|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"get_array1.5988b7ad8acf5c81cef9a72d072073c1_1" [label="1: Start get_array1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 12, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array1.5988b7ad8acf5c81cef9a72d072073c1_1" -> "get_array1.5988b7ad8acf5c81cef9a72d072073c1_3" ;
|
|
|
|
"get_array1.5988b7ad8acf5c81cef9a72d072073c1_2" [label="2: Exit get_array1 \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
|
|
|
"get_array1.5988b7ad8acf5c81cef9a72d072073c1_3" [label="3: Return Stmt \n n$5=_fun_NSString_stringWithUTF8String:(\"Matt\":char* const ) [line 14, column 53]\n n$0=_fun_NSString_stringWithUTF8String:(\"firstName\":char* const ) [line 15, column 53]\n n$1=_fun_NSString_stringWithUTF8String:(\"Galloway\":char* const ) [line 16, column 53]\n n$2=_fun_NSString_stringWithUTF8String:(\"lastName\":char* const ) [line 17, column 53]\n n$3=_fun_NSNumber_numberWithInt:(28:int) [line 18, column 53]\n n$4=_fun_NSString_stringWithUTF8String:(\"age\":char* const ) [line 19, column 53]\n n$6=_fun_NSDictionary_dictionaryWithObjectsAndKeys:(n$5:objc_object*,n$0:NSString*,n$1:NSString*,n$2:NSString*,n$3:NSNumber*,n$4:NSString*,null:void*) [line 14, column 10]\n *&return:NSDictionary*=n$6 [line 14, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array1.5988b7ad8acf5c81cef9a72d072073c1_3" -> "get_array1.5988b7ad8acf5c81cef9a72d072073c1_2" ;
|
|
|
|
"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_1" [label="1: Start get_array2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 23, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_1" -> "get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_3" ;
|
|
|
|
"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_2" [label="2: Exit get_array2 \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
|
|
|
"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_3" [label="3: Return Stmt \n n$5=_fun_NSString_stringWithUTF8String:(\"Matt\":char* const ) [line 25, column 28]\n n$0=_fun_NSString_stringWithUTF8String:(\"firstName\":char* const ) [line 25, column 13]\n n$1=_fun_NSString_stringWithUTF8String:(\"Galloway\":char* const ) [line 25, column 51]\n n$2=_fun_NSString_stringWithUTF8String:(\"lastName\":char* const ) [line 25, column 37]\n n$3=_fun_NSNumber_numberWithInt:(28:int) [line 25, column 73]\n n$4=_fun_NSString_stringWithUTF8String:(\"age\":char* const ) [line 25, column 64]\n n$6=_fun_NSDictionary_dictionaryWithObjects:forKeys:count:(n$5:objc_object*,n$0:objc_object*,n$1:objc_object*,n$2:objc_object*,n$3:objc_object*,n$4:objc_object*,null:objc_object*) [line 25, column 10]\n *&return:NSDictionary*=n$6 [line 25, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_3" -> "get_array2.84aa3c70cb20e7edbe4f0b8d0bd6aa3d_2" ;
|
|
|
|
}
|