annotate src/cpu/zero/vm/methodHandles_zero.cpp @ 11981:530fe88b3b2c hs25-b44

Merge
author amurillo
date Fri, 02 Aug 2013 02:54:47 -0700
parents a3e2f723f2a5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
1 /*
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
2480
4b95bbb36464 7035870: JSR 292: Zero support
twisti
parents: 1972
diff changeset
3 * Copyright 2009, 2010, 2011 Red Hat, Inc.
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
5 *
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
6 * This code is free software; you can redistribute it and/or modify it
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
7 * under the terms of the GNU General Public License version 2 only, as
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
8 * published by the Free Software Foundation.
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
9 *
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
10 * This code is distributed in the hope that it will be useful, but WITHOUT
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
13 * version 2 for more details (a copy is included in the LICENSE file that
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
14 * accompanied this code).
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
15 *
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License version
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
17 * 2 along with this work; if not, write to the Free Software Foundation,
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
19 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1510
diff changeset
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1510
diff changeset
21 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 1510
diff changeset
22 * questions.
1010
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
23 *
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
24 */
354d3184f6b2 6890308: integrate zero assembler hotspot changes
never
parents:
diff changeset
25
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
26 #include "precompiled.hpp"
6926
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
27 #include "interpreter/interpreterGenerator.hpp"
1972
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
28 #include "interpreter/interpreter.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
29 #include "memory/allocation.inline.hpp"
f95d63e2154a 6989984: Use standard include model for Hospot
stefank
parents: 1552
diff changeset
30 #include "prims/methodHandles.hpp"
1346
47742b654fcb 6939731: JSR 292 Zero build fix after 6934494
twisti
parents: 1010
diff changeset
31
6926
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
32 void MethodHandles::invoke_target(Method* method, TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
33
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
34 JavaThread *thread = (JavaThread *) THREAD;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
35 ZeroStack *stack = thread->zero_stack();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
36 InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
37 interpreterState istate = frame->interpreter_state();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
38
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
39 // Trim back the stack to put the parameters at the top
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
40 stack->set_sp(istate->stack() + 1);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
41
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
42 Interpreter::invoke_method(method, method->from_interpreted_entry(), THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
43
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
44 // Convert the result
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
45 istate->set_stack(stack->sp() - 1);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
46
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
47 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
48
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
49 oop MethodHandles::popFromStack(TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
50
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
51 JavaThread *thread = (JavaThread *) THREAD;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
52 InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
53 interpreterState istate = frame->interpreter_state();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
54 intptr_t* topOfStack = istate->stack();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
55
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
56 oop top = STACK_OBJECT(-1);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
57 MORE_STACK(-1);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
58 istate->set_stack(topOfStack);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
59
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
60 return top;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
61
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
62 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
63
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
64 int MethodHandles::method_handle_entry_invokeBasic(Method* method, intptr_t UNUSED, TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
65
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
66 JavaThread *thread = (JavaThread *) THREAD;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
67 InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
68 interpreterState istate = frame->interpreter_state();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
69 intptr_t* topOfStack = istate->stack();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
70
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
71 // 'this' is a MethodHandle. We resolve the target method by accessing this.form.vmentry.vmtarget.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
72 int numArgs = method->size_of_parameters();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
73 oop lform1 = java_lang_invoke_MethodHandle::form(STACK_OBJECT(-numArgs)); // this.form
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
74 oop vmEntry1 = java_lang_invoke_LambdaForm::vmentry(lform1);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
75 Method* vmtarget = (Method*) java_lang_invoke_MemberName::vmtarget(vmEntry1);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
76
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
77 invoke_target(vmtarget, THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
78
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
79 // No deoptimized frames on the stack
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
80 return 0;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
81 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
82
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
83 int MethodHandles::method_handle_entry_linkToStaticOrSpecial(Method* method, intptr_t UNUSED, TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
84
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
85 // Pop appendix argument from stack. This is a MemberName which we resolve to the
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
86 // target method.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
87 oop vmentry = popFromStack(THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
88
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
89 Method* vmtarget = (Method*) java_lang_invoke_MemberName::vmtarget(vmentry);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
90
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
91 invoke_target(vmtarget, THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
92
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
93 return 0;
1510
d6e880569997 6949830: 6939134 broke Zero
twisti
parents: 1346
diff changeset
94 }
d6e880569997 6949830: 6939134 broke Zero
twisti
parents: 1346
diff changeset
95
6926
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
96 int MethodHandles::method_handle_entry_linkToInterface(Method* method, intptr_t UNUSED, TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
97 JavaThread *thread = (JavaThread *) THREAD;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
98 InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
99 interpreterState istate = frame->interpreter_state();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
100
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
101 // Pop appendix argument from stack. This is a MemberName which we resolve to the
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
102 // target method.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
103 oop vmentry = popFromStack(THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
104 intptr_t* topOfStack = istate->stack();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
105
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
106 // Resolve target method by looking up in the receiver object's itable.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
107 Klass* clazz = java_lang_Class::as_Klass(java_lang_invoke_MemberName::clazz(vmentry));
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
108 intptr_t vmindex = java_lang_invoke_MemberName::vmindex(vmentry);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
109 Method* target = (Method*) java_lang_invoke_MemberName::vmtarget(vmentry);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
110
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
111 int numArgs = target->size_of_parameters();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
112 oop recv = STACK_OBJECT(-numArgs);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
113
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
114 InstanceKlass* klass_part = InstanceKlass::cast(recv->klass());
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
115 itableOffsetEntry* ki = (itableOffsetEntry*) klass_part->start_of_itable();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
116 int i;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
117 for ( i = 0 ; i < klass_part->itable_length() ; i++, ki++ ) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
118 if (ki->interface_klass() == clazz) break;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
119 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
120
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
121 itableMethodEntry* im = ki->first_method_entry(recv->klass());
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
122 Method* vmtarget = im[vmindex].method();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
123
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
124 invoke_target(vmtarget, THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
125
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
126 return 0;
1346
47742b654fcb 6939731: JSR 292 Zero build fix after 6934494
twisti
parents: 1010
diff changeset
127 }
6926
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
128
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
129 int MethodHandles::method_handle_entry_linkToVirtual(Method* method, intptr_t UNUSED, TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
130 JavaThread *thread = (JavaThread *) THREAD;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
131
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
132 InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
133 interpreterState istate = frame->interpreter_state();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
134
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
135 // Pop appendix argument from stack. This is a MemberName which we resolve to the
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
136 // target method.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
137 oop vmentry = popFromStack(THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
138 intptr_t* topOfStack = istate->stack();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
139
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
140 // Resolve target method by looking up in the receiver object's vtable.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
141 intptr_t vmindex = java_lang_invoke_MemberName::vmindex(vmentry);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
142 Method* target = (Method*) java_lang_invoke_MemberName::vmtarget(vmentry);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
143 int numArgs = target->size_of_parameters();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
144 oop recv = STACK_OBJECT(-numArgs);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
145 Klass* clazz = recv->klass();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
146 Klass* klass_part = InstanceKlass::cast(clazz);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
147 klassVtable* vtable = klass_part->vtable();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
148 Method* vmtarget = vtable->method_at(vmindex);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
149
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
150 invoke_target(vmtarget, THREAD);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
151
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
152 return 0;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
153 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
154
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
155 int MethodHandles::method_handle_entry_invalid(Method* method, intptr_t UNUSED, TRAPS) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
156 ShouldNotReachHere();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
157 return 0;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
158 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
159
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
160 address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler* masm,
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
161 vmIntrinsics::ID iid) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
162 switch (iid) {
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
163 case vmIntrinsics::_invokeGeneric:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
164 case vmIntrinsics::_compiledLambdaForm:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
165 // Perhaps surprisingly, the symbolic references visible to Java are not directly used.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
166 // They are linked to Java-generated adapters via MethodHandleNatives.linkMethod.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
167 // They all allow an appendix argument.
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
168 return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_invalid);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
169 case vmIntrinsics::_invokeBasic:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
170 return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_invokeBasic);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
171 case vmIntrinsics::_linkToStatic:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
172 case vmIntrinsics::_linkToSpecial:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
173 return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToStaticOrSpecial);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
174 case vmIntrinsics::_linkToInterface:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
175 return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToInterface);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
176 case vmIntrinsics::_linkToVirtual:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
177 return InterpreterGenerator::generate_entry_impl(masm, (address) MethodHandles::method_handle_entry_linkToVirtual);
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
178 default:
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
179 ShouldNotReachHere();
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
180 return NULL;
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
181 }
a3e2f723f2a5 8000780: make Zero build and run with JDK8
twisti
parents: 2480
diff changeset
182 }