CBMC
Loading...
Searching...
No Matches
Functions
java_enum_static_init_unwind_handler.h File Reference

Unwind loops in static initializers. More...

#include <util/threeval.h>
+ Include dependency graph for java_enum_static_init_unwind_handler.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

  Unwind handler that special-cases the clinit (static initializer) functions of enumeration classes, and VALUES array cloning in their values() methods.
 

Detailed Description

Unwind loops in static initializers.

Definition in file java_enum_static_init_unwind_handler.h.

Function Documentation

◆  java_enum_static_init_unwind_handler()

tvt java_enum_static_init_unwind_handler ( const call_stacktcontext,
unsigned  loop_number,
unsigned  unwind_count,
unsignedunwind_max,
const symbol_tabletsymbol_table 
)

Unwind handler that special-cases the clinit (static initializer) functions of enumeration classes, and VALUES array cloning in their values() methods.

When java_bytecode_convert_classt has annotated them with a size of the enumeration type, this forces unwinding of any loop in the static initializer to at least that many iterations, with intent to permit population / copying of the enumeration's value array.

Parameters
context call stack when the loop back-edge was taken
loop_number ordinal number of the loop (ignored)
unwind_count iteration count that is about to begin
[out] unwind_max may be set to an advisory (unenforced) maximum when we know the total iteration count
symbol_table global symbol table
Returns
false if loop_id belongs to an enumeration's static initializer and unwind_count is <= the enumeration size, or unknown (defer / no decision) otherwise.

Definition at line 70 of file java_enum_static_init_unwind_handler.cpp.

AltStyle によって変換されたページ (->オリジナル) /