|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_1" [label="1: Start call_method_with_default_parameters\nFormals: \nLocals: a_ptr:A* \n DECLARE_LOCALS(&return,&a_ptr); [line 16, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_1" -> "call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_5" ;
|
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_2" [label="2: Exit call_method_with_default_parameters \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
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_3" [label="3: Call _fun_A_fun_default \n n$1=*&a_ptr:A* [line 20, column 3]\n _=*n$1:A [line 20, column 3]\n n$3=_fun_A_fun_default(n$1:A*,1:int,10:int,20:int) [line 20, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_3" -> "call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_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
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_4" [label="4: Call _fun_A_fun_default \n n$4=*&a_ptr:A* [line 19, column 3]\n _=*n$4:A [line 19, column 3]\n n$6=_fun_A_fun_default(n$4:A*,1:int,2:int,20:int) [line 19, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_4" -> "call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_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
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_5" [label="5: Call _fun_A_fun_default \n n$7=*&a_ptr:A* [line 18, column 3]\n _=*n$7:A [line 18, column 3]\n n$9=_fun_A_fun_default(n$7:A*,1:int,2:int,3:int) [line 18, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_5" -> "call_method_with_default_parameters#7436997991634263214.eaaed1a0020d12e677ebd0f9049f2e4a_4" ;
|
|
|
|
"fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_1" [label="1: Start A_fun_default\nFormals: this:A* a:int b:int c:int\nLocals: \n DECLARE_LOCALS(&return); [line 13, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_1" -> "fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_3" ;
|
|
|
|
"fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_2" [label="2: Exit A_fun_default \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_3" [label="3: Return Stmt \n n$0=*&a:int [line 13, column 59]\n n$1=*&b:int [line 13, column 63]\n n$2=*&c:int [line 13, column 67]\n *&return:int=((n$0 + n$1) + n$2) [line 13, column 52]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_3" -> "fun_default#A#(5743605731228394805).32785ab130b2379c4e3e1b8b23953e73_2" ;
|
|
|
|
}
|