src/share/vm/oops/constantPoolOop.cpp

changeset 1934
e9ff18c4ace7
parent 1907
c18cbe5936b8
parent 1920
ab102d5d923e
child 1957
136b78722a08
     1.1 --- a/src/share/vm/oops/constantPoolOop.cpp	Tue Jun 01 11:48:33 2010 -0700
     1.2 +++ b/src/share/vm/oops/constantPoolOop.cpp	Wed Jun 02 22:45:42 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2010, 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 @@ -297,11 +297,9 @@
    1.11  
    1.12  
    1.13  int constantPoolOopDesc::remap_instruction_operand_from_cache(int operand) {
    1.14 -  // Operand was fetched by a stream using get_Java_u2, yet was stored
    1.15 -  // by Rewriter::rewrite_member_reference in native order.
    1.16 -  // So now we have to fix the damage by swapping back to native order.
    1.17 -  assert((int)(u2)operand == operand, "clean u2");
    1.18 -  int cpc_index = Bytes::swap_u2(operand);
    1.19 +  int cpc_index = operand;
    1.20 +  DEBUG_ONLY(cpc_index -= CPCACHE_INDEX_TAG);
    1.21 +  assert((int)(u2)cpc_index == cpc_index, "clean u2");
    1.22    int member_index = cache()->entry_at(cpc_index)->constant_pool_index();
    1.23    return member_index;
    1.24  }

mercurial