Definition at line 70 of file primitive.hpp.
Box a primitive of the given type.
If the type is an object, simply return it.
- Parameters
-
type | Type of the passed value. |
value | Value to box. |
- Returns
- Handle of the boxing Java object.
Definition at line 393 of file primitive.cpp.
Returns the primitive array-class of the given primitive class name.
- Parameters
-
- Returns
- Class structure.
Definition at line 314 of file primitive.cpp.
classinfo * Primitive::get_arrayclass_by_type |
( |
int |
type | ) |
|
|
static |
Returns the primitive array-class of the given type.
- Parameters
-
type | Integer type of the class. |
- Returns
- Class structure.
Definition at line 336 of file primitive.cpp.
classinfo * Primitive::get_class_by_char |
( |
char |
ch | ) |
|
|
static |
Returns the primitive class of the given type.
- Parameters
-
- Returns
- Class structure.
Definition at line 266 of file primitive.cpp.
Returns the primitive class of the given class name.
- Parameters
-
- Returns
- Class structure.
Definition at line 231 of file primitive.cpp.
classinfo * Primitive::get_class_by_type |
( |
int |
type | ) |
|
|
static |
Returns the primitive class of the given type.
- Parameters
-
type | Integer type of the class. |
- Returns
- Class structure.
Definition at line 253 of file primitive.cpp.
int Primitive::get_type_by_primitiveclass |
( |
classinfo * |
c | ) |
|
|
static |
Returns the primitive type of the given primitive-class.
- Parameters
-
- Returns
- Integer type of the class.
Definition at line 370 of file primitive.cpp.
int Primitive::get_type_by_wrapperclass |
( |
classinfo * |
c | ) |
|
|
static |
Returns the primitive type of the given wrapper-class.
- Parameters
-
- Returns
- Integer type of the class.
Definition at line 349 of file primitive.cpp.
void Primitive::initialize_table |
( |
| ) |
|
|
static |
Fill the primitive type table with the primitive-type classes, array-classes and wrapper classes.
This is important in the VM startup.
We split this primitive-type table initialization because of annotations in the bootstrap classes.
But we may get a problem if we have annotations in:
java/lang/Object java/lang/Cloneable java/io/Serializable
Also see: loader_preinit and linker_preinit.
Definition at line 94 of file primitive.cpp.
void Primitive::post_initialize_table |
( |
| ) |
|
|
static |
Finish the primitive-type table initialization.
In this step we set the vftbl of the primitive-type classes.
This is necessary because java/lang/Class is loaded and linked after the primitive types have been linked.
We have to do that in an extra function, as the primitive types are not stored in the classcache.
Definition at line 204 of file primitive.cpp.
Unbox a primitive of the given type.
If the type is an object, simply return it.
- Parameters
-
h | Handle of the Java object. |
- Returns
- Unboxed value as union.
Definition at line 442 of file primitive.cpp.
Unbox a primitive of the given type.
Also checks if the boxed primitive type can be widened into the destination type. This conversion is done according to "The Java Language Specification, Third Edition,
$5.1.2 Widening Primitive Conversion".
- Parameters
-
h | Handle of the boxing Java object. |
type | Destination type of the conversion. |
value | Pointer to union where the resulting primitive value will be stored will. |
- Returns
- True of the conversion is allowed, false otherwise.
Definition at line 508 of file primitive.cpp.
The documentation for this class was generated from the following files:
- /home/bbc/buildbot/slave/doxygen-compiler2/source/cacao/src/vm/primitive.hpp
- /home/bbc/buildbot/slave/doxygen-compiler2/source/cacao/src/vm/primitive.cpp