Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalJavaAccess.cpp @ 2891:75a99b4f1c98
Rebranded C++ part from C1X to Graal.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 08 Jun 2011 14:01:51 +0200 |
parents | c23d45daff9b |
children | 0e3ec0a4eda4 |
comparison
equal
deleted
inserted
replaced
2890:c23d45daff9b | 2891:75a99b4f1c98 |
---|---|
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 "c1x/c1x_JavaAccess.hpp" | 25 #include "graal/graalJavaAccess.hpp" |
26 #include "runtime/jniHandles.hpp" | 26 #include "runtime/jniHandles.hpp" |
27 #include "classfile/symbolTable.hpp" | 27 #include "classfile/symbolTable.hpp" |
28 // This function is similar to javaClasses.cpp, it computes the field offset of a (static or instance) field. | 28 // This function is similar to javaClasses.cpp, it computes the field offset of a (static or instance) field. |
29 // It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded. | 29 // It looks up the name and signature symbols without creating new ones, all the symbols of these classes need to be already loaded. |
30 | 30 |
48 } | 48 } |
49 assert(fd.is_static() == static_field, "static/instance mismatch"); | 49 assert(fd.is_static() == static_field, "static/instance mismatch"); |
50 dest_offset = fd.offset(); | 50 dest_offset = fd.offset(); |
51 } | 51 } |
52 | 52 |
53 // This piece of macro magic creates the contents of the c1x_compute_offsets method that initializes the field indices of all the access classes. | 53 // This piece of macro magic creates the contents of the graal_compute_offsets method that initializes the field indices of all the access classes. |
54 | 54 |
55 #define START_CLASS(name) { klassOop k = SystemDictionary::name##_klass(); assert(k != NULL, "Could not find class " #name ""); | 55 #define START_CLASS(name) { klassOop k = SystemDictionary::name##_klass(); assert(k != NULL, "Could not find class " #name ""); |
56 | 56 |
57 #define END_CLASS } | 57 #define END_CLASS } |
58 | 58 |
63 #define LONG_FIELD(klass, name) FIELD(klass, name, "J", false) | 63 #define LONG_FIELD(klass, name) FIELD(klass, name, "J", false) |
64 #define OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, false) | 64 #define OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, false) |
65 #define STATIC_OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, true) | 65 #define STATIC_OOP_FIELD(klass, name, signature) FIELD(klass, name, signature, true) |
66 | 66 |
67 | 67 |
68 void c1x_compute_offsets() { | 68 void graal_compute_offsets() { |
69 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, OOP_FIELD, STATIC_OOP_FIELD) | 69 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, OOP_FIELD, STATIC_OOP_FIELD) |
70 } | 70 } |
71 | 71 |
72 #define EMPTY0 | 72 #define EMPTY0 |
73 #define EMPTY1(x) | 73 #define EMPTY1(x) |