src/share/vm/interpreter/rewriter.cpp

changeset 1920
ab102d5d923e
parent 1573
dd57230ba8fe
child 1929
1eb493f33423
     1.1 --- a/src/share/vm/interpreter/rewriter.cpp	Fri May 21 02:59:24 2010 -0700
     1.2 +++ b/src/share/vm/interpreter/rewriter.cpp	Sun May 23 01:38:26 2010 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1998-2009 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1998-2010 Sun Microsystems, Inc.  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 @@ -103,16 +103,15 @@
    1.11  
    1.12  
    1.13  // Rewrite a classfile-order CP index into a native-order CPC index.
    1.14 -int Rewriter::rewrite_member_reference(address bcp, int offset) {
    1.15 +void Rewriter::rewrite_member_reference(address bcp, int offset) {
    1.16    address p = bcp + offset;
    1.17    int  cp_index    = Bytes::get_Java_u2(p);
    1.18    int  cache_index = cp_entry_to_cp_cache(cp_index);
    1.19    Bytes::put_native_u2(p, cache_index);
    1.20 -  return cp_index;
    1.21  }
    1.22  
    1.23  
    1.24 -void Rewriter::rewrite_invokedynamic(address bcp, int offset, int delete_me) {
    1.25 +void Rewriter::rewrite_invokedynamic(address bcp, int offset) {
    1.26    address p = bcp + offset;
    1.27    assert(p[-1] == Bytecodes::_invokedynamic, "");
    1.28    int cp_index = Bytes::get_Java_u2(p);
    1.29 @@ -178,7 +177,7 @@
    1.30          case Bytecodes::_lookupswitch   : {
    1.31  #ifndef CC_INTERP
    1.32            Bytecode_lookupswitch* bc = Bytecode_lookupswitch_at(bcp);
    1.33 -          bc->set_code(
    1.34 +          (*bcp) = (
    1.35              bc->number_of_pairs() < BinarySwitchThreshold
    1.36              ? Bytecodes::_fast_linearswitch
    1.37              : Bytecodes::_fast_binaryswitch
    1.38 @@ -197,7 +196,7 @@
    1.39            rewrite_member_reference(bcp, prefix_length+1);
    1.40            break;
    1.41          case Bytecodes::_invokedynamic:
    1.42 -          rewrite_invokedynamic(bcp, prefix_length+1, int(sizeof"@@@@DELETE ME"));
    1.43 +          rewrite_invokedynamic(bcp, prefix_length+1);
    1.44            break;
    1.45          case Bytecodes::_jsr            : // fall through
    1.46          case Bytecodes::_jsr_w          : nof_jsrs++;                   break;

mercurial