Mercurial > hg > truffle
comparison src/share/vm/oops/constantPool.hpp @ 7624:b14da2e6f2dc
7174978: NPG: Fix bactrace builder for class redefinition
Summary: Remove Method* from backtrace but save version so redefine classes doesn't give inaccurate line numbers. Removed old Merlin API with duplicate code.
Reviewed-by: dholmes, sspitsyn
author | coleenp |
---|---|
date | Thu, 17 Jan 2013 13:40:31 -0500 |
parents | 18fb7da42534 |
children | b5f6465019f6 |
comparison
equal
deleted
inserted
replaced
7623:203f64878aab | 7624:b14da2e6f2dc |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, 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. |
101 bool _on_stack; // Redefined method still executing refers to this constant pool. | 101 bool _on_stack; // Redefined method still executing refers to this constant pool. |
102 | 102 |
103 union { | 103 union { |
104 // set for CDS to restore resolved references | 104 // set for CDS to restore resolved references |
105 int _resolved_reference_length; | 105 int _resolved_reference_length; |
106 // only set to non-zero if constant pool is merged by RedefineClasses | 106 // keeps version number for redefined classes (used in backtrace) |
107 int _orig_length; | 107 int _version; |
108 } _saved; | 108 } _saved; |
109 | 109 |
110 Monitor* _lock; | 110 Monitor* _lock; |
111 | 111 |
112 void set_tags(Array<u1>* tags) { _tags = tags; } | 112 void set_tags(Array<u1>* tags) { _tags = tags; } |
782 copy_cp_to_impl(h_this, start_i, end_i, to_cp, to_i, THREAD); | 782 copy_cp_to_impl(h_this, start_i, end_i, to_cp, to_i, THREAD); |
783 } | 783 } |
784 static void copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, constantPoolHandle to_cp, int to_i, TRAPS); | 784 static void copy_cp_to_impl(constantPoolHandle from_cp, int start_i, int end_i, constantPoolHandle to_cp, int to_i, TRAPS); |
785 static void copy_entry_to(constantPoolHandle from_cp, int from_i, constantPoolHandle to_cp, int to_i, TRAPS); | 785 static void copy_entry_to(constantPoolHandle from_cp, int from_i, constantPoolHandle to_cp, int to_i, TRAPS); |
786 int find_matching_entry(int pattern_i, constantPoolHandle search_cp, TRAPS); | 786 int find_matching_entry(int pattern_i, constantPoolHandle search_cp, TRAPS); |
787 int orig_length() const { return _saved._orig_length; } | 787 int version() const { return _saved._version; } |
788 void set_orig_length(int orig_length) { _saved._orig_length = orig_length; } | 788 void set_version(int version) { _saved._version = version; } |
789 void increment_and_save_version(int version) { | |
790 _saved._version = version >= 0 ? version++ : version; // keep overflow | |
791 } | |
789 | 792 |
790 void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; } | 793 void set_resolved_reference_length(int length) { _saved._resolved_reference_length = length; } |
791 int resolved_reference_length() const { return _saved._resolved_reference_length; } | 794 int resolved_reference_length() const { return _saved._resolved_reference_length; } |
792 void set_lock(Monitor* lock) { _lock = lock; } | 795 void set_lock(Monitor* lock) { _lock = lock; } |
793 Monitor* lock() { return _lock; } | 796 Monitor* lock() { return _lock; } |