Mercurial > hg > truffle
comparison src/share/vm/oops/constantPoolOop.cpp @ 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. |
295 } | 295 } |
296 | 296 |
297 | 297 |
298 | 298 |
299 int constantPoolOopDesc::remap_instruction_operand_from_cache(int operand) { | 299 int constantPoolOopDesc::remap_instruction_operand_from_cache(int operand) { |
300 // Operand was fetched by a stream using get_Java_u2, yet was stored | 300 int cpc_index = operand; |
301 // by Rewriter::rewrite_member_reference in native order. | 301 DEBUG_ONLY(cpc_index -= CPCACHE_INDEX_TAG); |
302 // So now we have to fix the damage by swapping back to native order. | 302 assert((int)(u2)cpc_index == cpc_index, "clean u2"); |
303 assert((int)(u2)operand == operand, "clean u2"); | |
304 int cpc_index = Bytes::swap_u2(operand); | |
305 int member_index = cache()->entry_at(cpc_index)->constant_pool_index(); | 303 int member_index = cache()->entry_at(cpc_index)->constant_pool_index(); |
306 return member_index; | 304 return member_index; |
307 } | 305 } |
308 | 306 |
309 | 307 |