RFR(M) 7199175: JSR 292: C1 needs patching when invokedynamic/invokehandle call site is not linked
Christian Thalinger
christian.thalinger at oracle.com
Mon Jun 3 15:06:36 PDT 2013
On Jun 3, 2013, at 1:29 AM, Roland Westrelin <roland.westrelin at oracle.com> wrote:
> Christian,
>
> Can you confirm the last webrev:
>
> http://cr.openjdk.java.net/~roland/7199175/webrev.02/
>
> is ok with you?
Looks good. The only thing that looks odd is this method:
+PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {
+ PatchingStub::PatchID id = PatchingStub::load_mirror_id;
+ IRScope* scope = info->scope();
+ Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci());
+ if (Bytecodes::has_optional_appendix(bc_raw)) {
+ id = PatchingStub::load_appendix_id;
+ }
+ return id;
+}
It would be easier to read doing it like:
+PatchingStub::PatchID LIR_Assembler::patching_id(CodeEmitInfo* info) {
+ IRScope* scope = info->scope();
+ Bytecodes::Code bc_raw = scope->method()->raw_code_at_bci(info->stack()->bci());
+ if (Bytecodes::has_optional_appendix(bc_raw)) {
+ return PatchingStub::load_appendix_id;
+ }
+ return PatchingStub::load_mirror_id;
+}
-- Chris
>
> Roland.
More information about the hotspot-compiler-dev
mailing list