|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"derefFirstArg#11155233742091168443.dc9be6cfdd866625309f594a0c1a3bdc_1" [label="1: Start derefFirstArg\nFormals: a:int* b:int*\nLocals: \n DECLARE_LOCALS(&return); [line 19, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg#11155233742091168443.dc9be6cfdd866625309f594a0c1a3bdc_1" -> "derefFirstArg#11155233742091168443.dc9be6cfdd866625309f594a0c1a3bdc_2" ;
|
|
|
|
"derefFirstArg#11155233742091168443.dc9be6cfdd866625309f594a0c1a3bdc_2" [label="2: Exit derefFirstArg \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_1" [label="1: Start derefFirstArg2\nFormals: a:int* b:int*\nLocals: \n DECLARE_LOCALS(&return); [line 22, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_1" -> "derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_3" ;
|
|
|
|
"derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_2" [label="2: Exit derefFirstArg2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_3" [label="3: Return Stmt \n n$0=*&b:int* [line 26, column 11]\n n$1=*n$0:int [line 26, column 10]\n *&return:int=n$1 [line 26, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_3" -> "derefFirstArg2#11387624487828646016.9777f67ce8b8da5c99a0e59eaaf6eb17_2" ;
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_1" [label="1: Start derefFirstArg2_null_deref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 47, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_1" -> "derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_4" ;
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_2" [label="2: Exit derefFirstArg2_null_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_3" [label="3: Return Stmt \n n$0=*null:int [line 49, column 10]\n *&return:int=n$0 [line 49, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_3" -> "derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_2" ;
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_4" [label="4: DeclStmt \n *&a:int=0 [line 48, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_4" -> "derefFirstArg2_null_deref#13631548499595216278.23fca23ff6728e4b72a2548ecb3b1ba0_3" ;
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_1" [label="1: Start derefFirstArg2_ok_deref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 52, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_1" -> "derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_4" ;
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_2" [label="2: Exit derefFirstArg2_ok_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_3" [label="3: Return Stmt \n n$0=*&a:int [line 54, column 10]\n *&return:int=n$0 [line 54, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_3" -> "derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_2" ;
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_4" [label="4: DeclStmt \n *&a:int=0 [line 53, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_4" -> "derefFirstArg2_ok_deref#6873109919028202465.d57ab0b62c0ba18894b8b08d5a8f8e8a_3" ;
|
|
|
|
"derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_1" [label="1: Start derefFirstArg3\nFormals: a:int* b:int*\nLocals: \n DECLARE_LOCALS(&return); [line 31, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_1" -> "derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_3" ;
|
|
|
|
"derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_2" [label="2: Exit derefFirstArg3 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_3" [label="3: Return Stmt \n n$0=*&b:int* [line 33, column 11]\n n$1=*n$0:int [line 33, column 10]\n *&return:int=n$1 [line 33, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_3" -> "derefFirstArg3#3150650678378709003.fb38cf6b9238ba2f8f6e25136f8beb95_2" ;
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_1" [label="1: Start derefFirstArg3_null_deref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 62, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_1" -> "derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_4" ;
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_2" [label="2: Exit derefFirstArg3_null_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_3" [label="3: Return Stmt \n n$0=_fun_derefFirstArg3(&a:int*,null:int*) [line 64, column 10]\n *&return:int=n$0 [line 64, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_3" -> "derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_2" ;
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_4" [label="4: DeclStmt \n *&a:int=0 [line 63, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_4" -> "derefFirstArg3_null_deref#3036141491555788229.605788dbf5e3c5625520098d1b5d320e_3" ;
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_1" [label="1: Start derefFirstArg3_ok_deref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 57, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_1" -> "derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_4" ;
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_2" [label="2: Exit derefFirstArg3_ok_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_3" [label="3: Return Stmt \n n$0=_fun_derefFirstArg3(null:int*,&a:int*) [line 59, column 10]\n *&return:int=n$0 [line 59, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_3" -> "derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_2" ;
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_4" [label="4: DeclStmt \n *&a:int=0 [line 58, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_4" -> "derefFirstArg3_ok_deref#12266654054137171150.c58c85ea4ba2ebfd89d0336e51301e7a_3" ;
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_1" [label="1: Start derefFirstArg_null_deref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 37, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_1" -> "derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_4" ;
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_2" [label="2: Exit derefFirstArg_null_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_3" [label="3: Return Stmt \n n$0=*null:int [line 39, column 10]\n *&return:int=n$0 [line 39, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_3" -> "derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_2" ;
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_4" [label="4: DeclStmt \n *&a:int=0 [line 38, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_4" -> "derefFirstArg_null_deref#14830687999166111591.325df3347d8f75d0292cfd33a485d28a_3" ;
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_1" [label="1: Start derefFirstArg_ok_deref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 42, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_1" -> "derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_4" ;
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_2" [label="2: Exit derefFirstArg_ok_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_3" [label="3: Return Stmt \n n$0=*&a:int [line 44, column 10]\n *&return:int=n$0 [line 44, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_3" -> "derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_2" ;
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_4" [label="4: DeclStmt \n *&a:int=0 [line 43, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_4" -> "derefFirstArg_ok_deref#70986049112502156.78efafe2cdade07d4257a7cd671e75f5_3" ;
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_1" [label="1: Start getPtr_null_deref1\nFormals: \nLocals: t:int* \n DECLARE_LOCALS(&return,&t); [line 89, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_1" -> "getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_5" ;
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_2" [label="2: Exit getPtr_null_deref1 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_3" [label="3: Return Stmt \n _=*&t:int* [line 92, column 11]\n n$1=*&t:int* [line 92, column 11]\n n$2=*n$1:int [line 92, column 10]\n *&return:int=n$2 [line 92, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_3" -> "getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_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
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 91, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,null:int*) [line 91, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_4" -> "getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_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
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 90, column 23]\n n$6=*&t:int* [line 90, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_5" -> "getPtr_null_deref1#10685326586135592861.d05a7735c36f759fec001951cdc51035_4" ;
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_1" [label="1: Start getPtr_null_deref2\nFormals: \nLocals: t:int* \n DECLARE_LOCALS(&return,&t); [line 95, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_1" -> "getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_5" ;
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_2" [label="2: Exit getPtr_null_deref2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_3" [label="3: Return Stmt \n _=*&t:int* [line 98, column 11]\n n$1=*&t:int* [line 98, column 11]\n n$2=*n$1:int [line 98, column 10]\n *&return:int=n$2 [line 98, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_3" -> "getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_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
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 97, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,null:int*) [line 97, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_4" -> "getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_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
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 96, column 23]\n n$6=*&t:int* [line 96, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_5" -> "getPtr_null_deref2#10682492045158632578.de31216813faa493761802feb6f997f2_4" ;
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_1" [label="1: Start getPtr_ok_deref\nFormals: \nLocals: t:int* a:int \n DECLARE_LOCALS(&return,&t,&a); [line 101, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_1" -> "getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_6" ;
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_2" [label="2: Exit getPtr_ok_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_3" [label="3: Return Stmt \n _=*&t:int* [line 105, column 11]\n n$1=*&t:int* [line 105, column 11]\n n$2=*n$1:int [line 105, column 10]\n *&return:int=n$2 [line 105, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_3" -> "getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_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
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 104, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,&a:int*) [line 104, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_4" -> "getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_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
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 103, column 23]\n n$6=*&t:int* [line 103, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_5" -> "getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_4" ;
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_6" [label="6: DeclStmt \n *&a:int=0 [line 102, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_6" -> "getPtr_ok_deref#15608473391071478730.49e56fac5bd82269c2093a9c1e438200_5" ;
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_1" [label="1: Start getRef_null_deref1\nFormals: \nLocals: t:int* \n DECLARE_LOCALS(&return,&t); [line 127, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_1" -> "getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_5" ;
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_2" [label="2: Exit getRef_null_deref1 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_3" [label="3: Return Stmt \n _=*&t:int* [line 130, column 10]\n n$1=*&t:int* [line 130, column 10]\n n$2=*n$1:int [line 130, column 10]\n *&return:int=n$2 [line 130, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_3" -> "getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_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
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 129, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,null:int*) [line 129, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_4" -> "getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_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
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 128, column 23]\n n$6=*&t:int* [line 128, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_5" -> "getRef_null_deref1#4264296374417396044.654d24b6c4af017d90a5ceff83c121c2_4" ;
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_1" [label="1: Start getRef_null_deref2\nFormals: \nLocals: t:int* \n DECLARE_LOCALS(&return,&t); [line 133, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_1" -> "getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_5" ;
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_2" [label="2: Exit getRef_null_deref2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_3" [label="3: Return Stmt \n _=*&t:int* [line 136, column 10]\n n$1=*&t:int* [line 136, column 10]\n n$2=*n$1:int [line 136, column 10]\n *&return:int=n$2 [line 136, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_3" -> "getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_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
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 135, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,null:int*) [line 135, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_4" -> "getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_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
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 134, column 23]\n n$6=*&t:int* [line 134, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_5" -> "getRef_null_deref2#4263471740696427019.45bed1239309132cabf29f4cdd81f3cc_4" ;
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_1" [label="1: Start getRef_ok_deref\nFormals: \nLocals: t:int* a:int \n DECLARE_LOCALS(&return,&t,&a); [line 139, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_1" -> "getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_6" ;
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_2" [label="2: Exit getRef_ok_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_3" [label="3: Return Stmt \n _=*&t:int* [line 143, column 10]\n n$1=*&t:int* [line 143, column 10]\n n$2=*n$1:int [line 143, column 10]\n *&return:int=n$2 [line 143, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_3" -> "getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_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
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 142, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,&a:int*) [line 142, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_4" -> "getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_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
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 141, column 23]\n n$6=*&t:int* [line 141, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_5" -> "getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_4" ;
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_6" [label="6: DeclStmt \n *&a:int=0 [line 140, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_6" -> "getRef_ok_deref#10111201054364386601.e514c65ac6978a31376e6032d81b3d16_5" ;
|
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_1" [label="1: Start operator_star_null_deref1\nFormals: \nLocals: t:int* \n DECLARE_LOCALS(&return,&t); [line 108, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_1" -> "operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_5" ;
|
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_2" [label="2: Exit operator_star_null_deref1 \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
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_3" [label="3: Return Stmt \n n$1=*&t:int* [line 111, column 10]\n n$2=*n$1:int [line 111, column 10]\n *&return:int=n$2 [line 111, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_3" -> "operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_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
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 110, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,null:int*) [line 110, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_4" -> "operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_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
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 109, column 23]\n n$6=*&t:int* [line 109, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_5" -> "operator_star_null_deref1#14187169119337849630.74372e24230903d2d4cacecae74f498d_4" ;
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_1" [label="1: Start operator_star_null_deref2\nFormals: \nLocals: t:int* \n DECLARE_LOCALS(&return,&t); [line 114, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_1" -> "operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_5" ;
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_2" [label="2: Exit operator_star_null_deref2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_3" [label="3: Return Stmt \n _=*&t:int* [line 117, column 10]\n n$1=*&t:int* [line 117, column 10]\n n$2=*n$1:int [line 117, column 10]\n *&return:int=n$2 [line 117, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_3" -> "operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_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
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 116, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,null:int*) [line 116, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_4" -> "operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_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
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 115, column 23]\n n$6=*&t:int* [line 115, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_5" -> "operator_star_null_deref2#14189968475942707161.6f6b808f2059b0f1bd8edd63f3e0c27b_4" ;
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_1" [label="1: Start operator_star_ok_deref\nFormals: \nLocals: t:int* a:int \n DECLARE_LOCALS(&return,&t,&a); [line 120, column 1]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_1" -> "operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_5" ;
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_2" [label="2: Exit operator_star_ok_deref \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_3" [label="3: Return Stmt \n _=*&t:int* [line 124, column 10]\n n$1=*&t:int* [line 124, column 10]\n n$2=*n$1:int [line 124, column 10]\n *&return:int=n$2 [line 124, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_3" -> "operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_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
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_4" [label="4: Call _fun_TranslateAsPtr<int>_setPtr \n _=*&t:int* [line 123, column 3]\n n$5=_fun_TranslateAsPtr<int>_setPtr(&t:int*&,&a:int*) [line 123, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_4" -> "operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_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
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_5" [label="5: DeclStmt \n n$7=_fun_TranslateAsPtr<int>_TranslateAsPtr(&t:int**,null:int*) [line 122, column 23]\n n$6=*&t:int* [line 122, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_5" -> "operator_star_ok_deref#11345277927099423171.138b78e88dab5887cd2f20f2590c779f_4" ;
|
|
|
|
"TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_1" [label="1: Start TranslateAsPtr<int>_TranslateAsPtr\nFormals: this:int** t:int*\nLocals: \n DECLARE_LOCALS(&return); [line 76, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_1" -> "TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_3" ;
|
|
|
|
"TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_2" [label="2: Exit TranslateAsPtr<int>_TranslateAsPtr \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
|
|
|
"TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_3" [label="3: Call _fun_TranslateAsPtr<int>_setPtr \n n$1=*&this:int** [line 76, column 36]\n _=*n$1:int* [line 76, column 36]\n n$3=*&t:int* [line 76, column 43]\n n$4=_fun_TranslateAsPtr<int>_setPtr(n$1:int**,n$3:int*) [line 76, column 36]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_3" -> "TranslateAsPtr#TranslateAsPtr<int>#{16989717360382977660}.33ce04b76efc158540bbe4b4b3c6897f_2" ;
|
|
|
|
"getPtr#TranslateAsPtr<int>#(11398425810130716395).657b6b87ee3e6dc84e17d734bcfc55b1_1" [label="1: Start TranslateAsPtr<int>_getPtr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 78, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr#TranslateAsPtr<int>#(11398425810130716395).657b6b87ee3e6dc84e17d734bcfc55b1_1" -> "getPtr#TranslateAsPtr<int>#(11398425810130716395).657b6b87ee3e6dc84e17d734bcfc55b1_2" ;
|
|
|
|
"getPtr#TranslateAsPtr<int>#(11398425810130716395).657b6b87ee3e6dc84e17d734bcfc55b1_2" [label="2: Exit TranslateAsPtr<int>_getPtr \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr#TranslateAsPtr<int>#(5108725798531153105).ddae4f977672452bac54a30a4533059d_1" [label="1: Start TranslateAsPtr<int>_getPtr\nFormals: this:int** a:int b:int\nLocals: \n DECLARE_LOCALS(&return); [line 79, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getPtr#TranslateAsPtr<int>#(5108725798531153105).ddae4f977672452bac54a30a4533059d_1" -> "getPtr#TranslateAsPtr<int>#(5108725798531153105).ddae4f977672452bac54a30a4533059d_2" ;
|
|
|
|
"getPtr#TranslateAsPtr<int>#(5108725798531153105).ddae4f977672452bac54a30a4533059d_2" [label="2: Exit TranslateAsPtr<int>_getPtr \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef#TranslateAsPtr<int>#(12157952070639259276).02c97edc35db5f793a7a4d1e6c16b00b_1" [label="1: Start TranslateAsPtr<int>_getRef\nFormals: this:int** a:int b:int\nLocals: \n DECLARE_LOCALS(&return); [line 83, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef#TranslateAsPtr<int>#(12157952070639259276).02c97edc35db5f793a7a4d1e6c16b00b_1" -> "getRef#TranslateAsPtr<int>#(12157952070639259276).02c97edc35db5f793a7a4d1e6c16b00b_2" ;
|
|
|
|
"getRef#TranslateAsPtr<int>#(12157952070639259276).02c97edc35db5f793a7a4d1e6c16b00b_2" [label="2: Exit TranslateAsPtr<int>_getRef \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef#TranslateAsPtr<int>#(8980454460906194048).c1f61acdfdda98d0f31dfdad70fac6a4_1" [label="1: Start TranslateAsPtr<int>_getRef\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 82, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"getRef#TranslateAsPtr<int>#(8980454460906194048).c1f61acdfdda98d0f31dfdad70fac6a4_1" -> "getRef#TranslateAsPtr<int>#(8980454460906194048).c1f61acdfdda98d0f31dfdad70fac6a4_2" ;
|
|
|
|
"getRef#TranslateAsPtr<int>#(8980454460906194048).c1f61acdfdda98d0f31dfdad70fac6a4_2" [label="2: Exit TranslateAsPtr<int>_getRef \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator*#TranslateAsPtr<int>#(2957914813032465436).d9d28f5b3fa89d06894336545dfa919e_1" [label="1: Start TranslateAsPtr<int>_operator*\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 81, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"operator*#TranslateAsPtr<int>#(2957914813032465436).d9d28f5b3fa89d06894336545dfa919e_1" -> "operator*#TranslateAsPtr<int>#(2957914813032465436).d9d28f5b3fa89d06894336545dfa919e_2" ;
|
|
|
|
"operator*#TranslateAsPtr<int>#(2957914813032465436).d9d28f5b3fa89d06894336545dfa919e_2" [label="2: Exit TranslateAsPtr<int>_operator* \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_1" [label="1: Start TranslateAsPtr<int>_setPtr\nFormals: this:int** v:int*\nLocals: \n DECLARE_LOCALS(&return); [line 86, column 3]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_1" -> "setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_3" ;
|
|
|
|
"setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_2" [label="2: Exit TranslateAsPtr<int>_setPtr \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
|
|
|
"setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_3" [label="3: BinaryOperatorStmt: Assign \n n$1=*&this:int** [line 86, column 34]\n n$2=*&v:int* [line 86, column 43]\n *n$1:void*=n$2 [line 86, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_3" -> "setPtr#TranslateAsPtr<int>#(11427652750021041520).3f4d983a0a5cf5a43b2e4fd66c30c6a9_2" ;
|
|
|
|
}
|