PolyglotLanguage(PolyglotEngineImpl engine, LanguageCache cache, int index, boolean host, RuntimeException initError) { super(engine.impl); this.engine = engine; this.cache = cache; this.initError = initError; this.index = index; this.host = host; this.profile = new ContextProfile(this); this.info = NODES.createLanguage(this, cache.getId(), cache.getName(), cache.getVersion(), cache.getDefaultMimeType(), cache.getMimeTypes(), cache.isInternal(), cache.isInteractive()); }
LanguageShared(PolyglotRuntime engineShared, LanguageCache cache, int languageId) { this.runtime = engineShared; this.engineProfile = engineShared.engineProfile; assert engineProfile != null; this.cache = cache; this.languageId = languageId; this.language = NODES.createLanguage(this, cache.getId(), cache.getName(), cache.getVersion(), cache.getMimeTypes(), cache.isInternal()); }
private PolyglotLanguage createLanguage(LanguageCache cache, int index, RuntimeException initError) { PolyglotLanguage languageImpl = new PolyglotLanguage(this, cache, index, index == HOST_LANGUAGE_INDEX, initError); languageImpl.info = NODES.createLanguage(languageImpl, cache.getId(), cache.getName(), cache.getVersion(), cache.getMimeTypes(), cache.isInternal()); Language language = impl.getAPIAccess().newLanguage(languageImpl); languageImpl.api = language; return languageImpl; }