Loading...
Searching...
No Matches
remove_java_newt Class Reference
+ Collaboration diagram for remove_java_newt:
Replace every java_new or java_new_array by a malloc side-effect and zero initialization.
Replace every java_new or java_new_array by a malloc side-effect and zero initialization.
Protected Member Functions
Replaces the instruction lhs = new java_type by two instructions: lhs = ALLOCATE(java_type) *lhs = { zero-initialized java_type }.
Replaces the instruction lhs = new java_array_type by the following code: lhs = ALLOCATE(java_type) loops to initialize the elements (including multi-dimensional arrays)
Detailed Description
Constructor & Destructor Documentation
◆ remove_java_newt()
Member Function Documentation
◆ lower_java_new() [1/3]
Replaces the instruction lhs = new java_type by two instructions: lhs = ALLOCATE(java_type) *lhs = { zero-initialized java_type }.
- Parameters
-
function_identifier Name of the function containing target.
lhs the lhs
rhs the rhs
dest the goto program to modify
target the goto instruction to replace
- Returns
- the iterator advanced to the last of the inserted instructions Note: we have to take a copy of
lhs and rhs since they would suffer destruction when replacing the instruction.
Definition at line 82 of file remove_java_new.cpp.
◆ lower_java_new() [2/3]
Replace every java_new or java_new_array by a malloc side-effect and zero initialization.
- Parameters
-
function_identifier Name of the function containing target.
goto_program program to process
target instruction to check for java_new expressions
message_handler message handler
- Returns
- true if a replacement has been made
Definition at line 362 of file remove_java_new.cpp.
◆ lower_java_new() [3/3]
Replace every java_new or java_new_array by a malloc side-effect and zero initialization.
Extra auxiliary variables may be introduced into symbol_table.
- Parameters
-
function_identifier Name of the function goto_program.
goto_program The function body to work on.
message_handler message handler
- Returns
- true if one or more java_new expressions have been replaced
Definition at line 408 of file remove_java_new.cpp.
◆ lower_java_new_array()
Replaces the instruction lhs = new java_array_type by the following code: lhs = ALLOCATE(java_type) loops to initialize the elements (including multi-dimensional arrays)
- Parameters
-
function_identifier Name of the function containing target.
lhs the lhs
rhs the rhs
dest the goto program to modify
target the goto instruction to replace
message_handler message handler
- Returns
- the iterator advanced to the last of the inserted instructions Note: we have to take a copy of
lhs and rhs since they would suffer destruction when replacing the instruction.
Definition at line 132 of file remove_java_new.cpp.
Member Data Documentation
◆ ns
◆ symbol_table
The documentation for this class was generated from the following file: