comparison src/share/vm/interpreter/rewriter.cpp @ 8124:5fc51c1ecdeb

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 05 Mar 2013 23:44:54 +0100
parents 989155e2d07a f16e75e0cf11
children b8f261ba79c6
comparison
equal deleted inserted replaced
7943:a413bcd552a4 8124:5fc51c1ecdeb
1 /* 1 /*
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1998, 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.
46 case JVM_CONSTANT_Fieldref : // fall through 46 case JVM_CONSTANT_Fieldref : // fall through
47 case JVM_CONSTANT_Methodref : // fall through 47 case JVM_CONSTANT_Methodref : // fall through
48 add_cp_cache_entry(i); 48 add_cp_cache_entry(i);
49 break; 49 break;
50 case JVM_CONSTANT_String: 50 case JVM_CONSTANT_String:
51 case JVM_CONSTANT_Object:
52 case JVM_CONSTANT_MethodHandle : // fall through 51 case JVM_CONSTANT_MethodHandle : // fall through
53 case JVM_CONSTANT_MethodType : // fall through 52 case JVM_CONSTANT_MethodType : // fall through
54 add_resolved_references_entry(i); 53 add_resolved_references_entry(i);
55 break; 54 break;
56 case JVM_CONSTANT_Utf8: 55 case JVM_CONSTANT_Utf8:
238 if (!reverse) { 237 if (!reverse) {
239 assert((*bcp) == (is_wide ? Bytecodes::_ldc_w : Bytecodes::_ldc), "not ldc bytecode"); 238 assert((*bcp) == (is_wide ? Bytecodes::_ldc_w : Bytecodes::_ldc), "not ldc bytecode");
240 address p = bcp + offset; 239 address p = bcp + offset;
241 int cp_index = is_wide ? Bytes::get_Java_u2(p) : (u1)(*p); 240 int cp_index = is_wide ? Bytes::get_Java_u2(p) : (u1)(*p);
242 constantTag tag = _pool->tag_at(cp_index).value(); 241 constantTag tag = _pool->tag_at(cp_index).value();
243 if (tag.is_method_handle() || tag.is_method_type() || tag.is_string() || tag.is_object()) { 242 if (tag.is_method_handle() || tag.is_method_type() || tag.is_string()) {
244 int ref_index = cp_entry_to_resolved_references(cp_index); 243 int ref_index = cp_entry_to_resolved_references(cp_index);
245 if (is_wide) { 244 if (is_wide) {
246 (*bcp) = Bytecodes::_fast_aldc_w; 245 (*bcp) = Bytecodes::_fast_aldc_w;
247 assert(ref_index == (u2)ref_index, "index overflow"); 246 assert(ref_index == (u2)ref_index, "index overflow");
248 Bytes::put_native_u2(p, ref_index); 247 Bytes::put_native_u2(p, ref_index);