Removing m_ prefix from identifiers (m_ValueType -> ValueType, ...).
This commit is contained in:
@@ -39,16 +39,16 @@ ecma_abstract_equality_compare(ecma_Value_t x, /**< first operand */
|
||||
const bool is_x_undefined = ecma_IsValueUndefined( x);
|
||||
const bool is_x_null = ecma_IsValueNull( x);
|
||||
const bool is_x_boolean = ecma_IsValueBoolean( x);
|
||||
const bool is_x_number = ( x.m_ValueType == ECMA_TYPE_NUMBER );
|
||||
const bool is_x_string = ( x.m_ValueType == ECMA_TYPE_STRING );
|
||||
const bool is_x_object = ( x.m_ValueType == ECMA_TYPE_OBJECT );
|
||||
const bool is_x_number = ( x.ValueType == ECMA_TYPE_NUMBER );
|
||||
const bool is_x_string = ( x.ValueType == ECMA_TYPE_STRING );
|
||||
const bool is_x_object = ( x.ValueType == ECMA_TYPE_OBJECT );
|
||||
|
||||
const bool is_y_undefined = ecma_IsValueUndefined( y);
|
||||
const bool is_y_null = ecma_IsValueNull( y);
|
||||
const bool is_y_boolean = ecma_IsValueBoolean( y);
|
||||
const bool is_y_number = ( y.m_ValueType == ECMA_TYPE_NUMBER );
|
||||
const bool is_y_string = ( y.m_ValueType == ECMA_TYPE_STRING );
|
||||
const bool is_y_object = ( y.m_ValueType == ECMA_TYPE_OBJECT );
|
||||
const bool is_y_number = ( y.ValueType == ECMA_TYPE_NUMBER );
|
||||
const bool is_y_string = ( y.ValueType == ECMA_TYPE_STRING );
|
||||
const bool is_y_object = ( y.ValueType == ECMA_TYPE_OBJECT );
|
||||
|
||||
const bool is_types_equal = ( ( is_x_undefined && is_y_undefined )
|
||||
|| ( is_x_null && is_y_null )
|
||||
@@ -68,26 +68,26 @@ ecma_abstract_equality_compare(ecma_Value_t x, /**< first operand */
|
||||
return true;
|
||||
} else if ( is_x_number )
|
||||
{ // c.
|
||||
ecma_Number_t x_num = *(ecma_Number_t*)( ecma_GetPointer(x.m_Value) );
|
||||
ecma_Number_t y_num = *(ecma_Number_t*)( ecma_GetPointer(y.m_Value) );
|
||||
ecma_Number_t x_num = *(ecma_Number_t*)( ecma_GetPointer(x.Value) );
|
||||
ecma_Number_t y_num = *(ecma_Number_t*)( ecma_GetPointer(y.Value) );
|
||||
|
||||
TODO( Implement according to ECMA );
|
||||
|
||||
return (x_num == y_num);
|
||||
} else if ( is_x_string )
|
||||
{ // d.
|
||||
ecma_ArrayFirstChunk_t* x_str = (ecma_ArrayFirstChunk_t*)( ecma_GetPointer(x.m_Value) );
|
||||
ecma_ArrayFirstChunk_t* y_str = (ecma_ArrayFirstChunk_t*)( ecma_GetPointer(y.m_Value) );
|
||||
ecma_ArrayFirstChunk_t* x_str = (ecma_ArrayFirstChunk_t*)( ecma_GetPointer(x.Value) );
|
||||
ecma_ArrayFirstChunk_t* y_str = (ecma_ArrayFirstChunk_t*)( ecma_GetPointer(y.Value) );
|
||||
|
||||
return ecma_CompareEcmaStringToEcmaString( x_str, y_str);
|
||||
} else if ( is_x_boolean )
|
||||
{ // e.
|
||||
return ( x.m_Value == y.m_Value );
|
||||
return ( x.Value == y.Value );
|
||||
} else
|
||||
{ // f.
|
||||
JERRY_ASSERT( is_x_object );
|
||||
|
||||
return ( x.m_Value == y.m_Value );
|
||||
return ( x.Value == y.Value );
|
||||
}
|
||||
} else if ( ( is_x_null && is_y_undefined )
|
||||
|| ( is_x_undefined && is_y_null ) )
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
ecma_CompletionValue_t
|
||||
ecma_op_check_object_coercible( ecma_Value_t value) /**< ecma-value */
|
||||
{
|
||||
switch ( (ecma_Type_t)value.m_ValueType )
|
||||
switch ( (ecma_Type_t)value.ValueType )
|
||||
{
|
||||
case ECMA_TYPE_SIMPLE:
|
||||
{
|
||||
switch ( (ecma_SimpleValue_t)value.m_Value )
|
||||
switch ( (ecma_SimpleValue_t)value.Value )
|
||||
{
|
||||
case ECMA_SIMPLE_VALUE_UNDEFINED:
|
||||
case ECMA_SIMPLE_VALUE_NULL:
|
||||
@@ -95,7 +95,7 @@ ecma_op_check_object_coercible( ecma_Value_t value) /**< ecma-value */
|
||||
ecma_CompletionValue_t
|
||||
ecma_op_to_primitive( ecma_Value_t value) /**< ecma-value */
|
||||
{
|
||||
switch ( (ecma_Type_t)value.m_ValueType )
|
||||
switch ( (ecma_Type_t)value.ValueType )
|
||||
{
|
||||
case ECMA_TYPE_SIMPLE:
|
||||
case ECMA_TYPE_NUMBER:
|
||||
@@ -130,7 +130,7 @@ ecma_op_to_primitive( ecma_Value_t value) /**< ecma-value */
|
||||
ecma_CompletionValue_t
|
||||
ecma_op_to_number( ecma_Value_t value) /**< ecma-value */
|
||||
{
|
||||
switch ( (ecma_Type_t)value.m_ValueType )
|
||||
switch ( (ecma_Type_t)value.ValueType )
|
||||
{
|
||||
case ECMA_TYPE_NUMBER:
|
||||
{
|
||||
|
||||
@@ -43,10 +43,10 @@ ecma_op_get_value( ecma_Reference_t ref) /**< ECMA-reference */
|
||||
const ecma_Value_t base = ref.base;
|
||||
const bool is_unresolvable_reference = ecma_IsValueUndefined( base);
|
||||
const bool has_primitive_base = ( ecma_IsValueBoolean( base)
|
||||
|| base.m_ValueType == ECMA_TYPE_NUMBER
|
||||
|| base.m_ValueType == ECMA_TYPE_STRING );
|
||||
const bool has_object_base = ( base.m_ValueType == ECMA_TYPE_OBJECT
|
||||
&& !((ecma_Object_t*)ecma_GetPointer(base.m_Value))->m_IsLexicalEnvironment );
|
||||
|| base.ValueType == ECMA_TYPE_NUMBER
|
||||
|| base.ValueType == ECMA_TYPE_STRING );
|
||||
const bool has_object_base = ( base.ValueType == ECMA_TYPE_OBJECT
|
||||
&& !((ecma_Object_t*)ecma_GetPointer(base.Value))->IsLexicalEnvironment );
|
||||
const bool is_property_reference = has_primitive_base || has_object_base;
|
||||
|
||||
// GetValue_3
|
||||
@@ -60,8 +60,8 @@ ecma_op_get_value( ecma_Reference_t ref) /**< ECMA-reference */
|
||||
{
|
||||
if ( !has_primitive_base ) // GetValue_4.a
|
||||
{
|
||||
ecma_Object_t *obj_p = ecma_GetPointer( base.m_Value);
|
||||
JERRY_ASSERT( obj_p != NULL && !obj_p->m_IsLexicalEnvironment );
|
||||
ecma_Object_t *obj_p = ecma_GetPointer( base.Value);
|
||||
JERRY_ASSERT( obj_p != NULL && !obj_p->IsLexicalEnvironment );
|
||||
|
||||
// GetValue_4.b case 1
|
||||
/* return [[Get]]( base as this, ref.referenced_name_p) */
|
||||
@@ -70,18 +70,18 @@ ecma_op_get_value( ecma_Reference_t ref) /**< ECMA-reference */
|
||||
{ // GetValue_4.b case 2
|
||||
/*
|
||||
ecma_Object_t *obj_p = ecma_ToObject( base);
|
||||
JERRY_ASSERT( obj_p != NULL && !obj_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( obj_p != NULL && !obj_p->IsLexicalEnvironment );
|
||||
ecma_Property_t *property = obj_p->[[GetProperty]]( ref.referenced_name_p);
|
||||
if ( property->m_Type == ECMA_PROPERTY_NAMEDDATA )
|
||||
if ( property->Type == ECMA_PROPERTY_NAMEDDATA )
|
||||
{
|
||||
return ecma_MakeCompletionValue( ECMA_COMPLETION_TYPE_NORMAL,
|
||||
ecma_CopyValue( property->u.m_NamedDataProperty.m_Value),
|
||||
ecma_CopyValue( property->u.NamedDataProperty.Value),
|
||||
ECMA_TARGET_ID_RESERVED);
|
||||
} else
|
||||
{
|
||||
JERRY_ASSERT( property->m_Type == ECMA_PROPERTY_NAMEDACCESSOR );
|
||||
JERRY_ASSERT( property->Type == ECMA_PROPERTY_NAMEDACCESSOR );
|
||||
|
||||
ecma_Object_t *getter = ecma_GetPointer( property->u.m_NamedAccessorProperty.m_pGet);
|
||||
ecma_Object_t *getter = ecma_GetPointer( property->u.NamedAccessorProperty.pGet);
|
||||
|
||||
if ( getter == NULL )
|
||||
{
|
||||
@@ -99,9 +99,9 @@ ecma_op_get_value( ecma_Reference_t ref) /**< ECMA-reference */
|
||||
} else
|
||||
{
|
||||
// GetValue_5
|
||||
ecma_Object_t *lex_env_p = ecma_GetPointer( base.m_Value);
|
||||
ecma_Object_t *lex_env_p = ecma_GetPointer( base.Value);
|
||||
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
|
||||
return ecma_OpGetBindingValue( lex_env_p, ref.referenced_name_p, ref.is_strict);
|
||||
}
|
||||
@@ -122,10 +122,10 @@ ecma_op_put_value(ecma_Reference_t ref, /**< ECMA-reference */
|
||||
const ecma_Value_t base = ref.base;
|
||||
const bool is_unresolvable_reference = ecma_IsValueUndefined( base);
|
||||
const bool has_primitive_base = ( ecma_IsValueBoolean( base)
|
||||
|| base.m_ValueType == ECMA_TYPE_NUMBER
|
||||
|| base.m_ValueType == ECMA_TYPE_STRING );
|
||||
const bool has_object_base = ( base.m_ValueType == ECMA_TYPE_OBJECT
|
||||
&& !((ecma_Object_t*)ecma_GetPointer(base.m_Value))->m_IsLexicalEnvironment );
|
||||
|| base.ValueType == ECMA_TYPE_NUMBER
|
||||
|| base.ValueType == ECMA_TYPE_STRING );
|
||||
const bool has_object_base = ( base.ValueType == ECMA_TYPE_OBJECT
|
||||
&& !((ecma_Object_t*)ecma_GetPointer(base.Value))->IsLexicalEnvironment );
|
||||
const bool is_property_reference = has_primitive_base || has_object_base;
|
||||
|
||||
if ( is_unresolvable_reference ) // PutValue_3
|
||||
@@ -158,7 +158,7 @@ ecma_op_put_value(ecma_Reference_t ref, /**< ECMA-reference */
|
||||
/*
|
||||
// PutValue_sub_1
|
||||
ecma_Object_t *obj_p = ecma_ToObject( base);
|
||||
JERRY_ASSERT( obj_p != NULL && !obj_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( obj_p != NULL && !obj_p->IsLexicalEnvironment );
|
||||
|
||||
// PutValue_sub_2
|
||||
if ( !obj_p->[[CanPut]]( ref.referenced_name_p) )
|
||||
@@ -200,7 +200,7 @@ ecma_op_put_value(ecma_Reference_t ref, /**< ECMA-reference */
|
||||
if ( ecma_OpIsAccessorDescriptor( prop) )
|
||||
{
|
||||
// PutValue_sub_6.a
|
||||
ecma_Object_t *setter = ecma_GetPointer( property->u.m_NamedAccessorProperty.m_pSet);
|
||||
ecma_Object_t *setter = ecma_GetPointer( property->u.NamedAccessorProperty.pSet);
|
||||
JERRY_ASSERT( setter != NULL );
|
||||
|
||||
// PutValue_sub_6.b
|
||||
@@ -225,9 +225,9 @@ ecma_op_put_value(ecma_Reference_t ref, /**< ECMA-reference */
|
||||
} else
|
||||
{
|
||||
// PutValue_7
|
||||
ecma_Object_t *lex_env_p = ecma_GetPointer( base.m_Value);
|
||||
ecma_Object_t *lex_env_p = ecma_GetPointer( base.Value);
|
||||
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
|
||||
return ecma_OpSetMutableBinding( lex_env_p, ref.referenced_name_p, value, ref.is_strict);
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@ ecma_CompletionValue_t
|
||||
ecma_OpHasBinding(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_Char_t *name_p) /**< argument N */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
|
||||
ecma_SimpleValue_t has_binding = ECMA_SIMPLE_VALUE_UNDEFINED;
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
@@ -81,10 +81,10 @@ ecma_OpCreateMutableBinding(ecma_Object_t *lex_env_p, /**< lexical environment *
|
||||
ecma_Char_t *name_p, /**< argument N */
|
||||
bool is_deletable) /**< argument D */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
JERRY_ASSERT( name_p != NULL );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
@@ -125,21 +125,21 @@ ecma_OpSetMutableBinding(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_Value_t value, /**< argument V */
|
||||
bool is_strict) /**< argument S */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
JERRY_ASSERT( name_p != NULL );
|
||||
|
||||
JERRY_ASSERT( ecma_IsCompletionValueNormalTrue( ecma_OpHasBinding( lex_env_p, name_p)) );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
ecma_Property_t *property_p = ecma_GetNamedDataProperty( lex_env_p, name_p);
|
||||
|
||||
if ( property_p->u.m_NamedDataProperty.m_Writable == ECMA_PROPERTY_WRITABLE )
|
||||
if ( property_p->u.NamedDataProperty.Writable == ECMA_PROPERTY_WRITABLE )
|
||||
{
|
||||
ecma_FreeValue( property_p->u.m_NamedDataProperty.m_Value);
|
||||
property_p->u.m_NamedDataProperty.m_Value = ecma_CopyValue( value);
|
||||
ecma_FreeValue( property_p->u.NamedDataProperty.Value);
|
||||
property_p->u.NamedDataProperty.Value = ecma_CopyValue( value);
|
||||
} else if ( is_strict )
|
||||
{
|
||||
return ecma_MakeThrowValue( ecma_NewStandardError( ECMA_ERROR_TYPE));
|
||||
@@ -171,27 +171,27 @@ ecma_OpGetBindingValue(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_Char_t *name_p, /**< argument N */
|
||||
bool is_strict) /**< argument S */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
JERRY_ASSERT( name_p != NULL );
|
||||
|
||||
JERRY_ASSERT( ecma_IsCompletionValueNormalTrue( ecma_OpHasBinding( lex_env_p, name_p)) );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
ecma_Property_t *property_p = ecma_GetNamedDataProperty( lex_env_p, name_p);
|
||||
|
||||
ecma_Value_t prop_value = property_p->u.m_NamedDataProperty.m_Value;
|
||||
ecma_Value_t prop_value = property_p->u.NamedDataProperty.Value;
|
||||
|
||||
/* is the binding mutable? */
|
||||
if ( property_p->u.m_NamedDataProperty.m_Writable == ECMA_PROPERTY_WRITABLE )
|
||||
if ( property_p->u.NamedDataProperty.Writable == ECMA_PROPERTY_WRITABLE )
|
||||
{
|
||||
return ecma_MakeCompletionValue( ECMA_COMPLETION_TYPE_NORMAL,
|
||||
ecma_CopyValue( prop_value),
|
||||
ECMA_TARGET_ID_RESERVED);
|
||||
} else if ( prop_value.m_ValueType == ECMA_TYPE_SIMPLE
|
||||
&& prop_value.m_Value == ECMA_SIMPLE_VALUE_EMPTY )
|
||||
} else if ( prop_value.ValueType == ECMA_TYPE_SIMPLE
|
||||
&& prop_value.Value == ECMA_SIMPLE_VALUE_EMPTY )
|
||||
{
|
||||
/* unitialized immutable binding */
|
||||
if ( is_strict )
|
||||
@@ -229,10 +229,10 @@ ecma_CompletionValue_t
|
||||
ecma_OpDeleteBinding(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_Char_t *name_p) /**< argument N */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
JERRY_ASSERT( name_p != NULL );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
@@ -244,9 +244,9 @@ ecma_OpDeleteBinding(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ret_val = ECMA_SIMPLE_VALUE_TRUE;
|
||||
} else
|
||||
{
|
||||
JERRY_ASSERT( prop_p->m_Type == ECMA_PROPERTY_NAMEDDATA );
|
||||
JERRY_ASSERT( prop_p->Type == ECMA_PROPERTY_NAMEDDATA );
|
||||
|
||||
if ( prop_p->u.m_NamedDataProperty.m_Configurable == ECMA_PROPERTY_NOT_CONFIGURABLE )
|
||||
if ( prop_p->u.NamedDataProperty.Configurable == ECMA_PROPERTY_NOT_CONFIGURABLE )
|
||||
{
|
||||
ret_val = ECMA_SIMPLE_VALUE_FALSE;
|
||||
} else
|
||||
@@ -281,9 +281,9 @@ ecma_OpDeleteBinding(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_CompletionValue_t
|
||||
ecma_OpImplicitThisValue( ecma_Object_t *lex_env_p) /**< lexical environment */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
@@ -309,9 +309,9 @@ void
|
||||
ecma_OpCreateImmutableBinding(ecma_Object_t *lex_env_p, /**< lexical environment */
|
||||
ecma_Char_t *name_p) /**< argument N */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
@@ -327,9 +327,9 @@ ecma_OpCreateImmutableBinding(ecma_Object_t *lex_env_p, /**< lexical environment
|
||||
ECMA_PROPERTY_NOT_ENUMERABLE,
|
||||
ECMA_PROPERTY_NOT_CONFIGURABLE);
|
||||
|
||||
JERRY_ASSERT( prop_p->u.m_NamedDataProperty.m_Value.m_ValueType == ECMA_TYPE_SIMPLE );
|
||||
JERRY_ASSERT( prop_p->u.NamedDataProperty.Value.ValueType == ECMA_TYPE_SIMPLE );
|
||||
|
||||
prop_p->u.m_NamedDataProperty.m_Value.m_Value = ECMA_SIMPLE_VALUE_EMPTY;
|
||||
prop_p->u.NamedDataProperty.Value.Value = ECMA_SIMPLE_VALUE_EMPTY;
|
||||
}
|
||||
case ECMA_LEXICAL_ENVIRONMENT_OBJECTBOUND:
|
||||
{
|
||||
@@ -350,9 +350,9 @@ ecma_OpInitializeImmutableBinding(ecma_Object_t *lex_env_p, /**< lexical environ
|
||||
ecma_Char_t *name_p, /**< argument N */
|
||||
ecma_Value_t value) /**< argument V */
|
||||
{
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->m_IsLexicalEnvironment );
|
||||
JERRY_ASSERT( lex_env_p != NULL && lex_env_p->IsLexicalEnvironment );
|
||||
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.m_LexicalEnvironment.m_Type )
|
||||
switch ( (ecma_LexicalEnvironmentType_t) lex_env_p->u.LexicalEnvironment.Type )
|
||||
{
|
||||
case ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE:
|
||||
{
|
||||
@@ -361,11 +361,11 @@ ecma_OpInitializeImmutableBinding(ecma_Object_t *lex_env_p, /**< lexical environ
|
||||
ecma_Property_t *prop_p = ecma_GetNamedDataProperty( lex_env_p, name_p);
|
||||
|
||||
/* The binding must be unitialized immutable binding */
|
||||
JERRY_ASSERT( prop_p->u.m_NamedDataProperty.m_Writable == ECMA_PROPERTY_NOT_WRITABLE
|
||||
&& prop_p->u.m_NamedDataProperty.m_Value.m_ValueType == ECMA_TYPE_SIMPLE
|
||||
&& prop_p->u.m_NamedDataProperty.m_Value.m_Value == ECMA_SIMPLE_VALUE_EMPTY );
|
||||
JERRY_ASSERT( prop_p->u.NamedDataProperty.Writable == ECMA_PROPERTY_NOT_WRITABLE
|
||||
&& prop_p->u.NamedDataProperty.Value.ValueType == ECMA_TYPE_SIMPLE
|
||||
&& prop_p->u.NamedDataProperty.Value.Value == ECMA_SIMPLE_VALUE_EMPTY );
|
||||
|
||||
prop_p->u.m_NamedDataProperty.m_Value = ecma_CopyValue( value);
|
||||
prop_p->u.NamedDataProperty.Value = ecma_CopyValue( value);
|
||||
}
|
||||
case ECMA_LEXICAL_ENVIRONMENT_OBJECTBOUND:
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ ecma_OpGetIdentifierReference(ecma_Object_t *lex_env_p, /**< lexical environment
|
||||
JERRY_ASSERT( ecma_IsCompletionValueNormalFalse( completion_value) );
|
||||
}
|
||||
|
||||
lex_env_iter_p = ecma_GetPointer( lex_env_iter_p->u.m_LexicalEnvironment.m_pOuterReference);
|
||||
lex_env_iter_p = ecma_GetPointer( lex_env_iter_p->u.LexicalEnvironment.pOuterReference);
|
||||
}
|
||||
|
||||
return ecma_MakeReference( ecma_MakeSimpleValue( ECMA_SIMPLE_VALUE_UNDEFINED),
|
||||
|
||||
Reference in New Issue
Block a user