Mercurial > hg > graal-compiler
diff src/share/vm/code/debugInfo.cpp @ 44:52fed2ec0afb
6667620: (Escape Analysis) fix deoptimization for scalar replaced objects
Summary: Deoptimization code for reallocation and relocking scalar replaced objects has to be fixed.
Reviewed-by: rasbold, never
author | kvn |
---|---|
date | Tue, 11 Mar 2008 11:25:13 -0700 |
parents | a61af66fc99e |
children | d1605aabd0a1 |
line wrap: on
line diff
--- a/src/share/vm/code/debugInfo.cpp Tue Mar 11 11:04:40 2008 -0700 +++ b/src/share/vm/code/debugInfo.cpp Tue Mar 11 11:25:13 2008 -0700 @@ -47,7 +47,8 @@ } #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 @@ 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();