public class CpsFunction extends CpsCallable
| Constructor and Description |
|---|
CpsFunction(List<String> parameters,
Block body) |
| Modifier and Type | Method and Description |
|---|---|
Next |
invoke(Env caller,
SourceLocation loc,
Object receiver,
List<?> args,
Continuation k)
Invokes this callable something.
|
assignArgumentspublic Next invoke(Env caller, SourceLocation loc, Object receiver, List<?> args, Continuation k)
CpsCallablecaller - Environment of the caller. For example, if this invokable object throws an exception,
we might have to use this environment to find where to dispatch that exception.loc - Source location of the call site. Used to build stack trace elements. Null if the call
happens outside the CPS transformed world (think of the call into Thread.run()
in Java, which cannot be explained within the Java semantics.)receiver - For functions, this is the left hand side of the expression that becomes 'this' object.
This parameter is meaningless for closures because it's not invoked with a LHS object.args - Arguments to the call that match up with CpsCallable.parameters.Copyright © 2011–2019. All rights reserved.