changeset 22335:906a5f6e07cc

Giving the PolyglotEngine builder factory method more sensible name.
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Mon, 02 Nov 2015 19:13:21 +0100
parents c12a7960bd7b
children 5e37933270b0 7d9b7365b675
files truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/utilities/InstrumentationTestMode.java truffle/com.oracle.truffle.api.interop.java.test/src/com/oracle/truffle/api/interop/java/test/InstrumentationTestMode.java truffle/com.oracle.truffle.api.interop.java.test/src/com/oracle/truffle/api/interop/java/test/JavaFunctionTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/EvalInstrumentTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/utilities/InstrumentationTestMode.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/AccessorTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineAsynchTest.java 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/EngineTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ExceptionDuringParsingTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/GlobalSymbolAsynchTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/GlobalSymbolTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ImplicitExplicitExportTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/InitializationTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ToStringTest.java truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ValueTest.java truffle/com.oracle.truffle.api.vm/src/META-INF/upgrade/PolyglotEngineNewBuilder.hint truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLDebugTest.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLJavaInteropTest.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/ToStringOfEvalTest.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/InstrumentationTestMode.java truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLInstrumentTestRunner.java truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLServer.java truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/CoverageTrackerTest.java truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/LineToProbesMapTest.java truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/NodeExecCounterTest.java truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/TruffleToolTest.java
diffstat 32 files changed, 57 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/utilities/InstrumentationTestMode.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/utilities/InstrumentationTestMode.java	Mon Nov 02 19:13:21 2015 +0100
@@ -34,7 +34,7 @@
     public static void set(boolean enable) {
 
         try {
-            final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+            final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
             final Field instrumenterField = vm.getClass().getDeclaredField("instrumenter");
             instrumenterField.setAccessible(true);
             final Object instrumenter = instrumenterField.get(vm);
--- a/truffle/com.oracle.truffle.api.interop.java.test/src/com/oracle/truffle/api/interop/java/test/InstrumentationTestMode.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.interop.java.test/src/com/oracle/truffle/api/interop/java/test/InstrumentationTestMode.java	Mon Nov 02 19:13:21 2015 +0100
@@ -36,7 +36,7 @@
     public static void set(boolean enable) {
 
         try {
-            final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+            final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
             final Field instrumenterField = vm.getClass().getDeclaredField("instrumenter");
             instrumenterField.setAccessible(true);
             final Object instrumenter = instrumenterField.get(vm);
--- a/truffle/com.oracle.truffle.api.interop.java.test/src/com/oracle/truffle/api/interop/java/test/JavaFunctionTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.interop.java.test/src/com/oracle/truffle/api/interop/java/test/JavaFunctionTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -35,7 +35,7 @@
     public void invokeRunnable() throws IOException {
         final boolean[] called = {false};
 
-        PolyglotEngine engine = PolyglotEngine.buildNew().globalSymbol("test", JavaInterop.asTruffleFunction(Runnable.class, new Runnable() {
+        PolyglotEngine engine = PolyglotEngine.newBuilder().globalSymbol("test", JavaInterop.asTruffleFunction(Runnable.class, new Runnable() {
             @Override
             public void run() {
                 called[0] = true;
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/EvalInstrumentTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/EvalInstrumentTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -58,7 +58,7 @@
     public void before() {
         // TODO (mlvdv) eventually abstract this
         try {
-            vm = PolyglotEngine.buildNew().build();
+            vm = PolyglotEngine.newBuilder().build();
             final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
             field.setAccessible(true);
             instrumenter = (Instrumenter) field.get(vm);
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -64,7 +64,7 @@
 
     @Test
     public void testProbing() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, IOException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
@@ -106,7 +106,7 @@
     @Test
     public void testTagging() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, IOException {
 
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/utilities/InstrumentationTestMode.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/utilities/InstrumentationTestMode.java	Mon Nov 02 19:13:21 2015 +0100
@@ -34,7 +34,7 @@
     public static void set(boolean enable) {
 
         try {
-            final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+            final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
             final Field instrumenterField = vm.getClass().getDeclaredField("instrumenter");
             instrumenterField.setAccessible(true);
             final Object instrumenter = instrumenterField.get(vm);
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/AccessorTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/AccessorTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -50,7 +50,7 @@
 
     @Test
     public void canGetAccessToOwnLanguageInstance() throws Exception {
-        PolyglotEngine vm = PolyglotEngine.buildNew().executor(Executors.newSingleThreadExecutor()).build();
+        PolyglotEngine vm = PolyglotEngine.newBuilder().executor(Executors.newSingleThreadExecutor()).build();
         PolyglotEngine.Language language = vm.getLanguages().get(L1);
         assertNotNull("L1 language is defined", language);
 
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineAsynchTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineAsynchTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -38,6 +38,6 @@
 
     @Override
     protected PolyglotEngine.Builder createBuilder() {
-        return PolyglotEngine.buildNew().executor(Executors.newSingleThreadExecutor());
+        return PolyglotEngine.newBuilder().executor(Executors.newSingleThreadExecutor());
     }
 }
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineSingleThreadedTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -35,7 +35,7 @@
 
     @Before
     public void initInDifferentThread() throws InterruptedException {
-        final PolyglotEngine.Builder b = PolyglotEngine.buildNew();
+        final PolyglotEngine.Builder b = PolyglotEngine.newBuilder();
         Thread t = new Thread("Initializer") {
             @Override
             public void run() {
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/EngineTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -31,7 +31,7 @@
 
 public class EngineTest {
     protected PolyglotEngine.Builder createBuilder() {
-        return PolyglotEngine.buildNew();
+        return PolyglotEngine.newBuilder();
     }
 
     @Test
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ExceptionDuringParsingTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ExceptionDuringParsingTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -47,7 +47,7 @@
 
     @Test
     public void canGetAccessToOwnLanguageInstance() throws Exception {
-        PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         PolyglotEngine.Language language = vm.getLanguages().get(L1);
         assertNotNull("L1 language is defined", language);
 
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/GlobalSymbolAsynchTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/GlobalSymbolAsynchTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -35,6 +35,6 @@
 
     @Override
     protected PolyglotEngine.Builder createEngineBuilder() {
-        return PolyglotEngine.buildNew().executor(Executors.newSingleThreadExecutor());
+        return PolyglotEngine.newBuilder().executor(Executors.newSingleThreadExecutor());
     }
 }
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/GlobalSymbolTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/GlobalSymbolTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -74,7 +74,7 @@
     }
 
     protected PolyglotEngine.Builder createEngineBuilder() {
-        return PolyglotEngine.buildNew();
+        return PolyglotEngine.newBuilder();
     }
 
     @Test
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ImplicitExplicitExportTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ImplicitExplicitExportTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -60,7 +60,7 @@
     @Before
     public void initializeVM() {
         mainThread = Thread.currentThread();
-        vm = PolyglotEngine.buildNew().executor(Executors.newSingleThreadExecutor()).build();
+        vm = PolyglotEngine.newBuilder().executor(Executors.newSingleThreadExecutor()).build();
         assertTrue("Found " + L1 + " language", vm.getLanguages().containsKey(L1));
         assertTrue("Found " + L2 + " language", vm.getLanguages().containsKey(L2));
         assertTrue("Found " + L3 + " language", vm.getLanguages().containsKey(L3));
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/InitializationTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/InitializationTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -71,7 +71,7 @@
     @Test
     public void accessProbeForAbstractLanguage() throws IOException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
         final Debugger[] arr = {null};
-        PolyglotEngine vm = PolyglotEngine.buildNew().onEvent(new EventConsumer<ExecutionEvent>(ExecutionEvent.class) {
+        PolyglotEngine vm = PolyglotEngine.newBuilder().onEvent(new EventConsumer<ExecutionEvent>(ExecutionEvent.class) {
             @Override
             protected void on(ExecutionEvent event) {
                 arr[0] = event.getDebugger();
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ToStringTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ToStringTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -30,7 +30,7 @@
 public class ToStringTest {
     @Test
     public void valueToStringValueWith1() throws Exception {
-        PolyglotEngine engine = PolyglotEngine.buildNew().build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().build();
         PolyglotEngine.Language language1 = engine.getLanguages().get("application/x-test-import-export-1");
         PolyglotEngine.Language language2 = engine.getLanguages().get("application/x-test-import-export-2");
         language2.eval(Source.fromText("explicit.value=42", "define 42"));
@@ -43,7 +43,7 @@
 
     @Test
     public void valueToStringValueWith2() throws Exception {
-        PolyglotEngine engine = PolyglotEngine.buildNew().build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().build();
         PolyglotEngine.Language language1 = engine.getLanguages().get("application/x-test-import-export-1");
         PolyglotEngine.Language language2 = engine.getLanguages().get("application/x-test-import-export-2");
         language1.eval(Source.fromText("explicit.value=42", "define 42"));
--- a/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ValueTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/vm/ValueTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -41,7 +41,7 @@
 
     @Test
     public void valueToStringValue() throws Exception {
-        PolyglotEngine engine = PolyglotEngine.buildNew().build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().build();
         PolyglotEngine.Language language1 = engine.getLanguages().get("application/x-test-import-export-1");
         PolyglotEngine.Language language2 = engine.getLanguages().get("application/x-test-import-export-2");
         language2.eval(Source.fromText("explicit.value=42", "define 42"));
@@ -56,7 +56,7 @@
 
     @Test
     public void valueToStringException() throws Exception {
-        PolyglotEngine engine = PolyglotEngine.buildNew().build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().build();
         PolyglotEngine.Language language1 = engine.getLanguages().get("application/x-test-import-export-1");
         PolyglotEngine.Value value = null;
         try {
@@ -72,7 +72,7 @@
 
     @Test
     public void valueToStringValueAsync() throws Exception {
-        PolyglotEngine engine = PolyglotEngine.buildNew().executor(this).build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().executor(this).build();
         PolyglotEngine.Language language1 = engine.getLanguages().get("application/x-test-import-export-1");
         PolyglotEngine.Language language2 = engine.getLanguages().get("application/x-test-import-export-2");
         language2.eval(Source.fromText("explicit.value=42", "define 42"));
@@ -96,7 +96,7 @@
 
     @Test
     public void valueToStringExceptionAsync() throws Exception {
-        PolyglotEngine engine = PolyglotEngine.buildNew().executor(this).build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().executor(this).build();
         PolyglotEngine.Language language1 = engine.getLanguages().get("application/x-test-import-export-1");
         PolyglotEngine.Value value = language1.eval(Source.fromText("parse=does not work", "error.value"));
         assertNotNull("Value returned", value);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/truffle/com.oracle.truffle.api.vm/src/META-INF/upgrade/PolyglotEngineNewBuilder.hint	Mon Nov 02 19:13:21 2015 +0100
@@ -0,0 +1,6 @@
+'PolyglotEngine.buildNew() is misleading':
+com.oracle.truffle.api.vm.PolyglotEngine.buildNew()
+=>
+'Use newBuilder()':
+com.oracle.truffle.api.vm.PolyglotEngine.newBuilder()
+;;
--- a/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/PolyglotEngine.java	Mon Nov 02 19:13:21 2015 +0100
@@ -181,9 +181,9 @@
      * makes them available for later evaluation via
      * {@link #eval(com.oracle.truffle.api.source.Source)} method.
      *
-     * @return new, isolated virtual machine with pre-registered languages
+     * @return new builder to create isolated polyglot engine with pre-registered languages
      */
-    public static PolyglotEngine.Builder buildNew() {
+    public static PolyglotEngine.Builder newBuilder() {
         // making Builder non-static inner class is a
         // nasty trick to avoid the Builder class to appear
         // in Javadoc next to PolyglotEngine class
@@ -192,6 +192,15 @@
     }
 
     /**
+     * @return new builder
+     * @deprecated use {@link #newBuilder()}
+     */
+    @Deprecated
+    public static PolyglotEngine.Builder buildNew() {
+        return newBuilder();
+    }
+
+    /**
      * Builder for a new {@link PolyglotEngine}. Call various configuration methods in a chain and
      * at the end create new {@link PolyglotEngine virtual machine}:
      *
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLDebugTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLDebugTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -90,7 +90,7 @@
 
         ByteArrayOutputStream os = new ByteArrayOutputStream();
 
-        PolyglotEngine engine = PolyglotEngine.buildNew().onEvent(new EventConsumer<ExecutionEvent>(ExecutionEvent.class) {
+        PolyglotEngine engine = PolyglotEngine.newBuilder().onEvent(new EventConsumer<ExecutionEvent>(ExecutionEvent.class) {
             @Override
             protected void on(ExecutionEvent event) {
                 onExecution(event);
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLJavaInteropTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLJavaInteropTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -74,7 +74,7 @@
         String scriptText = "function main() {\n" + "    println(\"Called!\");\n" + "}\n";
         Source script = Source.fromText(scriptText, "Test").withMimeType("application/x-sl");
         ByteArrayOutputStream os = new ByteArrayOutputStream();
-        PolyglotEngine engine = PolyglotEngine.buildNew().setOut(os).build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().setOut(os).build();
         engine.eval(script);
         PolyglotEngine.Value main = engine.findGlobalSymbol("main");
         final Object value = main.get();
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTckTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -69,13 +69,13 @@
 
     @Test
     public void testVerifyPresence() {
-        PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         assertTrue("Our language is present", vm.getLanguages().containsKey("application/x-sl"));
     }
 
     @Override
     protected PolyglotEngine prepareVM() throws Exception {
-        PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         // @formatter:off
         vm.eval(
             Source.fromText(
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/SLTestRunner.java	Mon Nov 02 19:13:21 2015 +0100
@@ -286,7 +286,7 @@
 
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         try {
-            PolyglotEngine vm = PolyglotEngine.buildNew().setIn(new ByteArrayInputStream(repeat(testCase.testInput, repeats).getBytes("UTF-8"))).setOut(out).build();
+            PolyglotEngine vm = PolyglotEngine.newBuilder().setIn(new ByteArrayInputStream(repeat(testCase.testInput, repeats).getBytes("UTF-8"))).setOut(out).build();
 
             String script = readAllLines(testCase.path);
 
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/ToStringOfEvalTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/ToStringOfEvalTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -52,7 +52,7 @@
 
     @Test
     public void checkToStringOnAFunction() throws IOException {
-        PolyglotEngine engine = PolyglotEngine.buildNew().build();
+        PolyglotEngine engine = PolyglotEngine.newBuilder().build();
         PolyglotEngine.Language sl = engine.getLanguages().get("application/x-sl");
         sl.eval(Source.fromText("function checkName() {}", "defineFn"));
         PolyglotEngine.Value value1 = engine.findGlobalSymbol("checkName");
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/InstrumentationTestMode.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/InstrumentationTestMode.java	Mon Nov 02 19:13:21 2015 +0100
@@ -52,7 +52,7 @@
     public static void set(boolean enable) {
 
         try {
-            final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+            final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
             final Field instrumenterField = vm.getClass().getDeclaredField("instrumenter");
             instrumenterField.setAccessible(true);
             final Object instrumenter = instrumenterField.get(vm);
--- a/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLInstrumentTestRunner.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.test/src/com/oracle/truffle/sl/test/instrument/SLInstrumentTestRunner.java	Mon Nov 02 19:13:21 2015 +0100
@@ -240,7 +240,7 @@
             // We use the name of the file to determine what visitor to attach to it.
             if (testCase.baseName.endsWith(ASSIGNMENT_VALUE_SUFFIX)) {
                 // Set up the execution context for Simple and register our two listeners
-                PolyglotEngine vm = PolyglotEngine.buildNew().setIn(new ByteArrayInputStream(testCase.testInput.getBytes("UTF-8"))).setOut(out).build();
+                PolyglotEngine vm = PolyglotEngine.newBuilder().setIn(new ByteArrayInputStream(testCase.testInput.getBytes("UTF-8"))).setOut(out).build();
 
                 final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
                 field.setAccessible(true);
--- a/truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLServer.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLServer.java	Mon Nov 02 19:13:21 2015 +0100
@@ -144,7 +144,7 @@
             }
         };
 
-        PolyglotEngine newVM = PolyglotEngine.buildNew().onEvent(onHalted).onEvent(onExec).build();
+        PolyglotEngine newVM = PolyglotEngine.newBuilder().onEvent(onHalted).onEvent(onExec).build();
         this.language = newVM.getLanguages().get("application/x-sl");
         assert language != null;
 
--- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java	Mon Nov 02 19:13:21 2015 +0100
@@ -226,7 +226,7 @@
      * The main entry point. Use the mx command "mx sl" to run it with the correct class path setup.
      */
     public static void main(String[] args) throws IOException {
-        PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         assert vm.getLanguages().containsKey("application/x-sl");
 
         setupToolDemos();
--- a/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/CoverageTrackerTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/CoverageTrackerTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -44,7 +44,7 @@
 
     @Test
     public void testNoExecution() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
@@ -72,7 +72,7 @@
 
     @Test
     public void testCountingCoverage() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, IOException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
--- a/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/LineToProbesMapTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/LineToProbesMapTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -45,7 +45,7 @@
 
     @Test
     public void testNoExecution() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
@@ -61,7 +61,7 @@
 
     @Test
     public void testMapping1() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, IOException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
@@ -92,7 +92,7 @@
 
     @Test
     public void testMapping2() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, IOException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
--- a/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/NodeExecCounterTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/NodeExecCounterTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -42,7 +42,7 @@
 
     @Test
     public void testNoExecution() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
@@ -76,7 +76,7 @@
 
     @Test
     public void testCounting() throws NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, IOException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);
--- a/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/TruffleToolTest.java	Mon Nov 02 09:54:46 2015 +0100
+++ b/truffle/com.oracle.truffle.tools.test/src/com/oracle/truffle/tools/test/TruffleToolTest.java	Mon Nov 02 19:13:21 2015 +0100
@@ -123,7 +123,7 @@
     }
 
     private static Instrumenter getInstrumenter() throws NoSuchFieldException, IllegalAccessException {
-        final PolyglotEngine vm = PolyglotEngine.buildNew().build();
+        final PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         final Field field = PolyglotEngine.class.getDeclaredField("instrumenter");
         field.setAccessible(true);
         final Instrumenter instrumenter = (Instrumenter) field.get(vm);