Skip to content

Remove __CPROVER_initialize recreation #1828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/java_bytecode/java_bytecode_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -877,14 +877,7 @@ bool java_bytecode_languaget::convert_single_method(
bool java_bytecode_languaget::final(symbol_table_baset &symbol_table)
{
PRECONDITION(language_options_initialized);

return recreate_initialize(
symbol_table,
main_class,
get_message_handler(),
assume_inputs_non_null,
object_factory_parameters,
get_pointer_type_selector());
return false;
}

void java_bytecode_languaget::show_parse(std::ostream &out)
Expand Down
42 changes: 0 additions & 42 deletions src/java_bytecode/java_entry_point.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,48 +455,6 @@ bool java_entry_point(
pointer_type_selector);
}

/// Creates the initialize methods again taking account of symbols added to the
/// symbol table during instantiation of lazy methods since they were first
/// created,
/// \param symbol_table: global symbol table containing symbols to initialize
/// \param main_class: the class containing the "main" entry point
/// \param message_handler: message_handlert for logging
/// \param assume_init_pointers_not_null: specifies behaviour for
/// java_static_lifetime_init
/// \param object_factory_parameters: specifies behaviour for
/// java_static_lifetime_init
/// \param pointer_type_selector: specifies behaviour for
/// java_static_lifetime_init
bool recreate_initialize(
symbol_table_baset &symbol_table,
const irep_idt &main_class,
message_handlert &message_handler,
bool assume_init_pointers_not_null,
const object_factory_parameterst &object_factory_parameters,
const select_pointer_typet &pointer_type_selector)
{
messaget message(message_handler);
main_function_resultt res=
get_main_symbol(symbol_table, main_class, message_handler);
if(res.status!=main_function_resultt::Success)
{
// No initialization was originally created (yikes!) so we can't recreate
// it now
return res.status==main_function_resultt::Error;
}

create_initialize(symbol_table);

java_static_lifetime_init(
symbol_table,
res.main_function.location,
assume_init_pointers_not_null,
object_factory_parameters,
pointer_type_selector);

return false;
}

/// Generate a _start function for a specific function. See
/// java_entry_point for more details.
/// \param symbol: The symbol representing the function to call
Expand Down
8 changes: 0 additions & 8 deletions src/java_bytecode/java_entry_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,4 @@ bool generate_java_start_function(
const object_factory_parameterst& object_factory_parameters,
const select_pointer_typet &pointer_type_selector);

bool recreate_initialize(
symbol_table_baset &symbol_table,
const irep_idt &main_class,
message_handlert &message_handler,
bool assume_init_pointers_not_null,
const object_factory_parameterst &object_factory_parameters,
const select_pointer_typet &pointer_type_selector);

#endif // CPROVER_JAVA_BYTECODE_JAVA_ENTRY_POINT_H