7008809: should report the class in ArrayStoreExceptions from compiled code
Reviewed-by: iveresov, twisti
This commit is contained in:
parent
0f21994955
commit
4739203b6c
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,27 +129,6 @@ void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
|
||||
}
|
||||
|
||||
|
||||
// Implementation of ArrayStoreExceptionStub
|
||||
|
||||
ArrayStoreExceptionStub::ArrayStoreExceptionStub(CodeEmitInfo* info):
|
||||
_info(info) {
|
||||
}
|
||||
|
||||
|
||||
void ArrayStoreExceptionStub::emit_code(LIR_Assembler* ce) {
|
||||
__ bind(_entry);
|
||||
__ call(Runtime1::entry_for(Runtime1::throw_array_store_exception_id), relocInfo::runtime_call_type);
|
||||
__ delayed()->nop();
|
||||
ce->add_call_info_here(_info);
|
||||
ce->verify_oop_map(_info);
|
||||
#ifdef ASSERT
|
||||
__ should_not_reach_here();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Implementation of NewInstanceStub
|
||||
|
||||
NewInstanceStub::NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id) {
|
||||
|
@ -709,7 +709,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
case throw_array_store_exception_id:
|
||||
{
|
||||
__ set_info("throw_array_store_exception", dont_gc_arguments);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), false);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), true);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -411,20 +411,6 @@ void SimpleExceptionStub::emit_code(LIR_Assembler* ce) {
|
||||
}
|
||||
|
||||
|
||||
ArrayStoreExceptionStub::ArrayStoreExceptionStub(CodeEmitInfo* info):
|
||||
_info(info) {
|
||||
}
|
||||
|
||||
|
||||
void ArrayStoreExceptionStub::emit_code(LIR_Assembler* ce) {
|
||||
assert(__ rsp_offset() == 0, "frame size should be fixed");
|
||||
__ bind(_entry);
|
||||
__ call(RuntimeAddress(Runtime1::entry_for(Runtime1::throw_array_store_exception_id)));
|
||||
ce->add_call_info_here(_info);
|
||||
debug_only(__ should_not_reach_here());
|
||||
}
|
||||
|
||||
|
||||
void ArrayCopyStub::emit_code(LIR_Assembler* ce) {
|
||||
//---------------slow case: call to native-----------------
|
||||
__ bind(_entry);
|
||||
|
@ -1337,7 +1337,7 @@ OopMapSet* Runtime1::generate_code_for(StubID id, StubAssembler* sasm) {
|
||||
{ StubFrame f(sasm, "throw_array_store_exception", dont_gc_arguments);
|
||||
// tos + 0: link
|
||||
// + 1: return address
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), false);
|
||||
oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), true);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -476,18 +476,12 @@ class SimpleExceptionStub: public CodeStub {
|
||||
|
||||
|
||||
|
||||
class ArrayStoreExceptionStub: public CodeStub {
|
||||
class ArrayStoreExceptionStub: public SimpleExceptionStub {
|
||||
private:
|
||||
CodeEmitInfo* _info;
|
||||
|
||||
public:
|
||||
ArrayStoreExceptionStub(CodeEmitInfo* info);
|
||||
virtual void emit_code(LIR_Assembler* emit);
|
||||
virtual CodeEmitInfo* info() const { return _info; }
|
||||
virtual bool is_exception_throw_stub() const { return true; }
|
||||
virtual void visit(LIR_OpVisitState* visitor) {
|
||||
visitor->do_slow_case(_info);
|
||||
}
|
||||
ArrayStoreExceptionStub(LIR_Opr obj, CodeEmitInfo* info): SimpleExceptionStub(Runtime1::throw_array_store_exception_id, obj, info) {}
|
||||
#ifndef PRODUCT
|
||||
virtual void print_name(outputStream* out) const { out->print("ArrayStoreExceptionStub"); }
|
||||
#endif // PRODUCT
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -396,7 +396,7 @@ LIR_OpTypeCheck::LIR_OpTypeCheck(LIR_Code code, LIR_Opr object, LIR_Opr array, L
|
||||
, _should_profile(false)
|
||||
{
|
||||
if (code == lir_store_check) {
|
||||
_stub = new ArrayStoreExceptionStub(info_for_exception);
|
||||
_stub = new ArrayStoreExceptionStub(object, info_for_exception);
|
||||
assert(info_for_exception != NULL, "store_check throws exceptions");
|
||||
} else {
|
||||
ShouldNotReachHere();
|
||||
|
@ -339,8 +339,10 @@ JRT_ENTRY(void, Runtime1::unimplemented_entry(JavaThread* thread, StubID id))
|
||||
JRT_END
|
||||
|
||||
|
||||
JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* thread))
|
||||
THROW(vmSymbolHandles::java_lang_ArrayStoreException());
|
||||
JRT_ENTRY(void, Runtime1::throw_array_store_exception(JavaThread* thread, oopDesc* obj))
|
||||
ResourceMark rm(thread);
|
||||
const char* klass_name = Klass::cast(obj->klass())->external_name();
|
||||
SharedRuntime::throw_and_post_jvmti_exception(thread, vmSymbols::java_lang_ArrayStoreException(), klass_name);
|
||||
JRT_END
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -143,9 +143,9 @@ class Runtime1: public AllStatic {
|
||||
static void throw_index_exception(JavaThread* thread, int index);
|
||||
static void throw_div0_exception(JavaThread* thread);
|
||||
static void throw_null_pointer_exception(JavaThread* thread);
|
||||
static void throw_class_cast_exception(JavaThread* thread, oopDesc* obect);
|
||||
static void throw_class_cast_exception(JavaThread* thread, oopDesc* object);
|
||||
static void throw_incompatible_class_change_error(JavaThread* thread);
|
||||
static void throw_array_store_exception(JavaThread* thread);
|
||||
static void throw_array_store_exception(JavaThread* thread, oopDesc* object);
|
||||
|
||||
static void monitorenter(JavaThread* thread, oopDesc* obj, BasicObjectLock* lock);
|
||||
static void monitorexit (JavaThread* thread, BasicObjectLock* lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user