Mercurial > hg > truffle
changeset 22260:3986598b6aa0
Truffle/Instrumentation: remove some deprecated interfaces and Accessor methods.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 28 Sep 2015 12:38:23 -0700 |
parents | 1348cc2e084e |
children | b73205fe7cf3 |
files | truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportException.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportProvider.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ToolSupportProvider.java |
diffstat | 5 files changed, 0 insertions(+), 175 deletions(-) [+] |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java Mon Sep 28 12:34:51 2015 -0700 +++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java Mon Sep 28 12:38:23 2015 -0700 @@ -55,7 +55,6 @@ import com.oracle.truffle.api.TruffleLanguage; import com.oracle.truffle.api.TruffleLanguage.Env; import com.oracle.truffle.api.TruffleLanguage.Registration; -import com.oracle.truffle.api.debug.DebugSupportProvider; import com.oracle.truffle.api.debug.Debugger; import com.oracle.truffle.api.debug.ExecutionEvent; import com.oracle.truffle.api.debug.SuspendedEvent; @@ -63,7 +62,6 @@ import com.oracle.truffle.api.instrument.ASTProber; import com.oracle.truffle.api.instrument.Instrumenter; import com.oracle.truffle.api.instrument.Probe; -import com.oracle.truffle.api.instrument.ToolSupportProvider; import com.oracle.truffle.api.interop.TruffleObject; import com.oracle.truffle.api.interop.java.JavaInterop; import com.oracle.truffle.api.source.Source; @@ -898,18 +896,6 @@ return super.languageGlobal(env); } - @SuppressWarnings("deprecation") - @Override - public ToolSupportProvider getToolSupport(TruffleLanguage<?> l) { - throw new UnsupportedOperationException(); - } - - @SuppressWarnings("deprecation") - @Override - public DebugSupportProvider getDebugSupport(TruffleLanguage<?> l) { - throw new UnsupportedOperationException(); - } - @Override protected Instrumenter createInstrumenter(Object vm) { return super.createInstrumenter(vm);
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportException.java Mon Sep 28 12:34:51 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 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.debug; - -public class DebugSupportException extends Exception { - - private static final long serialVersionUID = 3039074861617372741L; - - public DebugSupportException(String string) { - super(string); - } - - public DebugSupportException(Exception ex) { - super(ex); - } - -}
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportProvider.java Mon Sep 28 12:34:51 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* - * Copyright (c) 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.debug; - -import com.oracle.truffle.api.frame.MaterializedFrame; -import com.oracle.truffle.api.instrument.AdvancedInstrumentResultListener; -import com.oracle.truffle.api.instrument.AdvancedInstrumentRoot; -import com.oracle.truffle.api.instrument.AdvancedInstrumentRootFactory; -import com.oracle.truffle.api.instrument.Instrumenter; -import com.oracle.truffle.api.instrument.ToolSupportProvider; -import com.oracle.truffle.api.nodes.Node; -import com.oracle.truffle.api.source.Source; - -/** - * Access to language-specific information and execution services to enable debugging. - */ -public interface DebugSupportProvider extends ToolSupportProvider { - /** - * Runs source code in a halted execution context, or at top level. - * - * @param source the code to run - * @param node node where execution halted, {@code null} if no execution context - * @param mFrame frame where execution halted, {@code null} if no execution context - * @return result of running the code in the context, or at top level if no execution context. - * @throws DebugSupportException if the evaluation cannot be performed - */ - Object evalInContext(Source source, Node node, MaterializedFrame mFrame) throws DebugSupportException; - - /** - * Creates a language-specific factory to produce instances of {@link AdvancedInstrumentRoot} - * that, when executed, computes the result of a textual expression in the language; used to - * create an - * {@linkplain Instrumenter#attach(com.oracle.truffle.api.instrument.Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) - * Advanced Instrument}. - * - * @param expr a guest language expression - * @param resultListener optional listener for the result of each evaluation. - * @return a new factory - * @throws DebugSupportException if the factory cannot be created, for example if the expression - * is badly formed. - */ - AdvancedInstrumentRootFactory createAdvancedInstrumentRootFactory(String expr, AdvancedInstrumentResultListener resultListener) throws DebugSupportException; -}
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java Mon Sep 28 12:34:51 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java Mon Sep 28 12:38:23 2015 -0700 @@ -36,7 +36,6 @@ import com.oracle.truffle.api.Truffle; import com.oracle.truffle.api.TruffleLanguage; import com.oracle.truffle.api.TruffleLanguage.Env; -import com.oracle.truffle.api.debug.DebugSupportProvider; import com.oracle.truffle.api.debug.Debugger; import com.oracle.truffle.api.frame.MaterializedFrame; import com.oracle.truffle.api.instrument.ASTProber; @@ -44,7 +43,6 @@ import com.oracle.truffle.api.instrument.AdvancedInstrumentRootFactory; import com.oracle.truffle.api.instrument.Instrumenter; import com.oracle.truffle.api.instrument.Probe; -import com.oracle.truffle.api.instrument.ToolSupportProvider; import com.oracle.truffle.api.instrument.Visualizer; import com.oracle.truffle.api.instrument.WrapperNode; import com.oracle.truffle.api.nodes.Node; @@ -181,16 +179,6 @@ return API.languageGlobal(env); } - @Deprecated - protected ToolSupportProvider getToolSupport(@SuppressWarnings("unused") TruffleLanguage<?> l) { - throw new UnsupportedOperationException(); - } - - @Deprecated - protected DebugSupportProvider getDebugSupport(@SuppressWarnings("unused") TruffleLanguage<?> l) { - throw new UnsupportedOperationException(); - } - /** * Provided by each {@linkplain TruffleLanguage language implementation}. */
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ToolSupportProvider.java Mon Sep 28 12:34:51 2015 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 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.instrument; - -/** - * Access to language-specific information and execution services for external tools. - */ -public interface ToolSupportProvider { - - /** - * Gets visualization services for language-specific information. - */ - Visualizer getVisualizer(); - - /** - * Enables AST probing on all subsequently created ASTs (sources parsed). - * - * @param astProber optional AST prober to enable; the default for the language used if - * {@code null} - */ - void enableASTProbing(ASTProber astProber); - -}