本文整理汇总了Java中com.oracle.truffle.api.TruffleLanguage类的典型用法代码示例。如果您正苦于以下问题:Java TruffleLanguage类的具体用法?Java TruffleLanguage怎么用?Java TruffleLanguage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TruffleLanguage类属于com.oracle.truffle.api包,在下文中一共展示了TruffleLanguage类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Context
import com.oracle.truffle.api.TruffleLanguage; //导入依赖的package包/类
public Context(Language language, TruffleLanguage.Env env) {
this.language = language;
this.globalFrame = Truffle.getRuntime().createMaterializedFrame(null);
this.functions = new HashMap<>();
set("*language*", "Java");
set("*implementation*", "Truffle / " + Truffle.getRuntime().getName());
set("*porters*", new String("Ragnar Dahlén".getBytes(), Charset.forName("ISO-8859-1")));
set("*port*", "0.1");
set("*stinput*", env.in());
set("*stoutput*", env.out());
set("*home-directory*", System.getProperty("user.dir"));
for(NodeFactory nodeFactory : Builtins.NODE_FACTORIES) {
installBuiltin(nodeFactory);
}
}
示例2: HBContext
import com.oracle.truffle.api.TruffleLanguage; //导入依赖的package包/类
public HBContext(TruffleLanguage.Env env, BufferedReader input, PrintWriter output) {
this.env = env;
this.input = input;
this.output = output;
}
示例3: ParseResult
import com.oracle.truffle.api.TruffleLanguage; //导入依赖的package包/类
ParseResult(final TruffleLanguage<?> language, final SClass moduleClass) {
super(language, null);
this.moduleClass = moduleClass;
}
示例4: createContext
import com.oracle.truffle.api.TruffleLanguage; //导入依赖的package包/类
@Override
protected MagicContext createContext(com.oracle.truffle.api.TruffleLanguage.Env arg0) {
return new MagicContext();
}
示例5: createContext
import com.oracle.truffle.api.TruffleLanguage; //导入依赖的package包/类
@Override
protected Object createContext(TruffleLanguage.Env env) {
return new MumblerContext();
}