12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "ci/ciEnv.hpp"
27 #include "ci/ciInstance.hpp"
28 #include "ci/ciMetadata.hpp"
29 #include "code/oopRecorder.hpp"
30 #include "memory/allocation.inline.hpp"
31 #include "oops/oop.inline.hpp"
32
33 #ifdef ASSERT
34 template <class T> int ValueRecorder<T>::_find_index_calls = 0;
35 template <class T> int ValueRecorder<T>::_hit_indexes = 0;
36 template <class T> int ValueRecorder<T>::_missed_indexes = 0;
37 #endif //ASSERT
38
39
40 template <class T> ValueRecorder<T>::ValueRecorder(Arena* arena) {
41 _handles = NULL;
42 _indexes = NULL;
43 _arena = arena;
44 _complete = false;
45 }
46
47 template <class T> template <class X> ValueRecorder<T>::IndexCache<X>::IndexCache() {
48 assert(first_index > 0, "initial zero state of cache must be invalid index");
49 Copy::zero_to_bytes(&_cache[0], sizeof(_cache));
50 }
51
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "ci/ciEnv.hpp"
27 #include "ci/ciInstance.hpp"
28 #include "ci/ciMetadata.hpp"
29 #include "code/oopRecorder.hpp"
30 #include "memory/allocation.inline.hpp"
31 #include "oops/oop.inline.hpp"
32 #include "utilities/copy.hpp"
33
34 #ifdef ASSERT
35 template <class T> int ValueRecorder<T>::_find_index_calls = 0;
36 template <class T> int ValueRecorder<T>::_hit_indexes = 0;
37 template <class T> int ValueRecorder<T>::_missed_indexes = 0;
38 #endif //ASSERT
39
40
41 template <class T> ValueRecorder<T>::ValueRecorder(Arena* arena) {
42 _handles = NULL;
43 _indexes = NULL;
44 _arena = arena;
45 _complete = false;
46 }
47
48 template <class T> template <class X> ValueRecorder<T>::IndexCache<X>::IndexCache() {
49 assert(first_index > 0, "initial zero state of cache must be invalid index");
50 Copy::zero_to_bytes(&_cache[0], sizeof(_cache));
51 }
52
|