Go to the source code of this file.
Definition at line 779 of file java_static_initializers.cpp.
Get the Java static initializer wrapper name for a given class (the wrapper checks if static initialization has already been done before invoking the real static initializer if not).
Doesn't check whether the symbol actually exists
Definition at line 73 of file java_static_initializers.cpp.
Create static initializer wrappers and possibly user-specified functions for initial static field value assignments for all classes that need them.
For each class that will require a static initializer wrapper, create a function named package.classname.<clinit_wrapper>, and a corresponding global tracking whether it has run or not. If a file containing initial static values is given, also create a function named package.classname::user_specified_clinit.
get_clinit_wrapper_body should be used to produce the method body when required. Definition at line 874 of file java_static_initializers.cpp.
Produces the static initializer wrapper body for the given function.
Note: this version of the clinit wrapper is not thread safe.
create_clinit_wrapper_symbols) Definition at line 718 of file java_static_initializers.cpp.
Thread safe version of the static initializer.
Produces the static initializer wrapper body for the given function. This static initializer implements (a simplification of) the algorithm defined in Section 5.5 of the JVM Specs. This function, or wrapper, checks whether static init has already taken place, calls the actual <clinit> method if not, and possibly recursively initializes super-classes and interfaces. Assume that C is the class to be initialized and that C extends C' and implements interfaces I1 ... In, then the algorithm is as follows:
Note: The current implementation does not deal with exceptions.
create_clinit_wrapper_symbols) Definition at line 520 of file java_static_initializers.cpp.
Create the body of a user_specified_clinit function for a given class, which includes assignments for all static fields of the class to values read from an input file.
If the file could not be parsed or an entry for this class could not be found in it, the user_specified_clinit function will only contain a call to the "real" clinit function, and not include any assignments itself. If an entry for this class is found but some of its static fields are not mentioned in the input file, those fields will be assigned default values (zero or null).
Definition at line 791 of file java_static_initializers.cpp.
Check if function_id is a clinit.
Definition at line 94 of file java_static_initializers.cpp.
Check if function_id is a clinit wrapper.
Definition at line 86 of file java_static_initializers.cpp.
Check if function_id is a user-specified clinit.
Definition at line 102 of file java_static_initializers.cpp.
Definition at line 78 of file java_static_initializers.cpp.