equal
deleted
inserted
replaced
151 } // end (UseStackBanging) |
151 } // end (UseStackBanging) |
152 } |
152 } |
153 |
153 |
154 void Label::add_patch_at(CodeBuffer* cb, int branch_loc) { |
154 void Label::add_patch_at(CodeBuffer* cb, int branch_loc) { |
155 assert(_loc == -1, "Label is unbound"); |
155 assert(_loc == -1, "Label is unbound"); |
|
156 // Don't add patch locations during scratch emit. |
|
157 if (cb->insts()->scratch_emit()) { return; } |
156 if (_patch_index < PatchCacheSize) { |
158 if (_patch_index < PatchCacheSize) { |
157 _patches[_patch_index] = branch_loc; |
159 _patches[_patch_index] = branch_loc; |
158 } else { |
160 } else { |
159 if (_patch_overflow == NULL) { |
161 if (_patch_overflow == NULL) { |
160 _patch_overflow = cb->create_patch_overflow(); |
162 _patch_overflow = cb->create_patch_overflow(); |