|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_1" [label="1: Start Boxing_getBool\nFormals: self:Boxing*\nLocals: n:NSNumber* \n DECLARE_LOCALS(&return,&n); [line 36, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_1" -> "getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_4" ;
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_2" [label="2: Exit Boxing_getBool \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_3" [label="3: Return Stmt \n n$12=_fun_NSNumber_numberWithBool:(1:_Bool) [line 38, column 10]\n *&return:NSNumber*=n$12 [line 38, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_3" -> "getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_2" ;
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_4" [label="4: DeclStmt \n n$13=_fun_NSNumber_numberWithBool:(1:_Bool) [line 37, column 17]\n *&n:NSNumber*=n$13 [line 37, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_4" -> "getBool#Boxing#instance.3315ec58788820860ec4adc889dd7197_3" ;
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_1" [label="1: Start Boxing_getDouble\nFormals: self:Boxing*\nLocals: n:NSNumber* \n DECLARE_LOCALS(&return,&n); [line 31, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_1" -> "getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_4" ;
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_2" [label="2: Exit Boxing_getDouble \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_3" [label="3: Return Stmt \n n$10=_fun_NSNumber_numberWithDouble:(1.5:double) [line 33, column 10]\n *&return:NSNumber*=n$10 [line 33, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_3" -> "getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_2" ;
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_4" [label="4: DeclStmt \n n$11=_fun_NSNumber_numberWithDouble:(1.5:double) [line 32, column 17]\n *&n:NSNumber*=n$11 [line 32, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_4" -> "getDouble#Boxing#instance.d2ccf367cc9eb4c0b5e345694f262070_3" ;
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_1" [label="1: Start Boxing_getFloat\nFormals: self:Boxing*\nLocals: n:NSNumber* \n DECLARE_LOCALS(&return,&n); [line 26, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_1" -> "getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_4" ;
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_2" [label="2: Exit Boxing_getFloat \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_3" [label="3: Return Stmt \n n$8=_fun_NSNumber_numberWithFloat:(1.5:float) [line 28, column 10]\n *&return:NSNumber*=n$8 [line 28, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_3" -> "getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_2" ;
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_4" [label="4: DeclStmt \n n$9=_fun_NSNumber_numberWithFloat:(1.5:float) [line 27, column 17]\n *&n:NSNumber*=n$9 [line 27, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_4" -> "getFloat#Boxing#instance.3de027274316c0cdfd230c6dbd0333a0_3" ;
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_1" [label="1: Start Boxing_getInt\nFormals: self:Boxing*\nLocals: n:NSNumber* \n DECLARE_LOCALS(&return,&n); [line 21, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_1" -> "getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_4" ;
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_2" [label="2: Exit Boxing_getInt \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_3" [label="3: Return Stmt \n n$6=_fun_NSNumber_numberWithInt:(5:int) [line 23, column 10]\n *&return:NSNumber*=n$6 [line 23, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_3" -> "getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_2" ;
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_4" [label="4: DeclStmt \n n$7=_fun_NSNumber_numberWithInt:(5:int) [line 22, column 17]\n *&n:NSNumber*=n$7 [line 22, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_4" -> "getInt#Boxing#instance.6b1205ea87bb285944ca74c0597dcf85_3" ;
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_1" [label="1: Start Boxing_getIntExp\nFormals: self:Boxing*\nLocals: n:NSNumber* y:int x:int \n DECLARE_LOCALS(&return,&n,&y,&x); [line 14, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_1" -> "getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_6" ;
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_2" [label="2: Exit Boxing_getIntExp \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_3" [label="3: Return Stmt \n n$0=*&x:int [line 18, column 12]\n n$1=*&y:int [line 18, column 16]\n n$2=_fun_NSNumber_numberWithInt:((n$0 + n$1):int) [line 18, column 10]\n *&return:NSNumber*=n$2 [line 18, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_3" -> "getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_2" ;
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_4" [label="4: DeclStmt \n n$3=*&x:int [line 17, column 41]\n n$4=*&y:int [line 17, column 45]\n n$5=_fun_NSNumber_numberWithInt:((n$3 + n$4):int) [line 17, column 17]\n *&n:NSNumber*=n$5 [line 17, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_4" -> "getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_3" ;
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_5" [label="5: DeclStmt \n *&y:int=5 [line 16, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_5" -> "getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_4" ;
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_6" [label="6: DeclStmt \n *&x:int=4 [line 15, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_6" -> "getIntExp#Boxing#instance.1230c4f8d594629f186c72bd450c75b1_5" ;
|
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_1" [label="1: Start Boxing_getS\nFormals: self:Boxing*\nLocals: s:NSString* \n DECLARE_LOCALS(&return,&s); [line 41, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_1" -> "getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_4" ;
|
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_2" [label="2: Exit Boxing_getS \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" [label="3: Return Stmt \n n$15=_fun_NSString_stringWithUTF8String:(\"hello world\":char const *) [line 43, column 10]\n *&return:NSString*=n$15 [line 43, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" -> "getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_2" ;
|
[clang] enforce that `instruction` always returns one SIL expression
Summary:
Previously, the type of `trans_result` contained a list of SIL expressions.
However, most of the time we expect to get exactly one, and getting a different
number is a soft(!) error, usually returning `-1`.
This splits `trans_result` into `control`, which contains the information
needed for temporary computation (hence when we don't necessarily know the
return value yet), and a new version of `trans_result` that includes `control`,
the previous `exps` list but replaced by a single `return` expression instead,
and a couple other values that made sense to move out of `control`. This allows
some flexibility in the frontend compared to enforcing exactly one return
expression always: if they are not known yet we stick to `control` instead (see
eg `compute_controls_to_parent`).
This creates more garbage temporary identifiers, however they do not show up in
the final cfg. Instead, we see that temporary IDs are now often not
consecutive...
The most painful complication is in the treatment of `DeclRefExpr`, which was
actually returning *two* expressions: the method name and the `this` object.
Now the method name is a separate (optional) field in `trans_result`.
Reviewed By: mbouaziz
Differential Revision: D7881088
fbshipit-source-id: 41ad3b5
7 years ago
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_4" [label="4: DeclStmt \n n$16=_fun_strdup(\"hello world\":char const *) [line 42, column 19]\n n$17=_fun_NSString_stringWithUTF8String:(n$16:char const *) [line 42, column 17]\n *&s:NSString*=n$17 [line 42, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_4" -> "getS#Boxing#instance.97ccd331527b54376eb9b2b822cb25a3_3" ;
|
|
|
|
}
|