@@ -485,6 +485,48 @@ bool java_entry_point(
485
485
pointer_type_selector);
486
486
}
487
487
488
+ // / Creates the initialize methods again taking account of symbols added to the
489
+ // / symbol table during instantiation of lazy methods since they were first
490
+ // / created,
491
+ // / \param symbol_table: global symbol table containing symbols to initialize
492
+ // / \param main_class: the class containing the "main" entry point
493
+ // / \param message_handler: message_handlert for logging
494
+ // / \param assume_init_pointers_not_null: specifies behaviour for
495
+ // / java_static_lifetime_init
496
+ // / \param object_factory_parameters: specifies behaviour for
497
+ // / java_static_lifetime_init
498
+ // / \param pointer_type_selector: specifies behaviour for
499
+ // / java_static_lifetime_init
500
+ bool recreate_initialize (
501
+ symbol_table_baset &symbol_table,
502
+ const irep_idt &main_class,
503
+ message_handlert &message_handler,
504
+ bool assume_init_pointers_not_null,
505
+ const object_factory_parameterst &object_factory_parameters,
506
+ const select_pointer_typet &pointer_type_selector)
507
+ {
508
+ messaget message (message_handler);
509
+ main_function_resultt res=
510
+ get_main_symbol (symbol_table, main_class, message_handler);
511
+ if (res.status !=main_function_resultt::Success)
512
+ {
513
+ // No initialization was originally created (yikes!) so we can't recreate
514
+ // it now
515
+ return res.status ==main_function_resultt::Error;
516
+ }
517
+
518
+ create_initialize (symbol_table);
519
+
520
+ java_static_lifetime_init (
521
+ symbol_table,
522
+ res.main_function .location ,
523
+ assume_init_pointers_not_null,
524
+ object_factory_parameters,
525
+ pointer_type_selector);
526
+
527
+ return false ;
528
+ }
529
+
488
530
// / Generate a _start function for a specific function. See
489
531
// / java_entry_point for more details.
490
532
// / \param symbol: The symbol representing the function to call
0 commit comments