Support byte code dump when snapshot is executed. (#4327)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-11-16 12:17:41 +01:00
committed by GitHub
parent 81702ff5ea
commit 640a7d33b3
6 changed files with 401 additions and 389 deletions
+8
View File
@@ -24,6 +24,7 @@
#include "jerry-snapshot.h"
#include "js-parser.h"
#include "lit-char-helpers.h"
#include "js-parser-internal.h"
#include "re-compiler.h"
#if ENABLED (JERRY_SNAPSHOT_SAVE) || ENABLED (JERRY_SNAPSHOT_EXEC)
@@ -991,6 +992,13 @@ jerry_snapshot_result (const uint32_t *snapshot_p, /**< snapshot */
}
}
#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
if (JERRY_CONTEXT (jerry_init_flags) & ECMA_INIT_SHOW_OPCODES)
{
util_print_cbc (bytecode_p);
}
#endif /* ENABLED (JERRY_PARSER_DUMP_BYTE_CODE) */
ecma_value_t ret_val;
if (as_function)