Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiEnvBase.cpp @ 2491:0654ee04b214
Merge with OpenJDK.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 22 Apr 2011 15:30:53 +0200 |
parents | c7f3d0b4570f |
children | e6b1331a51d2 |
comparison
equal
deleted
inserted
replaced
2490:29246b1d2d3c | 2491:0654ee04b214 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
614 return false; | 614 return false; |
615 } | 615 } |
616 bool found = false; | 616 bool found = false; |
617 if (jfieldIDWorkaround::is_static_jfieldID(field)) { | 617 if (jfieldIDWorkaround::is_static_jfieldID(field)) { |
618 JNIid* id = jfieldIDWorkaround::from_static_jfieldID(field); | 618 JNIid* id = jfieldIDWorkaround::from_static_jfieldID(field); |
619 int offset = id->offset(); | 619 found = id->find_local_field(fd); |
620 klassOop holder = id->holder(); | |
621 found = instanceKlass::cast(holder)->find_local_field_from_offset(offset, true, fd); | |
622 } else { | 620 } else { |
623 // Non-static field. The fieldID is really the offset of the field within the object. | 621 // Non-static field. The fieldID is really the offset of the field within the object. |
624 int offset = jfieldIDWorkaround::from_instance_jfieldID(k, field); | 622 int offset = jfieldIDWorkaround::from_instance_jfieldID(k, field); |
625 found = instanceKlass::cast(k)->find_field_from_offset(offset, false, fd); | 623 found = instanceKlass::cast(k)->find_field_from_offset(offset, false, fd); |
626 } | 624 } |