Skip to content

Conversation

hankluo6
Copy link
Collaborator

Implement invokedynamic opcode that can run bootstrap methods in order to do string concatenation, and modify ldc so that it can create new string.

Every string will be created by create_string function, which can place each string into heap so that strings can be released correctly.

Note that current implmentmentation of invokedynamic only supports makeConcatWithConstants, so callsite and lambda aren't supported.

classfile.h Outdated
u4 attribute_length;
u2 num_bootstrap_methods;
bootstrap_methods_t *bootstrap_methods;
} bootstrapMethods_attribute_t;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bootstrapMethods_attribute_t looks a bit longer. How about bootmethods_attr_t?

Implement `invokedynamic` opcode that can run bootstrap methods in order to
do string concatenation, and modify `ldc` so that it can create new string.

Every string will be created by `create_string` function, which can place
each string into heap so that strings can be released correctly.

Note that current implmentmentation of `invokedynamic` only supports
`makeConcatWithConstants`, so callsite and lambda aren't supported.

Add a new test script: "Strings.java"
@jserv jserv merged commit 001770a into sysprog21:master Sep 2, 2022
@jserv
Copy link
Collaborator

jserv commented Sep 2, 2022

Great work! This pull request makes it more practical as a JVM.

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.

2 participants