# HG changeset patch # User Doug Simon # Date 1334924082 -7200 # Node ID 4e4a868c2b2ae20dcecf5ecd64a8a3900df2b320 # Parent af8958fe5a3a556108f65c0b7a6dc032e2e9b802# Parent 1e153fdac9fb6a9ce353e820a80047f8302c0040 Merge. diff -r 1e153fdac9fb -r 4e4a868c2b2a graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Thu Apr 19 17:37:51 2012 -0700 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/Node.java Fri Apr 20 14:14:42 2012 +0200 @@ -332,6 +332,10 @@ return true; } + /** + * Removes this node from its graph. + * This node must have no {@linkplain Node#usages() usages} and no {@linkplain #predecessor() predecessor}. + */ public void safeDelete() { assert checkDeletion(); clearInputs(); diff -r 1e153fdac9fb -r 4e4a868c2b2a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Thu Apr 19 17:37:51 2012 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java Fri Apr 20 14:14:42 2012 +0200 @@ -98,7 +98,6 @@ public long accessFieldStub; public long resolveStaticCallStub; public long inlineCacheMissStub; - public long unwindExceptionStub; public long handleExceptionStub; public long handleDeoptStub; public long monitorEnterStub; diff -r 1e153fdac9fb -r 4e4a868c2b2a graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Thu Apr 19 17:37:51 2012 -0700 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/HotSpotAMD64Backend.java Fri Apr 20 14:14:42 2012 +0200 @@ -45,8 +45,6 @@ import com.oracle.max.asm.target.amd64.AMD64Assembler.ConditionFlag; import com.oracle.max.asm.target.amd64.*; import com.oracle.max.cri.ci.*; -import com.oracle.max.cri.ci.CiCallingConvention.Type; -import com.oracle.max.cri.ci.CiRegister.RegisterFlag; import com.oracle.max.cri.ri.*; import com.oracle.max.cri.xir.*; @@ -200,20 +198,6 @@ boolean frameOmitted = tasm.frameContext == null; if (!frameOmitted) { - CiRegister thread = r15; - CiRegister exceptionOop = regConfig.getCallingConventionRegisters(Type.RuntimeCall, RegisterFlag.CPU)[0]; - Label unwind = new Label(); - asm.bind(unwind); - tasm.recordMark(MARK_UNWIND_ENTRY); - CiAddress exceptionOopField = new CiAddress(CiKind.Object, thread.asValue(), config.threadExceptionOopOffset); - CiAddress exceptionPcField = new CiAddress(CiKind.Object, thread.asValue(), config.threadExceptionPcOffset); - asm.movq(exceptionOop, exceptionOopField); - asm.movslq(exceptionOopField, 0); - asm.movslq(exceptionPcField, 0); - - AMD64Call.directCall(tasm, asm, config.unwindExceptionStub, null); - AMD64Call.shouldNotReachHere(tasm, asm); - tasm.recordMark(MARK_EXCEPTION_HANDLER_ENTRY); AMD64Call.directCall(tasm, asm, config.handleExceptionStub, null); AMD64Call.shouldNotReachHere(tasm, asm); diff -r 1e153fdac9fb -r 4e4a868c2b2a graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Thu Apr 19 17:37:51 2012 -0700 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java Fri Apr 20 14:14:42 2012 +0200 @@ -166,6 +166,12 @@ node.safeDelete(); } + /** + * Unlinks a node from all its control flow neighbours and then removes it from its graph. + * The node must have no {@linkplain Node#usages() usages}. + * + * @param node the node to be unlinked and removed + */ public void removeFixed(FixedWithNextNode node) { assert node != null; if (node instanceof BeginNode) { diff -r 1e153fdac9fb -r 4e4a868c2b2a mx/commands.py --- a/mx/commands.py Thu Apr 19 17:37:51 2012 -0700 +++ b/mx/commands.py Fri Apr 20 14:14:42 2012 +0200 @@ -547,6 +547,14 @@ else: file(timestampFile, 'a') +def vmg(args): + """run the debug build of VM selected by the '--vm' option""" + return vm(args, vmbuild='debug') + +def vmfg(args): + """run the fastdebug build of VM selected by the '--vm' option""" + return vm(args, vmbuild='fastdebug') + def vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, timeout=None, vmbuild=None): """run the VM selected by the '--vm' option""" @@ -988,7 +996,9 @@ 'unittest' : [unittest, '[filters...]'], 'jtt' : [jtt, '[filters...]'], 'jacocoreport' : [jacocoreport, '[output directory]'], - 'vm': [vm, '[-options] class [args...]'] + 'vm': [vm, '[-options] class [args...]'], + 'vmg': [vmg, '[-options] class [args...]'], + 'vmfg': [vmfg, '[-options] class [args...]'] } mx.add_argument('--jacoco', help='instruments com.oracle.* classes using JaCoCo', default='off', choices=['off', 'on', 'append']) diff -r 1e153fdac9fb -r 4e4a868c2b2a src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Apr 19 17:37:51 2012 -0700 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Fri Apr 20 14:14:42 2012 +0200 @@ -815,9 +815,6 @@ case MARK_OSR_ENTRY: _offsets.set_value(CodeOffsets::OSR_Entry, pc_offset); break; - case MARK_UNWIND_ENTRY: - _offsets.set_value(CodeOffsets::UnwindHandler, pc_offset); - break; case MARK_EXCEPTION_HANDLER_ENTRY: _offsets.set_value(CodeOffsets::Exceptions, pc_offset); break; diff -r 1e153fdac9fb -r 4e4a868c2b2a src/share/vm/graal/graalCodeInstaller.hpp --- a/src/share/vm/graal/graalCodeInstaller.hpp Thu Apr 19 17:37:51 2012 -0700 +++ b/src/share/vm/graal/graalCodeInstaller.hpp Fri Apr 20 14:14:42 2012 +0200 @@ -31,7 +31,7 @@ MARK_VERIFIED_ENTRY = 0x0001, MARK_UNVERIFIED_ENTRY = 0x0002, MARK_OSR_ENTRY = 0x0003, - MARK_UNWIND_ENTRY = 0x0004, + //MARK_UNWIND_ENTRY = 0x0004, MARK_EXCEPTION_HANDLER_ENTRY = 0x0005, MARK_DEOPT_HANDLER_ENTRY = 0x0006, MARK_STATIC_CALL_STUB = 0x1000, diff -r 1e153fdac9fb -r 4e4a868c2b2a src/share/vm/graal/graalCompilerToVM.cpp --- a/src/share/vm/graal/graalCompilerToVM.cpp Thu Apr 19 17:37:51 2012 -0700 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Fri Apr 20 14:14:42 2012 +0200 @@ -824,7 +824,6 @@ set_long(env, config, "accessFieldStub", VmIds::addStub(Runtime1::entry_for(Runtime1::access_field_patching_id))); set_long(env, config, "resolveStaticCallStub", VmIds::addStub(SharedRuntime::get_resolve_static_call_stub())); set_long(env, config, "inlineCacheMissStub", VmIds::addStub(SharedRuntime::get_ic_miss_stub())); - set_long(env, config, "unwindExceptionStub", VmIds::addStub(Runtime1::entry_for(Runtime1::graal_unwind_exception_call_id))); set_long(env, config, "handleExceptionStub", VmIds::addStub(Runtime1::entry_for(Runtime1::handle_exception_nofpu_id))); set_long(env, config, "handleDeoptStub", VmIds::addStub(SharedRuntime::deopt_blob()->unpack())); set_long(env, config, "monitorEnterStub", VmIds::addStub(Runtime1::entry_for(Runtime1::monitorenter_id)));