private void print(FunctionNode node) throws IOException { if (!node.isMethod()) { writer.append("function"); } if (node.getFunctionName() != null) { writer.append(' '); print(node.getFunctionName()); } writer.append('('); printList(node.getParams()); writer.append(')').ws(); if (node.isExpressionClosure()) { if (node.getBody().getLastChild() instanceof ReturnStatement) { print(((ReturnStatement) node.getBody().getLastChild()).getReturnValue()); if (node.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { writer.append(";"); } } } else { print(node.getBody()); } }
private void generateNestedFunctionInits() { int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; i++) { OptFunctionNode ofn = OptFunctionNode.get(scriptOrFn, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { visitFunction(ofn, FunctionNode.FUNCTION_STATEMENT); } } }
private void generateNestedFunctionInits() { int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; i++) { OptFunctionNode ofn = OptFunctionNode.get(scriptOrFn, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { visitFunction(ofn, FunctionNode.FUNCTION_STATEMENT); } } }
private void generateNestedFunctionInits() { int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; i++) { OptFunctionNode ofn = OptFunctionNode.get(scriptOrFn, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { visitFunction(ofn, FunctionNode.FUNCTION_STATEMENT); } } }
private void generateNestedFunctionInits() { int functionCount = scriptOrFn.getFunctionCount(); for (int i = 0; i != functionCount; i++) { OptFunctionNode ofn = OptFunctionNode.get(scriptOrFn, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { visitFunction(ofn, FunctionNode.FUNCTION_STATEMENT); } } }
for (int i = 0; i != functionCount; ++i) { OptFunctionNode ofn = OptFunctionNode.get(tree, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT)
for (int i = 0; i != functionCount; ++i) { OptFunctionNode ofn = OptFunctionNode.get(tree, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT)
for (int i = 0; i != functionCount; ++i) { OptFunctionNode ofn = OptFunctionNode.get(tree, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT)
for (int i = 0; i != functionCount; ++i) { OptFunctionNode ofn = OptFunctionNode.get(tree, i); if (ofn.fnode.getFunctionType() == FunctionNode.FUNCTION_STATEMENT)
private void generateFunctionICode() { itsInFunctionFlag = true; FunctionNode theFunction = (FunctionNode)scriptOrFn; itsData.itsFunctionType = theFunction.getFunctionType(); itsData.itsNeedsActivation = theFunction.requiresActivation(); if (theFunction.getFunctionName() != null) { itsData.itsName = theFunction.getName(); } if (theFunction.isGenerator()) { addIcode(Icode_GENERATOR); addUint16(theFunction.getBaseLineno() & 0xFFFF); } generateICodeFromTree(theFunction.getLastChild()); }
private void generateFunctionICode() { itsInFunctionFlag = true; FunctionNode theFunction = (FunctionNode)scriptOrFn; itsData.itsFunctionType = theFunction.getFunctionType(); itsData.itsNeedsActivation = theFunction.requiresActivation(); if (theFunction.getFunctionName() != null) { itsData.itsName = theFunction.getName(); } if (theFunction.isGenerator()) { addIcode(Icode_GENERATOR); addUint16(theFunction.getBaseLineno() & 0xFFFF); } generateICodeFromTree(theFunction.getLastChild()); }
private void generateFunctionICode() { itsInFunctionFlag = true; FunctionNode theFunction = (FunctionNode)scriptOrFn; itsData.itsFunctionType = theFunction.getFunctionType(); itsData.itsNeedsActivation = theFunction.requiresActivation(); if (theFunction.getFunctionName() != null) { itsData.itsName = theFunction.getName(); } if (theFunction.isGenerator()) { addIcode(Icode_GENERATOR); addUint16(theFunction.getBaseLineno() & 0xFFFF); } generateICodeFromTree(theFunction.getLastChild()); }
private void generateFunctionICode() { itsInFunctionFlag = true; FunctionNode theFunction = (FunctionNode)scriptOrFn; itsData.itsFunctionType = theFunction.getFunctionType(); itsData.itsNeedsActivation = theFunction.requiresActivation(); if (theFunction.getFunctionName() != null) { itsData.itsName = theFunction.getName(); } if (theFunction.isGenerator()) { addIcode(Icode_GENERATOR); addUint16(theFunction.getBaseLineno() & 0xFFFF); } generateICodeFromTree(theFunction.getLastChild()); }
System.err.println(fne.getName()); if (fn.getFunctionType() == FunctionNode.FUNCTION_EXPRESSION) { CAstNode fun = Ast.makeNode(CAstNode.FUNCTION_EXPR, Ast.makeConstant(fne));
private Node transformFunction(FunctionNode fn) { int functionType = fn.getFunctionType(); int start = decompiler.markFunctionStart(functionType); Node mexpr = decompileFunctionHeader(fn); int syntheticType = fn.getFunctionType(); Node pn = initFunction(fn, index, body, syntheticType); if (mexpr != null) {
private Node transformFunction(FunctionNode fn) { int functionType = fn.getFunctionType(); int start = decompiler.markFunctionStart(functionType); Node mexpr = decompileFunctionHeader(fn); int syntheticType = fn.getFunctionType(); Node pn = initFunction(fn, index, body, syntheticType); if (mexpr != null) {
private Node transformFunction(FunctionNode fn) { int functionType = fn.getFunctionType(); int start = decompiler.markFunctionStart(functionType); Node mexpr = decompileFunctionHeader(fn); int syntheticType = fn.getFunctionType(); Node pn = initFunction(fn, index, body, syntheticType); if (mexpr != null) {
private Node transformFunction(FunctionNode fn) { int functionType = fn.getFunctionType(); int start = decompiler.markFunctionStart(functionType); Node mexpr = decompileFunctionHeader(fn); int syntheticType = fn.getFunctionType(); Node pn = initFunction(fn, index, body, syntheticType); if (mexpr != null) {
fn.setRequiresActivation(); int functionType = fn.getFunctionType(); int start = decompiler.markFunctionStart(functionType); Node mexpr = decompileFunctionHeader(fn); int syntheticType = fn.getFunctionType(); pn = initFunction(fn, index, body, syntheticType); if (mexpr != null) {
private void print(FunctionNode node) throws IOException { if (!node.isMethod()) { writer.append("function"); } if (node.getFunctionName() != null) { writer.append(' '); print(node.getFunctionName()); } writer.append('('); printList(node.getParams()); writer.append(')').ws(); if (node.isExpressionClosure()) { if (node.getBody().getLastChild() instanceof ReturnStatement) { print(((ReturnStatement) node.getBody().getLastChild()).getReturnValue()); if (node.getFunctionType() == FunctionNode.FUNCTION_STATEMENT) { writer.append(";"); } } } else { print(node.getBody()); } }