From c6a41c167e5f98be863bd02878af07d0068ad9e4 Mon Sep 17 00:00:00 2001 From: "e.gavrin" Date: Thu, 21 Aug 2014 17:28:28 +0400 Subject: [PATCH] Add native_call opcode. --- src/libcoreint/opcode-structures.h | 6 ++++++ src/libcoreint/opcodes.c | 2 ++ src/libcoreint/opcodes.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/libcoreint/opcode-structures.h b/src/libcoreint/opcode-structures.h index f6e7f1434..d7ea1b184 100644 --- a/src/libcoreint/opcode-structures.h +++ b/src/libcoreint/opcode-structures.h @@ -307,6 +307,12 @@ OP_CODE_DECL (call_n, T_IDX_IDX_IDX, name_lit_idx, arg1_lit_idx) +/** lhs = name (arg_list) */ +OP_CODE_DECL (native_call, T_IDX_IDX_IDX, + lhs, + name, + arg_list) + /** a = new name (arg_list */ OP_CODE_DECL (construct_decl, T_IDX_IDX_IDX, lhs, diff --git a/src/libcoreint/opcodes.c b/src/libcoreint/opcodes.c index 1ae013a33..82c592e3d 100644 --- a/src/libcoreint/opcodes.c +++ b/src/libcoreint/opcodes.c @@ -428,6 +428,7 @@ do_number_bitwise_logic (struct __int_data *int_data, /**< interpreter context * #define OP_UNIMPLEMENTED_LIST(op) \ op (call_n) \ + op (native_call) \ op (func_decl_n) \ op (varg_list) \ op (retval) \ @@ -2032,6 +2033,7 @@ GETOP_IMPL_3 (assignment, var_left, type_value_right, value_right) GETOP_IMPL_2 (call_0, lhs, name_lit_idx) GETOP_IMPL_3 (call_1, lhs, name_lit_idx, arg1_lit_idx) GETOP_IMPL_3 (call_n, lhs, name_lit_idx, arg1_lit_idx) +GETOP_IMPL_3 (native_call, lhs, name, arg_list) GETOP_IMPL_2 (func_decl_1, name_lit_idx, arg1_lit_idx) GETOP_IMPL_3 (func_decl_2, name_lit_idx, arg1_lit_idx, arg2_lit_idx) GETOP_IMPL_3 (func_decl_n, name_lit_idx, arg1_lit_idx, arg2_lit_idx) diff --git a/src/libcoreint/opcodes.h b/src/libcoreint/opcodes.h index e14ec0ee3..4e911725c 100644 --- a/src/libcoreint/opcodes.h +++ b/src/libcoreint/opcodes.h @@ -40,6 +40,7 @@ ecma_completion_value_t (*opfunc) (OPCODE, struct __int_data *); op (call_0) \ op (call_1) \ op (call_n) \ + op (native_call) \ op (construct_decl) \ op (func_decl_0) \ op (func_decl_1) \