Created
June 20, 2012 12:21
-
-
Save fjolnir/2959644 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
captureMePlease = "hey I was defined in the root! " | |
a = { :arg | | |
block = { :arg | | |
arg = arg stringByAppendingString:captureMePlease. | |
return arg. | |
} | |
return (block:arg.). | |
} | |
myBlock = a | |
numAsStr = a:(321 stringValue.). | |
numAsStr = numAsStr stringByAppendingString:" Three Two One". | |
return (myBlock:numAsStr.). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% build/tranquil < calltest.tq | |
2012-06-20 21:19:26.190 tranquil[36940:707] <prog@ | |
<blk@ { | |
<op@ <var@ captureMePlease> = <str@ "hey I was defined in the root! ">> | |
<op@ <var@ a> = <blk@ {<argdef@ (null): __blk> <argdef@ (null): arg> | | |
<op@ <var@ block> = <blk@ {<argdef@ (null): __blk> <argdef@ (null): arg> | | |
<op@ <var@ arg> = <msg@ <var@ arg> <arg@ stringByAppendingString: <var@ captureMePlease>> .>> | |
<ret@ <var@ arg>> | |
}>> | |
<ret@ <call@ <var@ block>: <arg@ (null): <var@ arg>> .>> | |
}>> | |
<op@ <var@ myBlock> = <var@ a>> | |
<op@ <var@ numAsStr> = <call@ <var@ a>: <arg@ (null): <msg@ <num@ 321.000000> <arg@ stringValue: (null)> .>> .>> | |
<op@ <var@ numAsStr> = <msg@ <var@ numAsStr> <arg@ stringByAppendingString: <str@ " Three Two One">> .>> | |
<ret@ <call@ <var@ myBlock>: <arg@ (null): <var@ numAsStr>> .>> | |
}> | |
}> | |
2012-06-20 21:19:26.190 tranquil[36940:707] ------------------------------------------ | |
2012-06-20 21:19:26.191 tranquil[36940:707] > Assigning to <var@ captureMePlease> | |
2012-06-20 21:19:26.192 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.193 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.193 tranquil[36940:707] > Assigning to <var@ a> | |
2012-06-20 21:19:26.194 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.195 tranquil[36940:707] registering arg local arg: <var@ arg> | |
2012-06-20 21:19:26.195 tranquil[36940:707] > Assigning to <var@ block> | |
2012-06-20 21:19:26.196 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.197 tranquil[36940:707] registering arg local arg: <var@ arg> | |
2012-06-20 21:19:26.197 tranquil[36940:707] > Assigning to <var@ arg> | |
2012-06-20 21:19:26.198 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.198 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.199 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.199 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.200 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.201 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.202 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.202 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.203 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.204 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.205 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.205 tranquil[36940:707] > Assigning to <var@ myBlock> | |
2012-06-20 21:19:26.206 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.206 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.207 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.207 tranquil[36940:707] > Assigning to <var@ numAsStr> | |
2012-06-20 21:19:26.208 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.209 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.209 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.210 tranquil[36940:707] > Assigning to <var@ numAsStr> | |
2012-06-20 21:19:26.210 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.211 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.211 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.212 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
2012-06-20 21:19:26.212 tranquil[36940:707] GETTING FORWARDING ----------------------------- | |
; ModuleID = 'Test' | |
%struct.__block_descriptor = type { i64, i64, i8*, i8* } | |
%struct._block_byref = type { i8*, i8*, i32, i32, i8*, i8*, i8* } | |
%struct.__block_literal_generic = type { i8*, i32, i32, i8*, %struct.__tq_block_descriptor* } | |
%struct.__tq_block_descriptor = type { i64, i64 } | |
@0 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@1 = private unnamed_addr constant [15 x i8] c"Invoking block\00" | |
@2 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@3 = private unnamed_addr constant [18 x i8] c"Loading arguments\00" | |
@4 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@5 = private unnamed_addr constant [17 x i8] c"Loading captures\00" | |
@6 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@7 = private unnamed_addr constant [21 x i8] c"Executing statements\00" | |
@className_NSMutableString = private unnamed_addr constant [16 x i8] c"NSMutableString\00" | |
@sel_stringWithUTF8String = private unnamed_addr constant [22 x i8] c"stringWithUTF8String:\00" | |
@8 = private unnamed_addr constant [32 x i8] c"hey I was defined in the root! \00" | |
@9 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@10 = private unnamed_addr constant [24 x i8] c"Storing captureMePlease\00" | |
@11 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@12 = private unnamed_addr constant [24 x i8] c"/Stored captureMePlease\00" | |
@13 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@14 = private unnamed_addr constant [15 x i8] c"Invoking block\00" | |
@15 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@16 = private unnamed_addr constant [18 x i8] c"Loading arguments\00" | |
@17 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@18 = private unnamed_addr constant [17 x i8] c"Loading captures\00" | |
@19 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@20 = private unnamed_addr constant [21 x i8] c"Executing statements\00" | |
@21 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@22 = private unnamed_addr constant [15 x i8] c"Invoking block\00" | |
@23 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@24 = private unnamed_addr constant [18 x i8] c"Loading arguments\00" | |
@25 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@26 = private unnamed_addr constant [17 x i8] c"Loading captures\00" | |
@27 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@28 = private unnamed_addr constant [21 x i8] c"Executing statements\00" | |
@selector = private unnamed_addr constant [25 x i8] c"stringByAppendingString:\00" | |
@29 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@30 = private unnamed_addr constant [10 x i8] c"Returning\00" | |
@_NSConcreteStackBlock = external global i8* | |
@31 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@32 = private unnamed_addr constant [14 x i8] c"Copying block\00" | |
@33 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@34 = private unnamed_addr constant [23 x i8] c"Copying block captures\00" | |
@35 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@36 = private unnamed_addr constant [14 x i8] c"/Copied block\00" | |
@37 = private unnamed_addr constant [4 x i8] c"@@@\00" | |
@__tq_block_descriptor_tmp = internal constant { i64, i64, void (i8*, i8*)*, void (i8*)*, i8* } { i64 0, i64 ptrtoint (<{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* getelementptr (<{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* null, i32 1) to i64), void (i8*, i8*)* @__tq_block_copy, void (i8*)* @__tq_block_dispose, i8* getelementptr inbounds ([4 x i8]* @37, i32 0, i32 0) } | |
@38 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@39 = private unnamed_addr constant [10 x i8] c"Returning\00" | |
@40 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@41 = private unnamed_addr constant [14 x i8] c"Copying block\00" | |
@42 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@43 = private unnamed_addr constant [23 x i8] c"Copying block captures\00" | |
@44 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@45 = private unnamed_addr constant [14 x i8] c"/Copied block\00" | |
@46 = private unnamed_addr constant [4 x i8] c"@@@\00" | |
@__tq_block_descriptor_tmp5 = internal constant { i64, i64, void (i8*, i8*)*, void (i8*)*, i8* } { i64 0, i64 ptrtoint (<{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* getelementptr (<{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* null, i32 1) to i64), void (i8*, i8*)* @__tq_block_copy3, void (i8*)* @__tq_block_dispose4, i8* getelementptr inbounds ([4 x i8]* @46, i32 0, i32 0) } | |
@selector6 = private unnamed_addr constant [12 x i8] c"stringValue\00" | |
@className_NSNumber = private unnamed_addr constant [9 x i8] c"NSNumber\00" | |
@sel_numberWithDouble = private unnamed_addr constant [18 x i8] c"numberWithDouble:\00" | |
@selector7 = private unnamed_addr constant [25 x i8] c"stringByAppendingString:\00" | |
@47 = private unnamed_addr constant [15 x i8] c" Three Two One\00" | |
@48 = private unnamed_addr constant [6 x i8] c"> %s\0A\00" | |
@49 = private unnamed_addr constant [10 x i8] c"Returning\00" | |
declare void @objc_allocateClassPair(i8*, i8*, i64) | |
declare void @objc_registerClassPair(i8*) | |
declare i8 @class_addIvar(i8*, i8*, i64, i8, i8*) | |
declare i8 @class_addMethod(i8*, i8*, i8*, i8*) | |
declare i8* @objc_msgSend(i8*, i8*, ...) | |
declare void @objc_storeStrong(i8**, i8*) | |
declare i8* @objc_storeWeak(i8**, i8*) | |
declare i8* @objc_loadWeak(i8**) | |
declare void @objc_destroyWeak(i8**) | |
declare i8* @objc_retain(i8*) | |
declare void @objc_release(i8*) | |
declare i8* @sel_registerName(i8*) | |
declare i8* @sel_getName(i8*) | |
declare i8* @objc_getClass(i8*) | |
declare i8* @_Block_copy(i8*) | |
declare void @_Block_object_assign(i8*, i8*, i32) | |
declare void @_Block_object_dispose(i8*, i32) | |
define i8* @__tq_block_invoke() { | |
entry: | |
%block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>, align 8 | |
%0 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @0, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8]* @1, i32 0, i32 0)) | |
%1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @2, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8]* @3, i32 0, i32 0)) | |
%2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @4, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8]* @5, i32 0, i32 0)) | |
%3 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @6, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8]* @7, i32 0, i32 0)) | |
%4 = call i8* @objc_getClass(i8* getelementptr inbounds ([16 x i8]* @className_NSMutableString, i32 0, i32 0)) | |
%5 = call i8* @sel_registerName(i8* getelementptr inbounds ([22 x i8]* @sel_stringWithUTF8String, i32 0, i32 0)) | |
%6 = call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %4, i8* %5, i8* getelementptr inbounds ([32 x i8]* @8, i32 0, i32 0)) | |
%7 = alloca %struct._block_byref | |
%8 = bitcast %struct._block_byref* %7 to i8* | |
%capture.forwarding = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 1 | |
store i8* %8, i8** %capture.forwarding | |
%capture.flags = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags | |
%capture.size = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size | |
%capture.byref_keep = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep | |
%capture.byref_dispose = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose | |
%capture.marked_variable = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable | |
%9 = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 1 | |
%forwarding = load i8** %9 | |
%forwardingCast = bitcast i8* %forwarding to %struct._block_byref* | |
%10 = getelementptr inbounds %struct._block_byref* %forwardingCast, i32 0, i32 6 | |
%11 = load i8** %10 | |
%12 = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 1 | |
%forwarding1 = load i8** %12 | |
%13 = bitcast i8* %forwarding1 to %struct._block_byref* | |
%storeAddr = getelementptr inbounds %struct._block_byref* %13, i32 0, i32 6 | |
store i8* %6, i8** %storeAddr | |
%14 = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 1 | |
%forwarding2 = load i8** %14 | |
%forwardingCast3 = bitcast i8* %forwarding2 to %struct._block_byref* | |
%15 = getelementptr inbounds %struct._block_byref* %forwardingCast3, i32 0, i32 6 | |
%16 = load i8** %15 | |
%block.isa = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i32 0, i32 0 | |
store i8* bitcast (i8** @_NSConcreteStackBlock to i8*), i8** %block.isa | |
%block.flags = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i32 0, i32 1 | |
store i32 1107296256, i32* %block.flags | |
%block.reserved = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i32 0, i32 2 | |
store i32 0, i32* %block.reserved | |
%block.invoke = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i32 0, i32 3 | |
store i8* bitcast (i8* (i8*, i8*)* @__tq_block_invoke1 to i8*), i8** %block.invoke | |
%block.descriptor = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i32 0, i32 4 | |
store %struct.__block_descriptor* bitcast ({ i64, i64, void (i8*, i8*)*, void (i8*)*, i8* }* @__tq_block_descriptor_tmp5 to %struct.__block_descriptor*), %struct.__block_descriptor** %block.descriptor | |
%17 = bitcast %struct._block_byref* %7 to i8* | |
%block.captureMePlease = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block, i32 0, i32 5 | |
store i8* %17, i8** %block.captureMePlease | |
%18 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %block to i8* | |
%19 = call i8* @_Block_copy(i8* %18) | |
%20 = alloca %struct._block_byref | |
%21 = bitcast %struct._block_byref* %20 to i8* | |
%capture.forwarding4 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
store i8* %21, i8** %capture.forwarding4 | |
%capture.flags5 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags5 | |
%capture.size6 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size6 | |
%capture.byref_keep7 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep7 | |
%capture.byref_dispose8 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose8 | |
%capture.marked_variable9 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable9 | |
%22 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding10 = load i8** %22 | |
%forwardingCast11 = bitcast i8* %forwarding10 to %struct._block_byref* | |
%23 = getelementptr inbounds %struct._block_byref* %forwardingCast11, i32 0, i32 6 | |
%24 = load i8** %23 | |
%25 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding12 = load i8** %25 | |
%26 = bitcast i8* %forwarding12 to %struct._block_byref* | |
%storeAddr13 = getelementptr inbounds %struct._block_byref* %26, i32 0, i32 6 | |
store i8* %19, i8** %storeAddr13 | |
%27 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding14 = load i8** %27 | |
%forwardingCast15 = bitcast i8* %forwarding14 to %struct._block_byref* | |
%28 = getelementptr inbounds %struct._block_byref* %forwardingCast15, i32 0, i32 6 | |
%29 = load i8** %28 | |
%30 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding16 = load i8** %30 | |
%forwardingCast17 = bitcast i8* %forwarding16 to %struct._block_byref* | |
%31 = getelementptr inbounds %struct._block_byref* %forwardingCast17, i32 0, i32 6 | |
%32 = load i8** %31 | |
%33 = alloca %struct._block_byref | |
%34 = bitcast %struct._block_byref* %33 to i8* | |
%capture.forwarding18 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 1 | |
store i8* %34, i8** %capture.forwarding18 | |
%capture.flags19 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags19 | |
%capture.size20 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size20 | |
%capture.byref_keep21 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep21 | |
%capture.byref_dispose22 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose22 | |
%capture.marked_variable23 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable23 | |
%35 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 1 | |
%forwarding24 = load i8** %35 | |
%forwardingCast25 = bitcast i8* %forwarding24 to %struct._block_byref* | |
%36 = getelementptr inbounds %struct._block_byref* %forwardingCast25, i32 0, i32 6 | |
%37 = load i8** %36 | |
%38 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 1 | |
%forwarding26 = load i8** %38 | |
%39 = bitcast i8* %forwarding26 to %struct._block_byref* | |
%storeAddr27 = getelementptr inbounds %struct._block_byref* %39, i32 0, i32 6 | |
store i8* %32, i8** %storeAddr27 | |
%40 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 1 | |
%forwarding28 = load i8** %40 | |
%forwardingCast29 = bitcast i8* %forwarding28 to %struct._block_byref* | |
%41 = getelementptr inbounds %struct._block_byref* %forwardingCast29, i32 0, i32 6 | |
%42 = load i8** %41 | |
%43 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding30 = load i8** %43 | |
%forwardingCast31 = bitcast i8* %forwarding30 to %struct._block_byref* | |
%44 = getelementptr inbounds %struct._block_byref* %forwardingCast31, i32 0, i32 6 | |
%45 = load i8** %44 | |
%46 = bitcast i8* %45 to %struct.__block_literal_generic* | |
%47 = getelementptr inbounds %struct.__block_literal_generic* %46, i32 0, i32 3 | |
%48 = call i8* @sel_registerName(i8* getelementptr inbounds ([12 x i8]* @selector6, i32 0, i32 0)) | |
%49 = call i8* @objc_getClass(i8* getelementptr inbounds ([9 x i8]* @className_NSNumber, i32 0, i32 0)) | |
%50 = call i8* @sel_registerName(i8* getelementptr inbounds ([18 x i8]* @sel_numberWithDouble, i32 0, i32 0)) | |
%51 = call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %49, i8* %50, double 3.210000e+02) | |
%52 = call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %51, i8* %48) | |
%53 = load i8** %47 | |
%54 = bitcast i8* %53 to i8* (i8*, i8*)* | |
%55 = call i8* %54(i8* %45, i8* %52) | |
%56 = alloca %struct._block_byref | |
%57 = bitcast %struct._block_byref* %56 to i8* | |
%capture.forwarding32 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
store i8* %57, i8** %capture.forwarding32 | |
%capture.flags33 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags33 | |
%capture.size34 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size34 | |
%capture.byref_keep35 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep35 | |
%capture.byref_dispose36 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose36 | |
%capture.marked_variable37 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable37 | |
%58 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding38 = load i8** %58 | |
%forwardingCast39 = bitcast i8* %forwarding38 to %struct._block_byref* | |
%59 = getelementptr inbounds %struct._block_byref* %forwardingCast39, i32 0, i32 6 | |
%60 = load i8** %59 | |
%61 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding40 = load i8** %61 | |
%62 = bitcast i8* %forwarding40 to %struct._block_byref* | |
%storeAddr41 = getelementptr inbounds %struct._block_byref* %62, i32 0, i32 6 | |
store i8* %55, i8** %storeAddr41 | |
%63 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding42 = load i8** %63 | |
%forwardingCast43 = bitcast i8* %forwarding42 to %struct._block_byref* | |
%64 = getelementptr inbounds %struct._block_byref* %forwardingCast43, i32 0, i32 6 | |
%65 = load i8** %64 | |
%66 = call i8* @sel_registerName(i8* getelementptr inbounds ([25 x i8]* @selector7, i32 0, i32 0)) | |
%67 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding44 = load i8** %67 | |
%forwardingCast45 = bitcast i8* %forwarding44 to %struct._block_byref* | |
%68 = getelementptr inbounds %struct._block_byref* %forwardingCast45, i32 0, i32 6 | |
%69 = load i8** %68 | |
%70 = call i8* @objc_getClass(i8* getelementptr inbounds ([16 x i8]* @className_NSMutableString, i32 0, i32 0)) | |
%71 = call i8* @sel_registerName(i8* getelementptr inbounds ([22 x i8]* @sel_stringWithUTF8String, i32 0, i32 0)) | |
%72 = call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %70, i8* %71, i8* getelementptr inbounds ([15 x i8]* @47, i32 0, i32 0)) | |
%73 = call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %69, i8* %66, i8* %72) | |
%74 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding46 = load i8** %74 | |
%forwardingCast47 = bitcast i8* %forwarding46 to %struct._block_byref* | |
%75 = getelementptr inbounds %struct._block_byref* %forwardingCast47, i32 0, i32 6 | |
%76 = load i8** %75 | |
%77 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding48 = load i8** %77 | |
%78 = bitcast i8* %forwarding48 to %struct._block_byref* | |
%storeAddr49 = getelementptr inbounds %struct._block_byref* %78, i32 0, i32 6 | |
store i8* %73, i8** %storeAddr49 | |
%79 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding50 = load i8** %79 | |
%forwardingCast51 = bitcast i8* %forwarding50 to %struct._block_byref* | |
%80 = getelementptr inbounds %struct._block_byref* %forwardingCast51, i32 0, i32 6 | |
%81 = load i8** %80 | |
%82 = getelementptr inbounds %struct._block_byref* %33, i32 0, i32 1 | |
%forwarding52 = load i8** %82 | |
%forwardingCast53 = bitcast i8* %forwarding52 to %struct._block_byref* | |
%83 = getelementptr inbounds %struct._block_byref* %forwardingCast53, i32 0, i32 6 | |
%84 = load i8** %83 | |
%85 = bitcast i8* %84 to %struct.__block_literal_generic* | |
%86 = getelementptr inbounds %struct.__block_literal_generic* %85, i32 0, i32 3 | |
%87 = getelementptr inbounds %struct._block_byref* %56, i32 0, i32 1 | |
%forwarding54 = load i8** %87 | |
%forwardingCast55 = bitcast i8* %forwarding54 to %struct._block_byref* | |
%88 = getelementptr inbounds %struct._block_byref* %forwardingCast55, i32 0, i32 6 | |
%89 = load i8** %88 | |
%90 = load i8** %86 | |
%91 = bitcast i8* %90 to i8* (i8*, i8*)* | |
%92 = call i8* %91(i8* %84, i8* %89) | |
%93 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @48, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @49, i32 0, i32 0)) | |
ret i8* %92 | |
} | |
declare i32 @printf(i8*, ...) | |
define void @__tq_byref_obj_keep_helper(i8*, i8*) { | |
entry: | |
%2 = alloca i8* | |
%3 = alloca i8* | |
store i8* %0, i8** %2 | |
store i8* %1, i8** %3 | |
%4 = load i8** %2 | |
%5 = bitcast i8* %4 to %struct._block_byref* | |
%6 = load i8** %3 | |
%7 = bitcast i8* %6 to %struct._block_byref* | |
%8 = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 6 | |
%9 = bitcast i8** %8 to i8* | |
%10 = getelementptr inbounds %struct._block_byref* %7, i32 0, i32 6 | |
%11 = load i8** %10 | |
%12 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @9, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8]* @10, i32 0, i32 0)) | |
call void @_Block_object_assign(i8* %9, i8* %11, i32 131) | |
%13 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @11, i32 0, i32 0), i8* getelementptr inbounds ([24 x i8]* @12, i32 0, i32 0)) | |
ret void | |
} | |
define i8* @__tq_block_invoke1(i8*, i8*) { | |
entry: | |
%block = alloca <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>, align 8 | |
%2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @13, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8]* @14, i32 0, i32 0)) | |
%3 = bitcast i8* %0 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* | |
%4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @15, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8]* @16, i32 0, i32 0)) | |
%5 = alloca %struct._block_byref | |
%6 = bitcast %struct._block_byref* %5 to i8* | |
%capture.forwarding = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
store i8* %6, i8** %capture.forwarding | |
%capture.flags = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags | |
%capture.size = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size | |
%capture.byref_keep = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep | |
%capture.byref_dispose = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose | |
%capture.marked_variable = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable | |
%7 = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
%forwarding = load i8** %7 | |
%forwardingCast = bitcast i8* %forwarding to %struct._block_byref* | |
%8 = getelementptr inbounds %struct._block_byref* %forwardingCast, i32 0, i32 6 | |
%9 = load i8** %8 | |
%10 = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
%forwarding1 = load i8** %10 | |
%11 = bitcast i8* %forwarding1 to %struct._block_byref* | |
%storeAddr = getelementptr inbounds %struct._block_byref* %11, i32 0, i32 6 | |
store i8* %1, i8** %storeAddr | |
%12 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @17, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8]* @18, i32 0, i32 0)) | |
%13 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %3, i32 0, i32 5 | |
%captureMePlease = load i8** %13 | |
%14 = bitcast i8* %captureMePlease to %struct._block_byref* | |
%15 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @19, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8]* @20, i32 0, i32 0)) | |
%block.isa = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 0 | |
store i8* bitcast (i8** @_NSConcreteStackBlock to i8*), i8** %block.isa | |
%block.flags = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 1 | |
store i32 1107296256, i32* %block.flags | |
%block.reserved = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 2 | |
store i32 0, i32* %block.reserved | |
%block.invoke = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 3 | |
store i8* bitcast (i8* (i8*, i8*)* @__tq_block_invoke2 to i8*), i8** %block.invoke | |
%block.descriptor = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 4 | |
store %struct.__block_descriptor* bitcast ({ i64, i64, void (i8*, i8*)*, void (i8*)*, i8* }* @__tq_block_descriptor_tmp to %struct.__block_descriptor*), %struct.__block_descriptor** %block.descriptor | |
%16 = bitcast %struct._block_byref* %5 to i8* | |
%block.arg = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 5 | |
store i8* %16, i8** %block.arg | |
%17 = bitcast %struct._block_byref* %14 to i8* | |
%block.captureMePlease = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block, i32 0, i32 6 | |
store i8* %17, i8** %block.captureMePlease | |
%18 = bitcast <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %block to i8* | |
%19 = call i8* @_Block_copy(i8* %18) | |
%20 = alloca %struct._block_byref | |
%21 = bitcast %struct._block_byref* %20 to i8* | |
%capture.forwarding2 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
store i8* %21, i8** %capture.forwarding2 | |
%capture.flags3 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags3 | |
%capture.size4 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size4 | |
%capture.byref_keep5 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep5 | |
%capture.byref_dispose6 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose6 | |
%capture.marked_variable7 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable7 | |
%22 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding8 = load i8** %22 | |
%forwardingCast9 = bitcast i8* %forwarding8 to %struct._block_byref* | |
%23 = getelementptr inbounds %struct._block_byref* %forwardingCast9, i32 0, i32 6 | |
%24 = load i8** %23 | |
%25 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding10 = load i8** %25 | |
%26 = bitcast i8* %forwarding10 to %struct._block_byref* | |
%storeAddr11 = getelementptr inbounds %struct._block_byref* %26, i32 0, i32 6 | |
store i8* %19, i8** %storeAddr11 | |
%27 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding12 = load i8** %27 | |
%forwardingCast13 = bitcast i8* %forwarding12 to %struct._block_byref* | |
%28 = getelementptr inbounds %struct._block_byref* %forwardingCast13, i32 0, i32 6 | |
%29 = load i8** %28 | |
%30 = getelementptr inbounds %struct._block_byref* %20, i32 0, i32 1 | |
%forwarding14 = load i8** %30 | |
%forwardingCast15 = bitcast i8* %forwarding14 to %struct._block_byref* | |
%31 = getelementptr inbounds %struct._block_byref* %forwardingCast15, i32 0, i32 6 | |
%32 = load i8** %31 | |
%33 = bitcast i8* %32 to %struct.__block_literal_generic* | |
%34 = getelementptr inbounds %struct.__block_literal_generic* %33, i32 0, i32 3 | |
%35 = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
%forwarding16 = load i8** %35 | |
%forwardingCast17 = bitcast i8* %forwarding16 to %struct._block_byref* | |
%36 = getelementptr inbounds %struct._block_byref* %forwardingCast17, i32 0, i32 6 | |
%37 = load i8** %36 | |
%38 = load i8** %34 | |
%39 = bitcast i8* %38 to i8* (i8*, i8*)* | |
%40 = call i8* %39(i8* %32, i8* %37) | |
%41 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @38, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @39, i32 0, i32 0)) | |
ret i8* %40 | |
} | |
define i8* @__tq_block_invoke2(i8*, i8*) { | |
entry: | |
%2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @21, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8]* @22, i32 0, i32 0)) | |
%3 = bitcast i8* %0 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* | |
%4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @23, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8]* @24, i32 0, i32 0)) | |
%5 = alloca %struct._block_byref | |
%6 = bitcast %struct._block_byref* %5 to i8* | |
%capture.forwarding = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
store i8* %6, i8** %capture.forwarding | |
%capture.flags = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 2 | |
store i32 33554432, i32* %capture.flags | |
%capture.size = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 3 | |
store i32 ptrtoint (%struct._block_byref* getelementptr (%struct._block_byref* null, i32 1) to i32), i32* %capture.size | |
%capture.byref_keep = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 4 | |
store i8* bitcast (void (i8*, i8*)* @__tq_byref_obj_keep_helper to i8*), i8** %capture.byref_keep | |
%capture.byref_dispose = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 5 | |
store i8* null, i8** %capture.byref_dispose | |
%capture.marked_variable = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 6 | |
store i8* null, i8** %capture.marked_variable | |
%7 = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
%forwarding = load i8** %7 | |
%forwardingCast = bitcast i8* %forwarding to %struct._block_byref* | |
%8 = getelementptr inbounds %struct._block_byref* %forwardingCast, i32 0, i32 6 | |
%9 = load i8** %8 | |
%10 = getelementptr inbounds %struct._block_byref* %5, i32 0, i32 1 | |
%forwarding1 = load i8** %10 | |
%11 = bitcast i8* %forwarding1 to %struct._block_byref* | |
%storeAddr = getelementptr inbounds %struct._block_byref* %11, i32 0, i32 6 | |
store i8* %1, i8** %storeAddr | |
%12 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @25, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8]* @26, i32 0, i32 0)) | |
%13 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %3, i32 0, i32 5 | |
%arg = load i8** %13 | |
%14 = bitcast i8* %arg to %struct._block_byref* | |
%15 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %3, i32 0, i32 6 | |
%captureMePlease = load i8** %15 | |
%16 = bitcast i8* %captureMePlease to %struct._block_byref* | |
%17 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @27, i32 0, i32 0), i8* getelementptr inbounds ([21 x i8]* @28, i32 0, i32 0)) | |
%18 = call i8* @sel_registerName(i8* getelementptr inbounds ([25 x i8]* @selector, i32 0, i32 0)) | |
%19 = getelementptr inbounds %struct._block_byref* %14, i32 0, i32 1 | |
%forwarding2 = load i8** %19 | |
%forwardingCast3 = bitcast i8* %forwarding2 to %struct._block_byref* | |
%20 = getelementptr inbounds %struct._block_byref* %forwardingCast3, i32 0, i32 6 | |
%21 = load i8** %20 | |
%22 = getelementptr inbounds %struct._block_byref* %16, i32 0, i32 1 | |
%forwarding4 = load i8** %22 | |
%forwardingCast5 = bitcast i8* %forwarding4 to %struct._block_byref* | |
%23 = getelementptr inbounds %struct._block_byref* %forwardingCast5, i32 0, i32 6 | |
%24 = load i8** %23 | |
%25 = call i8* (i8*, i8*, ...)* @objc_msgSend(i8* %21, i8* %18, i8* %24) | |
%26 = getelementptr inbounds %struct._block_byref* %14, i32 0, i32 1 | |
%forwarding6 = load i8** %26 | |
%forwardingCast7 = bitcast i8* %forwarding6 to %struct._block_byref* | |
%27 = getelementptr inbounds %struct._block_byref* %forwardingCast7, i32 0, i32 6 | |
%28 = load i8** %27 | |
%29 = getelementptr inbounds %struct._block_byref* %14, i32 0, i32 1 | |
%forwarding8 = load i8** %29 | |
%30 = bitcast i8* %forwarding8 to %struct._block_byref* | |
%storeAddr9 = getelementptr inbounds %struct._block_byref* %30, i32 0, i32 6 | |
store i8* %25, i8** %storeAddr9 | |
%31 = getelementptr inbounds %struct._block_byref* %14, i32 0, i32 1 | |
%forwarding10 = load i8** %31 | |
%forwardingCast11 = bitcast i8* %forwarding10 to %struct._block_byref* | |
%32 = getelementptr inbounds %struct._block_byref* %forwardingCast11, i32 0, i32 6 | |
%33 = load i8** %32 | |
%34 = getelementptr inbounds %struct._block_byref* %14, i32 0, i32 1 | |
%forwarding12 = load i8** %34 | |
%forwardingCast13 = bitcast i8* %forwarding12 to %struct._block_byref* | |
%35 = getelementptr inbounds %struct._block_byref* %forwardingCast13, i32 0, i32 6 | |
%36 = load i8** %35 | |
%37 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @29, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8]* @30, i32 0, i32 0)) | |
ret i8* %36 | |
} | |
define void @__tq_block_copy(i8*, i8*) { | |
entry: | |
%2 = alloca i8* | |
%3 = alloca i8* | |
%4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @31, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8]* @32, i32 0, i32 0)) | |
store i8* %0, i8** %2 | |
store i8* %1, i8** %3 | |
%5 = load i8** %2 | |
%dstBlk = bitcast i8* %5 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* | |
%6 = load i8** %3 | |
%srcBlk = bitcast i8* %6 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* | |
%7 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @33, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8]* @34, i32 0, i32 0)) | |
%8 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %dstBlk, i32 0, i32 5 | |
%9 = bitcast i8** %8 to i8* | |
%10 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %srcBlk, i32 0, i32 5 | |
%arg = load i8** %10 | |
call void @_Block_object_assign(i8* %9, i8* %arg, i32 8) | |
%11 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %dstBlk, i32 0, i32 6 | |
%12 = bitcast i8** %11 to i8* | |
%13 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %srcBlk, i32 0, i32 6 | |
%captureMePlease = load i8** %13 | |
call void @_Block_object_assign(i8* %12, i8* %captureMePlease, i32 8) | |
%14 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @35, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8]* @36, i32 0, i32 0)) | |
ret void | |
} | |
define void @__tq_block_dispose(i8*) { | |
entry: | |
%1 = alloca i8* | |
store i8* %0, i8** %1 | |
%2 = load i8** %1 | |
%blk = bitcast i8* %2 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* | |
%3 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %blk, i32 0, i32 5 | |
%arg = load i8** %3 | |
call void @_Block_object_dispose(i8* %arg, i32 8) | |
%4 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8*, i8* }>* %blk, i32 0, i32 6 | |
%captureMePlease = load i8** %4 | |
call void @_Block_object_dispose(i8* %captureMePlease, i32 8) | |
ret void | |
} | |
define void @__tq_block_copy3(i8*, i8*) { | |
entry: | |
%2 = alloca i8* | |
%3 = alloca i8* | |
%4 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @40, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8]* @41, i32 0, i32 0)) | |
store i8* %0, i8** %2 | |
store i8* %1, i8** %3 | |
%5 = load i8** %2 | |
%dstBlk = bitcast i8* %5 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* | |
%6 = load i8** %3 | |
%srcBlk = bitcast i8* %6 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* | |
%7 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @42, i32 0, i32 0), i8* getelementptr inbounds ([23 x i8]* @43, i32 0, i32 0)) | |
%8 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %dstBlk, i32 0, i32 5 | |
%9 = bitcast i8** %8 to i8* | |
%10 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %srcBlk, i32 0, i32 5 | |
%captureMePlease = load i8** %10 | |
call void @_Block_object_assign(i8* %9, i8* %captureMePlease, i32 8) | |
%11 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @44, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8]* @45, i32 0, i32 0)) | |
ret void | |
} | |
define void @__tq_block_dispose4(i8*) { | |
entry: | |
%1 = alloca i8* | |
store i8* %0, i8** %1 | |
%2 = load i8** %1 | |
%blk = bitcast i8* %2 to <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* | |
%3 = getelementptr inbounds <{ i8*, i32, i32, i8*, %struct.__block_descriptor*, i8* }>* %blk, i32 0, i32 5 | |
%captureMePlease = load i8** %3 | |
call void @_Block_object_dispose(i8* %captureMePlease, i32 8) | |
ret void | |
} | |
--------------------- | |
> Invoking block | |
> Loading arguments | |
> Loading captures | |
> Executing statements | |
> Copying block | |
> Copying block captures | |
> Storing captureMePlease | |
> /Stored captureMePlease | |
> /Copied block | |
> Invoking block | |
> Loading arguments | |
> Loading captures | |
> Executing statements | |
> Copying block | |
> Copying block captures | |
> Storing captureMePlease | |
> /Stored captureMePlease | |
> /Copied block | |
> Invoking block | |
> Loading arguments | |
> Loading captures | |
> Executing statements | |
> Returning | |
> Returning | |
> Invoking block | |
> Loading arguments | |
> Loading captures | |
> Executing statements | |
> Copying block | |
> Copying block captures | |
> Storing captureMePlease | |
> /Stored captureMePlease | |
> /Copied block | |
> Invoking block | |
> Loading arguments | |
> Loading captures | |
> Executing statements | |
> Returning | |
> Returning | |
> Returning | |
2012-06-20 21:19:26.326 tranquil[36940:707] Run time: 0.000178 sec | |
2012-06-20 21:19:26.326 tranquil[36940:707] 0x7f83c9b05110 | |
2012-06-20 21:19:26.327 tranquil[36940:707] 'root' retval: 0x7f83c9b05110: 321hey I was defined in the root! Three Two Onehey I was defined in the root! (__NSCFString) | |
% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment