Skip to content

Commit 8d9e6d0

Browse files
committedOct 21, 2020
8255041: Zero: remove old JSR 292 support leftovers
Reviewed-by: rkennke
1 parent 0efdde1 commit 8d9e6d0

File tree

3 files changed

+0
-76
lines changed

3 files changed

+0
-76
lines changed
 

‎src/hotspot/cpu/zero/bytecodeInterpreter_zero.hpp

-18
Original file line numberDiff line numberDiff line change
@@ -153,22 +153,4 @@
153153
#define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \
154154
((VMJavaVal64*)(addr))->l)
155155

156-
// VMSlots implementation
157-
158-
#define VMSLOTS_SLOT(offset) ((intptr_t*)&vmslots[(offset)])
159-
#define VMSLOTS_ADDR(offset) ((address)vmslots[(offset)])
160-
#define VMSLOTS_INT(offset) (*((jint*)&vmslots[(offset)]))
161-
#define VMSLOTS_FLOAT(offset) (*((jfloat*)&vmslots[(offset)]))
162-
#define VMSLOTS_OBJECT(offset) ((oop)vmslots[(offset)])
163-
#define VMSLOTS_DOUBLE(offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d)
164-
#define VMSLOTS_LONG(offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->l)
165-
166-
#define SET_VMSLOTS_SLOT(value, offset) (*(intptr_t*)&vmslots[(offset)] = *(intptr_t *)(value))
167-
#define SET_VMSLOTS_ADDR(value, offset) (*((address *)&vmslots[(offset)]) = (value))
168-
#define SET_VMSLOTS_INT(value, offset) (*((jint *)&vmslots[(offset)]) = (value))
169-
#define SET_VMSLOTS_FLOAT(value, offset) (*((jfloat *)&vmslots[(offset)]) = (value))
170-
#define SET_VMSLOTS_OBJECT(value, offset) (*((oop *)&vmslots[(offset)]) = (value))
171-
#define SET_VMSLOTS_DOUBLE(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->d = (value))
172-
#define SET_VMSLOTS_LONG(value, offset) (((VMJavaVal64*)&vmslots[(offset) - 1])->l = (value))
173-
174156
#endif // CPU_ZERO_BYTECODEINTERPRETER_ZERO_HPP

‎src/hotspot/cpu/zero/zeroInterpreter_zero.cpp

-50
Original file line numberDiff line numberDiff line change
@@ -697,56 +697,6 @@ int ZeroInterpreter::empty_entry(Method* method, intptr_t UNUSED, TRAPS) {
697697
return 0;
698698
}
699699

700-
// The new slots will be inserted before slot insert_before.
701-
// Slots < insert_before will have the same slot number after the insert.
702-
// Slots >= insert_before will become old_slot + num_slots.
703-
void ZeroInterpreter::insert_vmslots(int insert_before, int num_slots, TRAPS) {
704-
JavaThread *thread = THREAD->as_Java_thread();
705-
ZeroStack *stack = thread->zero_stack();
706-
707-
// Allocate the space
708-
stack->overflow_check(num_slots, CHECK);
709-
stack->alloc(num_slots * wordSize);
710-
intptr_t *vmslots = stack->sp();
711-
712-
// Shuffle everything up
713-
for (int i = 0; i < insert_before; i++)
714-
SET_VMSLOTS_SLOT(VMSLOTS_SLOT(i + num_slots), i);
715-
}
716-
717-
void ZeroInterpreter::remove_vmslots(int first_slot, int num_slots, TRAPS) {
718-
JavaThread *thread = THREAD->as_Java_thread();
719-
ZeroStack *stack = thread->zero_stack();
720-
intptr_t *vmslots = stack->sp();
721-
722-
// Move everything down
723-
for (int i = first_slot - 1; i >= 0; i--)
724-
SET_VMSLOTS_SLOT(VMSLOTS_SLOT(i), i + num_slots);
725-
726-
// Deallocate the space
727-
stack->set_sp(stack->sp() + num_slots);
728-
}
729-
730-
BasicType ZeroInterpreter::result_type_of_handle(oop method_handle) {
731-
oop method_type = java_lang_invoke_MethodHandle::type(method_handle);
732-
oop return_type = java_lang_invoke_MethodType::rtype(method_type);
733-
return java_lang_Class::as_BasicType(return_type, (Klass* *) NULL);
734-
}
735-
736-
intptr_t* ZeroInterpreter::calculate_unwind_sp(ZeroStack* stack,
737-
oop method_handle) {
738-
oop method_type = java_lang_invoke_MethodHandle::type(method_handle);
739-
int argument_slots = java_lang_invoke_MethodType::ptype_slot_count(method_type);
740-
741-
return stack->sp() + argument_slots;
742-
}
743-
744-
JRT_ENTRY(void, ZeroInterpreter::throw_exception(JavaThread* thread,
745-
Symbol* name,
746-
char* message))
747-
THROW_MSG(name, message);
748-
JRT_END
749-
750700
InterpreterFrame *InterpreterFrame::build(Method* const method, TRAPS) {
751701
JavaThread *thread = THREAD->as_Java_thread();
752702
ZeroStack *stack = thread->zero_stack();

‎src/hotspot/cpu/zero/zeroInterpreter_zero.hpp

-8
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,4 @@
4141
// Main loop of normal_entry
4242
static void main_loop(int recurse, TRAPS);
4343

44-
private:
45-
// Helpers for method_handle_entry
46-
static void insert_vmslots(int insert_before, int num_slots, TRAPS);
47-
static void remove_vmslots(int first_slot, int num_slots, TRAPS);
48-
static BasicType result_type_of_handle(oop method_handle);
49-
static intptr_t* calculate_unwind_sp(ZeroStack* stack, oop method_handle);
50-
static void throw_exception(JavaThread* thread, Symbol* name,char *msg=NULL);
51-
5244
#endif // CPU_ZERO_CPPINTERPRETER_ZERO_HPP

0 commit comments

Comments
 (0)
Please sign in to comment.