org.jetbrains.k2js.translate.context
Class AliasingContext
java.lang.Object
org.jetbrains.k2js.translate.context.AliasingContext
public class AliasingContext
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.