public final class JavaToJavaScriptCompiler extends Object
JProgram
representations into corresponding Js
source.Constructor and Description |
---|
JavaToJavaScriptCompiler(TreeLogger logger,
CompilerContext compilerContext) |
Modifier and Type | Method and Description |
---|---|
static PermutationResult |
compilePermutation(UnifiedAst unifiedAst,
TreeLogger logger,
CompilerContext compilerContext,
Permutation permutation)
Compiles a particular permutation.
|
protected ResolveRuntimeTypeReferences.TypeMapper<?> |
normalizeSemantics()
Transform patterns that can't be represented in JS (such as multiple catch blocks) into
equivalent but compatible patterns and take JVM semantics (such as numeric casts) that are not
explicit in the AST and make them explicit.
These passes can not be reordering because of subtle interdependencies. |
static UnifiedAst |
precompile(TreeLogger logger,
CompilerContext compilerContext,
PrecompilationContext precompilationContext) |
public JavaToJavaScriptCompiler(TreeLogger logger, CompilerContext compilerContext)
public static UnifiedAst precompile(TreeLogger logger, CompilerContext compilerContext, PrecompilationContext precompilationContext) throws UnableToCompleteException
UnableToCompleteException
public static PermutationResult compilePermutation(UnifiedAst unifiedAst, TreeLogger logger, CompilerContext compilerContext, Permutation permutation) throws UnableToCompleteException
logger
- the logger to usecompilerContext
- shared read only compiler statepermutation
- the permutation to compileUnableToCompleteException
- if an error other than OutOfMemoryError
occursprotected ResolveRuntimeTypeReferences.TypeMapper<?> normalizeSemantics()
Copyright © 2018. All rights reserved.