src/cpu/zero/vm/cppInterpreter_zero.cpp

changeset 8402
cc78c97abff8
parent 8368
32b682649973
child 8429
8f58998958ca
     1.1 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp	Mon Feb 29 10:30:03 2016 -0800
     1.2 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp	Wed Mar 02 19:16:30 2016 +0000
     1.3 @@ -93,6 +93,7 @@
     1.4      case T_SHORT:
     1.5        return (intptr_t)(jshort)result;
     1.6      case T_OBJECT:  // nothing to do fall through
     1.7 +    case T_ARRAY:
     1.8      case T_LONG:
     1.9      case T_INT:
    1.10      case T_FLOAT:
    1.11 @@ -183,7 +184,7 @@
    1.12      }
    1.13      else if (istate->msg() == BytecodeInterpreter::return_from_method) {
    1.14        // Copy the result into the caller's frame
    1.15 -      result_slots = type2size[result_type_of(method)];
    1.16 +      result_slots = type2size[method->result_type()];
    1.17        assert(result_slots >= 0 && result_slots <= 2, "what?");
    1.18        result = istate->stack() + result_slots;
    1.19        break;
    1.20 @@ -221,7 +222,7 @@
    1.21      // Adjust result to smaller
    1.22      intptr_t res = result[-i];
    1.23      if (result_slots == 1) {
    1.24 -      res = narrow(result_type_of(method), res);
    1.25 +      res = narrow(method->result_type(), res);
    1.26      }
    1.27      stack->push(res);
    1.28    }
    1.29 @@ -435,7 +436,7 @@
    1.30  
    1.31    // Push our result
    1.32    if (!HAS_PENDING_EXCEPTION) {
    1.33 -    BasicType type = result_type_of(method);
    1.34 +    BasicType type = method->result_type();
    1.35      stack->set_sp(stack->sp() - type2size[type]);
    1.36  
    1.37      switch (type) {
    1.38 @@ -795,26 +796,6 @@
    1.39    return i;
    1.40  }
    1.41  
    1.42 -BasicType CppInterpreter::result_type_of(Method* method) {
    1.43 -  BasicType t;
    1.44 -  switch (method->result_index()) {
    1.45 -    case 0 : t = T_BOOLEAN; break;
    1.46 -    case 1 : t = T_CHAR;    break;
    1.47 -    case 2 : t = T_BYTE;    break;
    1.48 -    case 3 : t = T_SHORT;   break;
    1.49 -    case 4 : t = T_INT;     break;
    1.50 -    case 5 : t = T_LONG;    break;
    1.51 -    case 6 : t = T_VOID;    break;
    1.52 -    case 7 : t = T_FLOAT;   break;
    1.53 -    case 8 : t = T_DOUBLE;  break;
    1.54 -    case 9 : t = T_OBJECT;  break;
    1.55 -    default: ShouldNotReachHere();
    1.56 -  }
    1.57 -  assert(AbstractInterpreter::BasicType_as_index(t) == method->result_index(),
    1.58 -         "out of step with AbstractInterpreter::BasicType_as_index");
    1.59 -  return t;
    1.60 -}
    1.61 -
    1.62  address InterpreterGenerator::generate_empty_entry() {
    1.63    if (!UseFastEmptyMethods)
    1.64      return NULL;

mercurial