Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 12356:359f7e70ae7f
Reduce HotSpot diff and fix previous merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 11 Oct 2013 15:41:33 +0200 |
parents | d7964e96b0b0 |
children | edacadae40a0 |
comparison
equal
deleted
inserted
replaced
12355:cefad50507d8 | 12356:359f7e70ae7f |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 | 23 |
24 #include "precompiled.hpp" | 24 #include "precompiled.hpp" |
25 #include "runtime/fieldDescriptor.hpp" | |
26 #include "memory/oopFactory.hpp" | 25 #include "memory/oopFactory.hpp" |
27 #include "oops/generateOopMap.hpp" | 26 #include "oops/generateOopMap.hpp" |
28 #include "oops/fieldStreams.hpp" | 27 #include "oops/fieldStreams.hpp" |
28 #include "runtime/fieldDescriptor.hpp" | |
29 #include "runtime/javaCalls.hpp" | 29 #include "runtime/javaCalls.hpp" |
30 #include "graal/graalRuntime.hpp" | 30 #include "graal/graalRuntime.hpp" |
31 #include "compiler/compileBroker.hpp" | 31 #include "compiler/compileBroker.hpp" |
32 #include "compiler/compilerOracle.hpp" | 32 #include "compiler/compilerOracle.hpp" |
33 #include "compiler/disassembler.hpp" | 33 #include "compiler/disassembler.hpp" |
507 Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF); | 507 Bytecodes::Code code = (Bytecodes::Code)(((int) opcode) & 0xFF); |
508 int offset = -1; | 508 int offset = -1; |
509 AccessFlags flags; | 509 AccessFlags flags; |
510 BasicType basic_type; | 510 BasicType basic_type; |
511 if (holder->klass() == SystemDictionary::HotSpotResolvedObjectType_klass()) { | 511 if (holder->klass() == SystemDictionary::HotSpotResolvedObjectType_klass()) { |
512 FieldAccessInfo result; | 512 fieldDescriptor result; |
513 LinkResolver::resolve_field(result, cp, cp_index, | 513 LinkResolver::resolve_field_access(result, cp, cp_index, Bytecodes::java_code(code), true, false, Thread::current()); |
514 Bytecodes::java_code(code), | 514 |
515 true, false, Thread::current()); | |
516 if (HAS_PENDING_EXCEPTION) { | 515 if (HAS_PENDING_EXCEPTION) { |
517 CLEAR_PENDING_EXCEPTION; | 516 CLEAR_PENDING_EXCEPTION; |
518 } else { | 517 } else { |
519 offset = result.field_offset(); | 518 offset = result.offset(); |
520 flags = result.access_flags(); | 519 flags = result.access_flags(); |
521 holder_klass = result.klass()(); | 520 holder_klass = result.field_holder(); |
522 basic_type = result.field_type(); | 521 basic_type = result.field_type(); |
523 holder = GraalCompiler::get_JavaType(holder_klass, CHECK_NULL); | 522 holder = GraalCompiler::get_JavaType(holder_klass, CHECK_NULL); |
524 } | 523 } |
525 } | 524 } |
526 | 525 |
1136 C2V_END | 1135 C2V_END |
1137 | 1136 |
1138 | 1137 |
1139 C2V_VMENTRY(jobject, readUnsafeUncompressedPointer, (JNIEnv *env, jobject, jobject o, jlong offset)) | 1138 C2V_VMENTRY(jobject, readUnsafeUncompressedPointer, (JNIEnv *env, jobject, jobject o, jlong offset)) |
1140 oop resolved_o = JNIHandles::resolve(o); | 1139 oop resolved_o = JNIHandles::resolve(o); |
1141 jlong address = offset + (jlong)resolved_o; | 1140 address addr = offset + (address)resolved_o; |
1142 return JNIHandles::make_local(*((oop*)address)); | 1141 return JNIHandles::make_local(*((oop*)addr)); |
1143 C2V_END | 1142 C2V_END |
1144 | 1143 |
1145 C2V_VMENTRY(jlong, readUnsafeKlassPointer, (JNIEnv *env, jobject, jobject o)) | 1144 C2V_VMENTRY(jlong, readUnsafeKlassPointer, (JNIEnv *env, jobject, jobject o)) |
1146 oop resolved_o = JNIHandles::resolve(o); | 1145 oop resolved_o = JNIHandles::resolve(o); |
1147 jlong klass = (jlong)(address)resolved_o->klass(); | 1146 jlong klass = (jlong)(address)resolved_o->klass(); |