Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/ci/bcEscapeAnalyzer.cpp
          +++ new/src/share/vm/ci/bcEscapeAnalyzer.cpp
   1    1  /*
   2      - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
        2 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
   3    3   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4    4   *
   5    5   * This code is free software; you can redistribute it and/or modify it
   6    6   * under the terms of the GNU General Public License version 2 only, as
   7    7   * published by the Free Software Foundation.
   8    8   *
   9    9   * This code is distributed in the hope that it will be useful, but WITHOUT
  10   10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11   11   * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12   12   * version 2 for more details (a copy is included in the LICENSE file that
↓ open down ↓ 230 lines elided ↑ open up ↑
 243  243    // other calls are skipped if there are no unescaped arguments passed to them
 244  244    bool directly_recursive = (method() == target) &&
 245  245                 (code != Bytecodes::_invokevirtual || target->is_final_method() || state._stack[arg_base] .is_empty());
 246  246  
 247  247    // check if analysis of callee can safely be skipped
 248  248    bool skip_callee = true;
 249  249    for (i = state._stack_height - 1; i >= arg_base && skip_callee; i--) {
 250  250      ArgumentMap arg = state._stack[i];
 251  251      skip_callee = !is_argument(arg) || !is_arg_stack(arg) || (directly_recursive && arg.is_singleton(i - arg_base));
 252  252    }
      253 +  // For now we conservatively skip invokedynamic.
      254 +  if (code == Bytecodes::_invokedynamic) {
      255 +    // Receiver is added implicitly.
      256 +    arg_size--;
      257 +    skip_callee = true;
      258 +  }
 253  259    if (skip_callee) {
 254  260      TRACE_BCEA(3, tty->print_cr("[EA] skipping method %s::%s", holder->name()->as_utf8(), target->name()->as_utf8()));
 255  261      for (i = 0; i < arg_size; i++) {
 256  262        set_method_escape(state.raw_pop());
 257  263      }
 258  264      _unknown_modified = true;  // assume the worst since we don't analyze the called method
 259  265      return;
 260  266    }
 261  267  
 262  268    // determine actual method (use CHA if necessary)
↓ open down ↓ 1175 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX