private static boolean isArithmeticNode(Node node) { int type = node.getType(); return (type == Token.SUB) || (type == Token.MOD) || (type == Token.DIV) || (type == Token.MUL); }
private static boolean isArithmeticNode(Node node) { int type = node.getType(); return (type == Token.SUB) || (type == Token.MOD) || (type == Token.DIV) || (type == Token.MUL); }
private static boolean isArithmeticNode(Node node) { int type = node.getType(); return (type == Token.SUB) || (type == Token.MOD) || (type == Token.DIV) || (type == Token.MUL); }
private int nodeIsDirectCallParameter(Node node) { if (node.getType() == Token.GETVAR && inDirectCallFunction && !itsForcedObjectParameters) { int varIndex = fnCurrent.getVarIndex(node); if (fnCurrent.isParameter(varIndex)) { return varRegisters[varIndex]; } } return -1; }
private int nodeIsDirectCallParameter(Node node) { if (node.getType() == Token.GETVAR && inDirectCallFunction && !itsForcedObjectParameters) { int varIndex = fnCurrent.getVarIndex(node); if (fnCurrent.isParameter(varIndex)) { return varRegisters[varIndex]; } } return -1; }
private void markDCPNumberContext(Node n) { if (inDirectCallFunction && n.getType() == Token.GETVAR) { int varIndex = theFunction.getVarIndex(n); if (theFunction.isParameter(varIndex)) { parameterUsedInNumberContext = true; } } }
private void markDCPNumberContext(Node n) { if (inDirectCallFunction && n.getType() == Token.GETVAR) { int varIndex = theFunction.getVarIndex(n); if (theFunction.isParameter(varIndex)) { parameterUsedInNumberContext = true; } } }
private int nodeIsDirectCallParameter(Node node) { if (node.getType() == Token.GETVAR && inDirectCallFunction && !itsForcedObjectParameters) { int varIndex = fnCurrent.getVarIndex(node); if (fnCurrent.isParameter(varIndex)) { return varRegisters[varIndex]; } } return -1; }
private void markDCPNumberContext(Node n) { if (inDirectCallFunction && n.getType() == Token.GETVAR) { int varIndex = theFunction.getVarIndex(n); if (theFunction.isParameter(varIndex)) { parameterUsedInNumberContext = true; } } }
private boolean convertParameter(Node n) { if (inDirectCallFunction && n.getType() == Token.GETVAR) { int varIndex = theFunction.getVarIndex(n); if (theFunction.isParameter(varIndex)) { n.removeProp(Node.ISNUMBER_PROP); return true; } } return false; }
Node createUseLocal(Node localBlock) { if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug(); Node result = new Node(Token.LOCAL_LOAD); result.putProp(Node.LOCAL_BLOCK_PROP, localBlock); return result; }
private boolean convertParameter(Node n) { if (inDirectCallFunction && n.getType() == Token.GETVAR) { int varIndex = theFunction.getVarIndex(n); if (theFunction.isParameter(varIndex)) { n.removeProp(Node.ISNUMBER_PROP); return true; } } return false; }
public void setDefault(Node defaultTarget) { if (type != Token.SWITCH) codeBug(); if (defaultTarget.getType() != Token.TARGET) codeBug(); if (target2 != null) codeBug(); //only once target2 = defaultTarget; }
public void setFinally(Node finallyTarget) { if (type != Token.TRY) codeBug(); if (finallyTarget.getType() != Token.TARGET) codeBug(); if (target2 != null) codeBug(); //only once target2 = finallyTarget; }
private static boolean isPrimitiveCreation(WalkContext context, NewExpression n) { Node target = getNewTarget(n); return isPrologueScript(context) && n.getType() == Token.NEW && target.getType() == Token.NAME && target.getString().equals("Primitives"); }
/** * Continue (possibly labeled) */ Node createContinue(Node loop, int lineno) { if (loop.getType() != Token.LOOP) Kit.codeBug(); Node.Jump n = new Node.Jump(Token.CONTINUE, lineno); n.setJumpStatement((Node.Jump)loop); return n; }
private Node createUseLocal(Node localBlock) { if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug(); Node result = new Node(Token.LOCAL_LOAD); result.putProp(Node.LOCAL_BLOCK_PROP, localBlock); return result; }
private boolean convertParameter(Node n) { if (inDirectCallFunction && n.getType() == Token.GETVAR) { int varIndex = theFunction.getVarIndex(n); if (theFunction.isParameter(varIndex)) { n.removeProp(Node.ISNUMBER_PROP); return true; } } return false; }
public void setContinue(Node continueTarget) { if (type != Token.LOOP) codeBug(); if (continueTarget.getType() != Token.TARGET) codeBug(); if (target2 != null) codeBug(); //only once target2 = continueTarget; }
/** * is n a call to "primitive" within our synthetic modeling code? */ private static boolean isPrimitiveCall(WalkContext context, FunctionCall n) { return isPrologueScript(context) && n.getType() == Token.CALL && getCallTarget(n).getType() == Token.NAME && getCallTarget(n).getString().equals("primitive"); }