hotspot/src/share/vm/code/debugInfo.cpp
Print this page
rev 611 : Merge
*** 1,10 ****
#ifdef USE_PRAGMA_IDENT_SRC
#pragma ident "@(#)debugInfo.cpp 1.35 07/07/27 16:12:09 JVM"
#endif
/*
! * Copyright 1997-2006 Sun Microsystems, Inc. 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,10 ----
#ifdef USE_PRAGMA_IDENT_SRC
#pragma ident "@(#)debugInfo.cpp 1.35 07/07/27 16:12:09 JVM"
#endif
/*
! * Copyright 1997-2008 Sun Microsystems, Inc. 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 48,69 ****
for (int i = _obj_pool->length() - 1; i >= 0; i--) {
assert(((ObjectValue*) _obj_pool->at(i))->id() != id, "should not be read twice");
}
#endif
ObjectValue* result = new ObjectValue(id);
! _obj_pool->append(result);
result->read_object(this);
return result;
}
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;
}
}
ShouldNotReachHere();
return NULL;
}
--- 48,70 ----
for (int i = _obj_pool->length() - 1; i >= 0; i--) {
assert(((ObjectValue*) _obj_pool->at(i))->id() != id, "should not be read twice");
}
#endif
ObjectValue* result = new ObjectValue(id);
! // Cache the object since an object field could reference it.
! _obj_pool->push(result);
result->read_object(this);
return result;
}
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* ov = (ObjectValue*) _obj_pool->at(i);
! if (ov->id() == id) {
! return ov;
}
}
ShouldNotReachHere();
return NULL;
}