diff --git a/src/libcoreint/interpreter.c b/src/libcoreint/interpreter.c index d31899638..fbd0d710a 100644 --- a/src/libcoreint/interpreter.c +++ b/src/libcoreint/interpreter.c @@ -47,6 +47,8 @@ run_int (void) int_data.this_binding_p = NULL; int_data.lex_env_p = ecma_CreateLexicalEnvironment( NULL, ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE); + FIXME( Strict mode ); + int_data.is_strict = false; ecma_CompletionValue_t completion = run_int_from_pos( &int_data); diff --git a/src/libcoreint/interpreter.h b/src/libcoreint/interpreter.h index d778c3f5f..994a81acf 100644 --- a/src/libcoreint/interpreter.h +++ b/src/libcoreint/interpreter.h @@ -25,7 +25,7 @@ struct __int_data int pos; /**< current opcode to execute */ ecma_Object_t *this_binding_p; /**< this binding for current context */ ecma_Object_t *lex_env_p; /**< current lexical environment */ - int *root_op_addr; /**< pointer to first opcode saved */ + bool is_strict; /**< is current code execution mode strict? */ }; void init_int (const OPCODE* program_p); diff --git a/src/libcoreint/opcodes.c b/src/libcoreint/opcodes.c index f2910521f..d682786e7 100644 --- a/src/libcoreint/opcodes.c +++ b/src/libcoreint/opcodes.c @@ -214,9 +214,6 @@ opfunc_assignment (OPCODE opdata, /**< operation data */ const opcode_arg_type_operand type_value_right = opdata.data.assignment.type_value_right; const T_IDX src_val_descr = opdata.data.assignment.value_right; - // FIXME: - const bool is_strict = false; - int_data->pos++; ecma_Value_t right_value; @@ -250,7 +247,7 @@ opfunc_assignment (OPCODE opdata, /**< operation data */ src_reference = ecma_OpGetIdentifierReference( int_data->lex_env_p, src_variable_name.str_p, - is_strict); + int_data->is_strict); ecma_CompletionValue_t get_value_completion = ecma_op_get_value( &src_reference); @@ -303,10 +300,10 @@ opfunc_assignment (OPCODE opdata, /**< operation data */ dst_reference = ecma_OpGetIdentifierReference( int_data->lex_env_p, dst_variable_name.str_p, - is_strict); + int_data->is_strict); - // FIXME: Move magic strings to header file and make them ecma_Char_t[] - // FIXME: Replace strcmp with ecma_Char_t[] comparator + FIXME( Move magic strings to header file and make them ecma_Char_t[] ); + FIXME( Replace strcmp with ecma_Char_t[] comparator ); if ( dst_reference.is_strict && ( __strcmp( (char*)dst_reference.referenced_name_p, "eval") == 0 || __strcmp( (char*)dst_reference.referenced_name_p, "arguments") == 0 ) @@ -348,9 +345,10 @@ opfunc_var_decl(OPCODE opdata, /**< operation data */ if ( ecma_IsCompletionValueNormalFalse( ecma_OpHasBinding( int_data->lex_env_p, variable_name.str_p)) ) { + FIXME( Pass configurableBindings that is true if and only if current code is eval code ); ecma_OpCreateMutableBinding( int_data->lex_env_p, variable_name.str_p, - false); // FIXME: Pass configurableBindings + false); /* Skipping SetMutableBinding as we have already checked that there were not * any binding with specified name in current lexical environment