|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_1" [label="1: Start A_test4:\nFormals: self:A* x:int\nLocals: \n DECLARE_LOCALS(&return); [line 19, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_1" -> "test4:#A#instance.718a300d6fa63609a70f22221a548ee5_3" ;
|
|
|
|
"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_2" [label="2: Exit A_test4: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_3" [label="3: Return Stmt \n n$0=*&x:int [line 20, column 10]\n *&return:int=n$0 [line 20, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_3" -> "test4:#A#instance.718a300d6fa63609a70f22221a548ee5_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
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_1" [label="1: Start A_test5:\nFormals: self:A* b:_Bool\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$1); [line 23, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_1" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_4" ;
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_1" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_5" ;
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_2" [label="2: Exit A_test5: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_3" [label="3: + \n " ]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_3" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_8" ;
|
[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
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_4" [label="4: Prune (true branch, boolean exp) \n n$2=*&b:_Bool [line 24, column 23]\n PRUNE(n$2, true); [line 24, column 23]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_4" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_6" ;
|
[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
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_5" [label="5: Prune (false branch, boolean exp) \n n$2=*&b:_Bool [line 24, column 23]\n PRUNE(!n$2, false); [line 24, column 23]\n " shape="invhouse"]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_5" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_7" ;
|
[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
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_6" [label="6: ConditionalStmt Branch \n n$3=*&b:_Bool [line 24, column 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int=n$3 [line 24, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_6" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_3" ;
|
[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
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_7" [label="7: ConditionalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int=1 [line 24, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_7" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_3" ;
|
[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
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_8" [label="8: Return Stmt \n n$5=*&self:A* [line 24, column 11]\n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 24, column 23]\n n$6=_fun_A_test4:(n$5:A*,n$4:int) virtual [line 24, column 10]\n *&return:int=n$6 [line 24, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"test5:#A#instance.4d6ac42705853160b533ab46b444624a_8" -> "test5:#A#instance.4d6ac42705853160b533ab46b444624a_2" ;
|
|
|
|
}
|