mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8146518: Zero interpreter broken with better byte behaviours
Replaced Method::_result_type_index with Method::_result_type for better byte behaviours should be used for Zero also. Reviewed-by: roland, kvn, bdelsart, kevinw
This commit is contained in:
parent
200784d505
commit
46cb32012a
4 changed files with 5 additions and 29 deletions
|
@ -94,6 +94,7 @@ intptr_t narrow(BasicType type, intptr_t result) {
|
|||
case T_SHORT:
|
||||
return (intptr_t)(jshort)result;
|
||||
case T_OBJECT: // nothing to do fall through
|
||||
case T_ARRAY:
|
||||
case T_LONG:
|
||||
case T_INT:
|
||||
case T_FLOAT:
|
||||
|
@ -184,7 +185,7 @@ void CppInterpreter::main_loop(int recurse, TRAPS) {
|
|||
}
|
||||
else if (istate->msg() == BytecodeInterpreter::return_from_method) {
|
||||
// Copy the result into the caller's frame
|
||||
result_slots = type2size[result_type_of(method)];
|
||||
result_slots = type2size[method->result_type()];
|
||||
assert(result_slots >= 0 && result_slots <= 2, "what?");
|
||||
result = istate->stack() + result_slots;
|
||||
break;
|
||||
|
@ -222,7 +223,7 @@ void CppInterpreter::main_loop(int recurse, TRAPS) {
|
|||
// Adjust result to smaller
|
||||
intptr_t res = result[-i];
|
||||
if (result_slots == 1) {
|
||||
res = narrow(result_type_of(method), res);
|
||||
res = narrow(method->result_type(), res);
|
||||
}
|
||||
stack->push(res);
|
||||
}
|
||||
|
@ -436,7 +437,7 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
|
|||
|
||||
// Push our result
|
||||
if (!HAS_PENDING_EXCEPTION) {
|
||||
BasicType type = result_type_of(method);
|
||||
BasicType type = method->result_type();
|
||||
stack->set_sp(stack->sp() - type2size[type]);
|
||||
|
||||
switch (type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue