mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8171392: Move Klass pointers outside of ConstantPool entries so ConstantPool can be read-only
Added _resolved_klasses; moved _resolved_references to ConstantPoolCache, etc. Reviewed-by: coleenp, lfoltan, simonis, aph
This commit is contained in:
parent
0c74ceb12d
commit
c386cec7b1
32 changed files with 527 additions and 231 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2017, 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
|
||||
|
@ -2168,7 +2168,7 @@ run:
|
|||
ConstantPool* constants = istate->method()->constants();
|
||||
if (!constants->tag_at(index).is_unresolved_klass()) {
|
||||
// Make sure klass is initialized and doesn't have a finalizer
|
||||
Klass* entry = constants->slot_at(index).get_klass();
|
||||
Klass* entry = constants->resolved_klass_at(index);
|
||||
InstanceKlass* ik = InstanceKlass::cast(entry);
|
||||
if (ik->is_initialized() && ik->can_be_fastpath_allocated() ) {
|
||||
size_t obj_size = ik->size_helper();
|
||||
|
@ -2268,7 +2268,7 @@ run:
|
|||
if (METHOD->constants()->tag_at(index).is_unresolved_klass()) {
|
||||
CALL_VM(InterpreterRuntime::quicken_io_cc(THREAD), handle_exception);
|
||||
}
|
||||
Klass* klassOf = (Klass*) METHOD->constants()->slot_at(index).get_klass();
|
||||
Klass* klassOf = (Klass*) METHOD->constants()->resolved_klass_at(index);
|
||||
Klass* objKlass = STACK_OBJECT(-1)->klass(); // ebx
|
||||
//
|
||||
// Check for compatibilty. This check must not GC!!
|
||||
|
@ -2303,7 +2303,7 @@ run:
|
|||
if (METHOD->constants()->tag_at(index).is_unresolved_klass()) {
|
||||
CALL_VM(InterpreterRuntime::quicken_io_cc(THREAD), handle_exception);
|
||||
}
|
||||
Klass* klassOf = (Klass*) METHOD->constants()->slot_at(index).get_klass();
|
||||
Klass* klassOf = (Klass*) METHOD->constants()->resolved_klass_at(index);
|
||||
Klass* objKlass = STACK_OBJECT(-1)->klass();
|
||||
//
|
||||
// Check for compatibilty. This check must not GC!!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue