Skip to content

Commit 9b59631

Browse files
authored
Merge pull request diffblue#1828 from smowton/smowton/cleanup/remove-recreate-initialize
Remove __CPROVER_initialize recreation
2 parents 932a38f + 968d97e commit 9b59631

File tree

3 files changed

+1
-58
lines changed

3 files changed

+1
-58
lines changed

src/java_bytecode/java_bytecode_language.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -877,14 +877,7 @@ bool java_bytecode_languaget::convert_single_method(
877877
bool java_bytecode_languaget::final(symbol_table_baset &symbol_table)
878878
{
879879
PRECONDITION(language_options_initialized);
880-
881-
return recreate_initialize(
882-
symbol_table,
883-
main_class,
884-
get_message_handler(),
885-
assume_inputs_non_null,
886-
object_factory_parameters,
887-
get_pointer_type_selector());
880+
return false;
888881
}
889882

890883
void java_bytecode_languaget::show_parse(std::ostream &out)

src/java_bytecode/java_entry_point.cpp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -455,48 +455,6 @@ bool java_entry_point(
455455
pointer_type_selector);
456456
}
457457

458-
/// Creates the initialize methods again taking account of symbols added to the
459-
/// symbol table during instantiation of lazy methods since they were first
460-
/// created,
461-
/// \param symbol_table: global symbol table containing symbols to initialize
462-
/// \param main_class: the class containing the "main" entry point
463-
/// \param message_handler: message_handlert for logging
464-
/// \param assume_init_pointers_not_null: specifies behaviour for
465-
/// java_static_lifetime_init
466-
/// \param object_factory_parameters: specifies behaviour for
467-
/// java_static_lifetime_init
468-
/// \param pointer_type_selector: specifies behaviour for
469-
/// java_static_lifetime_init
470-
bool recreate_initialize(
471-
symbol_table_baset &symbol_table,
472-
const irep_idt &main_class,
473-
message_handlert &message_handler,
474-
bool assume_init_pointers_not_null,
475-
const object_factory_parameterst &object_factory_parameters,
476-
const select_pointer_typet &pointer_type_selector)
477-
{
478-
messaget message(message_handler);
479-
main_function_resultt res=
480-
get_main_symbol(symbol_table, main_class, message_handler);
481-
if(res.status!=main_function_resultt::Success)
482-
{
483-
// No initialization was originally created (yikes!) so we can't recreate
484-
// it now
485-
return res.status==main_function_resultt::Error;
486-
}
487-
488-
create_initialize(symbol_table);
489-
490-
java_static_lifetime_init(
491-
symbol_table,
492-
res.main_function.location,
493-
assume_init_pointers_not_null,
494-
object_factory_parameters,
495-
pointer_type_selector);
496-
497-
return false;
498-
}
499-
500458
/// Generate a _start function for a specific function. See
501459
/// java_entry_point for more details.
502460
/// \param symbol: The symbol representing the function to call

src/java_bytecode/java_entry_point.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,4 @@ bool generate_java_start_function(
7373
const object_factory_parameterst& object_factory_parameters,
7474
const select_pointer_typet &pointer_type_selector);
7575

76-
bool recreate_initialize(
77-
symbol_table_baset &symbol_table,
78-
const irep_idt &main_class,
79-
message_handlert &message_handler,
80-
bool assume_init_pointers_not_null,
81-
const object_factory_parameterst &object_factory_parameters,
82-
const select_pointer_typet &pointer_type_selector);
83-
8476
#endif // CPROVER_JAVA_BYTECODE_JAVA_ENTRY_POINT_H

0 commit comments

Comments
 (0)