Move all remaining globals to the global context.

Zero out all globals (and remove unnecessary init() functions).
Move snapshot globals to a temporary stack variable.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-08-01 04:25:32 -07:00
parent b14ca4e248
commit d1b0b58729
18 changed files with 200 additions and 290 deletions
-13
View File
@@ -160,19 +160,6 @@ ecma_deref_object (ecma_object_t *object_p) /**< object */
object_p->type_flags_refs = (uint16_t) (object_p->type_flags_refs - ECMA_OBJECT_REF_ONE);
} /* ecma_deref_object */
/**
* Initialize garbage collector
*/
void
ecma_gc_init (void)
{
JERRY_CONTEXT (ecma_gc_objects_lists) [ECMA_GC_COLOR_WHITE_GRAY] = NULL;
JERRY_CONTEXT (ecma_gc_objects_lists) [ECMA_GC_COLOR_BLACK] = NULL;
JERRY_CONTEXT (ecma_gc_visited_flip_flag) = false;
JERRY_CONTEXT (ecma_gc_objects_number) = 0;
JERRY_CONTEXT (ecma_gc_new_objects) = 0;
} /* ecma_gc_init */
/**
* Mark referenced object from property
*/