Remove not needed opcode-support.[c,h]
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "opcodes-support.h"
|
||||
|
||||
#define GETOP_DEF_0(a, name) \
|
||||
__opcode getop_##name (void) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
#define GETOP_DEF_1(a, name, field1) \
|
||||
__opcode getop_##name (T_IDX arg1) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
opdata.data.name.field1 = arg1; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
#define GETOP_DEF_2(a, name, field1, field2) \
|
||||
__opcode getop_##name (T_IDX arg1, T_IDX arg2) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
opdata.data.name.field1 = arg1; \
|
||||
opdata.data.name.field2 = arg2; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
#define GETOP_DEF_3(a, name, field1, field2, field3) \
|
||||
__opcode getop_##name (T_IDX arg1, T_IDX arg2, T_IDX arg3) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
opdata.data.name.field1 = arg1; \
|
||||
opdata.data.name.field2 = arg2; \
|
||||
opdata.data.name.field3 = arg3; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
OP_ARGS_LIST (GETOP_DEF)
|
||||
@@ -1,37 +0,0 @@
|
||||
/* Copyright 2014 Samsung Electronics Co., Ltd.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef OPCODES_SUPPORT_H
|
||||
#define OPCODES_SUPPORT_H
|
||||
|
||||
#include "opcodes.h"
|
||||
|
||||
#define GETOP_DECL_0(a, name) \
|
||||
__opcode getop_##name (void);
|
||||
|
||||
#define GETOP_DECL_1(a, name, arg1) \
|
||||
__opcode getop_##name (T_IDX);
|
||||
|
||||
#define GETOP_DECL_2(a, name, arg1, arg2) \
|
||||
__opcode getop_##name (T_IDX, T_IDX);
|
||||
|
||||
#define GETOP_DECL_3(a, name, arg1, arg2, arg3) \
|
||||
__opcode getop_##name (T_IDX, T_IDX, T_IDX);
|
||||
|
||||
|
||||
OP_ARGS_LIST (GETOP_DECL)
|
||||
|
||||
#endif /* OPCODES_SUPPORT_H */
|
||||
|
||||
@@ -1067,3 +1067,5 @@ opfunc_logical_and (OPCODE opdata, /**< operation data */
|
||||
|
||||
return ret_value;
|
||||
} /* opfunc_logical_and */
|
||||
|
||||
OP_ARGS_LIST (GETOP_DEF)
|
||||
|
||||
+64
-13
@@ -40,6 +40,19 @@
|
||||
|
||||
typedef uint16_t opcode_counter_t;
|
||||
|
||||
/**
|
||||
* Descriptor of assignment's second argument
|
||||
* that specifies type of third argument.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
OPCODE_ARG_TYPE_SIMPLE, /**< ecma_simple_value_t */
|
||||
OPCODE_ARG_TYPE_SMALLINT, /**< small integer: from -128 to 127 */
|
||||
OPCODE_ARG_TYPE_NUMBER, /**< index of number literal */
|
||||
OPCODE_ARG_TYPE_STRING, /**< index of string literal */
|
||||
OPCODE_ARG_TYPE_VARIABLE /**< index of variable name */
|
||||
} opcode_arg_type_operand;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
opcode_counter_t pos; /**< current opcode to execute */
|
||||
@@ -197,20 +210,58 @@ enum __opcode_idx
|
||||
|
||||
OP_LIST (OP_FUNC_DECL)
|
||||
|
||||
|
||||
typedef ecma_completion_value_t (*opfunc) (__opcode, __int_data *);
|
||||
|
||||
/**
|
||||
* Descriptor of assignment's second argument
|
||||
* that specifies type of third argument.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
OPCODE_ARG_TYPE_SIMPLE, /**< ecma_simple_value_t */
|
||||
OPCODE_ARG_TYPE_SMALLINT, /**< small integer: from -128 to 127 */
|
||||
OPCODE_ARG_TYPE_NUMBER, /**< index of number literal */
|
||||
OPCODE_ARG_TYPE_STRING, /**< index of string literal */
|
||||
OPCODE_ARG_TYPE_VARIABLE /**< index of variable name */
|
||||
} opcode_arg_type_operand;
|
||||
#define GETOP_DECL_0(a, name) \
|
||||
__opcode getop_##name (void);
|
||||
|
||||
#define GETOP_DECL_1(a, name, arg1) \
|
||||
__opcode getop_##name (T_IDX);
|
||||
|
||||
#define GETOP_DECL_2(a, name, arg1, arg2) \
|
||||
__opcode getop_##name (T_IDX, T_IDX);
|
||||
|
||||
#define GETOP_DECL_3(a, name, arg1, arg2, arg3) \
|
||||
__opcode getop_##name (T_IDX, T_IDX, T_IDX);
|
||||
|
||||
#define GETOP_DEF_0(a, name) \
|
||||
__opcode getop_##name (void) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
#define GETOP_DEF_1(a, name, field1) \
|
||||
__opcode getop_##name (T_IDX arg1) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
opdata.data.name.field1 = arg1; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
#define GETOP_DEF_2(a, name, field1, field2) \
|
||||
__opcode getop_##name (T_IDX arg1, T_IDX arg2) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
opdata.data.name.field1 = arg1; \
|
||||
opdata.data.name.field2 = arg2; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
#define GETOP_DEF_3(a, name, field1, field2, field3) \
|
||||
__opcode getop_##name (T_IDX arg1, T_IDX arg2, T_IDX arg3) \
|
||||
{ \
|
||||
__opcode opdata; \
|
||||
opdata.op_idx = __op__idx_##name; \
|
||||
opdata.data.name.field1 = arg1; \
|
||||
opdata.data.name.field2 = arg2; \
|
||||
opdata.data.name.field3 = arg3; \
|
||||
return opdata; \
|
||||
}
|
||||
|
||||
OP_ARGS_LIST (GETOP_DECL)
|
||||
|
||||
#endif /* OPCODES_H */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "jerry-libc.h"
|
||||
#include "lexer.h"
|
||||
#include "parser.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
#include "interpreter.h"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
#include "optimizer-passes.h"
|
||||
#include "jerry-libc.h"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "lexer.h"
|
||||
#include "parser.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
|
||||
#define MAX_STRINGS 100
|
||||
#define MAX_NUMS 25
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
#include "optimizer-passes.h"
|
||||
#include "jerry-libc.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "globals.h"
|
||||
#include "interpreter.h"
|
||||
#include "mem-allocator.h"
|
||||
#include "opcodes-support.h"
|
||||
#include "opcodes.h"
|
||||
#include "serializer.h"
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user