comparison src/share/vm/interpreter/bytecodes.cpp @ 7066:7d815d842ee0

Merge.
author Christian Haeubl <haeubl@ssw.jku.at>
date Fri, 23 Nov 2012 11:50:27 +0100
parents da91efe96a93
children
comparison
equal deleted inserted replaced
7065:cfacf5d5bade 7066:7d815d842ee0
1 /* 1 /*
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2012, 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.
23 */ 23 */
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "interpreter/bytecodes.hpp" 26 #include "interpreter/bytecodes.hpp"
27 #include "memory/resourceArea.hpp" 27 #include "memory/resourceArea.hpp"
28 #include "oops/methodOop.hpp" 28 #include "oops/method.hpp"
29 #ifdef TARGET_ARCH_x86 29 #ifdef TARGET_ARCH_x86
30 # include "bytes_x86.hpp" 30 # include "bytes_x86.hpp"
31 #endif 31 #endif
32 #ifdef TARGET_ARCH_sparc 32 #ifdef TARGET_ARCH_sparc
33 # include "bytes_sparc.hpp" 33 # include "bytes_sparc.hpp"
59 u_char Bytecodes::_lengths [Bytecodes::number_of_codes]; 59 u_char Bytecodes::_lengths [Bytecodes::number_of_codes];
60 Bytecodes::Code Bytecodes::_java_code [Bytecodes::number_of_codes]; 60 Bytecodes::Code Bytecodes::_java_code [Bytecodes::number_of_codes];
61 u_short Bytecodes::_flags [(1<<BitsPerByte)*2]; 61 u_short Bytecodes::_flags [(1<<BitsPerByte)*2];
62 62
63 #ifdef ASSERT 63 #ifdef ASSERT
64 bool Bytecodes::check_method(const methodOopDesc* method, address bcp) { 64 bool Bytecodes::check_method(const Method* method, address bcp) {
65 return method->contains(bcp); 65 return method->contains(bcp);
66 } 66 }
67 #endif 67 #endif
68 68
69 bool Bytecodes::check_must_rewrite(Bytecodes::Code code) { 69 bool Bytecodes::check_must_rewrite(Bytecodes::Code code) {
87 87
88 // No other special cases. 88 // No other special cases.
89 return true; 89 return true;
90 } 90 }
91 91
92 Bytecodes::Code Bytecodes::code_at(methodOop method, int bci) { 92 Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
93 return code_at(method, method->bcp_from(bci)); 93 return code_at(method, method->bcp_from(bci));
94 } 94 }
95 95
96 Bytecodes::Code Bytecodes::non_breakpoint_code_at(const methodOopDesc* method, address bcp) { 96 Bytecodes::Code Bytecodes::non_breakpoint_code_at(const Method* method, address bcp) {
97 assert(method != NULL, "must have the method for breakpoint conversion"); 97 assert(method != NULL, "must have the method for breakpoint conversion");
98 assert(method->contains(bcp), "must be valid bcp in method"); 98 assert(method->contains(bcp), "must be valid bcp in method");
99 return method->orig_bytecode_at(method->bci_from(bcp)); 99 return method->orig_bytecode_at(method->bci_from(bcp));
100 } 100 }
101 101