Package com.ibm.wala.cast.js.translator
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:
com.ibm.wala.cast.ir.translator.TranslatorToCAst.WalkContext<C,T>,JavaScriptTranslatorToCAst.WalkContext<C,T>
- Enclosing interface:
- JavaScriptTranslatorToCAst
public static class JavaScriptTranslatorToCAst.MemberDestructuringContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T> extends java.lang.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
Constructors Modifier Constructor Description protectedMemberDestructuringContext(C parent, T initialBaseFor, int operationIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyOperation(T from, T to)booleanfoundMemberOperation(T node)JavaScriptTranslatorToCAst.WalkContext<C,T>getParent()intsetOperation(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
-
-
-
-
Method Detail
-
setOperation
public int setOperation(T node)
- Specified by:
setOperationin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>
-
foundMemberOperation
public boolean foundMemberOperation(T node)
- Specified by:
foundMemberOperationin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>
-
copyOperation
public void copyOperation(T from, T to)
- Specified by:
copyOperationin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>
-
getParent
public JavaScriptTranslatorToCAst.WalkContext<C,T> getParent()
- Specified by:
getParentin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>- Specified by:
getParentin interfacecom.ibm.wala.cast.ir.translator.TranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>,T>
-
-