Skip to content

Using jclass objects for metadata #33

Open
@dzagieboylo

Description

@dzagieboylo

Currently our runtime representation for Class<?> objects contains no extra information over the Java-specified Class object information.

We save all of the class metadata (# fields, field names, object size in bytes, etc) in a HashMap<jclass,metadata>.

Therefore every metadata lookup requires a hash map lookup and we need to allocate some extra memory for the map itself.

It is reasonable to store this metadata in the jclass objects themselves, in front of the Class objects so `*jclass == head of metadata` and `*(jclass + sizeof(metadata))` is a reference to the Class object.

This is a performance optimization that requires some compiler and runtime restructuring.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions