|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"get_array.bca6b16c85e5b8ba530f380271b2ec79_1" [label="1: Start get_array\nFormals: \nLocals: animals:NSArray* \n DECLARE_LOCALS(&return,&animals); [line 12, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array.bca6b16c85e5b8ba530f380271b2ec79_1" -> "get_array.bca6b16c85e5b8ba530f380271b2ec79_4" ;
|
|
|
|
"get_array.bca6b16c85e5b8ba530f380271b2ec79_2" [label="2: Exit get_array \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_array.bca6b16c85e5b8ba530f380271b2ec79_3" [label="3: Return Stmt \n n$1=_fun_NSString_stringWithUTF8String:(\"cat\":char* const ) [line 14, column 13]\n n$0=_fun_NSString_stringWithUTF8String:(\"dog\":char* const ) [line 14, column 21]\n n$2=_fun_NSArray_arrayWithObjects:count:(n$1:objc_object*,n$0:objc_object*,null:objc_object*) [line 14, column 10]\n *&return:NSArray*=n$2 [line 14, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array.bca6b16c85e5b8ba530f380271b2ec79_3" -> "get_array.bca6b16c85e5b8ba530f380271b2ec79_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
|
|
|
"get_array.bca6b16c85e5b8ba530f380271b2ec79_4" [label="4: DeclStmt \n n$4=_fun_NSString_stringWithUTF8String:(\"cat\":char* const ) [line 13, column 48]\n n$3=_fun_NSString_stringWithUTF8String:(\"dog\":char* const ) [line 13, column 56]\n n$5=_fun_NSArray_arrayWithObjects:(n$4:objc_object*,n$3:NSString*,null:void*) [line 13, column 22]\n *&animals:NSArray*=n$5 [line 13, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"get_array.bca6b16c85e5b8ba530f380271b2ec79_4" -> "get_array.bca6b16c85e5b8ba530f380271b2ec79_3" ;
|
|
|
|
}
|