Always define debugger-related opcodes (#1734)

This change makes the generated snapshot independent from buildconfig.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
This commit is contained in:
Zsolt Borbély
2017-04-18 11:20:20 +02:00
committed by yichoi
parent 0f4edbe580
commit 5449b0f40b
2 changed files with 5 additions and 16 deletions
+1 -1
View File
@@ -36,6 +36,6 @@ typedef struct
/** /**
* Jerry snapshot format version * Jerry snapshot format version
*/ */
#define JERRY_SNAPSHOT_VERSION (6u) #define JERRY_SNAPSHOT_VERSION (7u)
#endif /* !JERRY_SNAPSHOT_H */ #endif /* !JERRY_SNAPSHOT_H */
+4 -15
View File
@@ -206,20 +206,6 @@
/* PARSER_TRY_CONTEXT_STACK_ALLOCATION must be <= 3 */ /* PARSER_TRY_CONTEXT_STACK_ALLOCATION must be <= 3 */
#define PARSER_TRY_CONTEXT_STACK_ALLOCATION 2 #define PARSER_TRY_CONTEXT_STACK_ALLOCATION 2
#ifdef JERRY_DEBUGGER
#define CBC_BREAKPOINT_OPCODES \
CBC_OPCODE (CBC_BREAKPOINT_ENABLED, CBC_NO_FLAG, 0, \
VM_OC_BREAKPOINT_ENABLED) \
CBC_OPCODE (CBC_BREAKPOINT_DISABLED, CBC_NO_FLAG, 0, \
VM_OC_BREAKPOINT_DISABLED) \
#else /* !JERRY_DEBUGGER */
#define CBC_BREAKPOINT_OPCODES
#endif /* JERRY_DEBUGGER */
/** /**
* Opcode definitions. * Opcode definitions.
*/ */
@@ -331,7 +317,10 @@
VM_OC_RET) \ VM_OC_RET) \
CBC_OPCODE (CBC_RETURN_WITH_LITERAL, CBC_HAS_LITERAL_ARG, 0, \ CBC_OPCODE (CBC_RETURN_WITH_LITERAL, CBC_HAS_LITERAL_ARG, 0, \
VM_OC_RET | VM_OC_GET_LITERAL) \ VM_OC_RET | VM_OC_GET_LITERAL) \
CBC_BREAKPOINT_OPCODES \ CBC_OPCODE (CBC_BREAKPOINT_ENABLED, CBC_NO_FLAG, 0, \
VM_OC_BREAKPOINT_ENABLED) \
CBC_OPCODE (CBC_BREAKPOINT_DISABLED, CBC_NO_FLAG, 0, \
VM_OC_BREAKPOINT_DISABLED) \
\ \
/* Unary opcodes. */ \ /* Unary opcodes. */ \
CBC_UNARY_OPERATION (CBC_PLUS, \ CBC_UNARY_OPERATION (CBC_PLUS, \