Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class init: support initializing interfaces #546

Merged
merged 6 commits into from Jun 4, 2021

Conversation

DanHeidinga
Copy link
Collaborator

@DanHeidinga DanHeidinga commented Jun 3, 2021

Walk the qcc_typeid_array[typeid].interfaceBits to find all the interfaces that are implemented by the current class. This finds the full set of interfaces that a class implements. Only interfaces that ObjectModel.declares_default_methods(type_id) actually need to be initialized. This initializes the right interfaces but the ordering doesn't match the spec yet.

TypeType is now a WordType so it can be created at runtime from an integer.

Added some helper methods to print numbers to allow tracing class initialization. They should be removed when we have a better way to trace runtime actions (JFR?).

Stubbed out Object.notifyAll() so the initialization state machine can use it before locks are fully supported.

Signed-off-by: Dan Heidinga <heidinga@redhat.com>
These are needed to be able to walk the set of implemented interfaces
for a given typeid so we can find the relevant initailizers

Signed-off-by: Dan Heidinga <heidinga@redhat.com>
Signed-off-by: Dan Heidinga <heidinga@redhat.com>
Signed-off-by: Dan Heidinga <heidinga@redhat.com>
Signed-off-by: Dan Heidinga <heidinga@redhat.com>
* Disable array element fetch to work around scheduling bug
* Add helper methods for tracing initialization

Signed-off-by: Dan Heidinga <heidinga@redhat.com>
@dmlloyd dmlloyd merged commit aa23f73 into qbicc:main Jun 4, 2021
@DanHeidinga DanHeidinga deleted the djh/clinit_groundwork branch June 4, 2021 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants