1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
166 _patch_overflow = NULL; |
166 _patch_overflow = NULL; |
167 } |
167 } |
168 |
168 |
169 Label() { |
169 Label() { |
170 init(); |
170 init(); |
|
171 } |
|
172 |
|
173 ~Label() { |
|
174 assert(is_bound() || is_unused(), "Label was never bound to a location, but it was used as a jmp target"); |
|
175 } |
|
176 |
|
177 void reset() { |
|
178 init(); //leave _patch_overflow because it points to CodeBuffer. |
171 } |
179 } |
172 }; |
180 }; |
173 |
181 |
174 // A union type for code which has to assemble both constant and |
182 // A union type for code which has to assemble both constant and |
175 // non-constant operands, when the distinction cannot be made |
183 // non-constant operands, when the distinction cannot be made |