Add vm_finalize() to clean program pointer for embed systems

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
This commit is contained in:
SaeHie Park 2015-06-08 08:34:11 +09:00
parent 55b43071d1
commit 603fa56acf
3 changed files with 11 additions and 0 deletions

View File

@ -1171,6 +1171,7 @@ jerry_cleanup (void)
ecma_finalize ();
serializer_free ();
mem_finalize (is_show_mem_stats);
vm_finalize ();
} /* jerry_cleanup */
/**

View File

@ -350,6 +350,15 @@ vm_init (const opcode_t *program_p, /**< pointer to byte-code program */
__program = program_p;
} /* vm_init */
/**
* Cleanup interpreter
*/
void
vm_finalize (void)
{
__program = NULL;
} /* vm_finalize */
/**
* Run global code
*/

View File

@ -21,6 +21,7 @@
#include "opcodes.h"
extern void vm_init (const opcode_t* program_p, bool dump_mem_stats);
extern void vm_finalize (void);
extern jerry_completion_code_t vm_run_global (void);
extern ecma_completion_value_t vm_loop (int_data_t *int_data, vm_run_scope_t *run_scope_p);
extern ecma_completion_value_t vm_run_from_pos (opcode_counter_t start_pos,