Mercurial > hg > truffle
comparison src/share/vm/c1x/c1x_TargetMethod.cpp @ 1434:72cfb36c6bb2
* enabled all jtt tests
* added proxy that counts jni calls
* honor hotspot stackshadowpages
* constant pool caching
* monitor enter/exit
* arithmetic stubs (frem, drem, ...)
* create stack values for debug info
* some doc
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Thu, 30 Sep 2010 17:19:48 -0700 |
parents | b61a43cd1255 |
children | 20a3896518ac |
comparison
equal
deleted
inserted
replaced
1433:efba53f86c4f | 1434:72cfb36c6bb2 |
---|---|
23 */ | 23 */ |
24 | 24 |
25 # include "incls/_precompiled.incl" | 25 # include "incls/_precompiled.incl" |
26 # include "incls/_c1x_TargetMethod.cpp.incl" | 26 # include "incls/_c1x_TargetMethod.cpp.incl" |
27 | 27 |
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. | |
30 | |
28 static void compute_offset(int &dest_offset, klassOop klass_oop, const char* name, const char* signature, bool static_field) { | 31 static void compute_offset(int &dest_offset, klassOop klass_oop, const char* name, const char* signature, bool static_field) { |
29 symbolOop name_symbol = SymbolTable::probe(name, strlen(name)); | 32 symbolOop name_symbol = SymbolTable::probe(name, strlen(name)); |
30 symbolOop signature_symbol = SymbolTable::probe(signature, strlen(signature)); | 33 symbolOop signature_symbol = SymbolTable::probe(signature, strlen(signature)); |
31 assert(name_symbol != NULL, "symbol not found - class layout changed?"); | 34 assert(name_symbol != NULL, "symbol not found - class layout changed?"); |
32 assert(signature_symbol != NULL, "symbol not found - class layout changed?"); | 35 assert(signature_symbol != NULL, "symbol not found - class layout changed?"); |
40 } | 43 } |
41 assert(fd.is_static() == static_field, "static/instance mismatch"); | 44 assert(fd.is_static() == static_field, "static/instance mismatch"); |
42 dest_offset = fd.offset(); | 45 dest_offset = fd.offset(); |
43 } | 46 } |
44 | 47 |
45 // create the compute_class | 48 // This piece of macro magic creates the contents of the c1x_compute_offsets method that initializes the field indices of all the access classes. |
49 | |
46 #define START_CLASS(name) { klassOop k = SystemDictionary::name##_klass(); | 50 #define START_CLASS(name) { klassOop k = SystemDictionary::name##_klass(); |
47 | 51 |
48 #define END_CLASS } | 52 #define END_CLASS } |
49 | 53 |
50 #define FIELD(klass, name, signature, static_field) compute_offset(klass::_##name##_offset, k, #name, signature, static_field); | 54 #define FIELD(klass, name, signature, static_field) compute_offset(klass::_##name##_offset, k, #name, signature, static_field); |