public class GlobalEnvironment extends Environment
Environment.AbstractFrameVarRef, Environment.FrameSlotVarRef, Environment.GlobalLexVarRef, Environment.GlobalVarRef, Environment.ImportBindingRef, Environment.VarRef, Environment.WrappedVarRef
ARGUMENTS_NAME, context, factory, NEW_TARGET_NAME, SUPER_NAME, THIS_NAME
Constructor and Description |
---|
GlobalEnvironment(Environment parent,
NodeFactory factory,
JSContext context) |
Modifier and Type | Method and Description |
---|---|
boolean |
addLexicalDeclaration(String name,
boolean isConst) |
boolean |
addVarDeclaration(String name) |
com.oracle.truffle.api.frame.FrameSlot |
findBlockFrameSlot(String name) |
FunctionEnvironment |
function() |
com.oracle.truffle.api.frame.FrameDescriptor |
getBlockFrameDescriptor() |
com.oracle.truffle.api.frame.FrameSlot[] |
getParentSlots() |
boolean |
hasConstDeclaration(String name) |
boolean |
hasLexicalDeclaration(String name) |
boolean |
hasVarDeclaration(String name) |
static boolean |
isGlobalObjectConstant(String name)
Returns true for always-defined immutable value properties of the global object.
|
addFrameSlotFromSymbol, addFrameSlotsFromSymbols, addFrameSlotsFromSymbols, createLocal, createLocal, createTempVar, declareLocalVar, declareVar, findArgumentsVar, findAsyncContextVar, findAsyncResultVar, findDynamicScopeVar, findInternalSlot, findInternalSlot, findLocalVar, findNewTargetVar, findSuperVar, findTempVar, findThisVar, findVar, findVar, findYieldValueVar, getFunctionFrameDescriptor, getParent, getParentSlots, getScopeLevel, getVariableEnvironment, hasLocalVar, isDynamicallyScoped, isDynamicScopeContext, isStrictMode
public GlobalEnvironment(Environment parent, NodeFactory factory, JSContext context)
public FunctionEnvironment function()
function
in class Environment
public com.oracle.truffle.api.frame.FrameSlot findBlockFrameSlot(String name)
findBlockFrameSlot
in class Environment
public com.oracle.truffle.api.frame.FrameDescriptor getBlockFrameDescriptor()
getBlockFrameDescriptor
in class Environment
public com.oracle.truffle.api.frame.FrameSlot[] getParentSlots()
getParentSlots
in class Environment
public boolean addLexicalDeclaration(String name, boolean isConst)
public boolean hasLexicalDeclaration(String name)
public boolean hasConstDeclaration(String name)
public boolean addVarDeclaration(String name)
public boolean hasVarDeclaration(String name)
public static boolean isGlobalObjectConstant(String name)