From fe26674752daa957b80da5e35798008f983560e8 Mon Sep 17 00:00:00 2001 From: Zoltan Herczeg Date: Thu, 12 Oct 2017 14:43:32 +0200 Subject: Support multiple primary functions in a single snapshot. (#1797) This patch adds an extension to snapshots which allows storing multiple position independent primary functions in a single snapshot data. A new application called jerry-snapshot is added to the project to manage snapshots. Currently the only option is merging snapshots. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com --- jerry-core/include/jerryscript-snapshot.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'jerry-core/include/jerryscript-snapshot.h') diff --git a/jerry-core/include/jerryscript-snapshot.h b/jerry-core/include/jerryscript-snapshot.h index 62aa8a8d..6dac088d 100644 --- a/jerry-core/include/jerryscript-snapshot.h +++ b/jerry-core/include/jerryscript-snapshot.h @@ -33,6 +33,10 @@ extern "C" size_t jerry_parse_and_save_snapshot (const jerry_char_t *source_p, size_t source_size, bool is_for_global, bool is_strict, uint32_t *buffer_p, size_t buffer_size); jerry_value_t jerry_exec_snapshot (const uint32_t *snapshot_p, size_t snapshot_size, bool copy_bytecode); +jerry_value_t jerry_exec_snapshot_at (const uint32_t *snapshot_p, size_t snapshot_size, + size_t func_index, bool copy_bytecode); +size_t jerry_merge_snapshots (const uint32_t **inp_buffers_p, size_t *inp_buffer_sizes_p, size_t number_of_snapshots, + uint32_t *out_buffer_p, size_t out_buffer_size, const char **error_p); size_t jerry_parse_and_save_literals (const jerry_char_t *source_p, size_t source_size, bool is_strict, uint32_t *buffer_p, size_t buffer_size, bool is_c_format); -- cgit v1.2.3