org.jetbrains.k2js.translate.context
Class TranslationContext

java.lang.Object
  extended by org.jetbrains.k2js.translate.context.TranslationContext

public class TranslationContext
extends java.lang.Object

All the info about the state of the translation process.


Method Summary
 void addStatementToCurrentBlock(com.google.dart.compiler.backend.js.ast.JsStatement statement)
           
 AliasingContext aliasingContext()
           
 void associateExpressionToLazyValue(com.google.dart.compiler.backend.js.ast.JsExpression expression, TemporaryConstVariable temporaryConstVariable)
           
 BindingContext bindingContext()
           
 TranslationContext contextWithScope(com.google.dart.compiler.backend.js.ast.JsFunction fun)
           
 TranslationContext contextWithScope(com.google.dart.compiler.backend.js.ast.JsFunction fun, AliasingContext aliasingContext)
           
protected  TranslationContext contextWithScope(com.google.dart.compiler.backend.js.ast.JsScope newScope, com.google.dart.compiler.backend.js.ast.JsBlock block, AliasingContext aliasingContext)
           
 TemporaryVariable declareTemporary(com.google.dart.compiler.backend.js.ast.JsExpression initExpression)
           
 DynamicContext dynamicContext()
           
 com.google.dart.compiler.backend.js.ast.JsBlock getBlockForDescriptor(DeclarationDescriptor descriptor)
           
 com.google.dart.compiler.backend.js.ast.JsFunction getFunctionObject(CallableDescriptor descriptor)
           
 com.google.dart.compiler.backend.js.ast.JsName getNameForDescriptor(DeclarationDescriptor descriptor)
           
 com.google.dart.compiler.backend.js.ast.JsName getNameForElement(com.intellij.psi.PsiElement element)
           
 TemporaryConstVariable getOrDeclareTemporaryConstVariable(com.google.dart.compiler.backend.js.ast.JsExpression expression)
           
 com.google.dart.compiler.backend.js.ast.JsNameRef getQualifierForDescriptor(DeclarationDescriptor descriptor)
           
 com.google.dart.compiler.backend.js.ast.JsScope getScopeForDescriptor(DeclarationDescriptor descriptor)
           
 com.google.dart.compiler.backend.js.ast.JsExpression getThisObject(DeclarationDescriptor descriptor)
           
 TranslationContext innerBlock(com.google.dart.compiler.backend.js.ast.JsBlock block)
           
 TranslationContext innerContextWithAliasesForExpressions(java.util.Map<JetExpression,com.google.dart.compiler.backend.js.ast.JsName> aliases)
           
 TranslationContext innerContextWithDescriptorsAliased(java.util.Map<DeclarationDescriptor,com.google.dart.compiler.backend.js.ast.JsName> aliases)
           
 TranslationContext innerContextWithThisAliased(DeclarationDescriptor correspondingDescriptor, com.google.dart.compiler.backend.js.ast.JsName alias)
           
 Intrinsics intrinsics()
           
 boolean isEcma5()
           
 LiteralFunctionTranslator literalFunctionTranslator()
           
 Namer namer()
           
 com.google.dart.compiler.backend.js.ast.JsStringLiteral nameToLiteral(Named named)
           
 TranslationContext newDeclaration(DeclarationDescriptor descriptor)
           
 TranslationContext newDeclaration(com.intellij.psi.PsiElement element)
           
 com.google.dart.compiler.backend.js.ast.JsProgram program()
           
static TranslationContext rootContext(StaticContext staticContext)
           
 com.google.dart.compiler.backend.js.ast.JsScope scope()
           
 AliasingContext.ThisAliasProvider thisAliasProvider()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

rootContext

@NotNull
public static TranslationContext rootContext(@NotNull
                                                     StaticContext staticContext)

isEcma5

public boolean isEcma5()

dynamicContext

public DynamicContext dynamicContext()

contextWithScope

@NotNull
public TranslationContext contextWithScope(@NotNull
                                                   com.google.dart.compiler.backend.js.ast.JsFunction fun)

contextWithScope

@NotNull
protected TranslationContext contextWithScope(@NotNull
                                                      com.google.dart.compiler.backend.js.ast.JsScope newScope,
                                                      @NotNull
                                                      com.google.dart.compiler.backend.js.ast.JsBlock block,
                                                      @NotNull
                                                      AliasingContext aliasingContext)

contextWithScope

@NotNull
public TranslationContext contextWithScope(@NotNull
                                                   com.google.dart.compiler.backend.js.ast.JsFunction fun,
                                                   @NotNull
                                                   AliasingContext aliasingContext)

innerBlock

@NotNull
public TranslationContext innerBlock(@NotNull
                                             com.google.dart.compiler.backend.js.ast.JsBlock block)

newDeclaration

@NotNull
public TranslationContext newDeclaration(@NotNull
                                                 DeclarationDescriptor descriptor)

innerContextWithThisAliased

@NotNull
public TranslationContext innerContextWithThisAliased(@NotNull
                                                              DeclarationDescriptor correspondingDescriptor,
                                                              @NotNull
                                                              com.google.dart.compiler.backend.js.ast.JsName alias)

innerContextWithAliasesForExpressions

@NotNull
public TranslationContext innerContextWithAliasesForExpressions(@NotNull
                                                                        java.util.Map<JetExpression,com.google.dart.compiler.backend.js.ast.JsName> aliases)

innerContextWithDescriptorsAliased

@NotNull
public TranslationContext innerContextWithDescriptorsAliased(@NotNull
                                                                     java.util.Map<DeclarationDescriptor,com.google.dart.compiler.backend.js.ast.JsName> aliases)

getBlockForDescriptor

@NotNull
public com.google.dart.compiler.backend.js.ast.JsBlock getBlockForDescriptor(@NotNull
                                                                                     DeclarationDescriptor descriptor)

newDeclaration

@NotNull
public TranslationContext newDeclaration(@NotNull
                                                 com.intellij.psi.PsiElement element)

bindingContext

@NotNull
public BindingContext bindingContext()

getScopeForDescriptor

@NotNull
public com.google.dart.compiler.backend.js.ast.JsScope getScopeForDescriptor(@NotNull
                                                                                     DeclarationDescriptor descriptor)

getNameForElement

@NotNull
public com.google.dart.compiler.backend.js.ast.JsName getNameForElement(@NotNull
                                                                                com.intellij.psi.PsiElement element)

getNameForDescriptor

@NotNull
public com.google.dart.compiler.backend.js.ast.JsName getNameForDescriptor(@NotNull
                                                                                   DeclarationDescriptor descriptor)

nameToLiteral

@NotNull
public com.google.dart.compiler.backend.js.ast.JsStringLiteral nameToLiteral(@NotNull
                                                                                     Named named)

getQualifierForDescriptor

@Nullable
public com.google.dart.compiler.backend.js.ast.JsNameRef getQualifierForDescriptor(@NotNull
                                                                                            DeclarationDescriptor descriptor)

declareTemporary

@NotNull
public TemporaryVariable declareTemporary(@Nullable
                                                  com.google.dart.compiler.backend.js.ast.JsExpression initExpression)

getOrDeclareTemporaryConstVariable

@NotNull
public TemporaryConstVariable getOrDeclareTemporaryConstVariable(@NotNull
                                                                         com.google.dart.compiler.backend.js.ast.JsExpression expression)

associateExpressionToLazyValue

public void associateExpressionToLazyValue(com.google.dart.compiler.backend.js.ast.JsExpression expression,
                                           TemporaryConstVariable temporaryConstVariable)

namer

@NotNull
public Namer namer()

intrinsics

@NotNull
public Intrinsics intrinsics()

program

@NotNull
public com.google.dart.compiler.backend.js.ast.JsProgram program()

scope

@NotNull
public com.google.dart.compiler.backend.js.ast.JsScope scope()

aliasingContext

@NotNull
public AliasingContext aliasingContext()

literalFunctionTranslator

@NotNull
public LiteralFunctionTranslator literalFunctionTranslator()

getFunctionObject

@NotNull
public com.google.dart.compiler.backend.js.ast.JsFunction getFunctionObject(@NotNull
                                                                                    CallableDescriptor descriptor)

addStatementToCurrentBlock

public void addStatementToCurrentBlock(@NotNull
                                       com.google.dart.compiler.backend.js.ast.JsStatement statement)

thisAliasProvider

@NotNull
public AliasingContext.ThisAliasProvider thisAliasProvider()

getThisObject

@NotNull
public com.google.dart.compiler.backend.js.ast.JsExpression getThisObject(@NotNull
                                                                                  DeclarationDescriptor descriptor)