changeset 22172:b31dcacfc8ff

Replacing more TruffleVM references in comments with the new PolyglotEngine name
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Mon, 21 Sep 2015 10:55:36 +0200
parents 41c5f430ce37
children dcb70d90c11d
files CHANGELOG.md truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/TruffleVMSingleThreadedTest.java truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/EventConsumer.java truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/package-info.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Breakpoint.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/ExecutionEvent.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/SuspendedEvent.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/package-info.java truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java truffle/overview.html
diffstat 17 files changed, 177 insertions(+), 172 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG.md	Mon Sep 21 10:44:18 2015 +0200
+++ b/CHANGELOG.md	Mon Sep 21 10:55:36 2015 +0200
@@ -11,8 +11,8 @@
 17-Jul-2015, [Repository Revision](http://lafo.ssw.uni-linz.ac.at/hg/truffle/shortlog/graal-0.8)
 ### Truffle
 * The Truffle repository no longer contains Graal
-* TruffleVM is an entrypoint for creating, building and running multi language Truffle systems
-* Implement TruffleLanguage and use @Registration to register your language into the TruffleVM system
+* PolyglotEngine is an entrypoint for creating, building and running multi language Truffle systems
+* Implement TruffleLanguage and use @Registration to register your language into the Truffle polyglot system
 * Include Truffle TCK (test compatibility kit) into your test cases to verify your language implementation is compliant enough
 * Interoperability API polished
 * Cleanup of Source related API
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java	Mon Sep 21 10:55:36 2015 +0200
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.test.vm;
+
+import com.oracle.truffle.api.source.Source;
+import java.io.*;
+import java.net.*;
+
+import org.junit.*;
+
+import com.oracle.truffle.api.vm.*;
+
+public class EngineSingleThreadedTest {
+    PolyglotEngine tvm;
+
+    @Before
+    public void initInDifferentThread() throws InterruptedException {
+        final PolyglotEngine.Builder b = PolyglotEngine.buildNew();
+        Thread t = new Thread("Initializer") {
+            @Override
+            public void run() {
+                tvm = b.build();
+            }
+        };
+        t.start();
+        t.join();
+    }
+
+    @SuppressWarnings("deprecation")
+    @Test(expected = IllegalStateException.class)
+    public void evalURI() throws IOException, URISyntaxException {
+        tvm.eval(new URI("http://unknown.js"));
+    }
+
+    @SuppressWarnings("deprecation")
+    @Test(expected = IllegalStateException.class)
+    public void evalString() throws IOException {
+        tvm.eval("text/javascript", "1 + 1");
+    }
+
+    @SuppressWarnings("deprecation")
+    @Test(expected = IllegalStateException.class)
+    public void evalReader() throws IOException {
+        try (StringReader sr = new StringReader("1 + 1")) {
+            tvm.eval("text/javascript", sr);
+        }
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void evalSource() throws IOException {
+        tvm.eval(Source.fromText("", "Empty"));
+    }
+
+    @Test(expected = IllegalStateException.class)
+    public void findGlobalSymbol() {
+        tvm.findGlobalSymbol("doesNotExists");
+    }
+}
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/TruffleVMSingleThreadedTest.java	Mon Sep 21 10:44:18 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2012, 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.
- *
- * 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.test.vm;
-
-import com.oracle.truffle.api.source.Source;
-import java.io.*;
-import java.net.*;
-
-import org.junit.*;
-
-import com.oracle.truffle.api.vm.*;
-
-public class TruffleVMSingleThreadedTest {
-    PolyglotEngine tvm;
-
-    @Before
-    public void initInDifferentThread() throws InterruptedException {
-        final PolyglotEngine.Builder b = PolyglotEngine.buildNew();
-        Thread t = new Thread("Initializer") {
-            @Override
-            public void run() {
-                tvm = b.build();
-            }
-        };
-        t.start();
-        t.join();
-    }
-
-    @SuppressWarnings("deprecation")
-    @Test(expected = IllegalStateException.class)
-    public void evalURI() throws IOException, URISyntaxException {
-        tvm.eval(new URI("http://unknown.js"));
-    }
-
-    @SuppressWarnings("deprecation")
-    @Test(expected = IllegalStateException.class)
-    public void evalString() throws IOException {
-        tvm.eval("text/javascript", "1 + 1");
-    }
-
-    @SuppressWarnings("deprecation")
-    @Test(expected = IllegalStateException.class)
-    public void evalReader() throws IOException {
-        try (StringReader sr = new StringReader("1 + 1")) {
-            tvm.eval("text/javascript", sr);
-        }
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void evalSource() throws IOException {
-        tvm.eval(Source.fromText("", "Empty"));
-    }
-
-    @Test(expected = IllegalStateException.class)
-    public void findGlobalSymbol() {
-        tvm.findGlobalSymbol("doesNotExists");
-    }
-}
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/EventConsumer.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/EventConsumer.java	Mon Sep 21 10:55:36 2015 +0200
@@ -29,9 +29,9 @@
 import com.oracle.truffle.api.debug.SuspendedEvent;
 
 /**
- * {@link TruffleVM} generates various events and delivers them to
- * {@link TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) registered} handlers.
- * Each handler is registered for a particular type of event. Examples of events include
+ * {@link PolyglotEngine} generates various events and delivers them to
+ * {@link PolyglotEngine.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) registered}
+ * handlers. Each handler is registered for a particular type of event. Examples of events include
  * {@link ExecutionEvent} or {@link SuspendedEvent} useful when debugging {@link TruffleLanguage
  * Truffle language}s.
  *
@@ -50,7 +50,7 @@
     }
 
     /**
-     * Called by the {@link TruffleVM} when event of requested type appears.
+     * Called by the {@link PolyglotEngine} when event of requested type appears.
      *
      * @param event the instance of an event of the request type
      */
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java	Mon Sep 21 10:55:36 2015 +0200
@@ -44,19 +44,20 @@
 /**
  * Gate way into the world of {@link TruffleLanguage Truffle languages}. {@link #buildNew()
  * Instantiate} your own portal into the isolated, multi language system with all the registered
- * languages ready for your use. A {@link PolyglotEngine} runs inside of a <em>JVM</em>, there can however
- * be multiple instances (some would say tenants) of {@link PolyglotEngine} running next to each other in a
- * single <em>JVM</em> with a complete mutual isolation. There is 1:N mapping between <em>JVM</em>
- * and {@link PolyglotEngine}.
+ * languages ready for your use. A {@link PolyglotEngine} runs inside of a <em>JVM</em>, there can
+ * however be multiple instances (some would say tenants) of {@link PolyglotEngine} running next to
+ * each other in a single <em>JVM</em> with a complete mutual isolation. There is 1:N mapping
+ * between <em>JVM</em> and {@link PolyglotEngine}.
  * <p>
  * It would not be correct to think of a {@link PolyglotEngine} as a runtime for a single
  * {@link TruffleLanguage Truffle language} (Ruby, Python, R, C, JavaScript, etc.) either.
- * {@link PolyglotEngine} can host as many of Truffle languages as {@link Registration registered on a
- * class path} of your <em>JVM</em> application. {@link PolyglotEngine} orchestrates these languages,
- * manages exchange of objects and calls among them. While it may happen that there is just one
- * activated language inside of a {@link PolyglotEngine}, the greatest strength of {@link PolyglotEngine} is in
- * inter-operability between all Truffle languages. There is 1:N mapping between {@link PolyglotEngine} and
- * {@link TruffleLanguage Truffle language implementations}.
+ * {@link PolyglotEngine} can host as many of Truffle languages as {@link Registration registered on
+ * a class path} of your <em>JVM</em> application. {@link PolyglotEngine} orchestrates these
+ * languages, manages exchange of objects and calls among them. While it may happen that there is
+ * just one activated language inside of a {@link PolyglotEngine}, the greatest strength of
+ * {@link PolyglotEngine} is in inter-operability between all Truffle languages. There is 1:N
+ * mapping between {@link PolyglotEngine} and {@link TruffleLanguage Truffle language
+ * implementations}.
  * <p>
  * Use {@link #buildNew()} to create new isolated portal ready for execution of various languages.
  * All the languages in a single portal see each other exported global symbols and can cooperate.
@@ -69,10 +70,10 @@
  * 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.
  * <p>
- * The <code>TruffleVM</code> 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 thread. There is 1:1 mapping between {@link PolyglotEngine} and a thread that can tell it what
- * to do.
+ * 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
+ * thread. There is 1:1 mapping between {@link PolyglotEngine} and a thread that can tell it what to
+ * do.
  */
 @SuppressWarnings("rawtypes")
 public class PolyglotEngine {
@@ -141,14 +142,14 @@
     public static PolyglotEngine.Builder buildNew() {
         // making Builder non-static inner class is a
         // nasty trick to avoid the Builder class to appear
-        // in Javadoc next to TruffleVM class
+        // in Javadoc next to PolyglotEngine class
         PolyglotEngine vm = new PolyglotEngine();
         return vm.new Builder();
     }
 
     /**
-     * Builder for a new {@link PolyglotEngine}. Call various configuration methods in a chain and at the
-     * end create new {@link PolyglotEngine virtual machine}:
+     * Builder for a new {@link PolyglotEngine}. Call various configuration methods in a chain and
+     * at the end create new {@link PolyglotEngine virtual machine}:
      *
      * <pre>
      * {@link PolyglotEngine} vm = {@link PolyglotEngine}.{@link PolyglotEngine#buildNew() buildNew()}
@@ -182,8 +183,8 @@
         }
 
         /**
-         * Changes the error output for languages running in <em>to be created</em> {@link PolyglotEngine
-         * virtual machine}. The default is to use {@link System#err}.
+         * Changes the error output for languages running in <em>to be created</em>
+         * {@link PolyglotEngine virtual machine}. The default is to use {@link System#err}.
          *
          * @param w the writer to use as output
          * @return instance of this builder
@@ -194,8 +195,8 @@
         }
 
         /**
-         * Changes the default input for languages running in <em>to be created</em> {@link PolyglotEngine
-         * virtual machine}. The default is to use {@link System#out}.
+         * Changes the default input for languages running in <em>to be created</em>
+         * {@link PolyglotEngine virtual machine}. The default is to use {@link System#out}.
          *
          * @param r the reader to use as input
          * @return instance of this builder
@@ -219,11 +220,12 @@
         }
 
         /**
-         * Adds global named symbol into the configuration of to-be-built {@link PolyglotEngine}. This
-         * symbol will be accessible to all languages via {@link Env#importSymbol(java.lang.String)}
-         * and will take precedence over {@link TruffleLanguage#findExportedSymbol symbols exported
-         * by languages itself}. Repeated use of <code>globalSymbol</code> is possible; later
-         * definition of the same name overrides the previous one.
+         * Adds global named symbol into the configuration of to-be-built {@link PolyglotEngine}.
+         * This symbol will be accessible to all languages via
+         * {@link Env#importSymbol(java.lang.String)} and will take precedence over
+         * {@link TruffleLanguage#findExportedSymbol symbols exported by languages itself}. Repeated
+         * use of <code>globalSymbol</code> is possible; later definition of the same name overrides
+         * the previous one.
          *
          * @param name name of the symbol to register
          * @param obj value of the object - expected to be primitive wrapper, {@link String} or
@@ -258,8 +260,8 @@
         }
 
         /**
-         * Creates the {@link PolyglotEngine Truffle virtual machine}. The configuration is taken from
-         * values passed into configuration methods in this class.
+         * Creates the {@link PolyglotEngine Truffle virtual machine}. The configuration is taken
+         * from values passed into configuration methods in this class.
          *
          * @return new, isolated virtual machine with pre-registered languages
          */
@@ -412,11 +414,11 @@
     Value createValue(TruffleLanguage lang, Object[] result, CountDownLatch ready) {
         return new Value(lang, result, ready);
     }
+
     Language createLanguage(Map.Entry<String, LanguageCache> en) {
         return new Language(en.getValue());
     }
 
-
     @SuppressWarnings("try")
     private void evalImpl(Debugger[] fillIn, TruffleLanguage<?>[] fillLang, Source s, Object[] result, Language l, CountDownLatch ready) {
         try (Closeable d = SPI.executionStart(this, fillIn, s)) {
@@ -506,7 +508,7 @@
 
     private void checkThread() {
         if (initThread != Thread.currentThread()) {
-            throw new IllegalStateException("TruffleVM created on " + initThread.getName() + " but used on " + Thread.currentThread().getName());
+            throw new IllegalStateException("PolyglotEngine created on " + initThread.getName() + " but used on " + Thread.currentThread().getName());
         }
     }
 
@@ -550,7 +552,8 @@
 
     /**
      * A future value wrapper. A user level wrapper around values returned by evaluation of various
-     * {@link PolyglotEngine} functions like {@link PolyglotEngine#findGlobalSymbol(java.lang.String)} and
+     * {@link PolyglotEngine} functions like
+     * {@link PolyglotEngine#findGlobalSymbol(java.lang.String)} and
      * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source)} or value returned by
      * {@link #invoke(java.lang.Object, java.lang.Object...) sbbsequent of execution}. In case the
      * {@link PolyglotEngine} has been initialized for
@@ -680,12 +683,13 @@
     }
 
     /**
-     * Description of a language registered in {@link PolyglotEngine Truffle virtual machine}. Languages
-     * are registered by {@link Registration} annotation which stores necessary information into a
-     * descriptor inside of the language's JAR file. When a new {@link PolyglotEngine} is created, it reads
-     * all available descriptors and creates {@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
+     * Description of a language registered in {@link PolyglotEngine Truffle virtual machine}.
+     * Languages are registered by {@link Registration} annotation which stores necessary
+     * information into a descriptor inside of the language's JAR file. When a new
+     * {@link PolyglotEngine} is created, it reads all available descriptors and creates
+     * {@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.
      */
     public class Language {
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java	Mon Sep 21 10:55:36 2015 +0200
@@ -121,14 +121,14 @@
 
     @Override
     public Symbol eval(Source source) throws IOException {
-        return (Symbol)super.eval(source);
+        return (Symbol) super.eval(source);
     }
 
     @Override
     public Symbol findGlobalSymbol(final String globalName) {
-        return (Symbol)super.findGlobalSymbol(globalName);
+        return (Symbol) super.findGlobalSymbol(globalName);
     }
-    
+
     @Override
     void dispatchSuspendedEvent(SuspendedEvent event) {
     }
@@ -145,7 +145,7 @@
 
         @Override
         public Symbol invoke(final Object thiz, final Object... args) throws IOException {
-            return (Symbol)super.invoke(thiz, args);
+            return (Symbol) super.invoke(thiz, args);
         }
     }
 
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/package-info.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/package-info.java	Mon Sep 21 10:55:36 2015 +0200
@@ -30,8 +30,8 @@
  */
 
 /**
- * Central place to create and control {@link com.oracle.truffle.api.vm.TruffleVM Truffle Virtual
- * Machine} and all languages hosted in it.
+ * Central place to create and control {@link com.oracle.truffle.api.vm.PolyglotEngine polyglot
+ * execution engine} and all languages hosted in it.
  */
 package com.oracle.truffle.api.vm;
 
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java	Mon Sep 21 10:55:36 2015 +0200
@@ -38,10 +38,10 @@
 /**
  * An entry point for everyone who wants to implement a Truffle based language. By providing an
  * implementation of this type and registering it using {@link Registration} annotation, your
- * language becomes accessible to users of the {@link com.oracle.truffle.api.vm.TruffleVM Truffle
- * virtual machine} - all they will need to do is to include your JAR into their application and all
- * the Truffle goodies (multi-language support, multitenant hosting, debugging, etc.) will be made
- * available to them.
+ * language becomes accessible to users of the {@link com.oracle.truffle.api.vm.PolyglotEngine
+ * polyglot execution engine} - all they will need to do is to include your JAR into their
+ * application and all the Truffle goodies (multi-language support, multitenant hosting, debugging,
+ * etc.) will be made available to them.
  *
  * @param <C> internal state of the language associated with every thread that is executing program
  *            {@link #parse(com.oracle.truffle.api.source.Source, com.oracle.truffle.api.nodes.Node, java.lang.String...)
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Breakpoint.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Breakpoint.java	Mon Sep 21 10:55:36 2015 +0200
@@ -29,7 +29,7 @@
 import java.io.IOException;
 
 /**
- * Breakpoint in a {@link com.oracle.truffle.api.vm.TruffleVM} with
+ * Breakpoint in a {@link com.oracle.truffle.api.vm.PolyglotEngine} with
  * {@link com.oracle.truffle.api.debug debugging turned on}. You can ask
  * {@link Debugger#setLineBreakpoint(int, com.oracle.truffle.api.source.LineLocation, boolean)} or
  * {@link Debugger#setTagBreakpoint(int, com.oracle.truffle.api.instrument.SyntaxTag, boolean)} to
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java	Mon Sep 21 10:55:36 2015 +0200
@@ -36,8 +36,8 @@
 import com.oracle.truffle.api.source.*;
 
 /**
- * Represents debugging related state of a {@link com.oracle.truffle.api.vm.TruffleVM}. Instance of
- * this class is delivered via {@link SuspendedEvent#getDebugger()} and
+ * Represents debugging related state of a {@link com.oracle.truffle.api.vm.PolyglotEngine}.
+ * Instance of this class is delivered via {@link SuspendedEvent#getDebugger()} and
  * {@link ExecutionEvent#getDebugger()} events, once {@link com.oracle.truffle.api.debug debugging
  * is turned on}.
  */
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/ExecutionEvent.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/ExecutionEvent.java	Mon Sep 21 10:55:36 2015 +0200
@@ -26,7 +26,7 @@
 
 /**
  * This event is delivered to all
- * {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer)
+ * {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer)
  * registered event handlers} when an execution is about to be started. The event is the intended
  * place to initialize debugger - e.g. set
  * {@link Debugger#setLineBreakpoint(int, com.oracle.truffle.api.source.LineLocation, boolean)
@@ -35,7 +35,7 @@
  * the state of the event becomes invalid and subsequent calls to the event methods yield
  * {@link IllegalStateException}. One can however obtain reference to {@link Debugger} instance and
  * keep it to further manipulate with debugging capabilities of the
- * {@link com.oracle.truffle.api.vm.TruffleVM} when it is running.
+ * {@link com.oracle.truffle.api.vm.PolyglotEngine} when it is running.
  */
 @SuppressWarnings("javadoc")
 public final class ExecutionEvent {
@@ -48,10 +48,10 @@
     /**
      * Debugger associated with the execution. This debugger remains valid after the event is
      * processed, it is possible and suggested to keep a reference to it and use it any time later
-     * when evaluating sources in the {@link com.oracle.truffle.api.vm.TruffleVM}.
+     * when evaluating sources in the {@link com.oracle.truffle.api.vm.PolyglotEngine}.
      *
      * @return instance of debugger associated with the just starting execution and any subsequent
-     *         ones in the same {@link com.oracle.truffle.api.vm.TruffleVM}.
+     *         ones in the same {@link com.oracle.truffle.api.vm.PolyglotEngine}.
      */
     public Debugger getDebugger() {
         return debugger;
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/SuspendedEvent.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/SuspendedEvent.java	Mon Sep 21 10:55:36 2015 +0200
@@ -38,7 +38,7 @@
 
 /**
  * This event is delivered to all
- * {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer)
+ * {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer)
  * registered event handlers} when an execution is suspended on a
  * {@link Debugger#setLineBreakpoint(int, com.oracle.truffle.api.source.LineLocation, boolean)
  * breakpoint} or during {@link #prepareStepInto(int) stepping}. Methods in this event can only be
@@ -83,10 +83,10 @@
     /**
      * Debugger associated with the just suspended execution. This debugger remains valid after the
      * event is processed, it is possible and suggested to keep a reference to it and use it any
-     * time later when evaluating sources in the {@link com.oracle.truffle.api.vm.TruffleVM}.
+     * time later when evaluating sources in the {@link com.oracle.truffle.api.vm.PolyglotEngine}.
      *
      * @return instance of debugger associated with the just suspended execution and any subsequent
-     *         ones in the same {@link com.oracle.truffle.api.vm.TruffleVM}.
+     *         ones in the same {@link com.oracle.truffle.api.vm.PolyglotEngine}.
      */
     public Debugger getDebugger() {
         return debugger;
@@ -105,8 +105,8 @@
     }
 
     /**
-     * Gets the stack frames from the currently halted {@link com.oracle.truffle.api.vm.TruffleVM}
-     * execution.
+     * Gets the stack frames from the currently halted
+     * {@link com.oracle.truffle.api.vm.PolyglotEngine} execution.
      *
      * @return list of stack frames
      */
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/package-info.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/package-info.java	Mon Sep 21 10:55:36 2015 +0200
@@ -30,28 +30,28 @@
  */
 
 /**
- * Control over {@link com.oracle.truffle.api.debug.Debugger debugging} of your {@link com.oracle.truffle.api.vm.TruffleVM}. Each {@link com.oracle.truffle.api.vm.TruffleVM}
+ * Control over {@link com.oracle.truffle.api.debug.Debugger debugging} of your {@link com.oracle.truffle.api.vm.PolyglotEngine}. Each {@link com.oracle.truffle.api.vm.PolyglotEngine}
  * is inherently capable to run in debugging mode - there is just one thing
- * to do - the {@link com.oracle.truffle.api.vm.TruffleVM.Builder creator of the virtual machine}
- * needs to turn debugging on when constructing its Truffle virtual machine:
+ * to do - the {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder creator of the virtual machine}
+ * needs to turn debugging on when constructing its polyglot execution engine:
  * <pre>
- * vm = {@link com.oracle.truffle.api.vm.TruffleVM#newVM()}.
- *     {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}
+ * vm = {@link com.oracle.truffle.api.vm.PolyglotEngine#buildNew()}.
+ *     {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}
  *     {@code <}{@link com.oracle.truffle.api.debug.ExecutionEvent}{@code >}() {
  *         <b>public void</b> handle({@link com.oracle.truffle.api.debug.ExecutionEvent} ev) {
- *             <em>// configure the virtual machine as {@link com.oracle.truffle.api.vm.TruffleVM#eval(com.oracle.truffle.api.source.Source) new execution} is starting</em>
+ *             <em>// configure the virtual machine as {@link com.oracle.truffle.api.vm.PolyglotEngine#eval(com.oracle.truffle.api.source.Source) new execution} is starting</em>
  *         }
  *     }).
- *     {@link com.oracle.truffle.api.vm.TruffleVM.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}{@code <}
+ *     {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}{@code <}
  *     {@link com.oracle.truffle.api.debug.SuspendedEvent}{@code >}() {
  *         <b>public void</b> handle({@link com.oracle.truffle.api.debug.SuspendedEvent} ev) {
  *             <em>// execution is suspended on a breakpoint or on a step - decide what next</em>
  *         }
- *     }).{@link com.oracle.truffle.api.vm.TruffleVM.Builder#build() build()};
+ *     }).{@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#build() build()};
  * </pre>
  * The debugging is controlled by events emitted by the Truffle virtual machine
  * at important moments. The {@link com.oracle.truffle.api.debug.ExecutionEvent}
- * is sent when a call to {@link com.oracle.truffle.api.vm.TruffleVM#eval(com.oracle.truffle.api.source.Source)}
+ * is sent when a call to {@link com.oracle.truffle.api.vm.PolyglotEngine#eval(com.oracle.truffle.api.source.Source)}
  * is made and allows one to configure {@link com.oracle.truffle.api.debug.Breakpoint breakpoints} and/or decide whether the
  * program should {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto() step-into} or
  * {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareContinue() just run}. Once the execution is suspended a
@@ -63,7 +63,7 @@
  * The events methods are only available when the event is being delivered and
  * shouldn't be used anytime later. Both events however provide access to
  * {@link com.oracle.truffle.api.debug.Debugger} which can be kept and used
- * during whole existence of the {@link com.oracle.truffle.api.vm.TruffleVM}.
+ * during whole existence of the {@link com.oracle.truffle.api.vm.PolyglotEngine}.
  * {@link com.oracle.truffle.api.debug.Debugger} is the central class that
  * keeps information about {@link com.oracle.truffle.api.debug.Debugger#getBreakpoints() registered breakpoints}
  * and allows one create new {@link com.oracle.truffle.api.debug.Breakpoint ones}.
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java	Mon Sep 21 10:55:36 2015 +0200
@@ -36,7 +36,7 @@
 import java.lang.ref.WeakReference;
 
 /**
- * Communication between TruffleVM and TruffleLanguage API/SPI.
+ * Communication between PolyglotEngine and TruffleLanguage API/SPI.
  */
 @SuppressWarnings("rawtypes")
 public abstract class Accessor {
--- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java	Mon Sep 21 10:55:36 2015 +0200
@@ -449,7 +449,7 @@
         // if (statementCounts || coverage) {
         // if (registeredASTProber == null) {
         // final ASTProber newProber = new SLStandardASTProber();
-        // // This should be registered on the TruffleVM
+        // // This should be registered on the PolyglotEngine
         // Probe.registerASTProber(newProber);
         // registeredASTProber = newProber;
         // }
@@ -498,7 +498,7 @@
         public SLDebugProvider() {
             if (registeredASTProber == null) {
                 registeredASTProber = new SLStandardASTProber();
-                // This should be registered on the TruffleVM
+                // This should be registered on the PolyglotEngine
                 Probe.registerASTProber(registeredASTProber);
             }
         }
@@ -512,7 +512,7 @@
 
         public void enableASTProbing(ASTProber prober) {
             if (prober != null) {
-                // This should be registered on the TruffleVM
+                // This should be registered on the PolyglotEngine
                 Probe.registerASTProber(prober);
             }
         }
--- a/truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/com.oracle.truffle.tck/src/com/oracle/truffle/tck/TruffleTCK.java	Mon Sep 21 10:55:36 2015 +0200
@@ -49,10 +49,10 @@
     }
 
     /**
-     * This methods is called before first test is executed. It's purpose is to set a TruffleVM with
-     * your language up, so it is ready for testing.
-     * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source) Execute} any scripts you need, and
-     * prepare global symbols with proper names. The symbols will then be looked up by the
+     * This methods is called before first test is executed. It's purpose is to set a
+     * {@link PolyglotEngine} with your language up, so it is ready for testing.
+     * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source) Execute} any scripts you
+     * need, and prepare global symbols with proper names. The symbols will then be looked up by the
      * infrastructure (using the names provided by you from methods like {@link #plusInt()}) and
      * used for internal testing.
      *
@@ -63,8 +63,8 @@
 
     /**
      * MIME type associated with your language. The MIME type will be passed to
-     * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source)} method of the {@link #prepareVM()
-     * created TruffleVM}.
+     * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source)} method of the
+     * {@link #prepareVM() created engine}.
      *
      * @return mime type of the tested language
      */
@@ -82,8 +82,9 @@
     /**
      * Name of a function that returns <code>null</code>. Truffle languages are encouraged to have
      * their own type representing <code>null</code>, but when such value is returned from
-     * {@link PolyglotEngine#eval}, it needs to be converted to real Java <code>null</code> by sending a
-     * foreign access <em>isNull</em> message. There is a test to verify it is really true.
+     * {@link PolyglotEngine#eval}, it needs to be converted to real Java <code>null</code> by
+     * sending a foreign access <em>isNull</em> message. There is a test to verify it is really
+     * true.
      *
      * @return name of globally exported symbol
      */
@@ -149,10 +150,10 @@
     }
 
     /**
-     * Name of a function that counts number of its invocations in current {@link PolyglotEngine} context.
-     * Your function should somehow keep a counter to remember number of its invocations and always
-     * increment it. The first invocation should return <code>1</code>, the second <code>2</code>
-     * and so on. The returned values are expected to be instances of {@link Number}.
+     * Name of a function that counts number of its invocations in current {@link PolyglotEngine}
+     * context. Your function should somehow keep a counter to remember number of its invocations
+     * and always increment it. The first invocation should return <code>1</code>, the second
+     * <code>2</code> and so on. The returned values are expected to be instances of {@link Number}.
      * <p>
      * The function will be used to test that two instances of your language can co-exist next to
      * each other. Without being mutually influenced.
@@ -163,8 +164,8 @@
 
     /**
      * Return a code snippet that is invalid in your language. Its
-     * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source) evaluation} should fail and yield
-     * an exception.
+     * {@link PolyglotEngine#eval(com.oracle.truffle.api.source.Source) evaluation} should fail and
+     * yield an exception.
      *
      * @return code snippet invalid in the tested language
      */
--- a/truffle/overview.html	Mon Sep 21 10:44:18 2015 +0200
+++ b/truffle/overview.html	Mon Sep 21 10:55:36 2015 +0200
@@ -33,7 +33,7 @@
 <p>
 Truffle is a framework for writing and executing interpreters. In case
 you want to execute already written interpreters from your Java application,
-start at {@link com.oracle.truffle.api.vm.TruffleVM}. In case you'd like
+start at {@link com.oracle.truffle.api.vm.PolyglotEngine}. In case you'd like
 to write your own Truffle based language, start at 
 {@link com.oracle.truffle.api.TruffleLanguage}.
 <p>