Class JavaScriptTranslatorToCAst.MemberDestructuringContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>
java.lang.Object
com.ibm.wala.cast.js.translator.JavaScriptTranslatorToCAst.MemberDestructuringContext<C,T>
- All Implemented Interfaces:
TranslatorToCAst.WalkContext<C,
,T> JavaScriptTranslatorToCAst.WalkContext<C,
T>
- Enclosing interface:
JavaScriptTranslatorToCAst
public static class JavaScriptTranslatorToCAst.MemberDestructuringContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>
extends Object
implements JavaScriptTranslatorToCAst.WalkContext<C,T>
Used to determine the value to be passed as the 'this' argument for a function call. This is
needed since in JavaScript, you can write a call e(...) where e is some arbitrary expression,
and in the case where e is a property access like e'.f, we must discover that the value of
expression e' is passed as the 'this' parameter.
The general strategy is to store the value of the expression passed as the 'this' parameter in baseVar, and then to use baseVar as the actual argument sub-node for the CAst call node
-
Constructor Summary
ModifierConstructorDescriptionprotected
MemberDestructuringContext
(C parent, T initialBaseFor, int operationIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoid
copyOperation
(T from, T to) boolean
foundMemberOperation
(T node) int
setOperation
(T node) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.wala.cast.js.translator.JavaScriptTranslatorToCAst.WalkContext
script
Methods inherited from interface com.ibm.wala.cast.ir.translator.TranslatorToCAst.WalkContext
addNameDecl, addScopedEntity, cfg, getBreakFor, getCatchTarget, getCatchTarget, getContinueFor, getNameDecls, getNodeTypeMap, getScopedEntities, pos, top
-
Constructor Details
-
MemberDestructuringContext
-
-
Method Details
-
setOperation
- Specified by:
setOperation
in interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,
T>, T>
-
foundMemberOperation
- Specified by:
foundMemberOperation
in interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,
T>, T>
-
copyOperation
- Specified by:
copyOperation
in interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,
T>, T>
-
getParent
- Specified by:
getParent
in interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,
T>, T> - Specified by:
getParent
in interfaceTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,
T>, T>
-