|
|
|
/* @generated */
|
|
|
|
digraph cfg {
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_1" [label="1: Start call_virtual_destructor\nFormals: \nLocals: trgl:Polygon* \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
[clang] fix bad interaction between ConditionalOperator and initializers
Summary:
This is several inter-connected changes together to keep the tests
happy.
The ConditionalOperator `b?t:e` is translated by first creating a
placeholder variable to temporarily store the result of the evaluation
in each branch, then the real thing we want to assign to reads that
variable. But, there are situations where that changes the semantics of
the expression, namely when the value created is a struct on the stack
(eg, a C++ temporary). This is because in SIL we cannot assign the
*address* of a program variable, only its contents, so by the time we're
out of the conditional operator we cannot set the struct value
correctly anymore: we can only set its content, which we did, but that
results in a "shifted" struct value that is one dereference away from
where it should be.
So a batch of changes concern `conditionalOperator_trans`:
- instead of systematically creating a temporary for the conditional,
use the `trans_state.var_exp_typ` provided from above if available
when translating `ConditionalOperator`
- don't even set anything if that variable was already initialized by
merely translating the branch expression, eg when it's a constructor
- fix long-standing TODO to propagate these initialization facts
accurately for ConditionalOperator (used by `init_expr_trans` to also
figure out if it should insert a store to the variable being
initialised or not)
The rest of the changes adapt some relevant other constructs to deal
with conditionalOperator properly now that it can set the current
variable itself, instead of storing stuff inside a temp variable. This
change was a problem because some constructs, eg a variable declaration,
will insert nodes that set up the variable before calling its
initialization, and now the initialization happens *before* that setup,
in the translation of the inner conditional operator, which naturally
creates nodes above the current one.
- add a generic helper to force a sequential order between two
translation results, forcing node creation if necessary
- use that in `init_expr_trans` and `cxxNewExpr_trans`
- adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions
The sequentiality business creates more nodes when used, and the
conditionalOperator business uses fewer temporary variables, so the
frontend results change quite a bit.
Note that biabduction tests were invaluable in debugging this. There
could be other constructs to adjust similarly to cxxNewExpr that were
not covered by the tests though.
Added tests in pulse that exercises the previous bug.
Reviewed By: da319
Differential Revision: D24796282
fbshipit-source-id: 0790c8d17
4 years ago
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_1" -> "call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_6" ;
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_2" [label="2: Exit call_virtual_destructor \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_3" [label="3: Call delete \n n$0=*&trgl:Polygon* [line 70, column 10]\n n$1=_fun___delete(n$0:Polygon*) [line 70, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_3" -> "call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_2" ;
|
[clang] fix bad interaction between ConditionalOperator and initializers
Summary:
This is several inter-connected changes together to keep the tests
happy.
The ConditionalOperator `b?t:e` is translated by first creating a
placeholder variable to temporarily store the result of the evaluation
in each branch, then the real thing we want to assign to reads that
variable. But, there are situations where that changes the semantics of
the expression, namely when the value created is a struct on the stack
(eg, a C++ temporary). This is because in SIL we cannot assign the
*address* of a program variable, only its contents, so by the time we're
out of the conditional operator we cannot set the struct value
correctly anymore: we can only set its content, which we did, but that
results in a "shifted" struct value that is one dereference away from
where it should be.
So a batch of changes concern `conditionalOperator_trans`:
- instead of systematically creating a temporary for the conditional,
use the `trans_state.var_exp_typ` provided from above if available
when translating `ConditionalOperator`
- don't even set anything if that variable was already initialized by
merely translating the branch expression, eg when it's a constructor
- fix long-standing TODO to propagate these initialization facts
accurately for ConditionalOperator (used by `init_expr_trans` to also
figure out if it should insert a store to the variable being
initialised or not)
The rest of the changes adapt some relevant other constructs to deal
with conditionalOperator properly now that it can set the current
variable itself, instead of storing stuff inside a temp variable. This
change was a problem because some constructs, eg a variable declaration,
will insert nodes that set up the variable before calling its
initialization, and now the initialization happens *before* that setup,
in the translation of the inner conditional operator, which naturally
creates nodes above the current one.
- add a generic helper to force a sequential order between two
translation results, forcing node creation if necessary
- use that in `init_expr_trans` and `cxxNewExpr_trans`
- adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions
The sequentiality business creates more nodes when used, and the
conditionalOperator business uses fewer temporary variables, so the
frontend results change quite a bit.
Note that biabduction tests were invaluable in debugging this. There
could be other constructs to adjust similarly to cxxNewExpr that were
not covered by the tests though.
Added tests in pulse that exercises the previous bug.
Reviewed By: da319
Differential Revision: D24796282
fbshipit-source-id: 0790c8d17
4 years ago
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_4" [label="4: CXXNewExpr \n n$2=_fun___new(sizeof(t=Triangle):unsigned long) [line 69, column 19]\n " shape="box"]
|
|
|
|
|
|
|
|
|
[clang] fix bad interaction between ConditionalOperator and initializers
Summary:
This is several inter-connected changes together to keep the tests
happy.
The ConditionalOperator `b?t:e` is translated by first creating a
placeholder variable to temporarily store the result of the evaluation
in each branch, then the real thing we want to assign to reads that
variable. But, there are situations where that changes the semantics of
the expression, namely when the value created is a struct on the stack
(eg, a C++ temporary). This is because in SIL we cannot assign the
*address* of a program variable, only its contents, so by the time we're
out of the conditional operator we cannot set the struct value
correctly anymore: we can only set its content, which we did, but that
results in a "shifted" struct value that is one dereference away from
where it should be.
So a batch of changes concern `conditionalOperator_trans`:
- instead of systematically creating a temporary for the conditional,
use the `trans_state.var_exp_typ` provided from above if available
when translating `ConditionalOperator`
- don't even set anything if that variable was already initialized by
merely translating the branch expression, eg when it's a constructor
- fix long-standing TODO to propagate these initialization facts
accurately for ConditionalOperator (used by `init_expr_trans` to also
figure out if it should insert a store to the variable being
initialised or not)
The rest of the changes adapt some relevant other constructs to deal
with conditionalOperator properly now that it can set the current
variable itself, instead of storing stuff inside a temp variable. This
change was a problem because some constructs, eg a variable declaration,
will insert nodes that set up the variable before calling its
initialization, and now the initialization happens *before* that setup,
in the translation of the inner conditional operator, which naturally
creates nodes above the current one.
- add a generic helper to force a sequential order between two
translation results, forcing node creation if necessary
- use that in `init_expr_trans` and `cxxNewExpr_trans`
- adjust many places where `var_exp_typ` was incorrectly not reset when translating sub-expressions
The sequentiality business creates more nodes when used, and the
conditionalOperator business uses fewer temporary variables, so the
frontend results change quite a bit.
Note that biabduction tests were invaluable in debugging this. There
could be other constructs to adjust similarly to cxxNewExpr that were
not covered by the tests though.
Added tests in pulse that exercises the previous bug.
Reviewed By: da319
Differential Revision: D24796282
fbshipit-source-id: 0790c8d17
4 years ago
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_4" -> "call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_5" ;
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_5" [label="5: CXXNewExpr \n n$3=_fun_Triangle::Triangle(n$2:Triangle*) [line 69, column 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_5" -> "call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_7" ;
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_6" [label="6: DeclStmt \n VARIABLE_DECLARED(trgl:Polygon*); [line 69, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_6" -> "call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_4" ;
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_7" [label="7: DeclStmt \n *&trgl:Triangle*=n$2 [line 69, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_7" -> "call_virtual_destructor#6847397116347440235.d267757a410b72cac399f5e3d0ee0f45_3" ;
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_1" [label="1: Start poly_area\nFormals: \nLocals: ppoly3:Polygon* poly:Polygon \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_1" -> "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_6" ;
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_2" [label="2: Exit poly_area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_3" [label="3: Return Stmt \n n$0=*&ppoly3:Polygon* [line 54, column 14]\n _=*n$0:Polygon [line 54, column 14]\n n$2=_fun_Polygon::area(n$0:Polygon*) virtual [line 54, column 14]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_3" -> "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_4" ;
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_4" [label="4: Return Stmt \n *&return:int=(1 / n$2) [line 54, column 3]\n _=*&poly:Polygon [line 54, column 27]\n n$4=_fun_Polygon::~Polygon(&poly:Polygon*) injected virtual [line 54, column 27]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_4" -> "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_2" ;
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_5" [label="5: DeclStmt \n VARIABLE_DECLARED(ppoly3:Polygon*); [line 53, column 3]\n *&ppoly3:Polygon*=&poly [line 53, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_5" -> "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_3" ;
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_6" [label="6: DeclStmt \n VARIABLE_DECLARED(poly:Polygon); [line 52, column 3]\n n$6=_fun_Polygon::Polygon(&poly:Polygon*) [line 52, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_6" -> "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_5" ;
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_1" [label="1: Start rect_area\nFormals: \nLocals: ppoly1:Polygon* rect:Rectangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_1" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_7" ;
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_2" [label="2: Exit rect_area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" [label="3: Return Stmt \n n$0=*&ppoly1:Polygon* [line 40, column 15]\n _=*n$0:Polygon [line 40, column 15]\n n$2=_fun_Polygon::area(n$0:Polygon*) virtual [line 40, column 15]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_4" ;
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_4" [label="4: Return Stmt \n *&return:int=(1 / (n$2 - 20)) [line 40, column 3]\n _=*&rect:Rectangle [line 40, column 34]\n n$4=_fun_Rectangle::~Rectangle(&rect:Rectangle*) injected virtual [line 40, column 34]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_4" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_2" ;
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_5" [label="5: Call _fun_Polygon::set_values \n n$6=*&ppoly1:Polygon* [line 39, column 3]\n _=*n$6:Polygon [line 39, column 3]\n n$8=_fun_Polygon::set_values(n$6:Polygon*,4:int,5:int) [line 39, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_5" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" ;
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_6" [label="6: DeclStmt \n VARIABLE_DECLARED(ppoly1:Polygon*); [line 38, column 3]\n *&ppoly1:Rectangle*=&rect [line 38, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_6" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_5" ;
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_7" [label="7: DeclStmt \n VARIABLE_DECLARED(rect:Rectangle); [line 37, column 3]\n n$9=_fun_Rectangle::Rectangle(&rect:Rectangle*) [line 37, column 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_7" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_6" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_1" [label="1: Start tri_area\nFormals: \nLocals: ppoly2:Polygon* poly:Polygon trgl:Triangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_1" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_8" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_2" [label="2: Exit tri_area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" [label="3: Return Stmt \n n$0=*&ppoly2:Polygon* [line 48, column 15]\n _=*n$0:Polygon [line 48, column 15]\n n$2=_fun_Polygon::area(n$0:Polygon*) virtual [line 48, column 15]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_4" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_4" [label="4: Return Stmt \n *&return:int=(1 / (n$2 - 10)) [line 48, column 3]\n _=*&poly:Polygon [line 48, column 34]\n n$4=_fun_Polygon::~Polygon(&poly:Polygon*) injected virtual [line 48, column 34]\n _=*&trgl:Triangle [line 48, column 34]\n n$6=_fun_Triangle::~Triangle(&trgl:Triangle*) injected virtual [line 48, column 34]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_4" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_2" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_5" [label="5: Call _fun_Polygon::set_values \n n$8=*&ppoly2:Polygon* [line 47, column 3]\n _=*n$8:Polygon [line 47, column 3]\n n$10=_fun_Polygon::set_values(n$8:Polygon*,4:int,5:int) [line 47, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_5" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_6" [label="6: DeclStmt \n VARIABLE_DECLARED(ppoly2:Polygon*); [line 46, column 3]\n *&ppoly2:Triangle*=&trgl [line 46, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_6" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_5" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_7" [label="7: DeclStmt \n VARIABLE_DECLARED(poly:Polygon); [line 45, column 3]\n n$11=_fun_Polygon::Polygon(&poly:Polygon*) [line 45, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_7" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_6" ;
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_8" [label="8: DeclStmt \n VARIABLE_DECLARED(trgl:Triangle); [line 44, column 3]\n n$12=_fun_Triangle::Triangle(&trgl:Triangle*) [line 44, column 12]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_8" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_7" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_1" [label="1: Start tri_not_virtual_area\nFormals: \nLocals: ppoly2:Polygon* poly:Polygon trgl:Triangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_1" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_8" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_2" [label="2: Exit tri_not_virtual_area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" [label="3: Return Stmt \n n$0=*&ppoly2:Polygon* [line 62, column 14]\n _=*n$0:Polygon [line 62, column 14]\n n$2=_fun_Polygon::area(n$0:Polygon*) [line 62, column 14]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_4" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_4" [label="4: Return Stmt \n *&return:int=(1 / n$2) [line 62, column 3]\n _=*&poly:Polygon [line 62, column 36]\n n$4=_fun_Polygon::~Polygon(&poly:Polygon*) injected virtual [line 62, column 36]\n _=*&trgl:Triangle [line 62, column 36]\n n$6=_fun_Triangle::~Triangle(&trgl:Triangle*) injected virtual [line 62, column 36]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_4" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_2" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_5" [label="5: Call _fun_Polygon::set_values \n n$8=*&ppoly2:Polygon* [line 61, column 3]\n _=*n$8:Polygon [line 61, column 3]\n n$10=_fun_Polygon::set_values(n$8:Polygon*,4:int,5:int) [line 61, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_5" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_6" [label="6: DeclStmt \n VARIABLE_DECLARED(ppoly2:Polygon*); [line 60, column 3]\n *&ppoly2:Triangle*=&trgl [line 60, column 3]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_6" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_5" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_7" [label="7: DeclStmt \n VARIABLE_DECLARED(poly:Polygon); [line 59, column 3]\n n$11=_fun_Polygon::Polygon(&poly:Polygon*) [line 59, column 11]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_7" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_6" ;
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_8" [label="8: DeclStmt \n VARIABLE_DECLARED(trgl:Triangle); [line 58, column 3]\n n$12=_fun_Triangle::Triangle(&trgl:Triangle*) [line 58, column 12]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_8" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_7" ;
|
|
|
|
"area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_1" [label="1: Start Polygon::area\nFormals: this:Polygon*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_1" -> "area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_3" ;
|
|
|
|
"area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_2" [label="2: Exit Polygon::area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_3" [label="3: Return Stmt \n *&return:int=0 [line 18, column 24]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_3" -> "area#Polygon#(14534668876010564879).ccccc470b1eafda401273f4b27bbfa9f_2" ;
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_1" [label="1: Start Polygon::set_values\nFormals: this:Polygon* a:int b:int\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_1" -> "set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_4" ;
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_2" [label="2: Exit Polygon::set_values \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:Polygon* [line 16, column 5]\n n$1=*&b:int [line 16, column 14]\n *n$0.height:int=n$1 [line 16, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_3" -> "set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_2" ;
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_4" [label="4: BinaryOperatorStmt: Assign \n n$2=*&this:Polygon* [line 15, column 5]\n n$3=*&a:int [line 15, column 13]\n *n$2.width:int=n$3 [line 15, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_4" -> "set_values#Polygon#(2698446688876490094).f9216ba6d3085c8bce59aeddec27f348_3" ;
|
|
|
|
"Polygon#Polygon#{11469354922025116589}.8fcae27003a8dcdfbaecf915d438331a_1" [label="1: Start Polygon::Polygon\nFormals: this:Polygon*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"Polygon#Polygon#{11469354922025116589}.8fcae27003a8dcdfbaecf915d438331a_1" -> "Polygon#Polygon#{11469354922025116589}.8fcae27003a8dcdfbaecf915d438331a_2" ;
|
|
|
|
"Polygon#Polygon#{11469354922025116589}.8fcae27003a8dcdfbaecf915d438331a_2" [label="2: Exit Polygon::Polygon \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_1" [label="1: Start Rectangle::area\nFormals: this:Rectangle*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_1" -> "area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_3" ;
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_2" [label="2: Exit Rectangle::area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_3" [label="3: Return Stmt \n n$0=*&this:Rectangle* [line 24, column 23]\n n$1=*n$0.width:int [line 24, column 23]\n n$2=*&this:Rectangle* [line 24, column 31]\n n$3=*n$2.height:int [line 24, column 31]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_3" -> "area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_4" ;
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_4" [label="4: Return Stmt \n *&return:int=(n$1 * n$3) [line 24, column 16]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_4" -> "area#Rectangle#(14534668876010564879).9b17971eaa6024f5a21d98d4b495fbd8_2" ;
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_1" [label="1: Start Rectangle::Rectangle\nFormals: this:Rectangle*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_1" -> "Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_3" ;
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_2" [label="2: Exit Rectangle::Rectangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_3" [label="3: Constructor Init \n n$1=*&this:Rectangle* [line 21, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_3" -> "Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_4" ;
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_4" [label="4: Constructor Init \n n$2=_fun_Polygon::Polygon(n$1:Rectangle*) [line 21, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_4" -> "Rectangle#Rectangle#{37770367790745680}.b489689f1ea2a6c0031f1c12df9cf683_2" ;
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_1" [label="1: Start Triangle::area\nFormals: this:Triangle*\nLocals: x:int \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_1" -> "area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_5" ;
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_2" [label="2: Exit Triangle::area \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_3" [label="3: Return Stmt \n n$0=*&x:int [line 32, column 12]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_3" -> "area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_4" ;
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_4" [label="4: Return Stmt \n *&return:int=(n$0 - 10) [line 32, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_4" -> "area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_2" ;
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_5" [label="5: DeclStmt \n VARIABLE_DECLARED(x:int); [line 31, column 5]\n n$1=*&this:Triangle* [line 31, column 13]\n n$2=*n$1.width:int [line 31, column 13]\n n$3=*&this:Triangle* [line 31, column 21]\n n$4=*n$3.height:int [line 31, column 21]\n *&x:int=(n$2 * n$4) [line 31, column 5]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_5" -> "area#Triangle#(14534668876010564879).b2c96bbb8f170e9d12180637dc0d6da3_3" ;
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_1" [label="1: Start Triangle::Triangle\nFormals: this:Triangle*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_1" -> "Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_3" ;
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_2" [label="2: Exit Triangle::Triangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_3" [label="3: Constructor Init \n n$1=*&this:Triangle* [line 27, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_3" -> "Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_4" ;
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_4" [label="4: Constructor Init \n n$2=_fun_Polygon::Polygon(n$1:Triangle*) [line 27, column 7]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_4" -> "Triangle#Triangle#{14925008984920285500}.e64c12e70a0a920bac962a31dd016f62_2" ;
|
|
|
|
"__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_1" [label="1: Start Triangle::__infer_inner_destructor_~Triangle\nFormals: this:Triangle*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_1" -> "__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_3" ;
|
|
|
|
"__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_2" [label="2: Exit Triangle::__infer_inner_destructor_~Triangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_3" [label="3: Destruction(fields) \n n$0=*&this:Triangle* [line 29, column 15]\n _=*n$0:Triangle [line 29, column 15]\n n$2=_fun_Polygon::__infer_inner_destructor_~Polygon(n$0:Triangle*) injected virtual [line 29, column 15]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_3" -> "__infer_inner_destructor_~Triangle#Triangle#(15321349019777754162).beef4fb98598050797ff216b414c1577_2" ;
|
|
|
|
"~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_1" [label="1: Start Triangle::~Triangle\nFormals: this:Triangle*\nLocals: \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_1" -> "~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_3" ;
|
|
|
|
"~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_2" [label="2: Exit Triangle::~Triangle \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
"~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_3" [label="3: Destruction(virtual base) \n n$0=*&this:Triangle* [line 29, column 15]\n _=*n$0:Triangle [line 29, column 15]\n n$2=_fun_Triangle::__infer_inner_destructor_~Triangle(n$0:Triangle*) injected virtual [line 29, column 15]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
"~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_3" -> "~Triangle#Triangle#(15321349019777754162).1c72e28229f327d097695ed4746edcfe_2" ;
|
|
|
|
}
|