Struct boa::environment::function_environment_record::FunctionEnvironmentRecord [−][src]
pub struct FunctionEnvironmentRecord {
pub declarative_record: DeclarativeEnvironmentRecord,
pub this_value: JsValue,
pub this_binding_status: BindingStatus,
pub function: JsObject,
pub home_object: JsValue,
pub new_target: JsValue,
}Expand description
Fields
declarative_record: DeclarativeEnvironmentRecordthis_value: JsValueThis is the this value used for this invocation of the function.
this_binding_status: BindingStatusIf the value is “lexical”, this is an ArrowFunction and does not have a local this value.
function: JsObjectThe function object whose invocation caused this Environment Record to be created.
home_object: JsValueIf the associated function has super property accesses and is not an ArrowFunction,
[[HomeObject]] is the object that the function is bound to as a method.
The default value for [[HomeObject]] is undefined.
new_target: JsValueIf this Environment Record was created by the [[Construct]] internal method,
[[NewTarget]] is the value of the [[Construct]] newTarget parameter.
Otherwise, its value is undefined.
Implementations
pub fn new(
f: JsObject,
this: Option<JsValue>,
outer: Option<Environment>,
binding_status: BindingStatus,
new_target: JsValue,
context: &mut Context
) -> JsResult<FunctionEnvironmentRecord>
Trait Implementations
Determine if an Environment Record has a binding for the String value N. Return true if it does and false if it does not. Read more
Create a new but uninitialized mutable binding in an Environment Record. The String value N is the text of the bound name. If the Boolean argument deletion is true the binding may be subsequently deleted. Read more
Create a new but uninitialized immutable binding in an Environment Record. The String value N is the text of the bound name. If strict is true then attempts to set it after it has been initialized will always throw an exception, regardless of the strict mode setting of operations that reference that binding. Read more
Set the value of an already existing but uninitialized binding in an Environment Record. The String value N is the text of the bound name. V is the value for the binding and is a value of any ECMAScript language type. Read more
Set the value of an already existing mutable binding in an Environment Record.
The String value name is the text of the bound name.
value is the value for the binding and may be a value of any ECMAScript language type. S is a Boolean flag.
If strict is true and the binding cannot be set throw a TypeError exception. Read more
Returns the value of an already existing binding from an Environment Record. The String value N is the text of the bound name. S is used to identify references originating in strict mode code or that otherwise require strict mode reference semantics. Read more
Delete a binding from an Environment Record. The String value name is the text of the bound name. If a binding for name exists, remove the binding and return true. If the binding exists but cannot be removed return false. If the binding does not exist return true. Read more
If this Environment Record is associated with a with statement, return the with object. Otherwise, return None. Read more
Get the next environment up
Set the next environment up
Get the type of environment this is
fn recursive_create_mutable_binding(
&self,
name: &str,
deletion: bool,
_scope: VariableScope,
context: &mut Context
) -> JsResult<()>
fn recursive_create_mutable_binding(
&self,
name: &str,
deletion: bool,
_scope: VariableScope,
context: &mut Context
) -> JsResult<()>
Create mutable binding while handling outer environments
fn recursive_create_immutable_binding(
&self,
name: &str,
deletion: bool,
_scope: VariableScope,
context: &mut Context
) -> JsResult<()>
fn recursive_create_immutable_binding(
&self,
name: &str,
deletion: bool,
_scope: VariableScope,
context: &mut Context
) -> JsResult<()>
Create immutable binding while handling outer environments
Return the this binding from the environment or try to get it from outer environments
Set mutable binding while handling outer environments
Initialize binding while handling outer environments
Check if a binding exists in current or any outer environment
Performs the conversion.
Runs Finalize::finalize() on this object and all contained subobjects Read more
Auto Trait Implementations
impl !RefUnwindSafe for FunctionEnvironmentRecord
impl !Send for FunctionEnvironmentRecord
impl !Sync for FunctionEnvironmentRecord
impl Unpin for FunctionEnvironmentRecord
impl !UnwindSafe for FunctionEnvironmentRecord
Blanket Implementations
Mutably borrows from an owned value. Read more