[frontend] Add autoreleasepool code block

Summary:
This diff translates

```
autoreleasepool {
  body;
}
```

into

```
_objc_autoreleasePoolPush();
body;
_objc_autoreleasePoolPop();
```

Reviewed By: ezgicicek

Differential Revision: D23478313

fbshipit-source-id: 313edd281
master
Sungkeun Cho 4 years ago committed by Facebook GitHub Bot
parent cf322a4e84
commit 44ff6df1d6

@ -85,6 +85,10 @@ let nsobject_cl = "NSObject"
let nsstring_cl = "NSString"
let objc_autorelease_pool_pop = "_objc_autoreleasePoolPop"
let objc_autorelease_pool_push = "_objc_autoreleasePoolPush"
let objc_class = "objc_class"
let objc_object = "objc_object"

@ -79,6 +79,10 @@ val nsobject_cl : string
val nsstring_cl : string
val objc_autorelease_pool_pop : string
val objc_autorelease_pool_push : string
val objc_class : string
val objc_object : string

@ -2990,6 +2990,27 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
assert false
and objCAutoreleasePoolStmt_trans trans_state stmt_info stmts =
let procdesc = trans_state.context.procdesc in
let location =
CLocation.location_of_stmt_info trans_state.context.translation_unit_context.source_file
stmt_info
in
let mk_call_node fname =
let ret = mk_fresh_void_id_typ () in
let pname = Procname.from_string_c_fun fname in
let instr = Sil.Call (ret, Const (Cfun pname), [], location, CallFlags.default) in
Procdesc.create_node procdesc location (Stmt_node (Call fname)) [instr]
in
let push_node = mk_call_node CFrontend_config.objc_autorelease_pool_push in
let pop_node = mk_call_node CFrontend_config.objc_autorelease_pool_pop in
let res_trans_body = compoundStmt_trans {trans_state with succ_nodes= [pop_node]} stmts in
Procdesc.set_succs push_node ~normal:(Some res_trans_body.control.root_nodes) ~exn:None ;
Procdesc.set_succs pop_node ~normal:(Some trans_state.succ_nodes) ~exn:None ;
mk_trans_result res_trans_body.return
{empty_control with root_nodes= [push_node]; leaf_nodes= [pop_node]}
and blockExpr_trans trans_state stmt_info expr_info decl =
let context = trans_state.context in
let outer_proc = Procdesc.get_proc_name context.CContext.procdesc in
@ -3796,8 +3817,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s
mk_trans_result (last_or_mk_fresh_void_exp_typ returns) control
| BlockExpr (stmt_info, _, expr_info, decl) ->
blockExpr_trans trans_state stmt_info expr_info decl
| ObjCAutoreleasePoolStmt (_, stmts) ->
compoundStmt_trans trans_state stmts
| ObjCAutoreleasePoolStmt (stmt_info, stmts) ->
objCAutoreleasePoolStmt_trans trans_state stmt_info stmts
| ObjCAtTryStmt (_, stmts) ->
compoundStmt_trans trans_state stmts
| CXXTryStmt (_, try_stmts) ->

@ -8,6 +8,7 @@ TESTS_DIR = ../../../..
CLANG_OPTIONS = -c $(OBJC_CLANG_OPTIONS) -fobjc-arc
SOURCES = \
../autoreleasepool/Autoreleasepool.m \
../if_and_arc/If_and_arc.m \
../predefined_expr/PredefinedExprExample.m \
../types/attributes.m \

@ -0,0 +1,40 @@
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
@interface Autoreleasepool : NSObject
@end
@implementation Autoreleasepool
- (void)test {
@autoreleasepool {
int i = 0;
}
}
- (void)test1 {
for (int i = 0; i < 10; i++) {
@autoreleasepool {
int i = 0;
}
}
}
- (void)test2 {
for (int i = 0; i < 10; i++) {
@autoreleasepool {
for (int j = 0; j < 10; j++) {
int k = 0;
}
}
}
}
@end

@ -0,0 +1,146 @@
/* @generated */
digraph cfg {
"dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_1" [label="1: Start Autoreleasepool.dealloc\nFormals: self:Autoreleasepool*\nLocals: \n " color=yellow style=filled]
"dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_1" -> "dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_3" ;
"dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_2" [label="2: Exit Autoreleasepool.dealloc \n " color=yellow style=filled]
"dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_3" [label="3: Call dealloc \n " shape="box"]
"dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_3" -> "dealloc#Autoreleasepool#instance.65b3873c13c8c3701384d7b6f48e27f7_2" ;
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_1" [label="1: Start Autoreleasepool.test\nFormals: self:Autoreleasepool*\nLocals: i:int \n " color=yellow style=filled]
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_1" -> "test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_3" ;
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_2" [label="2: Exit Autoreleasepool.test \n " color=yellow style=filled]
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_3" [label="3: Call _objc_autoreleasePoolPush \n n$0=_fun__objc_autoreleasePoolPush() [line 17, column 3]\n " shape="box"]
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_3" -> "test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_5" ;
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_4" [label="4: Call _objc_autoreleasePoolPop \n n$1=_fun__objc_autoreleasePoolPop() [line 17, column 3]\n " shape="box"]
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_4" -> "test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_2" ;
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_5" [label="5: DeclStmt \n VARIABLE_DECLARED(i:int); [line 18, column 5]\n *&i:int=0 [line 18, column 5]\n " shape="box"]
"test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_5" -> "test#Autoreleasepool#instance.17592bbc7bbec05b6df3b9d1e8a76b10_4" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_1" [label="1: Start Autoreleasepool.test1\nFormals: self:Autoreleasepool*\nLocals: i:int i:int \n " color=yellow style=filled]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_1" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_4" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_2" [label="2: Exit Autoreleasepool.test1 \n " color=yellow style=filled]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_3" [label="3: + \n " ]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_3" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_6" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_4" [label="4: DeclStmt \n VARIABLE_DECLARED(i:int); [line 23, column 8]\n *&i:int=0 [line 23, column 8]\n " shape="box"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_4" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_3" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_5" [label="5: UnaryOperator \n n$2=*&i:int [line 23, column 27]\n *&i:int=(n$2 + 1) [line 23, column 27]\n " shape="box"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_5" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_3" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_6" [label="6: BinaryOperatorStmt: LT \n n$3=*&i:int [line 23, column 19]\n " shape="box"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_6" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_7" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_6" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_8" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_7" [label="7: Prune (true branch, for loop) \n PRUNE((n$3 < 10), true); [line 23, column 19]\n " shape="invhouse"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_7" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_9" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_8" [label="8: Prune (false branch, for loop) \n PRUNE(!(n$3 < 10), false); [line 23, column 19]\n " shape="invhouse"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_8" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_2" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_9" [label="9: Call _objc_autoreleasePoolPush \n n$4=_fun__objc_autoreleasePoolPush() [line 24, column 5]\n " shape="box"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_9" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_11" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_10" [label="10: Call _objc_autoreleasePoolPop \n n$5=_fun__objc_autoreleasePoolPop() [line 24, column 5]\n " shape="box"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_10" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_5" ;
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_11" [label="11: DeclStmt \n VARIABLE_DECLARED(i:int); [line 25, column 7]\n *&i:int=0 [line 25, column 7]\n " shape="box"]
"test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_11" -> "test1#Autoreleasepool#instance.206a0aed2a32589ebf3507c0b44a4caf_10" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_1" [label="1: Start Autoreleasepool.test2\nFormals: self:Autoreleasepool*\nLocals: i:int j:int k:int \n " color=yellow style=filled]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_1" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_4" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_2" [label="2: Exit Autoreleasepool.test2 \n " color=yellow style=filled]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_3" [label="3: + \n " ]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_3" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_6" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_4" [label="4: DeclStmt \n VARIABLE_DECLARED(i:int); [line 31, column 8]\n *&i:int=0 [line 31, column 8]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_4" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_3" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_5" [label="5: UnaryOperator \n n$7=*&i:int [line 31, column 27]\n *&i:int=(n$7 + 1) [line 31, column 27]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_5" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_3" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_6" [label="6: BinaryOperatorStmt: LT \n n$8=*&i:int [line 31, column 19]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_6" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_7" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_6" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_8" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_7" [label="7: Prune (true branch, for loop) \n PRUNE((n$8 < 10), true); [line 31, column 19]\n " shape="invhouse"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_7" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_9" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_8" [label="8: Prune (false branch, for loop) \n PRUNE(!(n$8 < 10), false); [line 31, column 19]\n " shape="invhouse"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_8" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_2" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_9" [label="9: Call _objc_autoreleasePoolPush \n n$9=_fun__objc_autoreleasePoolPush() [line 32, column 5]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_9" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_12" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_10" [label="10: Call _objc_autoreleasePoolPop \n n$10=_fun__objc_autoreleasePoolPop() [line 32, column 5]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_10" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_5" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_11" [label="11: + \n " ]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_11" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_14" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_12" [label="12: DeclStmt \n VARIABLE_DECLARED(j:int); [line 33, column 12]\n *&j:int=0 [line 33, column 12]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_12" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_11" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_13" [label="13: UnaryOperator \n n$11=*&j:int [line 33, column 31]\n *&j:int=(n$11 + 1) [line 33, column 31]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_13" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_11" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_14" [label="14: BinaryOperatorStmt: LT \n n$12=*&j:int [line 33, column 23]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_14" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_15" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_14" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_16" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_15" [label="15: Prune (true branch, for loop) \n PRUNE((n$12 < 10), true); [line 33, column 23]\n " shape="invhouse"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_15" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_17" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_16" [label="16: Prune (false branch, for loop) \n PRUNE(!(n$12 < 10), false); [line 33, column 23]\n " shape="invhouse"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_16" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_10" ;
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_17" [label="17: DeclStmt \n VARIABLE_DECLARED(k:int); [line 34, column 9]\n *&k:int=0 [line 34, column 9]\n " shape="box"]
"test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_17" -> "test2#Autoreleasepool#instance.620673c62b0512b60564c16015598db8_13" ;
}

@ -7,10 +7,18 @@ digraph cfg {
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_2" [label="2: Exit super_example_main \n " color=yellow style=filled]
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_3" [label="3: DeclStmt \n VARIABLE_DECLARED(a:objc_object*); [line 40, column 5]\n n$0=_fun___objc_alloc_no_fail(sizeof(t=ASuper):unsigned long) [line 40, column 21]\n n$1=_fun_NSObject.init(n$0:ASuper*) virtual [line 40, column 21]\n *&a:objc_object*=n$1 [line 40, column 5]\n " shape="box"]
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_3" [label="3: Call _objc_autoreleasePoolPush \n n$0=_fun__objc_autoreleasePoolPush() [line 39, column 3]\n " shape="box"]
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_3" -> "super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_2" ;
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_3" -> "super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_5" ;
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_4" [label="4: Call _objc_autoreleasePoolPop \n n$1=_fun__objc_autoreleasePoolPop() [line 39, column 3]\n " shape="box"]
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_4" -> "super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_2" ;
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_5" [label="5: DeclStmt \n VARIABLE_DECLARED(a:objc_object*); [line 40, column 5]\n n$2=_fun___objc_alloc_no_fail(sizeof(t=ASuper):unsigned long) [line 40, column 21]\n n$3=_fun_NSObject.init(n$2:ASuper*) virtual [line 40, column 21]\n *&a:objc_object*=n$3 [line 40, column 5]\n " shape="box"]
"super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_5" -> "super_example_main.e3ebe95e6c5ae811733f235c29fbbf6d_4" ;
"dealloc#ASuper#instance.d4e2053955a905d19c2f334e81096e84_1" [label="1: Start ASuper.dealloc\nFormals: self:ASuper*\nLocals: \n " color=yellow style=filled]

@ -3,7 +3,7 @@ digraph cfg {
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_1" [label="1: Start autorelease_test1\nFormals: \nLocals: s3:Auto* s2:Auto* s1:Auto* \n " color=yellow style=filled]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_1" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_1" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_12" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_2" [label="2: Exit autorelease_test1 \n " color=yellow style=filled]
@ -11,38 +11,46 @@ digraph cfg {
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_3" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_2" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_4" [label="4: BinaryOperatorStmt: Assign \n n$0=_fun_createA() [line 40, column 10]\n *&s3:Auto*=n$0 [line 40, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_4" [label="4: Call _objc_autoreleasePoolPush \n n$0=_fun__objc_autoreleasePoolPush() [line 36, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_4" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_3" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_5" [label="5: BinaryOperatorStmt: Assign \n n$1=_fun_createA() [line 39, column 10]\n *&s2:Auto*=n$1 [line 39, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_4" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_5" [label="5: Call _objc_autoreleasePoolPop \n n$1=_fun__objc_autoreleasePoolPop() [line 36, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_5" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_4" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_6" [label="6: Message Call: retain \n n$2=*&s1:Auto* [line 38, column 6]\n n$3=_fun_NSObject.retain(n$2:Auto*) virtual [line 38, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_5" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_3" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_6" [label="6: BinaryOperatorStmt: Assign \n n$2=_fun_createA() [line 40, column 10]\n *&s3:Auto*=n$2 [line 40, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_6" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_5" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_7" [label="7: BinaryOperatorStmt: Assign \n n$4=_fun_createA() [line 37, column 10]\n *&s1:Auto*=n$4 [line 37, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_7" [label="7: BinaryOperatorStmt: Assign \n n$3=_fun_createA() [line 39, column 10]\n *&s2:Auto*=n$3 [line 39, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_7" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_6" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_8" [label="8: DeclStmt \n VARIABLE_DECLARED(s3:Auto*); [line 35, column 3]\n *&s3:Auto*=null [line 35, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_8" [label="8: Message Call: retain \n n$4=*&s1:Auto* [line 38, column 6]\n n$5=_fun_NSObject.retain(n$4:Auto*) virtual [line 38, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_8" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_7" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" [label="9: DeclStmt \n VARIABLE_DECLARED(s2:Auto*); [line 34, column 3]\n *&s2:Auto*=null [line 34, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" [label="9: BinaryOperatorStmt: Assign \n n$6=_fun_createA() [line 37, column 10]\n *&s1:Auto*=n$6 [line 37, column 5]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_8" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" [label="10: DeclStmt \n VARIABLE_DECLARED(s1:Auto*); [line 33, column 3]\n *&s1:Auto*=null [line 33, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" [label="10: DeclStmt \n VARIABLE_DECLARED(s3:Auto*); [line 35, column 3]\n *&s3:Auto*=null [line 35, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_9" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_4" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_11" [label="11: DeclStmt \n VARIABLE_DECLARED(s2:Auto*); [line 34, column 3]\n *&s2:Auto*=null [line 34, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_11" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_10" ;
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_12" [label="12: DeclStmt \n VARIABLE_DECLARED(s1:Auto*); [line 33, column 3]\n *&s1:Auto*=null [line 33, column 3]\n " shape="box"]
"autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_12" -> "autorelease_test1.8f3499e28c7129f0f6b2300d214d7864_11" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_1" [label="1: Start autorelease_test2\nFormals: \nLocals: s3:Auto* s2:Auto* s1:Auto* \n " color=yellow style=filled]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_1" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_1" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_11" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_2" [label="2: Exit autorelease_test2 \n " color=yellow style=filled]
@ -50,30 +58,38 @@ digraph cfg {
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_3" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_2" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_4" [label="4: BinaryOperatorStmt: Assign \n n$0=_fun_createA() [line 52, column 10]\n *&s3:Auto*=n$0 [line 52, column 5]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_4" [label="4: Call _objc_autoreleasePoolPush \n n$0=_fun__objc_autoreleasePoolPush() [line 49, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_4" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_3" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_5" [label="5: BinaryOperatorStmt: Assign \n n$1=_fun_createA() [line 51, column 10]\n *&s2:Auto*=n$1 [line 51, column 5]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_4" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_5" [label="5: Call _objc_autoreleasePoolPop \n n$1=_fun__objc_autoreleasePoolPop() [line 49, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_5" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_4" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_6" [label="6: BinaryOperatorStmt: Assign \n n$2=_fun_createA() [line 50, column 10]\n *&s1:Auto*=n$2 [line 50, column 5]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_5" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_3" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_6" [label="6: BinaryOperatorStmt: Assign \n n$2=_fun_createA() [line 52, column 10]\n *&s3:Auto*=n$2 [line 52, column 5]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_6" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_5" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_7" [label="7: DeclStmt \n VARIABLE_DECLARED(s3:Auto*); [line 48, column 3]\n *&s3:Auto*=null [line 48, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_7" [label="7: BinaryOperatorStmt: Assign \n n$3=_fun_createA() [line 51, column 10]\n *&s2:Auto*=n$3 [line 51, column 5]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_7" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_6" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" [label="8: DeclStmt \n VARIABLE_DECLARED(s2:Auto*); [line 47, column 3]\n *&s2:Auto*=null [line 47, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" [label="8: BinaryOperatorStmt: Assign \n n$4=_fun_createA() [line 50, column 10]\n *&s1:Auto*=n$4 [line 50, column 5]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_7" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" [label="9: DeclStmt \n VARIABLE_DECLARED(s1:Auto*); [line 46, column 3]\n *&s1:Auto*=null [line 46, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" [label="9: DeclStmt \n VARIABLE_DECLARED(s3:Auto*); [line 48, column 3]\n *&s3:Auto*=null [line 48, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_4" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_10" [label="10: DeclStmt \n VARIABLE_DECLARED(s2:Auto*); [line 47, column 3]\n *&s2:Auto*=null [line 47, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_10" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_11" [label="11: DeclStmt \n VARIABLE_DECLARED(s1:Auto*); [line 46, column 3]\n *&s1:Auto*=null [line 46, column 3]\n " shape="box"]
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_9" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_8" ;
"autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_11" -> "autorelease_test2.d978c6e21f1931e19bc731b4ffb90225_10" ;
"autorelease_test3.5fa2e6ceb6075e26a47f9b8c9cdf65ba_1" [label="1: Start autorelease_test3\nFormals: \nLocals: c:NSString* string:NSString* pool:NSAutoreleasePool* \n " color=yellow style=filled]

Loading…
Cancel
Save