SharkValue* local(int index) { SharkValue *value = current_state()->local(index); assert(value != NULL, "shouldn't be"); assert(value->is_one_word() || (index + 1 < max_locals() && current_state()->local(index + 1) == NULL), "should be"); return value; }
SharkOSREntryCacher(SharkFunction* function, llvm::Value* method, llvm::Value* osr_buf) : SharkFunctionEntryCacher(function, method), _osr_buf( builder()->CreateBitCast( osr_buf, llvm::PointerType::getUnqual( llvm::ArrayType::get( SharkType::intptr_type(), max_locals() + max_monitors() * 2)))) {}
BitMap ciMethod::live_local_oops_at_bci(int bci) { VM_ENTRY_MARK; InterpreterOopMap mask; OopMapCache::compute_one_oop_map(get_Method(), bci, &mask); int mask_size = max_locals(); BitMap result(mask_size); result.clear(); int i; for (i = 0; i < mask_size ; i++ ) { if (mask.is_oop(i)) result.set_bit(i); } return result; }
bool StackMapFrame::has_flag_match_exception( const StackMapFrame* target) const { // We allow flags of {UninitThis} to assign to {} if-and-only-if the // target frame does not depend upon the current type. // This is slightly too strict, as we need only enforce that the // slots that were initialized by the <init> (the things that were // UninitializedThis before initialize_object() converted them) are unused. // However we didn't save that information so we'll enforce this upon // anything that might have been initialized. This is a rare situation // and javac never generates code that would end up here, but some profilers // (such as NetBeans) might, when adding exception handlers in <init> // methods to cover the invokespecial instruction. See 7020118. assert(max_locals() == target->max_locals() && stack_size() == target->stack_size(), "StackMap sizes must match"); VerificationType top = VerificationType::top_type(); VerificationType this_type = verifier()->current_type(); if (!flag_this_uninit() || target->flags() != 0) { return false; } for (int i = 0; i < target->locals_size(); ++i) { if (locals()[i] == this_type && target->locals()[i] != top) { return false; } } for (int i = 0; i < target->stack_size(); ++i) { if (stack()[i] == this_type && target->stack()[i] != top) { return false; } } return true; }