comparison src/share/vm/graal/graalCodeInstaller.cpp @ 3028:1305cb3809c1

Performed folder and class name changes in native code.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 20 Jun 2011 14:07:11 +0200
parents 5857923e563c
children b7f45b37dd43
comparison
equal deleted inserted replaced
3027:d5e9eff55773 3028:1305cb3809c1
53 } 53 }
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 = GraalBitMap::low(bit_map);
59 return (low & (1LL << 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) GraalBitMap::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 & (1LL << (i % MapWordBits))) != 0; 65 return (word & (1LL << (i % MapWordBits))) != 0;
66 } 66 }
67 } 67 }
71 OopMap* map = new OopMap(frame_size, parameter_count); 71 OopMap* map = new OopMap(frame_size, parameter_count);
72 oop register_map = (oop) CiDebugInfo::registerRefMap(debug_info); 72 oop register_map = (oop) CiDebugInfo::registerRefMap(debug_info);
73 oop frame_map = (oop) CiDebugInfo::frameRefMap(debug_info); 73 oop frame_map = (oop) CiDebugInfo::frameRefMap(debug_info);
74 74
75 if (register_map != NULL) { 75 if (register_map != NULL) {
76 assert(CiBitMap::size(register_map) == (unsigned) NUM_CPU_REGS, "unexpected register_map length"); 76 assert(BitMap::size(register_map) == (unsigned) NUM_CPU_REGS, "unexpected register_map length");
77 for (jint i = 0; i < NUM_CPU_REGS; i++) { 77 for (jint i = 0; i < NUM_CPU_REGS; i++) {
78 bool is_oop = is_bit_set(register_map, i); 78 bool is_oop = is_bit_set(register_map, i);
79 VMReg reg = get_hotspot_reg(i); 79 VMReg reg = get_hotspot_reg(i);
80 if (is_oop) { 80 if (is_oop) {
81 assert(OOP_ALLOWED[i], "this register may never be an oop, register map misaligned?"); 81 assert(OOP_ALLOWED[i], "this register may never be an oop, register map misaligned?");
85 } 85 }
86 } 86 }
87 } 87 }
88 88
89 if (frame_size > 0) { 89 if (frame_size > 0) {
90 assert(CiBitMap::size(frame_map) == frame_size / HeapWordSize, "unexpected frame_map length"); 90 assert(BitMap::size(frame_map) == frame_size / HeapWordSize, "unexpected frame_map length");
91 91
92 for (jint i = 0; i < frame_size / HeapWordSize; i++) { 92 for (jint i = 0; i < frame_size / HeapWordSize; i++) {
93 bool is_oop = is_bit_set(frame_map, i); 93 bool is_oop = is_bit_set(frame_map, i);
94 // hotspot stack slots are 4 bytes 94 // hotspot stack slots are 4 bytes
95 VMReg reg = VMRegImpl::stack2reg(i * 2); 95 VMReg reg = VMRegImpl::stack2reg(i * 2);
98 } else { 98 } else {
99 map->set_value(reg); 99 map->set_value(reg);
100 } 100 }
101 } 101 }
102 } else { 102 } else {
103 assert(frame_map == NULL || CiBitMap::size(frame_map) == 0, "cannot have frame_map for frames with size 0"); 103 assert(frame_map == NULL || BitMap::size(frame_map) == 0, "cannot have frame_map for frames with size 0");
104 } 104 }
105 105
106 return map; 106 return map;
107 } 107 }
108 108