Conversation
7b37755 to
07ff702
Compare
bc0a7c3 to
ef71950
Compare
| klass = *((Klass**) (intptr_t) (base_address + offset)); | ||
| intptr_t temp = (intptr_t) *((Klass**) (intptr_t) (base_address + offset)); | ||
| // clear the bits used for acmp data profiling | ||
| clear_bits(temp, 0b011); |
There was a problem hiding this comment.
use a constant for the bitmask please with proper doc
5dbf959 to
543708d
Compare
ddfe4c6 to
31f10f3
Compare
dougxc
left a comment
There was a problem hiding this comment.
I left a first round of comments and think they should be addressed before more reviewing. A more general comment is that new JVMCI tests should be added for as much as possible of the new JVMCI code.
|
|
||
| call = nativeCall_at(_instructions->start() + pc_offset); | ||
| call->set_destination(SharedRuntime::get_resolve_virtual_call_stub()); | ||
| if(method()->has_scalarized_args()) { |
There was a problem hiding this comment.
Space between if and (. Same everywhere else.
| if(method()->has_scalarized_args()) { | ||
| _instructions->relocate(call->instruction_address(), | ||
| virtual_call_Relocation::spec(_invoke_mark_pc), | ||
| virtual_call_Relocation::spec(_invoke_mark_pc, _oop_recorder->find_index(method())), |
There was a problem hiding this comment.
Please find all the places in the aarch64 code that will need similar changes and try stub it out or at least put a TBD comment.
| // If inline types are passed as fields, use the extended signature | ||
| // which contains the types of all (oop) fields of the inline type. | ||
| if (is_compiled_by_c2() && callee->has_scalarized_args()) { | ||
| if ((is_compiled_by_c2() || is_compiled_by_jvmci()) && callee->has_scalarized_args()) { |
There was a problem hiding this comment.
Maybe it's worth adding a nmethod::can_scalarize_args abstraction?
| return method()->c1_needs_stack_repair(); | ||
| } else if (is_compiled_by_c2()) { | ||
| } else if (is_compiled_by_c2() || is_compiled_by_jvmci()) { | ||
| return method()->c2_needs_stack_repair(); |
There was a problem hiding this comment.
rename c2_needs_stack_repair to c2_or_jvmci_needs_stack_repair. This will hopefully prompt a follow-on discussion with the Valhalla team about a better name.
There was a problem hiding this comment.
Probably change that if we are sure that Graal should also rely on the calling convention.
| Bytecodes::Code byte, bool check_null_and_abstract, TRAPS); | ||
| Bytecodes::Code byte, bool check_null_or_abstract, TRAPS); | ||
|
|
||
| static void resolve_invoke_jvmci(CallInfo& result, Handle recv, const constantPoolHandle& pool, int index, Bytecodes::Code byte, bool check_null_or_abstract, TRAPS); |
There was a problem hiding this comment.
Dead code? Doesn't seem to be implemented.
There was a problem hiding this comment.
Yes forgot to delete it.
| @Override | ||
| ResolvedJavaType getArrayClass(); | ||
|
|
||
| default ResolvedJavaType getFlatArrayClass() { |
There was a problem hiding this comment.
Every method in jdk.vm.ci.meta needs javadoc.
| } | ||
|
|
||
| /** | ||
| * Checks whether this type has an identity. |
There was a problem hiding this comment.
What does "identity" mean here? Where ever possible, cross reference core reflection classes and methods (e.g. Class.isIdentity()) that explain these concepts. The more JVMCI can lean on core Java documentation, the easier it will be to understand (and the better the chance of it staying consistent).
| @@ -0,0 +1,19 @@ | |||
| package jdk.vm.ci.hotspot; | |||
|
|
|||
| public interface SingleTypeEntry{ | |||
There was a problem hiding this comment.
javadoc for the class and all methods please
| /** | ||
| * Gets the registers to be used for returning multiple values e.g. used for a scalarized inline object. | ||
| */ | ||
| default Register[] getReturnRegisters(JavaKind[] kinds, boolean includeRax) { |
There was a problem hiding this comment.
Rax cannot be mentioned here - it's x64 specific.
There was a problem hiding this comment.
True, actually the bool is used to decide whether the first general return register should be included or not
| Register getReturnRegister(JavaKind kind); | ||
|
|
||
| /** | ||
| * Gets the registers to be used for returning multiple values e.g. used for a scalarized inline object. |
There was a problem hiding this comment.
Needs more precise specification. How does kinds relate to the returned value? Are they the same length even when longs and doubles are involved? Providing an example can help.
There was a problem hiding this comment.
Only needed to decide if the value is put into a regular or xmm register, I will add a comment. But it is just the same as with getReturnRegister just using multiple kinds.
| */ | ||
| package jdk.vm.ci.meta; | ||
|
|
||
| import jdk.vm.ci.hotspot.HotSpotSignature; |
There was a problem hiding this comment.
Cannot reference HotSpot specific types in VM agnostic parts of the API.
There was a problem hiding this comment.
Ah yes the function that uses it can be deleted anyway (was never used actually).
dougxc
left a comment
There was a problem hiding this comment.
Are all the test changes ready for review by the Valhalla team?
| * @param index the index of a formal parameter in the signature | ||
| * @return the instance fields as types including the is not null type | ||
| */ | ||
| default JavaType[] getScalarizedParameter(int index) { |
There was a problem hiding this comment.
We should List instead of arrays for new method, especially now that there are convenient ways to create immutable lists with the List.of(...) static methods.
|
|
||
| final Scenario[] scenarios = { | ||
| new Scenario(0, | ||
| /*new Scenario(0, |
There was a problem hiding this comment.
Commented out code will have to be removed or uncommented before merging.
1754167 to
fdb1690
Compare
|
Please open a new version of this PR (in draft state) that targets https://github.com/openjdk/valhalla/tree/lworld instead of https://github.com/MichaelHaas99/valhalla/tree/lworld. The PR description should describe what state the changes are in and what needs to be done before it's ready for taking out of draft state. |
4bf3091 to
6115652
Compare
fc4d873 to
d1331cc
Compare
No description provided.