comparison src/share/vm/interpreter/interpreterRuntime.hpp @ 1579:e9ff18c4ace7

Merge
author jrose
date Wed, 02 Jun 2010 22:45:42 -0700
parents c18cbe5936b8 ab102d5d923e
children 136b78722a08
comparison
equal deleted inserted replaced
1562:dfe27f03244a 1579:e9ff18c4ace7
1 /* 1 /*
2 * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2010, 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.
38 static Bytecodes::Code code(JavaThread *thread) { 38 static Bytecodes::Code code(JavaThread *thread) {
39 // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272) 39 // pass method to avoid calling unsafe bcp_to_method (partial fix 4926272)
40 return Bytecodes::code_at(bcp(thread), method(thread)); 40 return Bytecodes::code_at(bcp(thread), method(thread));
41 } 41 }
42 static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); } 42 static bool already_resolved(JavaThread *thread) { return cache_entry(thread)->is_resolved(code(thread)); }
43 static int one_byte_index(JavaThread *thread) { return bcp(thread)[1]; } 43 static Bytecode* bytecode(JavaThread *thread) { return Bytecode_at(bcp(thread)); }
44 static int two_byte_index(JavaThread *thread) { return Bytes::get_Java_u2(bcp(thread) + 1); } 44 static int get_index_u1(JavaThread *thread, Bytecodes::Code bc)
45 static int four_byte_index(JavaThread *thread) { return Bytes::get_native_u4(bcp(thread) + 1); } 45 { return bytecode(thread)->get_index_u1(bc); }
46 static int get_index_u2(JavaThread *thread, Bytecodes::Code bc)
47 { return bytecode(thread)->get_index_u2(bc); }
48 static int get_index_u2_cpcache(JavaThread *thread, Bytecodes::Code bc)
49 { return bytecode(thread)->get_index_u2_cpcache(bc); }
46 static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; } 50 static int number_of_dimensions(JavaThread *thread) { return bcp(thread)[3]; }
47 51
48 static ConstantPoolCacheEntry* cache_entry_at(JavaThread *thread, int i) { return method(thread)->constants()->cache()->entry_at(i); } 52 static ConstantPoolCacheEntry* cache_entry_at(JavaThread *thread, int i) { return method(thread)->constants()->cache()->entry_at(i); }
49 static ConstantPoolCacheEntry* cache_entry(JavaThread *thread) { return cache_entry_at(thread, Bytes::get_native_u2(bcp(thread) + 1)); } 53 static ConstantPoolCacheEntry* cache_entry(JavaThread *thread) { return cache_entry_at(thread, Bytes::get_native_u2(bcp(thread) + 1)); }
50 static void note_trap(JavaThread *thread, int reason, TRAPS); 54 static void note_trap(JavaThread *thread, int reason, TRAPS);