# HG changeset patch # User Thomas Wuerthinger # Date 1361243819 28800 # Node ID c58f8f4cda6909778cd920bca61a629891315417 # Parent a42dc71ad051b5188320e402a12b050da4957c6c Remove last usage of VmIds. diff -r a42dc71ad051 -r c58f8f4cda69 src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Mon Feb 18 19:12:32 2013 -0800 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Mon Feb 18 19:16:59 2013 -0800 @@ -29,7 +29,6 @@ #include "graal/graalCodeInstaller.hpp" #include "graal/graalJavaAccess.hpp" #include "graal/graalCompilerToVM.hpp" -#include "graal/graalVmIds.hpp" #include "graal/graalRuntime.hpp" #include "asm/register.hpp" #include "classfile/vmSymbols.hpp" @@ -661,19 +660,20 @@ if (global_stub != NULL) { assert(java_lang_boxing_object::is_instance(global_stub, T_LONG), "global_stub needs to be of type Long"); + jlong global_stub_destination = global_stub->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG)); if (inst->is_call()) { // NOTE: for call without a mov, the offset must fit a 32-bit immediate // see also CompilerToVM.getMaxCallTargetOffset() NativeCall* call = nativeCall_at((address) (inst)); - call->set_destination(VmIds::getStub(global_stub)); + call->set_destination((address) global_stub_destination); _instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec(), Assembler::call32_operand); } else if (inst->is_mov_literal64()) { NativeMovConstReg* mov = nativeMovConstReg_at((address) (inst)); - mov->set_data((intptr_t) VmIds::getStub(global_stub)); + mov->set_data((intptr_t) global_stub_destination); _instructions->relocate(mov->instruction_address(), runtime_call_Relocation::spec(), Assembler::imm_operand); } else { NativeJump* jump = nativeJump_at((address) (inst)); - jump->set_jump_destination(VmIds::getStub(global_stub)); + jump->set_jump_destination((address) global_stub_destination); _instructions->relocate((address)inst, runtime_call_Relocation::spec(), Assembler::call32_operand); } TRACE_graal_3("relocating (stub) at %p", inst); diff -r a42dc71ad051 -r c58f8f4cda69 src/share/vm/graal/graalCompiler.cpp --- a/src/share/vm/graal/graalCompiler.cpp Mon Feb 18 19:12:32 2013 -0800 +++ b/src/share/vm/graal/graalCompiler.cpp Mon Feb 18 19:16:59 2013 -0800 @@ -28,7 +28,6 @@ #include "graal/graalJavaAccess.hpp" #include "graal/graalVMToCompiler.hpp" #include "graal/graalCompilerToVM.hpp" -#include "graal/graalVmIds.hpp" #include "graal/graalEnv.hpp" #include "graal/graalRuntime.hpp" #include "runtime/arguments.hpp" diff -r a42dc71ad051 -r c58f8f4cda69 src/share/vm/graal/graalCompilerToVM.cpp --- a/src/share/vm/graal/graalCompilerToVM.cpp Mon Feb 18 19:12:32 2013 -0800 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Mon Feb 18 19:16:59 2013 -0800 @@ -37,7 +37,6 @@ #include "graal/graalJavaAccess.hpp" #include "graal/graalCodeInstaller.hpp" #include "graal/graalVMToCompiler.hpp" -#include "graal/graalVmIds.hpp" Method* getMethodFromHotSpotMethod(oop hotspot_method) { diff -r a42dc71ad051 -r c58f8f4cda69 src/share/vm/graal/graalVmIds.hpp --- a/src/share/vm/graal/graalVmIds.hpp Mon Feb 18 19:12:32 2013 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -#ifndef SHARE_VM_GRAAL_GRAAL_VM_IDS_HPP -#define SHARE_VM_GRAAL_GRAAL_VM_IDS_HPP - -#include "memory/allocation.hpp" -#include "utilities/growableArray.hpp" -#include "oops/oop.hpp" -#include "runtime/handles.hpp" -#include "runtime/thread.hpp" -#include "classfile/javaClasses.hpp" -#include "runtime/jniHandles.hpp" - -class VmIds : public AllStatic { - -public: - - // Returns the stub address with the given vmId taken from a java.lang.Long - static address getStub(oop id); - - // Helper function to get the contents of a java.lang.Long - static jlong getBoxedLong(oop obj); -}; - -inline address VmIds::getStub(oop obj) { - return (address)(getBoxedLong(obj)); -} - -inline jlong VmIds::getBoxedLong(oop obj) { - assert(obj->is_oop(true), "cannot unbox null or non-oop"); - return obj->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG)); -} - -#endif // SHARE_VM_GRAAL_GRAAL_VM_IDS_HPP