equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
36 #include "oops/oop.inline.hpp" |
36 #include "oops/oop.inline.hpp" |
37 #include "prims/jvmtiExport.hpp" |
37 #include "prims/jvmtiExport.hpp" |
38 #include "prims/jvmtiThreadState.hpp" |
38 #include "prims/jvmtiThreadState.hpp" |
39 #include "prims/methodHandles.hpp" |
39 #include "prims/methodHandles.hpp" |
40 #include "runtime/arguments.hpp" |
40 #include "runtime/arguments.hpp" |
41 #include "runtime/deoptimization.hpp" |
|
42 #include "runtime/frame.inline.hpp" |
41 #include "runtime/frame.inline.hpp" |
43 #include "runtime/sharedRuntime.hpp" |
42 #include "runtime/sharedRuntime.hpp" |
44 #include "runtime/stubRoutines.hpp" |
43 #include "runtime/stubRoutines.hpp" |
45 #include "runtime/synchronizer.hpp" |
44 #include "runtime/synchronizer.hpp" |
46 #include "runtime/timer.hpp" |
45 #include "runtime/timer.hpp" |
59 |
58 |
60 #define __ _masm-> |
59 #define __ _masm-> |
61 |
60 |
62 |
61 |
63 //---------------------------------------------------------------------------------------------------- |
62 //---------------------------------------------------------------------------------------------------- |
64 |
|
65 |
|
66 |
|
67 |
|
68 int AbstractInterpreter::BasicType_as_index(BasicType type) { |
|
69 int i = 0; |
|
70 switch (type) { |
|
71 case T_BOOLEAN: i = 0; break; |
|
72 case T_CHAR : i = 1; break; |
|
73 case T_BYTE : i = 2; break; |
|
74 case T_SHORT : i = 3; break; |
|
75 case T_INT : i = 4; break; |
|
76 case T_LONG : i = 5; break; |
|
77 case T_VOID : i = 6; break; |
|
78 case T_FLOAT : i = 7; break; |
|
79 case T_DOUBLE : i = 8; break; |
|
80 case T_OBJECT : i = 9; break; |
|
81 case T_ARRAY : i = 9; break; |
|
82 default : ShouldNotReachHere(); |
|
83 } |
|
84 assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, "index out of bounds"); |
|
85 return i; |
|
86 } |
|
87 |
|
88 |
63 |
89 #ifndef _LP64 |
64 #ifndef _LP64 |
90 address AbstractInterpreterGenerator::generate_slow_signature_handler() { |
65 address AbstractInterpreterGenerator::generate_slow_signature_handler() { |
91 address entry = __ pc(); |
66 address entry = __ pc(); |
92 Argument argv(0, true); |
67 Argument argv(0, true); |
252 // the call_VM checks for exception, so we should never return here. |
227 // the call_VM checks for exception, so we should never return here. |
253 __ should_not_reach_here(); |
228 __ should_not_reach_here(); |
254 return entry; |
229 return entry; |
255 |
230 |
256 } |
231 } |
257 |
|
258 bool AbstractInterpreter::can_be_compiled(methodHandle m) { |
|
259 // No special entry points that preclude compilation |
|
260 return true; |
|
261 } |
|
262 |
|
263 void Deoptimization::unwind_callee_save_values(frame* f, vframeArray* vframe_array) { |
|
264 |
|
265 // This code is sort of the equivalent of C2IAdapter::setup_stack_frame back in |
|
266 // the days we had adapter frames. When we deoptimize a situation where a |
|
267 // compiled caller calls a compiled caller will have registers it expects |
|
268 // to survive the call to the callee. If we deoptimize the callee the only |
|
269 // way we can restore these registers is to have the oldest interpreter |
|
270 // frame that we create restore these values. That is what this routine |
|
271 // will accomplish. |
|
272 |
|
273 // At the moment we have modified c2 to not have any callee save registers |
|
274 // so this problem does not exist and this routine is just a place holder. |
|
275 |
|
276 assert(f->is_interpreted_frame(), "must be interpreted"); |
|
277 } |
|
278 |
|
279 |
|
280 //---------------------------------------------------------------------------------------------------- |
|
281 // Exceptions |
|