Mercurial > hg > truffle
comparison src/share/vm/c1x/c1x_CodeInstaller.cpp @ 2215:999f8086cc4f
More changes to make it compile and work on win64.
author | Thomas Wuerthinger <thomas.wuerthinger@gmail.com> |
---|---|
date | Mon, 21 Feb 2011 20:44:57 +0100 |
parents | 9569fdf936ff |
children | a2babfb34c24 |
comparison
equal
deleted
inserted
replaced
2214:30fd69882184 | 2215:999f8086cc4f |
---|---|
54 | 54 |
55 static bool is_bit_set(oop bit_map, int i) { | 55 static bool is_bit_set(oop bit_map, int i) { |
56 const int MapWordBits = 64; | 56 const int MapWordBits = 64; |
57 if (i < MapWordBits) { | 57 if (i < MapWordBits) { |
58 jlong low = CiBitMap::low(bit_map); | 58 jlong low = CiBitMap::low(bit_map); |
59 return (low & (1L << i)) != 0; | 59 return (low & (1LL << i)) != 0; |
60 } else { | 60 } else { |
61 jint extra_idx = (i - MapWordBits) / MapWordBits; | 61 jint extra_idx = (i - MapWordBits) / MapWordBits; |
62 arrayOop extra = (arrayOop) CiBitMap::extra(bit_map); | 62 arrayOop extra = (arrayOop) CiBitMap::extra(bit_map); |
63 assert(extra_idx >= 0 && extra_idx < extra->length(), "unexpected index"); | 63 assert(extra_idx >= 0 && extra_idx < extra->length(), "unexpected index"); |
64 jlong word = ((jlong*) extra->base(T_LONG))[extra_idx]; | 64 jlong word = ((jlong*) extra->base(T_LONG))[extra_idx]; |
65 return (word & (1L << (i % MapWordBits))) != 0; | 65 return (word & (1LL << (i % MapWordBits))) != 0; |
66 } | 66 } |
67 } | 67 } |
68 | 68 |
69 // creates a hotspot oop map out of the byte arrays provided by CiDebugInfo | 69 // creates a hotspot oop map out of the byte arrays provided by CiDebugInfo |
70 static OopMap* create_oop_map(jint frame_size, jint parameter_count, oop debug_info) { | 70 static OopMap* create_oop_map(jint frame_size, jint parameter_count, oop debug_info) { |
141 oop obj = CiConstant::object(value); | 141 oop obj = CiConstant::object(value); |
142 if (obj == NULL) { | 142 if (obj == NULL) { |
143 return new ConstantOopWriteValue(NULL); | 143 return new ConstantOopWriteValue(NULL); |
144 } else { | 144 } else { |
145 obj->print(); | 145 obj->print(); |
146 ShouldNotReachHere(); | |
147 } | 146 } |
148 } else if (type == T_ADDRESS) { | 147 } else if (type == T_ADDRESS) { |
149 return new ConstantLongValue(prim); | 148 return new ConstantLongValue(prim); |
150 } | 149 } |
151 tty->print("%i", type); | 150 tty->print("%i", type); |
152 ShouldNotReachHere(); | |
153 } else { | 151 } else { |
154 value->klass()->print(); | 152 value->klass()->print(); |
155 value->print(); | 153 value->print(); |
156 ShouldNotReachHere(); | 154 } |
157 } | 155 ShouldNotReachHere(); |
156 return NULL; | |
158 } | 157 } |
159 | 158 |
160 // constructor used to create a method | 159 // constructor used to create a method |
161 CodeInstaller::CodeInstaller(Handle target_method) { | 160 CodeInstaller::CodeInstaller(Handle target_method) { |
162 ciMethod *ciMethodObject = NULL; | 161 ciMethod *ciMethodObject = NULL; |