src/cpu/zero/vm/cppInterpreter_zero.cpp

changeset 1869
22af4ce8dba1
parent 1860
0c5b3cf3c1f5
child 1907
c18cbe5936b8
     1.1 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp	Tue May 11 15:19:19 2010 -0700
     1.2 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp	Wed May 12 03:49:52 2010 -0700
     1.3 @@ -37,15 +37,18 @@
     1.4    thread->reset_last_Java_frame();              \
     1.5    fixup_after_potential_safepoint()
     1.6  
     1.7 -void CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) {
     1.8 +int CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) {
     1.9    JavaThread *thread = (JavaThread *) THREAD;
    1.10  
    1.11    // Allocate and initialize our frame.
    1.12 -  InterpreterFrame *frame = InterpreterFrame::build(method, CHECK);
    1.13 +  InterpreterFrame *frame = InterpreterFrame::build(method, CHECK_0);
    1.14    thread->push_zero_frame(frame);
    1.15  
    1.16    // Execute those bytecodes!
    1.17    main_loop(0, THREAD);
    1.18 +
    1.19 +  // No deoptimized frames on the stack
    1.20 +  return 0;
    1.21  }
    1.22  
    1.23  void CppInterpreter::main_loop(int recurse, TRAPS) {
    1.24 @@ -165,7 +168,7 @@
    1.25      stack->push(result[-i]);
    1.26  }
    1.27  
    1.28 -void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) {
    1.29 +int CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) {
    1.30    // Make sure method is native and not abstract
    1.31    assert(method->is_native() && !method->is_abstract(), "should be");
    1.32  
    1.33 @@ -173,7 +176,7 @@
    1.34    ZeroStack *stack = thread->zero_stack();
    1.35  
    1.36    // Allocate and initialize our frame
    1.37 -  InterpreterFrame *frame = InterpreterFrame::build(method, CHECK);
    1.38 +  InterpreterFrame *frame = InterpreterFrame::build(method, CHECK_0);
    1.39    thread->push_zero_frame(frame);
    1.40    interpreterState istate = frame->interpreter_state();
    1.41    intptr_t *locals = istate->locals();
    1.42 @@ -430,25 +433,26 @@
    1.43        ShouldNotReachHere();
    1.44      }
    1.45    }
    1.46 +
    1.47 +  // No deoptimized frames on the stack
    1.48 +  return 0;
    1.49  }
    1.50  
    1.51 -void CppInterpreter::accessor_entry(methodOop method, intptr_t UNUSED, TRAPS) {
    1.52 +int CppInterpreter::accessor_entry(methodOop method, intptr_t UNUSED, TRAPS) {
    1.53    JavaThread *thread = (JavaThread *) THREAD;
    1.54    ZeroStack *stack = thread->zero_stack();
    1.55    intptr_t *locals = stack->sp();
    1.56  
    1.57    // Drop into the slow path if we need a safepoint check
    1.58    if (SafepointSynchronize::do_call_back()) {
    1.59 -    normal_entry(method, 0, THREAD);
    1.60 -    return;
    1.61 +    return normal_entry(method, 0, THREAD);
    1.62    }
    1.63  
    1.64    // Load the object pointer and drop into the slow path
    1.65    // if we have a NullPointerException
    1.66    oop object = LOCALS_OBJECT(0);
    1.67    if (object == NULL) {
    1.68 -    normal_entry(method, 0, THREAD);
    1.69 -    return;
    1.70 +    return normal_entry(method, 0, THREAD);
    1.71    }
    1.72  
    1.73    // Read the field index from the bytecode, which looks like this:
    1.74 @@ -470,15 +474,14 @@
    1.75    constantPoolCacheOop cache = method->constants()->cache();
    1.76    ConstantPoolCacheEntry* entry = cache->entry_at(index);
    1.77    if (!entry->is_resolved(Bytecodes::_getfield)) {
    1.78 -    normal_entry(method, 0, THREAD);
    1.79 -    return;
    1.80 +    return normal_entry(method, 0, THREAD);
    1.81    }
    1.82  
    1.83    // Get the result and push it onto the stack
    1.84    switch (entry->flag_state()) {
    1.85    case ltos:
    1.86    case dtos:
    1.87 -    stack->overflow_check(1, CHECK);
    1.88 +    stack->overflow_check(1, CHECK_0);
    1.89      stack->alloc(wordSize);
    1.90      break;
    1.91    }
    1.92 @@ -558,20 +561,25 @@
    1.93        ShouldNotReachHere();
    1.94      }
    1.95    }
    1.96 +
    1.97 +  // No deoptimized frames on the stack
    1.98 +  return 0;
    1.99  }
   1.100  
   1.101 -void CppInterpreter::empty_entry(methodOop method, intptr_t UNUSED, TRAPS) {
   1.102 +int CppInterpreter::empty_entry(methodOop method, intptr_t UNUSED, TRAPS) {
   1.103    JavaThread *thread = (JavaThread *) THREAD;
   1.104    ZeroStack *stack = thread->zero_stack();
   1.105  
   1.106    // Drop into the slow path if we need a safepoint check
   1.107    if (SafepointSynchronize::do_call_back()) {
   1.108 -    normal_entry(method, 0, THREAD);
   1.109 -    return;
   1.110 +    return normal_entry(method, 0, THREAD);
   1.111    }
   1.112  
   1.113    // Pop our parameters
   1.114    stack->set_sp(stack->sp() + method->size_of_parameters());
   1.115 +
   1.116 +  // No deoptimized frames on the stack
   1.117 +  return 0;
   1.118  }
   1.119  
   1.120  InterpreterFrame *InterpreterFrame::build(const methodOop method, TRAPS) {

mercurial