Skip to content

Commit 60e4aca

Browse files
committed
8255890: Zero: remove unused methods from BytecodeInterpreter
Reviewed-by: coleenp
1 parent 397bae2 commit 60e4aca

File tree

2 files changed

+1
-185
lines changed

2 files changed

+1
-185
lines changed

src/hotspot/share/interpreter/zero/bytecodeInterpreter.cpp

Lines changed: 1 addition & 139 deletions
Original file line numberDiff line numberDiff line change
@@ -3049,151 +3049,12 @@ BytecodeInterpreter::BytecodeInterpreter(messages msg) {
30493049
_prev_link = NULL;
30503050
}
30513051

3052-
// Inline static functions for Java Stack and Local manipulation
3053-
3054-
// The implementations are platform dependent. We have to worry about alignment
3055-
// issues on some machines which can change on the same platform depending on
3056-
// whether it is an LP64 machine also.
3057-
address BytecodeInterpreter::stack_slot(intptr_t *tos, int offset) {
3058-
return (address) tos[Interpreter::expr_index_at(-offset)];
3059-
}
3060-
3061-
jint BytecodeInterpreter::stack_int(intptr_t *tos, int offset) {
3062-
return *((jint*) &tos[Interpreter::expr_index_at(-offset)]);
3063-
}
3064-
3065-
jfloat BytecodeInterpreter::stack_float(intptr_t *tos, int offset) {
3066-
return *((jfloat *) &tos[Interpreter::expr_index_at(-offset)]);
3067-
}
3068-
3069-
oop BytecodeInterpreter::stack_object(intptr_t *tos, int offset) {
3070-
return cast_to_oop(tos [Interpreter::expr_index_at(-offset)]);
3071-
}
3072-
3073-
jdouble BytecodeInterpreter::stack_double(intptr_t *tos, int offset) {
3074-
return ((VMJavaVal64*) &tos[Interpreter::expr_index_at(-offset)])->d;
3075-
}
3076-
3077-
jlong BytecodeInterpreter::stack_long(intptr_t *tos, int offset) {
3078-
return ((VMJavaVal64 *) &tos[Interpreter::expr_index_at(-offset)])->l;
3079-
}
3080-
3081-
// only used for value types
3082-
void BytecodeInterpreter::set_stack_slot(intptr_t *tos, address value,
3083-
int offset) {
3084-
*((address *)&tos[Interpreter::expr_index_at(-offset)]) = value;
3085-
}
3086-
3087-
void BytecodeInterpreter::set_stack_int(intptr_t *tos, int value,
3088-
int offset) {
3089-
*((jint *)&tos[Interpreter::expr_index_at(-offset)]) = value;
3090-
}
3091-
3092-
void BytecodeInterpreter::set_stack_float(intptr_t *tos, jfloat value,
3093-
int offset) {
3094-
*((jfloat *)&tos[Interpreter::expr_index_at(-offset)]) = value;
3095-
}
3096-
3097-
void BytecodeInterpreter::set_stack_object(intptr_t *tos, oop value,
3098-
int offset) {
3099-
*((oop *)&tos[Interpreter::expr_index_at(-offset)]) = value;
3100-
}
3101-
3102-
// needs to be platform dep for the 32 bit platforms.
3103-
void BytecodeInterpreter::set_stack_double(intptr_t *tos, jdouble value,
3104-
int offset) {
3105-
((VMJavaVal64*)&tos[Interpreter::expr_index_at(-offset)])->d = value;
3106-
}
3107-
3108-
void BytecodeInterpreter::set_stack_double_from_addr(intptr_t *tos,
3109-
address addr, int offset) {
3110-
(((VMJavaVal64*)&tos[Interpreter::expr_index_at(-offset)])->d =
3111-
((VMJavaVal64*)addr)->d);
3112-
}
3113-
3114-
void BytecodeInterpreter::set_stack_long(intptr_t *tos, jlong value,
3115-
int offset) {
3116-
((VMJavaVal64*)&tos[Interpreter::expr_index_at(-offset+1)])->l = 0xdeedbeeb;
3117-
((VMJavaVal64*)&tos[Interpreter::expr_index_at(-offset)])->l = value;
3118-
}
3119-
3120-
void BytecodeInterpreter::set_stack_long_from_addr(intptr_t *tos,
3121-
address addr, int offset) {
3122-
((VMJavaVal64*)&tos[Interpreter::expr_index_at(-offset+1)])->l = 0xdeedbeeb;
3123-
((VMJavaVal64*)&tos[Interpreter::expr_index_at(-offset)])->l =
3124-
((VMJavaVal64*)addr)->l;
3125-
}
3126-
3127-
// Locals
3128-
3129-
address BytecodeInterpreter::locals_slot(intptr_t* locals, int offset) {
3130-
return (address)locals[Interpreter::local_index_at(-offset)];
3131-
}
3132-
jint BytecodeInterpreter::locals_int(intptr_t* locals, int offset) {
3133-
return (jint)locals[Interpreter::local_index_at(-offset)];
3134-
}
3135-
jfloat BytecodeInterpreter::locals_float(intptr_t* locals, int offset) {
3136-
return (jfloat)locals[Interpreter::local_index_at(-offset)];
3137-
}
3138-
oop BytecodeInterpreter::locals_object(intptr_t* locals, int offset) {
3139-
return cast_to_oop(locals[Interpreter::local_index_at(-offset)]);
3140-
}
3141-
jdouble BytecodeInterpreter::locals_double(intptr_t* locals, int offset) {
3142-
return ((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->d;
3143-
}
3144-
jlong BytecodeInterpreter::locals_long(intptr_t* locals, int offset) {
3145-
return ((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->l;
3146-
}
3147-
3148-
// Returns the address of locals value.
3149-
address BytecodeInterpreter::locals_long_at(intptr_t* locals, int offset) {
3150-
return ((address)&locals[Interpreter::local_index_at(-(offset+1))]);
3151-
}
3152-
address BytecodeInterpreter::locals_double_at(intptr_t* locals, int offset) {
3153-
return ((address)&locals[Interpreter::local_index_at(-(offset+1))]);
3154-
}
3155-
3156-
// Used for local value or returnAddress
3157-
void BytecodeInterpreter::set_locals_slot(intptr_t *locals,
3158-
address value, int offset) {
3159-
*((address*)&locals[Interpreter::local_index_at(-offset)]) = value;
3160-
}
3161-
void BytecodeInterpreter::set_locals_int(intptr_t *locals,
3162-
jint value, int offset) {
3163-
*((jint *)&locals[Interpreter::local_index_at(-offset)]) = value;
3164-
}
3165-
void BytecodeInterpreter::set_locals_float(intptr_t *locals,
3166-
jfloat value, int offset) {
3167-
*((jfloat *)&locals[Interpreter::local_index_at(-offset)]) = value;
3168-
}
3169-
void BytecodeInterpreter::set_locals_object(intptr_t *locals,
3170-
oop value, int offset) {
3171-
*((oop *)&locals[Interpreter::local_index_at(-offset)]) = value;
3172-
}
3173-
void BytecodeInterpreter::set_locals_double(intptr_t *locals,
3174-
jdouble value, int offset) {
3175-
((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->d = value;
3176-
}
3177-
void BytecodeInterpreter::set_locals_long(intptr_t *locals,
3178-
jlong value, int offset) {
3179-
((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->l = value;
3180-
}
3181-
void BytecodeInterpreter::set_locals_double_from_addr(intptr_t *locals,
3182-
address addr, int offset) {
3183-
((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->d = ((VMJavaVal64*)addr)->d;
3184-
}
3185-
void BytecodeInterpreter::set_locals_long_from_addr(intptr_t *locals,
3186-
address addr, int offset) {
3187-
((VMJavaVal64*)&locals[Interpreter::local_index_at(-(offset+1))])->l = ((VMJavaVal64*)addr)->l;
3188-
}
3189-
31903052
void BytecodeInterpreter::astore(intptr_t* tos, int stack_offset,
31913053
intptr_t* locals, int locals_offset) {
31923054
intptr_t value = tos[Interpreter::expr_index_at(-stack_offset)];
31933055
locals[Interpreter::local_index_at(-locals_offset)] = value;
31943056
}
31953057

3196-
31973058
void BytecodeInterpreter::copy_stack_slot(intptr_t *tos, int from_offset,
31983059
int to_offset) {
31993060
tos[Interpreter::expr_index_at(-to_offset)] =
@@ -3203,6 +3064,7 @@ void BytecodeInterpreter::copy_stack_slot(intptr_t *tos, int from_offset,
32033064
void BytecodeInterpreter::dup(intptr_t *tos) {
32043065
copy_stack_slot(tos, -1, 0);
32053066
}
3067+
32063068
void BytecodeInterpreter::dup2(intptr_t *tos) {
32073069
copy_stack_slot(tos, -2, 0);
32083070
copy_stack_slot(tos, -1, 1);

src/hotspot/share/interpreter/zero/bytecodeInterpreter.hpp

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -509,52 +509,6 @@ static void swap(intptr_t *tos); /* swap top two elements */
509509
static void run(interpreterState istate);
510510
// The interpreter used if JVMTI needs interpreter events
511511
static void runWithChecks(interpreterState istate);
512-
static void End_Of_Interpreter(void);
513-
514-
// Inline static functions for Java Stack and Local manipulation
515-
516-
static address stack_slot(intptr_t *tos, int offset);
517-
static jint stack_int(intptr_t *tos, int offset);
518-
static jfloat stack_float(intptr_t *tos, int offset);
519-
static oop stack_object(intptr_t *tos, int offset);
520-
static jdouble stack_double(intptr_t *tos, int offset);
521-
static jlong stack_long(intptr_t *tos, int offset);
522-
523-
// only used for value types
524-
static void set_stack_slot(intptr_t *tos, address value, int offset);
525-
static void set_stack_int(intptr_t *tos, int value, int offset);
526-
static void set_stack_float(intptr_t *tos, jfloat value, int offset);
527-
static void set_stack_object(intptr_t *tos, oop value, int offset);
528-
529-
// needs to be platform dep for the 32 bit platforms.
530-
static void set_stack_double(intptr_t *tos, jdouble value, int offset);
531-
static void set_stack_long(intptr_t *tos, jlong value, int offset);
532-
533-
static void set_stack_double_from_addr(intptr_t *tos, address addr, int offset);
534-
static void set_stack_long_from_addr(intptr_t *tos, address addr, int offset);
535-
536-
// Locals
537-
538-
static address locals_slot(intptr_t* locals, int offset);
539-
static jint locals_int(intptr_t* locals, int offset);
540-
static jfloat locals_float(intptr_t* locals, int offset);
541-
static oop locals_object(intptr_t* locals, int offset);
542-
static jdouble locals_double(intptr_t* locals, int offset);
543-
static jlong locals_long(intptr_t* locals, int offset);
544-
545-
static address locals_long_at(intptr_t* locals, int offset);
546-
static address locals_double_at(intptr_t* locals, int offset);
547-
548-
static void set_locals_slot(intptr_t *locals, address value, int offset);
549-
static void set_locals_int(intptr_t *locals, jint value, int offset);
550-
static void set_locals_float(intptr_t *locals, jfloat value, int offset);
551-
static void set_locals_object(intptr_t *locals, oop value, int offset);
552-
static void set_locals_double(intptr_t *locals, jdouble value, int offset);
553-
static void set_locals_long(intptr_t *locals, jlong value, int offset);
554-
static void set_locals_double_from_addr(intptr_t *locals,
555-
address addr, int offset);
556-
static void set_locals_long_from_addr(intptr_t *locals,
557-
address addr, int offset);
558512

559513
static void astore(intptr_t* topOfStack, int stack_offset,
560514
intptr_t* locals, int locals_offset);

0 commit comments

Comments
 (0)