# HG changeset patch # User Jaroslav Tulach # Date 1445624580 -7200 # Node ID 414e82b9fc35c11cbe322495a7ee53434d07f9c5 # Parent ad67d348e361e44b605c60b9477bf4a294f2f2a5 Release 0.9 is out, let's remove deprecated elements from the API diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteMethodTest.java --- a/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteMethodTest.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteMethodTest.java Fri Oct 23 20:23:00 2015 +0200 @@ -39,7 +39,7 @@ + "execute(VirtualFrame)' and must not throw any checked exceptions."; @TypeSystem({int.class}) - @DSLOptions(useNewLayout = true) + @DSLOptions static class ExecuteMethodTypes { } diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SpecializationFallthroughTest.java --- a/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SpecializationFallthroughTest.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SpecializationFallthroughTest.java Fri Oct 23 20:23:00 2015 +0200 @@ -162,7 +162,7 @@ static int fallthrough1; static int fallthrough2; - @Specialization(order = 1, rewriteOn = ArithmeticException.class) + @Specialization(rewriteOn = ArithmeticException.class) int do1(int a) throws ArithmeticException { if (a == 0) { fallthrough1++; @@ -171,7 +171,7 @@ return a; } - @Specialization(order = 2, rewriteOn = ArithmeticException.class) + @Specialization(rewriteOn = ArithmeticException.class) int do2(int a) throws ArithmeticException { if (a == 1) { fallthrough2++; @@ -266,7 +266,7 @@ static int fallthrough1; static int fallthrough2; - @Specialization(order = 1, rewriteOn = ArithmeticException.class) + @Specialization(rewriteOn = ArithmeticException.class) int do1(int a) throws ArithmeticException { if (a == 0) { fallthrough1++; @@ -275,7 +275,7 @@ return a; } - @Specialization(order = 2, rewriteOn = ArithmeticException.class) + @Specialization(rewriteOn = ArithmeticException.class) int do2(int a) throws ArithmeticException { if (a == 1) { fallthrough2++; diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TypeSystemTest.java --- a/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TypeSystemTest.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TypeSystemTest.java Fri Oct 23 20:23:00 2015 +0200 @@ -43,7 +43,7 @@ @TypeSystem({byte.class, short.class, int.class, long.class, double.class, boolean.class, BigInteger.class, String.class, CallTarget.class, BExtendsAbstract.class, CExtendsAbstract.class, Abstract.class, Interface.class, Object[].class}) - @DSLOptions(useNewLayout = true) + @DSLOptions static class SimpleTypes { static int intCheck; diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Implies.java --- a/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Implies.java Fri Oct 23 20:22:44 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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.dsl; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Experimental API. - * - * @deprecated annotation has no effect anymore. - */ -@Retention(RetentionPolicy.CLASS) -@Target({ElementType.METHOD}) -@Deprecated -public @interface Implies { - - String[] value(); - -} diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/NodeAssumptions.java --- a/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/NodeAssumptions.java Fri Oct 23 20:22:44 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2012, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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.dsl; - -import com.oracle.truffle.api.Assumption; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * @deprecated use {@link NodeField} with type {@link Assumption} instead. - */ -@Retention(RetentionPolicy.CLASS) -@Target({ElementType.TYPE}) -@Deprecated -public @interface NodeAssumptions { - - String[] value(); - -} diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java --- a/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java Fri Oct 23 20:23:00 2015 +0200 @@ -119,18 +119,6 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD}) public @interface Specialization { - - /** - * @deprecated do not use anymore. Will get removed in the next release. - */ - @Deprecated int DEFAULT_ORDER = -1; - - /** - * @deprecated use declaration order instead. Will get removed in the next release. - */ - @Deprecated - int order() default DEFAULT_ORDER; - /** * References a specialization of a super class by its method name where this specialization is * inserted before. The declaration order of a specialization is not usable for nodes where diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/internal/DSLOptions.java --- a/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/internal/DSLOptions.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/internal/DSLOptions.java Fri Oct 23 20:23:00 2015 +0200 @@ -36,11 +36,6 @@ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface DSLOptions { - - /** Flag has no effect anymore. Is going to be removed soon. */ - @Deprecated - boolean useNewLayout() default true; - /** * Lazy class loading ensures that all generated specialization classes are loaded lazily. * Disabling this feature will eagerly load all classes but will also reduce the generated code diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/Layout.java --- a/truffle/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/Layout.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/Layout.java Fri Oct 23 20:23:00 2015 +0200 @@ -35,10 +35,6 @@ * An object may change its shape but only to shapes of the same layout. */ public abstract class Layout { - @Deprecated public static final EnumSet NONE = EnumSet.noneOf(ImplicitCast.class); - @Deprecated public static final EnumSet INT_TO_DOUBLE = EnumSet.of(ImplicitCast.IntToDouble); - @Deprecated public static final EnumSet INT_TO_LONG = EnumSet.of(ImplicitCast.IntToLong); - public static final String OPTION_PREFIX = "truffle.object."; private static final LayoutFactory LAYOUT_FACTORY = loadLayoutFactory(); @@ -65,15 +61,6 @@ return newLayout().build(); } - /** - * Equivalent to - * {@code Layout.newLayout().setAllowedImplicitCasts(allowedImplicitCasts).build()}. - */ - @Deprecated - public static Layout createLayout(EnumSet allowedImplicitCasts) { - return newLayout().setAllowedImplicitCasts(allowedImplicitCasts).build(); - } - public abstract DynamicObject newInstance(Shape shape); public abstract Class getType(); @@ -168,11 +155,6 @@ this.allowedImplicitCasts.add(allowedImplicitCast); return this; } - - @Deprecated - public EnumSet getAllowedImplicitCasts() { - return allowedImplicitCasts; - } } protected static EnumSet getAllowedImplicitCasts(Builder builder) { diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java --- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java Fri Oct 23 20:23:00 2015 +0200 @@ -24,10 +24,9 @@ import com.oracle.truffle.api.source.Source; import com.oracle.truffle.api.vm.PolyglotEngine; +import java.io.File; import java.io.IOException; import java.io.StringReader; -import java.net.URI; -import java.net.URISyntaxException; import org.junit.Before; import org.junit.Test; @@ -47,23 +46,20 @@ t.join(); } - @SuppressWarnings("deprecation") @Test(expected = IllegalStateException.class) - public void evalURI() throws IOException, URISyntaxException { - tvm.eval(new URI("http://unknown.js")); + public void evalURI() throws IOException { + tvm.eval(Source.fromURL(new File(".").toURI().toURL(), "wrong.test")); } - @SuppressWarnings("deprecation") @Test(expected = IllegalStateException.class) public void evalString() throws IOException { - tvm.eval("text/javascript", "1 + 1"); + tvm.eval(Source.fromText("1 + 1", "wrong.test").withMimeType("text/javascript")); } - @SuppressWarnings("deprecation") @Test(expected = IllegalStateException.class) public void evalReader() throws IOException { try (StringReader sr = new StringReader("1 + 1")) { - tvm.eval("text/javascript", sr); + tvm.eval(Source.fromReader(sr, "wrong.test").withMimeType("text/javascript")); } } diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java --- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java Fri Oct 23 20:23:00 2015 +0200 @@ -25,17 +25,10 @@ package com.oracle.truffle.api.vm; import java.io.Closeable; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InterruptedIOException; import java.io.OutputStream; -import java.io.Reader; -import java.io.Writer; -import java.net.URI; -import java.net.URL; -import java.net.URLConnection; -import java.nio.file.Files; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -94,11 +87,12 @@ * Use {@link #buildNew()} multiple times to create different, isolated portal environment * completely separated from each other. *

- * Once instantiated use {@link #eval(java.net.URI)} with a reference to a file or URL or directly - * pass code snippet into the virtual machine via {@link #eval(java.lang.String, java.lang.String)}. - * Support for individual languages is initialized on demand - e.g. once a file of certain MIME type - * is about to be processed, its appropriate engine (if found), is initialized. Once an engine gets - * initialized, it remains so, until the virtual machine isn't garbage collected. + * Once instantiated use {@link #eval(com.oracle.truffle.api.source.Source)} with a reference to a + * file or URL or directly pass code snippet into the virtual machine via + * {@link #eval(com.oracle.truffle.api.source.Source)}. Support for individual languages is + * initialized on demand - e.g. once a file of certain MIME type is about to be processed, its + * appropriate engine (if found), is initialized. Once an engine gets initialized, it remains so, + * until the virtual machine isn't garbage collected. *

* The engine is single-threaded and tries to enforce that. It records the thread it has been * {@link Builder#build() created} by and checks that all subsequent calls are coming from the same @@ -184,7 +178,7 @@ * * It searches for {@link Registration languages registered} in the system class loader and * makes them available for later evaluation via - * {@link #eval(java.lang.String, java.lang.String)} methods. + * {@link #eval(com.oracle.truffle.api.source.Source)} method. * * @return new, isolated virtual machine with pre-registered languages */ @@ -232,15 +226,6 @@ } /** - * @deprecated does nothing - */ - @Deprecated - @SuppressWarnings("unused") - public Builder stdOut(Writer w) { - return this; - } - - /** * Changes the error output for languages running in to be created * {@link PolyglotEngine virtual machine}. The default is to use {@link System#err}. * @@ -253,15 +238,6 @@ } /** - * @deprecated does nothing - */ - @Deprecated - @SuppressWarnings("unused") - public Builder stdErr(Writer w) { - return this; - } - - /** * Changes the default input for languages running in to be created * {@link PolyglotEngine virtual machine}. The default is to use {@link System#in}. * @@ -274,15 +250,6 @@ } /** - * @deprecated does nothing - */ - @Deprecated - @SuppressWarnings("unused") - public Builder stdIn(Reader r) { - return this; - } - - /** * Registers another instance of {@link EventConsumer} into the to be created * {@link PolyglotEngine}. * @@ -373,79 +340,6 @@ } /** - * Evaluates file located on a given URL. Is equivalent to loading the content of a file and - * executing it via {@link #eval(java.lang.String, java.lang.String)} with a MIME type guess - * based on the file's extension and/or content. - * - * @param location the location of a file to execute - * @return result of a processing the file, possibly null - * @throws IOException exception to signal I/O problems or problems with processing the file's - * content - * @deprecated use {@link #eval(com.oracle.truffle.api.source.Source)} - */ - @Deprecated - public Object eval(URI location) throws IOException { - checkThread(); - Source s; - String mimeType; - if (location.getScheme().equals("file")) { - File file = new File(location); - s = Source.fromFileName(file.getPath(), true); - mimeType = Files.probeContentType(file.toPath()); - } else { - URL url = location.toURL(); - s = Source.fromURL(url, location.toString()); - URLConnection conn = url.openConnection(); - mimeType = conn.getContentType(); - } - Language l = langs.get(mimeType); - if (l == null) { - throw new IOException("No language for " + location + " with MIME type " + mimeType + " found. Supported types: " + langs.keySet()); - } - return eval(l, s).get(); - } - - /** - * Evaluates code snippet. Chooses a language registered for a given MIME type (throws - * {@link IOException} if there is none). And passes the specified code to it for execution. - * - * @param mimeType MIME type of the code snippet - chooses the right language - * @param reader the source of code snippet to execute - * @return result of an execution, possibly null - * @throws IOException thrown to signal errors while processing the code - * @deprecated use {@link #eval(com.oracle.truffle.api.source.Source)} - */ - @Deprecated - public Object eval(String mimeType, Reader reader) throws IOException { - checkThread(); - Language l = langs.get(mimeType); - if (l == null) { - throw new IOException("No language for MIME type " + mimeType + " found. Supported types: " + langs.keySet()); - } - return eval(l, Source.fromReader(reader, mimeType)).get(); - } - - /** - * Evaluates code snippet. Chooses a language registered for a given MIME type (throws - * {@link IOException} if there is none). And passes the specified code to it for execution. - * - * @param mimeType MIME type of the code snippet - chooses the right language - * @param code the code snippet to execute - * @return result of an execution, possibly null - * @throws IOException thrown to signal errors while processing the code - * @deprecated use {@link #eval(com.oracle.truffle.api.source.Source)} - */ - @Deprecated - public Object eval(String mimeType, String code) throws IOException { - checkThread(); - Language l = langs.get(mimeType); - if (l == null) { - throw new IOException("No language for MIME type " + mimeType + " found. Supported types: " + langs.keySet()); - } - return eval(l, Source.fromText(code, mimeType)).get(); - } - - /** * Evaluates provided source. Chooses language registered for a particular * {@link Source#getMimeType() MIME type} (throws {@link IOException} if there is none). The * language is then allowed to parse and execute the source. @@ -576,7 +470,7 @@ /** * Looks global symbol provided by one of initialized languages up. First of all execute your - * program via one of your {@link #eval(java.lang.String, java.lang.String)} and then look + * program via one of your {@link #eval(com.oracle.truffle.api.source.Source)} and then look * expected symbol up using this method. *

* The names of the symbols are language dependent, but for example the Java language bindings @@ -860,7 +754,7 @@ * {@link Language} objects to represent them. One can obtain a {@link #getName() name} or list * of supported {@link #getMimeTypes() MIME types} for each language. The actual language * implementation is not initialized until - * {@link PolyglotEngine#eval(java.lang.String, java.lang.String) a code is evaluated} in it. + * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source) a code is evaluated} in it. */ public class Language { private final LanguageCache info; @@ -926,14 +820,6 @@ return res[0] == null ? null : new Value(new TruffleLanguage[]{info.getImpl(true)}, res, null); } - /** - * @deprecated concatenate {@link #getName()} and {@link #getVersion()} the way you want. - */ - @Deprecated - public String getShortName() { - return getName() + "(" + getVersion() + ")"; - } - TruffleLanguage getImpl(boolean create) { getEnv(create); TruffleLanguage impl = info.getImpl(false); @@ -949,7 +835,7 @@ @Override public String toString() { - return "[" + getShortName() + " for " + getMimeTypes() + "]"; + return "[" + getName() + "@ " + getVersion() + " for " + getMimeTypes() + "]"; } } // end of Language diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java --- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java Fri Oct 23 20:22:44 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -/* - * Copyright (c) 2014, 2015, 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * 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.vm; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.Reader; -import java.io.Writer; -import java.util.Map; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Executor; - -import com.oracle.truffle.api.TruffleLanguage; -import com.oracle.truffle.api.debug.ExecutionEvent; -import com.oracle.truffle.api.debug.SuspendedEvent; -import com.oracle.truffle.api.source.Source; - -/** - * @deprecated - */ -@Deprecated -@SuppressWarnings({"rawtypes", "deprecated"}) -public final class TruffleVM extends PolyglotEngine { - private TruffleVM() { - super(); - } - - /** - * Real constructor used from the builder. - */ - TruffleVM(Executor executor, Map globals, OutputStream out, OutputStream err, InputStream in, EventConsumer[] handlers) { - super(executor, globals, out, err, in, handlers); - } - - @Deprecated - public static TruffleVM.Builder newVM() { - // making Builder non-static inner class is a - // nasty trick to avoid the Builder class to appear - // in Javadoc next to TruffleVM class - TruffleVM vm = new TruffleVM(); - return vm.new Builder(); - } - - @SuppressWarnings("deprecation") - @Deprecated - public final class Builder extends PolyglotEngine.Builder { - Builder() { - } - - @Deprecated - @Override - public Builder setOut(OutputStream os) { - super.setOut(os); - return this; - } - - @Deprecated - @Override - public Builder executor(Executor executor) { - return (Builder) super.executor(executor); - } - - @Deprecated - @Override - public Builder setErr(OutputStream os) { - super.setErr(os); - return this; - } - - @Deprecated - @Override - public Builder globalSymbol(String name, Object obj) { - return (Builder) super.globalSymbol(name, obj); - } - - @Deprecated - @Override - public Builder setIn(InputStream is) { - super.setIn(is); - return this; - } - - @Deprecated - @Override - public Builder onEvent(EventConsumer handler) { - return (Builder) super.onEvent(handler); - } - - @Deprecated - @Override - public Builder stdIn(Reader r) { - return (Builder) super.stdIn(r); - } - - @Deprecated - @Override - public Builder stdErr(Writer w) { - return (Builder) super.stdErr(w); - } - - @Deprecated - @Override - public Builder stdOut(Writer w) { - return (Builder) super.stdOut(w); - } - - @Deprecated - @Override - public TruffleVM build() { - return (TruffleVM) super.build(); - } - } - - @Override - Value createValue(TruffleLanguage[] lang, Object[] result, CountDownLatch ready) { - return new Symbol(lang, result, ready); - } - - @Override - Language createLanguage(Map.Entry en) { - return new Language(en.getValue()); - } - - @Override - @SuppressWarnings("unchecked") - public Map getLanguages() { - return (Map) super.getLanguages(); - } - - @Override - public Symbol eval(Source source) throws IOException { - return (Symbol) super.eval(source); - } - - @Override - public Symbol findGlobalSymbol(final String globalName) { - return (Symbol) super.findGlobalSymbol(globalName); - } - - @Override - void dispatchSuspendedEvent(SuspendedEvent event) { - super.dispatchSuspendedEvent(event); - } - - @Override - void dispatchExecutionEvent(ExecutionEvent event) { - super.dispatchExecutionEvent(event); - } - - @Deprecated - public class Symbol extends Value { - Symbol(TruffleLanguage[] language, Object[] result, CountDownLatch ready) { - super(language, result, ready); - } - - @Override - public Symbol invoke(final Object thiz, final Object... args) throws IOException { - return (Symbol) super.invoke(thiz, args); - } - } - - @Deprecated - public final class Language extends PolyglotEngine.Language { - Language(LanguageCache info) { - super(info); - } - } // end of Language -} diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java Fri Oct 23 20:23:00 2015 +0200 @@ -26,11 +26,7 @@ import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.Writer; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -398,11 +394,6 @@ return in; } - @Deprecated - public Reader stdIn() { - return new InputStreamReader(in); - } - /** * Standard output writer for {@link com.oracle.truffle.api.vm.PolyglotEngine} this language * is being executed in. @@ -413,11 +404,6 @@ return out; } - @Deprecated - public Writer stdOut() { - return new OutputStreamWriter(out); - } - /** * Standard error writer for {@link com.oracle.truffle.api.vm.PolyglotEngine} this language * is being executed in. @@ -428,11 +414,6 @@ return err; } - @Deprecated - public Writer stdErr() { - return new OutputStreamWriter(err); - } - public Instrumenter instrumenter() { return instrumenter; } diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/DirectCallNode.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/DirectCallNode.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/DirectCallNode.java Fri Oct 23 20:23:00 2015 +0200 @@ -99,21 +99,6 @@ public abstract void forceInlining(); /** - * Returns true if the runtime system has decided to inline this call-site. If the - * {@link DirectCallNode} was forced to inline then this does not necessarily mean that the - * {@link DirectCallNode} is really going to be inlined. This depends on whether or not the - * runtime system supports inlining. The runtime system may also decide to not inline calls - * which were forced to inline. - * - * @deprecated we do not expose this information any longer. returns always false. - */ - @SuppressWarnings("static-method") - @Deprecated - public final boolean isInlined() { - return false; - } - - /** * Returns true if the runtime system supports cloning and the {@link RootNode} * returns true in {@link RootNode#isCloningAllowed()}. * diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java Fri Oct 23 20:23:00 2015 +0200 @@ -392,16 +392,6 @@ } /** - * This method must never be called. It enforces that {@link Object#clone} is not directly - * called by subclasses. Use the {@link #copy()} method instead. - */ - @Override - @Deprecated - protected final Object clone() throws CloneNotSupportedException { - throw new IllegalStateException("This method should never be called, use the copy method instead!"); - } - - /** * Get the root node of the tree a node belongs to. * * @return the {@link RootNode} or {@code null} if there is none. diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/RootNode.java Fri Oct 23 20:23:00 2015 +0200 @@ -49,33 +49,6 @@ @CompilationFinal private FrameDescriptor frameDescriptor; /** - * @deprecated each RootNode should be associated with a {@link TruffleLanguage} use constructor - * that allows you to specify it. This method will be removed on Aug 15, 2015. - */ - @Deprecated - protected RootNode() { - this(null, null, null, false); - } - - /** - * @deprecated each RootNode should be associated with a {@link TruffleLanguage} use constructor - * that allows you to specify it. This method will be removed on Aug 15, 2015. - */ - @Deprecated - protected RootNode(SourceSection sourceSection) { - this(null, sourceSection, null, false); - } - - /** - * @deprecated each RootNode should be associated with a {@link TruffleLanguage} use constructor - * that allows you to specify it. This method will be removed on Aug 15, 2015. - */ - @Deprecated - protected RootNode(SourceSection sourceSection, FrameDescriptor frameDescriptor) { - this(null, sourceSection, frameDescriptor, false); - } - - /** * Creates new root node. Each {@link RootNode} is associated with a particular language - if * the root node represents a method it is assumed the method is written in such language. *

diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java --- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java Fri Oct 23 20:23:00 2015 +0200 @@ -254,21 +254,6 @@ } /** - * Temporary method during API evolution, supports debugger integration. - */ - @Deprecated - public static void run(Source source) throws IOException { - PolyglotEngine vm = PolyglotEngine.buildNew().build(); - assert vm.getLanguages().containsKey("application/x-sl"); - vm.eval(source); - Value main = vm.findGlobalSymbol("main"); - if (main == null) { - throw new SLException("No function main() defined in SL source file."); - } - main.invoke(null); - } - - /** * Parse and run the specified SL source. Factored out in a separate method so that it can also * be used by the unit test harness. */ diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLTypes.java --- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLTypes.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLTypes.java Fri Oct 23 20:23:00 2015 +0200 @@ -58,7 +58,7 @@ * generated ones would not be sufficient. */ @TypeSystem({long.class, BigInteger.class, boolean.class, String.class, SLFunction.class, SLNull.class}) -@DSLOptions(useNewLayout = true) +@DSLOptions public abstract class SLTypes { /** diff -r ad67d348e361 -r 414e82b9fc35 truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/server/REPLServerContext.java --- a/truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/server/REPLServerContext.java Fri Oct 23 20:22:44 2015 +0200 +++ b/truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/server/REPLServerContext.java Fri Oct 23 20:23:00 2015 +0200 @@ -91,15 +91,7 @@ } public PolyglotEngine engine() { - return vm(); - } - - /** - * @deprecated use {@link #engine()}. - */ - @Deprecated - public com.oracle.truffle.api.vm.PolyglotEngine vm() { - return engine(); + throw new IllegalStateException(); } protected abstract Debugger db();