mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
6667620: (Escape Analysis) fix deoptimization for scalar replaced objects
Deoptimization code for reallocation and relocking scalar replaced objects has to be fixed. Reviewed-by: rasbold, never
This commit is contained in:
parent
50708126d4
commit
96e8bcb6aa
6 changed files with 163 additions and 55 deletions
|
@ -47,7 +47,8 @@ ScopeValue* DebugInfoReadStream::read_object_value() {
|
|||
}
|
||||
#endif
|
||||
ObjectValue* result = new ObjectValue(id);
|
||||
_obj_pool->append(result);
|
||||
// Cache the object since an object field could reference it.
|
||||
_obj_pool->push(result);
|
||||
result->read_object(this);
|
||||
return result;
|
||||
}
|
||||
|
@ -56,9 +57,9 @@ ScopeValue* DebugInfoReadStream::get_cached_object() {
|
|||
int id = read_int();
|
||||
assert(_obj_pool != NULL, "object pool does not exist");
|
||||
for (int i = _obj_pool->length() - 1; i >= 0; i--) {
|
||||
ObjectValue* sv = (ObjectValue*) _obj_pool->at(i);
|
||||
if (sv->id() == id) {
|
||||
return sv;
|
||||
ObjectValue* ov = (ObjectValue*) _obj_pool->at(i);
|
||||
if (ov->id() == id) {
|
||||
return ov;
|
||||
}
|
||||
}
|
||||
ShouldNotReachHere();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue