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
ConstructorsModifierConstructorDescriptionprotectedMemberDestructuringContext(C parent, T initialBaseFor, int operationIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyOperation(T from, T to) booleanfoundMemberOperation(T node) intsetOperation(T node) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaScriptTranslatorToCAst.WalkContext
scriptMethods inherited from interface TranslatorToCAst.WalkContext
addNameDecl, addScopedEntity, cfg, getBreakFor, getCatchTarget, getCatchTarget, getContinueFor, getNameDecls, getNodeTypeMap, getScopedEntities, pos, topModifier and TypeMethodDescriptiondefault voidAdd a name declaration to this context.default voidaddScopedEntity(CAstNode newNode, CAstEntity visit) associate a child entity with a given CAstNode, e.g.default CAstControlFlowRecordercfg()for recording control-flow relationships among the CAst nodesdefault TgetBreakFor(String label) for a 'break' style goto, return the control flow targetdefault CAstNodedefault CAstNodedefault TgetContinueFor(String label) for a 'continue' style goto, return the control flow targetdefault CAstNodeTypeMapRecorderfor recording types of nodesdefault Map<CAstNode, Collection<CAstEntity>> get a mapping from CAstNodes to the scoped entities (e.g.default CAstSourcePositionRecorderpos()for recording source positionsdefault Ttop()
-
Constructor Details
-
MemberDestructuringContext
-
-
Method Details
-
setOperation
- Specified by:
setOperationin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>, T>
-
foundMemberOperation
- Specified by:
foundMemberOperationin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>, T>
-
copyOperation
- Specified by:
copyOperationin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>, T>
-
getParent
- Specified by:
getParentin interfaceJavaScriptTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>, T> - Specified by:
getParentin interfaceTranslatorToCAst.WalkContext<C extends JavaScriptTranslatorToCAst.WalkContext<C,T>, T>
-