Improve the dumping of literals

* Guard `lit_dump_literals` with `JERRY_ENABLE_LOG` (both in source
  and in header).
* Change `printf`s to `JERRY_DLOG`.
* Make `lit_dump_literals` be called in `lit_finalize` (it was dead
  code).
* Remove its duplicate declaration from lit-literal.h

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
This commit is contained in:
Akos Kiss
2016-03-10 18:54:40 +01:00
parent c82caa7f3c
commit a9c77b49ee
4 changed files with 24 additions and 16 deletions
+5 -1
View File
@@ -1,4 +1,4 @@
/* Copyright 2015 Samsung Electronics Co., Ltd.
/* Copyright 2015-2016 Samsung Electronics Co., Ltd.
* Copyright 2016 University of Szeged.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,6 +37,10 @@ lit_init (void)
void
lit_finalize (void)
{
#ifdef JERRY_ENABLE_LOG
lit_dump_literals ();
#endif /* JERRY_ENABLE_LOG */
while (lit_storage)
{
lit_storage = lit_free_literal (lit_storage);