Partial implementation of function call routine ([[Call]]).

This commit is contained in:
Ruben Ayrapetyan
2014-07-30 20:34:04 +04:00
parent 221fb47a77
commit e540590ddd
6 changed files with 161 additions and 10 deletions
+4 -4
View File
@@ -47,14 +47,14 @@ run_int (void)
JERRY_ASSERT( __program != NULL );
const interp_bytecode_idx start_pos = 0;
ecma_object_t *this_binding_p = NULL;
ecma_value_t this_binding_value = ecma_make_simple_value( ECMA_SIMPLE_VALUE_UNDEFINED);
ecma_object_t *lex_env_p = ecma_create_lexical_environment (NULL,
ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);
FIXME( Strict mode );
const bool is_strict = false;
ecma_completion_value_t completion = run_int_from_pos (start_pos,
this_binding_p,
this_binding_value,
lex_env_p,
is_strict);
@@ -89,7 +89,7 @@ run_int (void)
ecma_completion_value_t
run_int_from_pos (interp_bytecode_idx start_pos,
ecma_object_t *this_binding_p,
ecma_value_t this_binding_value,
ecma_object_t *lex_env_p,
bool is_strict)
{
@@ -112,7 +112,7 @@ run_int_from_pos (interp_bytecode_idx start_pos,
struct __int_data int_data;
int_data.pos = (interp_bytecode_idx) (start_pos + 1);
int_data.this_binding_p = this_binding_p;
int_data.this_binding = this_binding_value;
int_data.lex_env_p = lex_env_p;
int_data.is_strict = is_strict;
int_data.min_reg_num = min_reg_num;
+2 -2
View File
@@ -25,7 +25,7 @@ typedef uint16_t interp_bytecode_idx;
struct __int_data
{
interp_bytecode_idx pos; /**< current opcode to execute */
ecma_object_t *this_binding_p; /**< this binding for current context */
ecma_value_t this_binding; /**< this binding for current context */
ecma_object_t *lex_env_p; /**< current lexical environment */
bool is_strict; /**< is current code execution mode strict? */
T_IDX min_reg_num; /**< minimum idx used for register identification */
@@ -36,7 +36,7 @@ struct __int_data
void init_int (const OPCODE* program_p);
bool run_int (void);
ecma_completion_value_t run_int_from_pos (interp_bytecode_idx start_pos,
ecma_object_t *this_binding_p,
ecma_value_t this_binding_value,
ecma_object_t *lex_env_p,
bool is_strict);
+1 -1
View File
@@ -1397,7 +1397,7 @@ opfunc_call_0( OPCODE opdata, /**< operation data */
ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE);
ret_value = run_int_from_pos( code_idx,
NULL,
ecma_make_simple_value( ECMA_SIMPLE_VALUE_UNDEFINED),
new_lex_env_p,
false);