Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 3053:b7f45b37dd43
Fix bug in FrameState handling for LoopBegin, BitMap -> GraalBitMap in some assertions in graalCodeInstaller
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 21 Jun 2011 10:35:27 +0200 |
parents | 1305cb3809c1 |
children | 46fe56f202a4 536528f48708 |
comparison
equal
deleted
inserted
replaced
3052:4afbc254f02d | 3053:b7f45b37dd43 |
---|---|
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(BitMap::size(register_map) == (unsigned) NUM_CPU_REGS, "unexpected register_map length"); | 76 assert(GraalBitMap::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(BitMap::size(frame_map) == frame_size / HeapWordSize, "unexpected frame_map length"); | 90 assert(GraalBitMap::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 || BitMap::size(frame_map) == 0, "cannot have frame_map for frames with size 0"); | 103 assert(frame_map == NULL || GraalBitMap::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 |