String getBodyMethodSignature(ScriptOrFnNode n) { StringBuffer sb = new StringBuffer(); sb.append('('); sb.append(mainClassSignature); sb.append("Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;"); if (n.getType() == Token.FUNCTION) { OptFunctionNode ofn = OptFunctionNode.get(n); if (ofn.isTargetOfDirectCall()) { int pCount = ofn.fnode.getParamCount(); for (int i = 0; i != pCount; i++) { sb.append("Ljava/lang/Object;D"); } } } sb.append("[Ljava/lang/Object;)Ljava/lang/Object;"); return sb.toString(); }
String getBodyMethodSignature(ScriptNode n) { StringBuilder sb = new StringBuilder(); sb.append('('); sb.append(mainClassSignature); sb.append("Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;"); if (n.getType() == Token.FUNCTION) { OptFunctionNode ofn = OptFunctionNode.get(n); if (ofn.isTargetOfDirectCall()) { int pCount = ofn.fnode.getParamCount(); for (int i = 0; i != pCount; i++) { sb.append("Ljava/lang/Object;D"); } } } sb.append("[Ljava/lang/Object;)Ljava/lang/Object;"); return sb.toString(); }
String getBodyMethodSignature(ScriptNode n) { StringBuffer sb = new StringBuffer(); sb.append('('); sb.append(mainClassSignature); sb.append("Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;"); if (n.getType() == Token.FUNCTION) { OptFunctionNode ofn = OptFunctionNode.get(n); if (ofn.isTargetOfDirectCall()) { int pCount = ofn.fnode.getParamCount(); for (int i = 0; i != pCount; i++) { sb.append("Ljava/lang/Object;D"); } } } sb.append("[Ljava/lang/Object;)Ljava/lang/Object;"); return sb.toString(); }
String getBodyMethodSignature(ScriptOrFnNode n) { StringBuffer sb = new StringBuffer(); sb.append('('); sb.append(mainClassSignature); sb.append("Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;"); if (n.getType() == Token.FUNCTION) { OptFunctionNode ofn = OptFunctionNode.get(n); if (ofn.isTargetOfDirectCall()) { int pCount = ofn.fnode.getParamCount(); for (int i = 0; i != pCount; i++) { sb.append("Ljava/lang/Object;D"); } } } sb.append("[Ljava/lang/Object;)Ljava/lang/Object;"); return sb.toString(); }
String getBodyMethodSignature(ScriptNode n) { StringBuilder sb = new StringBuilder(); sb.append('('); sb.append(mainClassSignature); sb.append("Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;"); if (n.getType() == Token.FUNCTION) { OptFunctionNode ofn = OptFunctionNode.get(n); if (ofn.isTargetOfDirectCall()) { int pCount = ofn.fnode.getParamCount(); for (int i = 0; i != pCount; i++) { sb.append("Ljava/lang/Object;D"); } } } sb.append("[Ljava/lang/Object;)Ljava/lang/Object;"); return sb.toString(); }
String getBodyMethodSignature(ScriptNode n) { StringBuffer sb = new StringBuffer(); sb.append('('); sb.append(mainClassSignature); sb.append("Lorg/mozilla/javascript/Context;" +"Lorg/mozilla/javascript/Scriptable;" +"Lorg/mozilla/javascript/Scriptable;"); if (n.getType() == Token.FUNCTION) { OptFunctionNode ofn = OptFunctionNode.get(n); if (ofn.isTargetOfDirectCall()) { int pCount = ofn.fnode.getParamCount(); for (int i = 0; i != pCount; i++) { sb.append("Ljava/lang/Object;D"); } } } sb.append("[Ljava/lang/Object;)Ljava/lang/Object;"); return sb.toString(); }
inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); if (inDirectCallFunction && !hasVarsInRegs) Codegen.badTree(); } else {
inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); if (inDirectCallFunction && !hasVarsInRegs) Codegen.badTree(); } else {
inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); if (inDirectCallFunction && !hasVarsInRegs) Codegen.badTree(); } else {
inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); if (inDirectCallFunction && !hasVarsInRegs) Codegen.badTree(); } else {
inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); if (inDirectCallFunction && !hasVarsInRegs) Codegen.badTree(); } else {
inDirectCallFunction = fnCurrent.isTargetOfDirectCall(); if (inDirectCallFunction && !hasVarsInRegs) Codegen.badTree(); } else {
private void optimizeFunction(OptFunctionNode theFunction) { if (theFunction.fnode.requiresActivation()) return; inDirectCallFunction = theFunction.isTargetOfDirectCall(); this.theFunction = theFunction; ObjArray statementsArray = new ObjArray(); buildStatementList_r(theFunction.fnode, statementsArray); Node[] theStatementNodes = new Node[statementsArray.size()]; statementsArray.toArray(theStatementNodes); Block.runFlowAnalyzes(theFunction, theStatementNodes); if (!theFunction.fnode.requiresActivation()) { /* * Now that we know which local vars are in fact always * Numbers, we re-write the tree to take advantage of * that. Any arithmetic or assignment op involving just * Number typed vars is marked so that the codegen will * generate non-object code. */ parameterUsedInNumberContext = false; for (int i = 0; i < theStatementNodes.length; i++) { rewriteForNumberVariables(theStatementNodes[i], NumberType); } theFunction.setParameterNumberContext(parameterUsedInNumberContext); } }
private void optimizeFunction(OptFunctionNode theFunction) { if (theFunction.fnode.requiresActivation()) return; inDirectCallFunction = theFunction.isTargetOfDirectCall(); this.theFunction = theFunction; ObjArray statementsArray = new ObjArray(); buildStatementList_r(theFunction.fnode, statementsArray); Node[] theStatementNodes = new Node[statementsArray.size()]; statementsArray.toArray(theStatementNodes); Block.runFlowAnalyzes(theFunction, theStatementNodes); if (!theFunction.fnode.requiresActivation()) { /* * Now that we know which local vars are in fact always * Numbers, we re-write the tree to take advantage of * that. Any arithmetic or assignment op involving just * Number typed vars is marked so that the codegen will * generate non-object code. */ parameterUsedInNumberContext = false; for (Node theStatementNode : theStatementNodes) { rewriteForNumberVariables(theStatementNode, NumberType); } theFunction.setParameterNumberContext(parameterUsedInNumberContext); } }
private void optimizeFunction(OptFunctionNode theFunction) { if (theFunction.fnode.requiresActivation()) return; inDirectCallFunction = theFunction.isTargetOfDirectCall(); this.theFunction = theFunction; ObjArray statementsArray = new ObjArray(); buildStatementList_r(theFunction.fnode, statementsArray); Node[] theStatementNodes = new Node[statementsArray.size()]; statementsArray.toArray(theStatementNodes); Block.runFlowAnalyzes(theFunction, theStatementNodes); if (!theFunction.fnode.requiresActivation()) { /* * Now that we know which local vars are in fact always * Numbers, we re-write the tree to take advantage of * that. Any arithmetic or assignment op involving just * Number typed vars is marked so that the codegen will * generate non-object code. */ parameterUsedInNumberContext = false; for (Node theStatementNode : theStatementNodes) { rewriteForNumberVariables(theStatementNode, NumberType); } theFunction.setParameterNumberContext(parameterUsedInNumberContext); } }
private void optimizeFunction(OptFunctionNode theFunction) { if (theFunction.fnode.requiresActivation()) return; inDirectCallFunction = theFunction.isTargetOfDirectCall(); this.theFunction = theFunction; ObjArray statementsArray = new ObjArray(); buildStatementList_r(theFunction.fnode, statementsArray); Node[] theStatementNodes = new Node[statementsArray.size()]; statementsArray.toArray(theStatementNodes); Block.runFlowAnalyzes(theFunction, theStatementNodes); if (!theFunction.fnode.requiresActivation()) { /* * Now that we know which local vars are in fact always * Numbers, we re-write the tree to take advantage of * that. Any arithmetic or assignment op involving just * Number typed vars is marked so that the codegen will * generate non-object code. */ parameterUsedInNumberContext = false; for (Node theStatementNode : theStatementNodes) { rewriteForNumberVariables(theStatementNode, NumberType); } theFunction.setParameterNumberContext(parameterUsedInNumberContext); } }
private void optimizeFunction(OptFunctionNode theFunction) { if (theFunction.fnode.requiresActivation()) return; inDirectCallFunction = theFunction.isTargetOfDirectCall(); this.theFunction = theFunction; ObjArray statementsArray = new ObjArray(); buildStatementList_r(theFunction.fnode, statementsArray); Node[] theStatementNodes = new Node[statementsArray.size()]; statementsArray.toArray(theStatementNodes); Block.runFlowAnalyzes(theFunction, theStatementNodes); if (!theFunction.fnode.requiresActivation()) { /* * Now that we know which local vars are in fact always * Numbers, we re-write the tree to take advantage of * that. Any arithmetic or assignment op involving just * Number typed vars is marked so that the codegen will * generate non-object code. */ parameterUsedInNumberContext = false; for (int i = 0; i < theStatementNodes.length; i++) { rewriteForNumberVariables(theStatementNodes[i]); } theFunction.setParameterNumberContext(parameterUsedInNumberContext); } }
private void optimizeFunction(OptFunctionNode theFunction) { if (theFunction.fnode.requiresActivation()) return; inDirectCallFunction = theFunction.isTargetOfDirectCall(); this.theFunction = theFunction; ObjArray statementsArray = new ObjArray(); buildStatementList_r(theFunction.fnode, statementsArray); Node[] theStatementNodes = new Node[statementsArray.size()]; statementsArray.toArray(theStatementNodes); Block.runFlowAnalyzes(theFunction, theStatementNodes); if (!theFunction.fnode.requiresActivation()) { /* * Now that we know which local vars are in fact always * Numbers, we re-write the tree to take advantage of * that. Any arithmetic or assignment op involving just * Number typed vars is marked so that the codegen will * generate non-object code. */ parameterUsedInNumberContext = false; for (Node theStatementNode : theStatementNodes) { rewriteForNumberVariables(theStatementNode, NumberType); } theFunction.setParameterNumberContext(parameterUsedInNumberContext); } }
OptFunctionNode ofn = OptFunctionNode.get(n); generateFunctionInit(cfw, ofn); if (ofn.isTargetOfDirectCall()) { emitDirectConstructor(cfw, ofn);
OptFunctionNode ofn = OptFunctionNode.get(n); generateFunctionInit(cfw, ofn); if (ofn.isTargetOfDirectCall()) { emitDirectConstructor(cfw, ofn);