public class FunctionCallEnv extends Object
| Constructor and Description |
|---|
FunctionCallEnv(Env caller,
Continuation returnAddress,
SourceLocation loc,
Object _this) |
| Modifier and Type | Method and Description |
|---|---|
void |
buildStackTraceElements(List<StackTraceElement> stack,
int depth)
Builds the current call stack information for
Throwable.getStackTrace(). |
Object |
closureOwner()
Closure or 'this' object that surrounds the currently executing code.
|
void |
declareVariable(Class type,
String name) |
Continuation |
getBreakAddress(String label)
If we see a break statement, where should we go?
|
Continuation |
getContinueAddress(String label)
If we see a continue statement, where should we go?
|
Continuation |
getExceptionHandler(Class<? extends Throwable> type)
Finds the exception handler that catches a
Throwable instance of this type. |
Invoker |
getInvoker()
Invoker is typically scoped at the whole execution. |
Object |
getLocalVariable(String name) |
Continuation |
getReturnAddress()
Where should the return statement return to?
|
void |
setInvoker(Invoker invoker)
Sets the
Invoker, which gets inherited through the call chain. |
void |
setLocalVariable(String name,
Object value) |
public FunctionCallEnv(Env caller, Continuation returnAddress, SourceLocation loc, Object _this)
caller - The environment of the call site. Can be null but only if the caller is outside CPS execution.public Object closureOwner()
Envpublic void setInvoker(Invoker invoker)
Invoker, which gets inherited through the call chain.public Invoker getInvoker()
EnvInvoker is typically scoped at the whole execution.getInvoker in interface Envpublic final Continuation getReturnAddress()
EnvgetReturnAddress in interface Envpublic final Continuation getBreakAddress(String label)
EnvgetBreakAddress in interface Envlabel - Specifies the loop to break from. null for nearest loop.public final Continuation getContinueAddress(String label)
EnvgetContinueAddress in interface Envlabel - Specifies the loop to repeat. null for nearest loop.public final Continuation getExceptionHandler(Class<? extends Throwable> type)
EnvThrowable instance of this type.getExceptionHandler in interface Envpublic void buildStackTraceElements(List<StackTraceElement> stack, int depth)
EnvThrowable.getStackTrace().buildStackTraceElements in interface Envdepth - Maximum depth of stack trace to obtain.Copyright © 2011–2014. All rights reserved.