282 case T_OBJECT: value->l = (jobject)*oop_addr_in_slot(slot_addr); break;
283 default: ShouldNotReachHere();
284 }
285 }
286 static void set_jvalue_in_slot(intptr_t* slot_addr, BasicType type, jvalue* value) {
287 switch (type) {
288 case T_BOOLEAN: *int_addr_in_slot(slot_addr) = (value->z != 0); break;
289 case T_CHAR: *int_addr_in_slot(slot_addr) = value->c; break;
290 case T_BYTE: *int_addr_in_slot(slot_addr) = value->b; break;
291 case T_SHORT: *int_addr_in_slot(slot_addr) = value->s; break;
292 case T_INT: *int_addr_in_slot(slot_addr) = value->i; break;
293 case T_LONG: set_long_in_slot(slot_addr, value->j); break;
294 case T_FLOAT: *(jfloat*)int_addr_in_slot(slot_addr) = value->f; break;
295 case T_DOUBLE: set_long_in_slot(slot_addr, jlong_cast(value->d)); break;
296 case T_OBJECT: *oop_addr_in_slot(slot_addr) = (oop) value->l; break;
297 default: ShouldNotReachHere();
298 }
299 }
300
301 static void initialize_method_handle_entries();
302
303 // PPC-only: Support abs and sqrt like in compiler.
304 // For others we can use a normal (native) entry.
305 static bool math_entry_available(MethodKind kind);
306 };
307
308 //------------------------------------------------------------------------------------------------------------------------
309 // The interpreter generator.
310
311 class Template;
312 class AbstractInterpreterGenerator: public StackObj {
313 protected:
314 InterpreterMacroAssembler* _masm;
315
316 public:
317 AbstractInterpreterGenerator(StubQueue* _code);
318 };
319
320 #endif // SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP
|
282 case T_OBJECT: value->l = (jobject)*oop_addr_in_slot(slot_addr); break;
283 default: ShouldNotReachHere();
284 }
285 }
286 static void set_jvalue_in_slot(intptr_t* slot_addr, BasicType type, jvalue* value) {
287 switch (type) {
288 case T_BOOLEAN: *int_addr_in_slot(slot_addr) = (value->z != 0); break;
289 case T_CHAR: *int_addr_in_slot(slot_addr) = value->c; break;
290 case T_BYTE: *int_addr_in_slot(slot_addr) = value->b; break;
291 case T_SHORT: *int_addr_in_slot(slot_addr) = value->s; break;
292 case T_INT: *int_addr_in_slot(slot_addr) = value->i; break;
293 case T_LONG: set_long_in_slot(slot_addr, value->j); break;
294 case T_FLOAT: *(jfloat*)int_addr_in_slot(slot_addr) = value->f; break;
295 case T_DOUBLE: set_long_in_slot(slot_addr, jlong_cast(value->d)); break;
296 case T_OBJECT: *oop_addr_in_slot(slot_addr) = (oop) value->l; break;
297 default: ShouldNotReachHere();
298 }
299 }
300
301 static void initialize_method_handle_entries();
302 };
303
304 //------------------------------------------------------------------------------------------------------------------------
305 // The interpreter generator.
306
307 class Template;
308 class AbstractInterpreterGenerator: public StackObj {
309 protected:
310 InterpreterMacroAssembler* _masm;
311
312 public:
313 AbstractInterpreterGenerator(StubQueue* _code);
314 };
315
316 #endif // SHARE_VM_INTERPRETER_ABSTRACTINTERPRETER_HPP
|