|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"call_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_1" [label="1: Start call_with_forward_declaration\nFormals: x:XForward*\nLocals: \n DECLARE_LOCALS(&return); [line 35, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_1" -> "call_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_3" ;
|
|
|
|
"call_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_2" [label="2: Exit call_with_forward_declaration \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_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_3" [label="3: Call _fun_XForward_call \n n$1=*&x:XForward* [line 35, column 51]\n _=*n$1:XForward [line 35, column 51]\n n$3=_fun_XForward_call(n$1:XForward*) [line 35, column 51]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_3" -> "call_with_forward_declaration#16178135517860387666.7dab8d0b16e63b8b27f5ae7c5c45a070_2" ;
|
|
|
|
"getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_1" [label="1: Start getX\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 20, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_1" -> "getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_3" ;
|
|
|
|
"getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_2" [label="2: Exit getX \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_3" [label="3: Return Stmt \n *&return:X*=null [line 20, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_3" -> "getX#13708790503777666214.a992c0752db0283a341b47e16da10f48_2" ;
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_1" [label="1: Start npe_call\nFormals: \nLocals: x:X* \n DECLARE_LOCALS(&return,&x); [line 15, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_1" -> "npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_4" ;
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_2" [label="2: Exit npe_call \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_3" [label="3: Return Stmt \n n$0=*&x:X* [line 17, column 10]\n _=*n$0:X [line 17, column 10]\n n$2=_fun_X_call(n$0:X*) [line 17, column 10]\n *&return:int=n$2 [line 17, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_3" -> "npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_2" ;
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_4" [label="4: DeclStmt \n *&x:X*=null [line 16, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_4" -> "npe_call#13153501568930109452.8b51ea84ce0a673218a9c81b7ab70538_3" ;
|
|
|
|
"npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_1" [label="1: Start npe_call_after_call\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 22, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_1" -> "npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_3" ;
|
|
|
|
"npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_2" [label="2: Exit npe_call_after_call \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
|
|
|
"npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_3" [label="3: Call _fun_X_call \n n$1=_fun_getX() [line 22, column 30]\n _=*n$1:X [line 22, column 30]\n n$3=_fun_X_call(n$1:X*) [line 22, column 30]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_3" -> "npe_call_after_call#8140813350794705532.fd3a6d06275def8a130284a430f22a3d_2" ;
|
|
|
|
"npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_1" [label="1: Start npe_call_with_forward_declaration\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 37, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_1" -> "npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_3" ;
|
|
|
|
"npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_2" [label="2: Exit npe_call_with_forward_declaration \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
|
|
|
"npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_3" [label="3: Call _fun_call_with_forward_declaration \n n$1=_fun_call_with_forward_declaration(null:XForward*) [line 38, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_3" -> "npe_call_with_forward_declaration#12046983290123510130.5e902eb9a8f96f74e83d527b422bd861_2" ;
|
|
|
|
"call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_1" [label="1: Start X_call\nFormals: this:X*\nLocals: \n DECLARE_LOCALS(&return); [line 12, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_1" -> "call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_3" ;
|
|
|
|
"call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_2" [label="2: Exit X_call \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_3" [label="3: Return Stmt \n *&return:int=1 [line 12, column 16]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_3" -> "call#X#(5770224879682844394).d055b894c8e89eaff4b8d412706da082_2" ;
|
|
|
|
"call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_1" [label="1: Start XForward_call\nFormals: this:XForward*\nLocals: \n DECLARE_LOCALS(&return); [line 31, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_1" -> "call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_3" ;
|
|
|
|
"call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_2" [label="2: Exit XForward_call \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_3" [label="3: Return Stmt \n *&return:int=0 [line 31, column 16]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_3" -> "call#XForward#(12704523141681064974).3ad3a0c1410d3c3ebc30a3c69ad91790_2" ;
|
|
|
|
}
|