0N/A/*
3879N/A * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
0N/A * published by the Free Software Foundation.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1472N/A * or visit www.oracle.com if you need additional information or have any
1472N/A * questions.
0N/A *
0N/A */
0N/A
1879N/A#include "precompiled.hpp"
1879N/A#include "ci/ciCallProfile.hpp"
1879N/A#include "ci/ciExceptionHandler.hpp"
1879N/A#include "ci/ciInstanceKlass.hpp"
1879N/A#include "ci/ciMethod.hpp"
1879N/A#include "ci/ciMethodBlocks.hpp"
1879N/A#include "ci/ciMethodData.hpp"
1879N/A#include "ci/ciMethodKlass.hpp"
1879N/A#include "ci/ciStreams.hpp"
1879N/A#include "ci/ciSymbol.hpp"
1879N/A#include "ci/ciUtilities.hpp"
1879N/A#include "classfile/systemDictionary.hpp"
1879N/A#include "compiler/abstractCompiler.hpp"
1879N/A#include "compiler/compilerOracle.hpp"
1879N/A#include "compiler/methodLiveness.hpp"
1879N/A#include "interpreter/interpreter.hpp"
1879N/A#include "interpreter/linkResolver.hpp"
1879N/A#include "interpreter/oopMapCache.hpp"
1879N/A#include "memory/allocation.inline.hpp"
1879N/A#include "memory/resourceArea.hpp"
1879N/A#include "oops/generateOopMap.hpp"
1879N/A#include "oops/oop.inline.hpp"
1879N/A#include "prims/nativeLookup.hpp"
1879N/A#include "runtime/deoptimization.hpp"
1879N/A#include "utilities/bitMap.inline.hpp"
1879N/A#include "utilities/xmlstream.hpp"
1879N/A#ifdef COMPILER2
1879N/A#include "ci/bcEscapeAnalyzer.hpp"
1879N/A#include "ci/ciTypeFlow.hpp"
1879N/A#include "oops/methodOop.hpp"
1879N/A#endif
1879N/A#ifdef SHARK
1879N/A#include "ci/ciTypeFlow.hpp"
1879N/A#include "oops/methodOop.hpp"
1879N/A#endif
0N/A
0N/A// ciMethod
0N/A//
0N/A// This class represents a methodOop in the HotSpot virtual
0N/A// machine.
0N/A
0N/A
0N/A// ------------------------------------------------------------------
0N/A// ciMethod::ciMethod
0N/A//
0N/A// Loaded method.
0N/AciMethod::ciMethod(methodHandle h_m) : ciObject(h_m) {
0N/A assert(h_m() != NULL, "no null method");
0N/A
0N/A // These fields are always filled in in loaded methods.
0N/A _flags = ciFlags(h_m()->access_flags());
0N/A
0N/A // Easy to compute, so fill them in now.
0N/A _max_stack = h_m()->max_stack();
0N/A _max_locals = h_m()->max_locals();
0N/A _code_size = h_m()->code_size();
0N/A _intrinsic_id = h_m()->intrinsic_id();
3879N/A _handler_count = h_m()->exception_table_length();
0N/A _uses_monitors = h_m()->access_flags().has_monitor_bytecodes();
0N/A _balanced_monitors = !_uses_monitors || h_m()->access_flags().is_monitor_matching();
1703N/A _is_c1_compilable = !h_m()->is_not_c1_compilable();
1703N/A _is_c2_compilable = !h_m()->is_not_c2_compilable();
0N/A // Lazy fields, filled in on demand. Require allocation.
0N/A _code = NULL;
0N/A _exception_handlers = NULL;
0N/A _liveness = NULL;
0N/A _method_blocks = NULL;
1612N/A#if defined(COMPILER2) || defined(SHARK)
0N/A _flow = NULL;
1568N/A _bcea = NULL;
1612N/A#endif // COMPILER2 || SHARK
0N/A
780N/A ciEnv *env = CURRENT_ENV;
1703N/A if (env->jvmti_can_hotswap_or_post_breakpoint() && can_be_compiled()) {
0N/A // 6328518 check hotswap conditions under the right lock.
0N/A MutexLocker locker(Compile_lock);
0N/A if (Dependencies::check_evol_method(h_m()) != NULL) {
1703N/A _is_c1_compilable = false;
1703N/A _is_c2_compilable = false;
0N/A }
0N/A } else {
0N/A CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
0N/A }
0N/A
0N/A if (instanceKlass::cast(h_m()->method_holder())->is_linked()) {
0N/A _can_be_statically_bound = h_m()->can_be_statically_bound();
0N/A } else {
0N/A // Have to use a conservative value in this case.
0N/A _can_be_statically_bound = false;
0N/A }
0N/A
0N/A // Adjust the definition of this condition to be more useful:
0N/A // %%% take these conditions into account in vtable generation
0N/A if (!_can_be_statically_bound && h_m()->is_private())
0N/A _can_be_statically_bound = true;
0N/A if (_can_be_statically_bound && h_m()->is_abstract())
0N/A _can_be_statically_bound = false;
0N/A
0N/A // generating _signature may allow GC and therefore move m.
0N/A // These fields are always filled in.
Error!

 

There was an error!

null

java.lang.NullPointerException