Package me.topchetoeu.j2s.compilation
Class FunctionNode
java.lang.Object
me.topchetoeu.j2s.compilation.Node
me.topchetoeu.j2s.compilation.FunctionNode
- Direct Known Subclasses:
FunctionStatementNode
,FunctionValueNode
,PropertyMemberNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal CompoundNode
final me.topchetoeu.j2s.common.Location
final List<VariableNode>
-
Constructor Summary
ConstructorsConstructorDescriptionFunctionNode
(me.topchetoeu.j2s.common.Location loc, me.topchetoeu.j2s.common.Location end, List<VariableNode> params, CompoundNode body) -
Method Summary
Modifier and TypeMethodDescriptionprotected final int[]
captures
(CompileResult target) void
compile
(CompileResult target, boolean pollute) void
compile
(CompileResult target, boolean pollute, String name) abstract void
compile
(CompileResult target, boolean pollute, String name, me.topchetoeu.j2s.common.Instruction.BreakpointType bp) void
compile
(CompileResult target, boolean pollute, me.topchetoeu.j2s.common.Instruction.BreakpointType bp) final CompileResult
compileBody
(me.topchetoeu.j2s.common.Environment env, FunctionScope scope, boolean lastReturn, String selfName) final CompileResult
compileBody
(CompileResult parent, String selfName) static void
compileWithName
(Node stm, CompileResult target, boolean pollute, String name) static void
compileWithName
(Node stm, CompileResult target, boolean pollute, String name, me.topchetoeu.j2s.common.Instruction.BreakpointType bp) abstract String
name()
final String
static ParseRes<FunctionNode>
parseFunction
(Source src, int i, boolean statement) void
resolve
(CompileResult target) protected final me.topchetoeu.j2s.common.Environment
rootEnv
(me.topchetoeu.j2s.common.Environment env) Methods inherited from class me.topchetoeu.j2s.compilation.Node
compileFunctions, loc, setLoc
-
Field Details
-
body
-
params
-
end
public final me.topchetoeu.j2s.common.Location end
-
-
Constructor Details
-
FunctionNode
public FunctionNode(me.topchetoeu.j2s.common.Location loc, me.topchetoeu.j2s.common.Location end, List<VariableNode> params, CompoundNode body)
-
-
Method Details
-
name
-
name
-
captures
-
rootEnv
protected final me.topchetoeu.j2s.common.Environment rootEnv(me.topchetoeu.j2s.common.Environment env) -
resolve
-
compileBody
public final CompileResult compileBody(me.topchetoeu.j2s.common.Environment env, FunctionScope scope, boolean lastReturn, String selfName) -
compileBody
-
compile
public abstract void compile(CompileResult target, boolean pollute, String name, me.topchetoeu.j2s.common.Instruction.BreakpointType bp) -
compile
-
compile
public void compile(CompileResult target, boolean pollute, me.topchetoeu.j2s.common.Instruction.BreakpointType bp) -
compile
-
compileWithName
-
compileWithName
public static void compileWithName(Node stm, CompileResult target, boolean pollute, String name, me.topchetoeu.j2s.common.Instruction.BreakpointType bp) -
parseFunction
-