From a61d31e9bf9a7ae25aee7b6722e82729a8a96412 Mon Sep 17 00:00:00 2001 From: "e.gavrin" Date: Wed, 16 Jul 2014 23:20:27 +0400 Subject: [PATCH] fix style error: Variable xxx hides enumerator with same name --- src/libcoreint/interpreter.c | 2 +- src/libcoreint/opcode-structures.h | 8 ++++---- src/libcoreint/opcodes.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libcoreint/interpreter.c b/src/libcoreint/interpreter.c index ed91ba3a4..5652ebd30 100644 --- a/src/libcoreint/interpreter.c +++ b/src/libcoreint/interpreter.c @@ -18,7 +18,7 @@ void init_int (void) { -#define INIT_OP_FUNC(name) __opfuncs[ name ] = opfunc_##name ; +#define INIT_OP_FUNC(name) __opfuncs[ __op__idx_##name ] = opfunc_##name ; JERRY_STATIC_ASSERT (sizeof (OPCODE) <= 4); OP_LIST (INIT_OP_FUNC) diff --git a/src/libcoreint/opcode-structures.h b/src/libcoreint/opcode-structures.h index b6f48c129..a745e1d4f 100644 --- a/src/libcoreint/opcode-structures.h +++ b/src/libcoreint/opcode-structures.h @@ -43,14 +43,14 @@ #define GETOP_IMPL_0(name) \ OPCODE getop_##name () { \ OPCODE opdata; \ - opdata.op_idx = name; \ + opdata.op_idx = __op__idx_##name; \ return opdata; \ } #define GETOP_IMPL_1(name, field1) \ OPCODE getop_##name (T_IDX arg1) { \ OPCODE opdata; \ - opdata.op_idx = name; \ + opdata.op_idx = __op__idx_##name; \ opdata.data.name.field1 = arg1; \ return opdata; \ } @@ -58,7 +58,7 @@ #define GETOP_IMPL_2(name, field1, field2) \ OPCODE getop_##name (T_IDX arg1, T_IDX arg2) { \ OPCODE opdata; \ - opdata.op_idx = name; \ + opdata.op_idx = __op__idx_##name; \ opdata.data.name.field1 = arg1; \ opdata.data.name.field2 = arg2; \ return opdata; \ @@ -67,7 +67,7 @@ #define GETOP_IMPL_3(name, field1, field2, field3) \ OPCODE getop_##name (T_IDX arg1, T_IDX arg2, T_IDX arg3) { \ OPCODE opdata; \ - opdata.op_idx = name; \ + opdata.op_idx = __op__idx_##name; \ opdata.data.name.field1 = arg1; \ opdata.data.name.field2 = arg2; \ opdata.data.name.field3 = arg3; \ diff --git a/src/libcoreint/opcodes.h b/src/libcoreint/opcodes.h index 646b3854f..1a303ee89 100644 --- a/src/libcoreint/opcodes.h +++ b/src/libcoreint/opcodes.h @@ -22,7 +22,7 @@ struct __int_data; #define OP_STRUCT_FIELD(name) struct __op_##name name; -#define OP_ENUM_FIELD(name) name , +#define OP_ENUM_FIELD(name) __op__idx_##name , #define OP_FUNC_DECL(name) void opfunc_##name (OPCODE, struct __int_data *); /** A single bytecode instruction is 32bit wide and has an 8bit opcode field