org.jetbrains.k2js.translate.context
Class AliasingContext

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

public class AliasingContext
extends java.lang.Object


Method Summary
 com.google.dart.compiler.backend.js.ast.JsExpression getAliasForDescriptor(DeclarationDescriptor descriptor)
           
protected  com.google.dart.compiler.backend.js.ast.JsExpression getAliasForDescriptor(DeclarationDescriptor descriptor, boolean fromChild)
           
 com.google.dart.compiler.backend.js.ast.JsName getAliasForExpression(JetExpression element)
           
static AliasingContext getCleanContext()
           
 AliasingContext inner(DeclarationDescriptor descriptor, com.google.dart.compiler.backend.js.ast.JsExpression alias)
           
 AliasingContext notShareableThisAliased(DeclarationDescriptor thisDescriptor, com.google.dart.compiler.backend.js.ast.JsExpression alias)
           
 void registerAlias(DeclarationDescriptor descriptor, com.google.dart.compiler.backend.js.ast.JsExpression alias)
          Usages: 1) Local variable captured in closure.
 AliasingContext withDescriptorsAliased(java.util.Map<DeclarationDescriptor,com.google.dart.compiler.backend.js.ast.JsExpression> aliases)
           
 AliasingContext withExpressionsAliased(java.util.Map<JetExpression,com.google.dart.compiler.backend.js.ast.JsName> aliasesForExpressions)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCleanContext

public static AliasingContext getCleanContext()

inner

@NotNull
public AliasingContext inner(@NotNull
                                     DeclarationDescriptor descriptor,
                                     @NotNull
                                     com.google.dart.compiler.backend.js.ast.JsExpression alias)

notShareableThisAliased

@NotNull
public AliasingContext notShareableThisAliased(@NotNull
                                                       DeclarationDescriptor thisDescriptor,
                                                       @NotNull
                                                       com.google.dart.compiler.backend.js.ast.JsExpression alias)

withExpressionsAliased

@NotNull
public AliasingContext withExpressionsAliased(@NotNull
                                                      java.util.Map<JetExpression,com.google.dart.compiler.backend.js.ast.JsName> aliasesForExpressions)

withDescriptorsAliased

@NotNull
public AliasingContext withDescriptorsAliased(@NotNull
                                                      java.util.Map<DeclarationDescriptor,com.google.dart.compiler.backend.js.ast.JsExpression> aliases)

getAliasForDescriptor

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

getAliasForDescriptor

@Nullable
protected com.google.dart.compiler.backend.js.ast.JsExpression getAliasForDescriptor(@NotNull
                                                                                              DeclarationDescriptor descriptor,
                                                                                              boolean fromChild)

getAliasForExpression

@Nullable
public com.google.dart.compiler.backend.js.ast.JsName getAliasForExpression(@NotNull
                                                                                     JetExpression element)

registerAlias

public void registerAlias(@NotNull
                          DeclarationDescriptor descriptor,
                          @NotNull
                          com.google.dart.compiler.backend.js.ast.JsExpression alias)
Usages: 1) Local variable captured in closure. If captured in closure, any modification in closure should affect captured variable. So, "var count = n" wrapped as "var count = {v: n}". descriptor wil be property descriptor, alias will be JsObjectLiteral 2) Local named function.