1.1 --- a/src/share/vm/interpreter/bytecode.hpp Fri Aug 31 16:39:35 2012 -0700 1.2 +++ b/src/share/vm/interpreter/bytecode.hpp Sat Sep 01 13:25:18 2012 -0400 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -27,7 +27,7 @@ 1.11 1.12 #include "interpreter/bytecodes.hpp" 1.13 #include "memory/allocation.hpp" 1.14 -#include "oops/methodOop.hpp" 1.15 +#include "oops/method.hpp" 1.16 #ifdef TARGET_ARCH_x86 1.17 # include "bytes_x86.hpp" 1.18 #endif 1.19 @@ -68,8 +68,8 @@ 1.20 int get_native_u4_at (int offset) const { return Bytes::get_native_u4(addr_at(offset)); } 1.21 1.22 public: 1.23 - Bytecode(methodOop method, address bcp): _bcp(bcp), _code(Bytecodes::code_at(method, addr_at(0))) { 1.24 - assert(method != NULL, "this form requires a valid methodOop"); 1.25 + Bytecode(Method* method, address bcp): _bcp(bcp), _code(Bytecodes::code_at(method, addr_at(0))) { 1.26 + assert(method != NULL, "this form requires a valid Method*"); 1.27 } 1.28 // Defined in ciStreams.hpp 1.29 inline Bytecode(const ciBytecodeStream* stream, address bcp = NULL); 1.30 @@ -96,11 +96,11 @@ 1.31 } 1.32 int get_index_u1_cpcache(Bytecodes::Code bc) const { 1.33 assert_same_format_as(bc); assert_index_size(1, bc); 1.34 - return *(jubyte*)addr_at(1) + constantPoolOopDesc::CPCACHE_INDEX_TAG; 1.35 + return *(jubyte*)addr_at(1) + ConstantPool::CPCACHE_INDEX_TAG; 1.36 } 1.37 int get_index_u2_cpcache(Bytecodes::Code bc) const { 1.38 assert_same_format_as(bc); assert_index_size(2, bc); assert_native_index(bc); 1.39 - return Bytes::get_native_u2(addr_at(1)) + constantPoolOopDesc::CPCACHE_INDEX_TAG; 1.40 + return Bytes::get_native_u2(addr_at(1)) + ConstantPool::CPCACHE_INDEX_TAG; 1.41 } 1.42 int get_index_u4(Bytecodes::Code bc) const { 1.43 assert_same_format_as(bc); assert_index_size(4, bc); 1.44 @@ -158,7 +158,7 @@ 1.45 1.46 class Bytecode_lookupswitch: public Bytecode { 1.47 public: 1.48 - Bytecode_lookupswitch(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.49 + Bytecode_lookupswitch(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.50 // Defined in ciStreams.hpp 1.51 inline Bytecode_lookupswitch(const ciBytecodeStream* stream); 1.52 void verify() const PRODUCT_RETURN; 1.53 @@ -174,7 +174,7 @@ 1.54 1.55 class Bytecode_tableswitch: public Bytecode { 1.56 public: 1.57 - Bytecode_tableswitch(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.58 + Bytecode_tableswitch(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.59 // Defined in ciStreams.hpp 1.60 inline Bytecode_tableswitch(const ciBytecodeStream* stream); 1.61 void verify() const PRODUCT_RETURN; 1.62 @@ -196,8 +196,8 @@ 1.63 Bytecode_member_ref(methodHandle method, int bci) : Bytecode(method(), method()->bcp_from(bci)), _method(method) {} 1.64 1.65 methodHandle method() const { return _method; } 1.66 - constantPoolOop constants() const { return _method->constants(); } 1.67 - constantPoolCacheOop cpcache() const { return _method->constants()->cache(); } 1.68 + ConstantPool* constants() const { return _method->constants(); } 1.69 + ConstantPoolCache* cpcache() const { return _method->constants()->cache(); } 1.70 ConstantPoolCacheEntry* cpcache_entry() const; 1.71 1.72 public: 1.73 @@ -278,7 +278,7 @@ 1.74 // Abstraction for checkcast 1.75 class Bytecode_checkcast: public Bytecode { 1.76 public: 1.77 - Bytecode_checkcast(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.78 + Bytecode_checkcast(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.79 void verify() const { assert(Bytecodes::java_code(code()) == Bytecodes::_checkcast, "check checkcast"); } 1.80 1.81 // Returns index 1.82 @@ -288,7 +288,7 @@ 1.83 // Abstraction for instanceof 1.84 class Bytecode_instanceof: public Bytecode { 1.85 public: 1.86 - Bytecode_instanceof(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.87 + Bytecode_instanceof(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.88 void verify() const { assert(code() == Bytecodes::_instanceof, "check instanceof"); } 1.89 1.90 // Returns index 1.91 @@ -297,7 +297,7 @@ 1.92 1.93 class Bytecode_new: public Bytecode { 1.94 public: 1.95 - Bytecode_new(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.96 + Bytecode_new(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.97 void verify() const { assert(java_code() == Bytecodes::_new, "check new"); } 1.98 1.99 // Returns index 1.100 @@ -306,7 +306,7 @@ 1.101 1.102 class Bytecode_multianewarray: public Bytecode { 1.103 public: 1.104 - Bytecode_multianewarray(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.105 + Bytecode_multianewarray(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.106 void verify() const { assert(java_code() == Bytecodes::_multianewarray, "check new"); } 1.107 1.108 // Returns index 1.109 @@ -315,7 +315,7 @@ 1.110 1.111 class Bytecode_anewarray: public Bytecode { 1.112 public: 1.113 - Bytecode_anewarray(methodOop method, address bcp): Bytecode(method, bcp) { verify(); } 1.114 + Bytecode_anewarray(Method* method, address bcp): Bytecode(method, bcp) { verify(); } 1.115 void verify() const { assert(java_code() == Bytecodes::_anewarray, "check anewarray"); } 1.116 1.117 // Returns index 1.118 @@ -340,11 +340,11 @@ 1.119 stdc == Bytecodes::_ldc2_w, "load constant"); 1.120 } 1.121 1.122 - // Only non-standard bytecodes (fast_aldc) have CP cache indexes. 1.123 + // Only non-standard bytecodes (fast_aldc) have reference cache indexes. 1.124 bool has_cache_index() const { return code() >= Bytecodes::number_of_java_codes; } 1.125 1.126 int pool_index() const; // index into constant pool 1.127 - int cache_index() const { // index into CP cache (or -1 if none) 1.128 + int cache_index() const { // index into reference cache (or -1 if none) 1.129 return has_cache_index() ? raw_index() : -1; 1.130 } 1.131