# HG changeset patch # User Lukas Stadler # Date 1359749453 -3600 # Node ID 36ead721a04ff4ab1cf335ae53ce9e201fed0a50 # Parent f78ac2ce44ef4f09d33a968df3bc5ca838be1c18# Parent 5a63675be8caf799daef4ae0ca27849e983940d8 Merge diff -r f78ac2ce44ef -r 36ead721a04f graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/inlining/InliningTest.java --- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/inlining/InliningTest.java Fri Feb 01 21:10:23 2013 +0100 +++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/inlining/InliningTest.java Fri Feb 01 21:10:53 2013 +0100 @@ -36,7 +36,6 @@ import com.oracle.graal.phases.*; import com.oracle.graal.phases.common.*; -// TODO (chaeubl): add more test cases @SuppressWarnings("unused") public class InliningTest extends GraalCompilerTest { diff -r f78ac2ce44ef -r 36ead721a04f graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java Fri Feb 01 21:10:23 2013 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/TailcallNode.java Fri Feb 01 21:10:53 2013 +0100 @@ -64,7 +64,6 @@ JavaType[] signature = MetaUtil.signatureToTypes(method.getSignature(), isStatic ? null : method.getDeclaringClass()); CallingConvention cc = gen.frameMap().registerConfig.getCallingConvention(CallingConvention.Type.JavaCall, null, signature, gen.target(), false); - gen.frameMap().callsMethod(cc); // TODO (aw): I think this is unnecessary for a tail call. List parameters = new ArrayList<>(); for (int i = 0, slot = 0; i < cc.getArgumentCount(); i++, slot += FrameStateBuilder.stackSlots(frameState.localAt(slot).kind())) { parameters.add(frameState.localAt(slot)); diff -r f78ac2ce44ef -r 36ead721a04f graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/ControlFlowException.java Fri Feb 01 21:10:53 2013 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2012, 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. + */ +package com.oracle.truffle.api.nodes; + +/** + * An exception thrown to model control flow in a Truffle interpreter. The Truffle optimizer has + * special knowledge of this exception class for performance optimizations. + */ +public class ControlFlowException extends Exception { + + private static final long serialVersionUID = 3676602078425211386L; + + /** + * Creates an exception thrown to enter a slow path. + */ + public ControlFlowException(String message, Throwable cause) { + super(message, cause); + } +}