annotate truffle/com.oracle.truffle.api.vm/src/com/oracle/truffle/api/vm/TruffleVM.java @ 22170:796f0fef110e

Renaming to PolyglotEngine
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Mon, 21 Sep 2015 10:34:30 +0200
parents 307a4ed5430e
children b31dcacfc8ff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
1 /*
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
4 *
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
10 *
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
11 * This code is distributed in the hope that it will be useful, but WITHOUT
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
14 * version 2 for more details (a copy is included in the LICENSE file that
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
15 * accompanied this code).
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
16 *
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License version
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
18 * 2 along with this work; if not, write to the Free Software Foundation,
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
20 *
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
22 * or visit www.oracle.com if you need additional information or have any
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
23 * questions.
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
24 */
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
25 package com.oracle.truffle.api.vm;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
26
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
27 import com.oracle.truffle.api.*;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
28 import com.oracle.truffle.api.debug.*;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
29 import com.oracle.truffle.api.source.*;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
30 import java.io.*;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
31 import java.util.*;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
32 import java.util.concurrent.CountDownLatch;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
33 import java.util.concurrent.Executor;
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
34
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
35 /**
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
36 * @deprecated
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
37 */
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
38 @Deprecated
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
39 @SuppressWarnings({"rawtypes", "deprecated"})
22170
796f0fef110e Renaming to PolyglotEngine
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22169
diff changeset
40 public final class TruffleVM extends PolyglotEngine {
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
41 private TruffleVM() {
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
42 super();
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
43 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
44
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
45 TruffleVM(Executor executor, Map<String, Object> globals, Writer out, Writer err, Reader in, EventConsumer<?>[] handlers) {
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
46 super(executor, globals, out, err, in, handlers);
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
47 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
48
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
49 @Deprecated
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
50 public static TruffleVM.Builder newVM() {
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
51 // making Builder non-static inner class is a
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
52 // nasty trick to avoid the Builder class to appear
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
53 // in Javadoc next to TruffleVM class
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
54 TruffleVM vm = new TruffleVM();
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
55 return vm.new Builder();
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
56 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
57
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
58 @Deprecated
22170
796f0fef110e Renaming to PolyglotEngine
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22169
diff changeset
59 public final class Builder extends PolyglotEngine.Builder {
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
60 Builder() {
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
61 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
62
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
63 @Deprecated
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
64 @Override
22169
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
65 public Builder executor(Executor executor) {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
66 return (Builder) super.executor(executor);
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
67 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
68
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
69 @Deprecated
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
70 @Override
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
71 public Builder globalSymbol(String name, Object obj) {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
72 return (Builder) super.globalSymbol(name, obj);
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
73 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
74
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
75 @Deprecated
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
76 @Override
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
77 public Builder onEvent(EventConsumer<?> handler) {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
78 return (Builder) super.onEvent(handler);
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
79 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
80
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
81 @Deprecated
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
82 @Override
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
83 public Builder stdIn(Reader r) {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
84 return (Builder) super.stdIn(r);
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
85 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
86
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
87 @Deprecated
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
88 @Override
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
89 public Builder stdErr(Writer w) {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
90 return (Builder) super.stdErr(w);
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
91 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
92
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
93 @Deprecated
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
94 @Override
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
95 public Builder stdOut(Writer w) {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
96 return (Builder) super.stdOut(w);
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
97 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
98
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
99 @Deprecated
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
100 @Override
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
101 public TruffleVM build() {
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
102 return (TruffleVM) super.build();
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
103 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
104 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
105
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
106 @Override
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
107 Value createValue(TruffleLanguage lang, Object[] result, CountDownLatch ready) {
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
108 return new Symbol(lang, result, ready);
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
109 }
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
110
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
111 @Override
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
112 Language createLanguage(Map.Entry<String, LanguageCache> en) {
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
113 return new Language(en.getValue());
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
114 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
115
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
116 @Override
22169
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
117 @SuppressWarnings("unchecked")
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
118 public Map<String, Language> getLanguages() {
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
119 return (Map<String, Language>) super.getLanguages();
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
120 }
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
121
307a4ed5430e Two more changes to guarantee better compatibility with TruffleVM
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22168
diff changeset
122 @Override
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
123 public Symbol eval(Source source) throws IOException {
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
124 return (Symbol)super.eval(source);
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
125 }
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
126
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
127 @Override
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
128 public Symbol findGlobalSymbol(final String globalName) {
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
129 return (Symbol)super.findGlobalSymbol(globalName);
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
130 }
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
131
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
132 @Override
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
133 void dispatchSuspendedEvent(SuspendedEvent event) {
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
134 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
135
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
136 @Override
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
137 void dispatchExecutionEvent(ExecutionEvent event) {
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
138 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
139
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
140 @Deprecated
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
141 public class Symbol extends Value {
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
142 Symbol(TruffleLanguage<?> language, Object[] result, CountDownLatch ready) {
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
143 super(language, result, ready);
22135
e70b20f4bb00 Implementing API for Java/Truffle interop. Based around JavaInterop.asJavaObject and JavaInterop.asTruffleObject methods. Connected to TruffleVM via Symbol.as(Class) wrapper. Verified by extended TCK.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22133
diff changeset
144 }
e70b20f4bb00 Implementing API for Java/Truffle interop. Based around JavaInterop.asJavaObject and JavaInterop.asTruffleObject methods. Connected to TruffleVM via Symbol.as(Class) wrapper. Verified by extended TCK.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22133
diff changeset
145
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
146 @Override
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
147 public Symbol invoke(final Object thiz, final Object... args) throws IOException {
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
148 return (Symbol)super.invoke(thiz, args);
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
149 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
150 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
151
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
152 @Deprecated
22170
796f0fef110e Renaming to PolyglotEngine
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22169
diff changeset
153 public final class Language extends PolyglotEngine.Language {
22137
1957c49a979d (Re)Introducing LanguageCache - e.g. data that hold the essential static information about Truffle languages. Pre-initializing the data if AOT property is specified. Use mx -J-Dcom.oracle.truffle.aot=true unittest to validate proper behavior of AOT mode.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22135
diff changeset
154 Language(LanguageCache info) {
22168
ffadd23c63c8 Introducing Portaal into the isolated world of each and any TruffleLanguage.
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 22137
diff changeset
155 super(info);
22128
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
156 }
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
157 } // end of Language
f879b1fe3773 Separating the TruffleVM into its own project makes it possible to cleanup various system parts interations
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents:
diff changeset
158 }