com.oracle.truffle.js.lang.JavaScriptLanguageProvider Maven / Gradle / Ivy
// CheckStyle: start generated
package com.oracle.truffle.js.lang;
import com.oracle.truffle.api.TruffleLanguage.ContextPolicy;
import com.oracle.truffle.api.TruffleLanguage.Registration;
import com.oracle.truffle.api.debug.DebuggerTags.AlwaysHalt;
import com.oracle.truffle.api.dsl.GeneratedBy;
import com.oracle.truffle.api.instrumentation.ProvidedTags;
import com.oracle.truffle.api.instrumentation.StandardTags.CallTag;
import com.oracle.truffle.api.instrumentation.StandardTags.ExpressionTag;
import com.oracle.truffle.api.instrumentation.StandardTags.RootBodyTag;
import com.oracle.truffle.api.instrumentation.StandardTags.RootTag;
import com.oracle.truffle.api.instrumentation.StandardTags.StatementTag;
import com.oracle.truffle.api.instrumentation.StandardTags.TryBlockTag;
import com.oracle.truffle.api.provider.TruffleLanguageProvider;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.BinaryOperationTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.BuiltinRootTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.ControlFlowBlockTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.ControlFlowBranchTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.ControlFlowRootTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.DeclareTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.EvalCallTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.FunctionCallTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.InputNodeTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.LiteralTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.ObjectAllocationTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.ReadElementTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.ReadPropertyTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.UnaryOperationTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.WriteElementTag;
import com.oracle.truffle.js.nodes.instrumentation.JSTags.WritePropertyTag;
import java.util.Collection;
import java.util.List;
import org.graalvm.polyglot.SandboxPolicy;
@GeneratedBy(JavaScriptLanguage.class)
@Registration(characterMimeTypes = {"application/javascript", "text/javascript", "application/javascript+module"}, contextPolicy = ContextPolicy.SHARED, defaultMimeType = "application/javascript", dependentLanguages = "regex", id = "js", implementationName = "GraalVM JavaScript", name = "JavaScript", sandbox = SandboxPolicy.UNTRUSTED, website = "https://www.graalvm.org/javascript/")
@ProvidedTags({StatementTag.class, RootTag.class, RootBodyTag.class, ExpressionTag.class, CallTag.class, com.oracle.truffle.api.instrumentation.StandardTags.ReadVariableTag.class, com.oracle.truffle.api.instrumentation.StandardTags.WriteVariableTag.class, TryBlockTag.class, AlwaysHalt.class, ObjectAllocationTag.class, BinaryOperationTag.class, UnaryOperationTag.class, com.oracle.truffle.js.nodes.instrumentation.JSTags.WriteVariableTag.class, ReadElementTag.class, WriteElementTag.class, ReadPropertyTag.class, WritePropertyTag.class, com.oracle.truffle.js.nodes.instrumentation.JSTags.ReadVariableTag.class, LiteralTag.class, FunctionCallTag.class, BuiltinRootTag.class, EvalCallTag.class, ControlFlowRootTag.class, ControlFlowBlockTag.class, ControlFlowBranchTag.class, DeclareTag.class, InputNodeTag.class})
public final class JavaScriptLanguageProvider extends TruffleLanguageProvider {
@Override
protected String getLanguageClassName() {
return "com.oracle.truffle.js.lang.JavaScriptLanguage";
}
@Override
protected Object create() {
return new JavaScriptLanguage();
}
@Override
protected Collection getServicesClassNames() {
return List.of();
}
@Override
protected List> createFileTypeDetectors() {
return List.of(new JSFileTypeDetector());
}
@Override
protected List getInternalResourceIds() {
return List.of();
}
@Override
protected Object createInternalResource(String resourceId) {
throw new IllegalArgumentException(String.format("Unsupported internal resource id %s, supported ids are ", resourceId));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy