# HG changeset patch # User Doug Simon # Date 1342631312 -7200 # Node ID 0278da961319a0150bb867e6912c38fbb77bb870 # Parent 2c00c51357d89a7439cacc86d41bd06a1506474b moved InstalledCode from graal.api.meta to graal.api.code diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationQueue.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationQueue.java Wed Jul 18 14:38:16 2012 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationQueue.java Wed Jul 18 19:08:32 2012 +0200 @@ -24,7 +24,10 @@ import com.oracle.graal.api.meta.*; +/** + * Callback mechanism for the VM to schedule a compilation. + */ +public interface CompilationQueue { -public interface CompilationQueue { boolean enqueue(final ResolvedJavaMethod method, final int entryBCI, boolean blocking, int priority) throws Throwable; } diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/InstalledCode.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/InstalledCode.java Wed Jul 18 19:08:32 2012 +0200 @@ -0,0 +1,51 @@ +/* + * 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. + */ +package com.oracle.graal.api.code; + +import com.oracle.graal.api.meta.*; + +/** + * Represents a compiled instance of a method. It may have been invalidated or removed in the meantime. + */ +public interface InstalledCode { + + public abstract class MethodInvalidatedException extends RuntimeException { + + private static final long serialVersionUID = -3540232440794244844L; + } + + /** + * Returns the method to which the compiled code belongs. + * @return the method to which the compiled code belongs. + */ + ResolvedJavaMethod method(); + + /** + * @return true if the code represented by this object is still valid, false otherwise (may happen due to deopt, etc.) + */ + boolean isValid(); + + Object execute(Object arg1, Object arg2, Object arg3); + + Object executeVarargs(Object... args); +} diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/InstalledCode.java --- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/InstalledCode.java Wed Jul 18 14:38:16 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +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. - */ -package com.oracle.graal.api.meta; - -/** - * Represents a compiled instance of a method. It may have been invalidated or removed in the meantime. - */ -public interface InstalledCode { - - public abstract class MethodInvalidatedException extends RuntimeException { - - private static final long serialVersionUID = -3540232440794244844L; - } - - /** - * Returns the method to which the compiled code belongs. - * @return the method to which the compiled code belongs. - */ - ResolvedJavaMethod method(); - - /** - * @return true if the code represented by this object is still valid, false otherwise (may happen due to deopt, etc.) - */ - boolean isValid(); - - Object execute(Object arg1, Object arg2, Object arg3); - - Object executeVarargs(Object... args); -} diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCompiledMethod.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCompiledMethod.java Wed Jul 18 14:38:16 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCompiledMethod.java Wed Jul 18 19:08:32 2012 +0200 @@ -24,6 +24,7 @@ import java.lang.reflect.*; +import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.hotspot.*; diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java Wed Jul 18 14:38:16 2012 +0200 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/target/amd64/AMD64TailcallOp.java Wed Jul 18 19:08:32 2012 +0200 @@ -26,6 +26,7 @@ import java.util.*; +import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; import com.oracle.graal.lir.LIRInstruction.Opcode; import com.oracle.graal.lir.amd64.*; diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.snippets.test/src/com/oracle/graal/snippets/TypeCheckTest.java --- a/graal/com.oracle.graal.snippets.test/src/com/oracle/graal/snippets/TypeCheckTest.java Wed Jul 18 14:38:16 2012 +0200 +++ b/graal/com.oracle.graal.snippets.test/src/com/oracle/graal/snippets/TypeCheckTest.java Wed Jul 18 19:08:32 2012 +0200 @@ -22,8 +22,9 @@ */ package com.oracle.graal.snippets; +import com.oracle.graal.api.code.*; import com.oracle.graal.api.meta.*; -import com.oracle.graal.api.meta.JavaTypeProfile.*; +import com.oracle.graal.api.meta.JavaTypeProfile.ProfiledType; import com.oracle.graal.compiler.tests.*; import com.oracle.graal.nodes.*; diff -r 2c00c51357d8 -r 0278da961319 graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java --- a/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java Wed Jul 18 14:38:16 2012 +0200 +++ b/graal/com.oracle.graal.tests/src/com/oracle/graal/compiler/tests/CompiledMethodTest.java Wed Jul 18 19:08:32 2012 +0200 @@ -26,8 +26,9 @@ import org.junit.*; +import com.oracle.graal.api.code.*; +import com.oracle.graal.api.code.InstalledCode.*; import com.oracle.graal.api.meta.*; -import com.oracle.graal.api.meta.InstalledCode.*; import com.oracle.graal.compiler.*; import com.oracle.graal.compiler.phases.*; import com.oracle.graal.graph.*;