Mercurial > hg > truffle
comparison src/cpu/x86/vm/methodHandles_x86.hpp @ 4137:04b9a2566eec
Merge with hsx23/hotspot.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sat, 17 Dec 2011 21:40:27 +0100 |
parents | 59bc0d4d9ea3 |
children | 82e5a84b7436 |
comparison
equal
deleted
inserted
replaced
3737:9dc19b7d89a3 | 4137:04b9a2566eec |
---|---|
25 // Platform-specific definitions for method handles. | 25 // Platform-specific definitions for method handles. |
26 // These definitions are inlined into class MethodHandles. | 26 // These definitions are inlined into class MethodHandles. |
27 | 27 |
28 // Adapters | 28 // Adapters |
29 enum /* platform_dependent_constants */ { | 29 enum /* platform_dependent_constants */ { |
30 adapter_code_size = NOT_LP64(30000 DEBUG_ONLY(+ 10000)) LP64_ONLY(80000 DEBUG_ONLY(+ 120000)) | 30 adapter_code_size = NOT_LP64(16000 DEBUG_ONLY(+ 15000)) LP64_ONLY(32000 DEBUG_ONLY(+ 120000)) |
31 }; | 31 }; |
32 | 32 |
33 public: | 33 public: |
34 | 34 |
35 // The stack just after the recursive call from a ricochet frame | 35 // The stack just after the recursive call from a ricochet frame |
108 // disappear, and the final target of the adapter method handle | 108 // disappear, and the final target of the adapter method handle |
109 // will be invoked on the transformed argument list. | 109 // will be invoked on the transformed argument list. |
110 | 110 |
111 class RicochetFrame { | 111 class RicochetFrame { |
112 friend class MethodHandles; | 112 friend class MethodHandles; |
113 friend class VMStructs; | |
113 | 114 |
114 private: | 115 private: |
115 intptr_t* _continuation; // what to do when control gets back here | 116 intptr_t* _continuation; // what to do when control gets back here |
116 oopDesc* _saved_target; // target method handle to invoke on saved_args | 117 oopDesc* _saved_target; // target method handle to invoke on saved_args |
117 oopDesc* _saved_args_layout; // caching point for MethodTypeForm.vmlayout cookie | 118 oopDesc* _saved_args_layout; // caching point for MethodTypeForm.vmlayout cookie |
129 intptr_t conversion() const { return _conversion; } | 130 intptr_t conversion() const { return _conversion; } |
130 intptr_t* exact_sender_sp() const { return _exact_sender_sp; } | 131 intptr_t* exact_sender_sp() const { return _exact_sender_sp; } |
131 intptr_t* sender_link() const { return _sender_link; } | 132 intptr_t* sender_link() const { return _sender_link; } |
132 address sender_pc() const { return _sender_pc; } | 133 address sender_pc() const { return _sender_pc; } |
133 | 134 |
134 intptr_t* extended_sender_sp() const { return saved_args_base(); } | 135 intptr_t* extended_sender_sp() const { |
136 // The extended sender SP is above the current RicochetFrame. | |
137 return (intptr_t*) (((address) this) + sizeof(RicochetFrame)); | |
138 } | |
135 | 139 |
136 intptr_t return_value_slot_number() const { | 140 intptr_t return_value_slot_number() const { |
137 return adapter_conversion_vminfo(conversion()); | 141 return adapter_conversion_vminfo(conversion()); |
138 } | 142 } |
139 BasicType return_value_type() const { | 143 BasicType return_value_type() const { |
289 static void verify_method_handle(MacroAssembler* _masm, Register mh_reg) { | 293 static void verify_method_handle(MacroAssembler* _masm, Register mh_reg) { |
290 verify_klass(_masm, mh_reg, SystemDictionaryHandles::MethodHandle_klass(), | 294 verify_klass(_masm, mh_reg, SystemDictionaryHandles::MethodHandle_klass(), |
291 "reference is a MH"); | 295 "reference is a MH"); |
292 } | 296 } |
293 | 297 |
298 // Similar to InterpreterMacroAssembler::jump_from_interpreted. | |
299 // Takes care of special dispatch from single stepping too. | |
300 static void jump_from_method_handle(MacroAssembler* _masm, Register method, Register temp); | |
301 | |
294 static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN; | 302 static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN; |
295 | 303 |
296 static Register saved_last_sp_register() { | 304 static Register saved_last_sp_register() { |
297 // Should be in sharedRuntime, not here. | 305 // Should be in sharedRuntime, not here. |
298 return LP64_ONLY(r13) NOT_LP64(rsi); | 306 return LP64_ONLY(r13) NOT_LP64(rsi); |