Skip to content

Introduce JERRY_DISABLE_HEAVY_DEBUG preprocessor definition. #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2015

Conversation

sand1k
Copy link
Contributor

@sand1k sand1k commented Jun 15, 2015

Introduce JERRY_HEAVY_DEBUG preprocessor definiton to speed up debug version of the engine.
JERRY_HEAVY_DEBUG is enabled only for unit tests.

Related issue: #180

@ruben-ayrapetyan
Copy link
Contributor

@sand1k, could you, please, also add #ifdef JERRY_HEAVY_DEBUG to mem_check_heap and mem_check_pool?

@sand1k sand1k mentioned this pull request Jun 15, 2015
@ruben-ayrapetyan
Copy link
Contributor

Could you also, please, add check

#if defined (JERRY_NDEBUG) || !defined (JERRY_HEAVY_DEBUG)
# error "defined (JERRY_NDEBUG) || !defined (JERRY_HEAVY_DEBUG) in a unit test"
#endif /* JERRY_NDEBUG || !JERRY_HEAVY_DEBUG */

to test-common.h?

@egavrin
Copy link
Contributor

egavrin commented Jun 15, 2015

@sand1k, could you, please, also add #ifdef JERRY_HEAVY_DEBUG to mem_check_heap and mem_check_pool?

+1

@egavrin egavrin added enhancement An improvement parser Related to the JavaScript parser ecma core Related to core ECMA functionality labels Jun 15, 2015
@egavrin egavrin added this to the Core ECMA features milestone Jun 15, 2015
@ruben-ayrapetyan
Copy link
Contributor

May be, we should rename JERRY_HEAVY_DEBUG to JERRY_NO_HEAVY_DEBUG (or something like this) to make it consistent with JERRY_NDEBUG.

What do you think about this?

@sand1k
Copy link
Contributor Author

sand1k commented Jun 15, 2015

@ruben-ayrapetyan, name, consistent with JERRY_NDEBUG, would be JERRY_NHEAVY_DEBUG, but JERRY_NO_HEAVY_DEBUG looks much more clear for me. So my preference is JERRY_NO_HEAVY_DEBUG :)

@ruben-ayrapetyan
Copy link
Contributor

@sand1k, great!

name, consistent with JERRY_NDEBUG, would be JERRY_NHEAVY_DEBUG

I mean consistency of behaviours =)

@sand1k sand1k changed the title Introduce JERRY_HEAVY_DEBUG preprocessor definiton. Introduce JERRY_HEAVY_DEBUG preprocessor definition. Jun 15, 2015
@sand1k sand1k force-pushed the Andrey-heavy-debug branch from e7649ad to a1e767c Compare June 15, 2015 14:49
@sand1k
Copy link
Contributor Author

sand1k commented Jun 15, 2015

@ruben-ayrapetyan, I've updated the pull request according to your notes.

(void) node_p;
#endif /* JERRY_NDEBUG */
#endif /* !JERRY_NO_HEAVY_DEBUG */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we don't need !, as the corresponding code part is executed if the macro is defined.

@sand1k sand1k force-pushed the Andrey-heavy-debug branch from a1e767c to b48cf05 Compare June 15, 2015 16:12
@sand1k sand1k changed the title Introduce JERRY_HEAVY_DEBUG preprocessor definition. Introduce JERRY_DISABLE_HEAVY_DEBUG preprocessor definition. Jun 15, 2015
@sand1k
Copy link
Contributor Author

sand1k commented Jun 15, 2015

@ruben-ayrapetyan, @egavrin, pr was updated.

@sand1k sand1k force-pushed the Andrey-heavy-debug branch 3 times, most recently from 2f38f5c to 608be9e Compare June 16, 2015 10:23
@sand1k
Copy link
Contributor Author

sand1k commented Jun 16, 2015

@egavrin, please, review.
Should I rename JERRY_NDEBUG -> JERRY_DISABLE_DEBUG here (as a second commit) or create a separate PR?

@LaszloLango
Copy link
Contributor

@sand1k, please do the JERRY_NDEBUG -> JERRY_DISABLE_DEBUG renaming in a separate PR. But why is it needed at all?

@sand1k
Copy link
Contributor Author

sand1k commented Jun 16, 2015

@LaszloLango, just to make the definition name more clear.

@LaszloLango
Copy link
Contributor

+1 LGTM

…p debug version of the engine.

Heavy debug is enabled only for unit tests.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
@sand1k sand1k force-pushed the Andrey-heavy-debug branch from 608be9e to a293e21 Compare June 17, 2015 08:31
@zherczeg
Copy link
Member

lgtm

@sand1k sand1k merged commit a293e21 into master Jun 17, 2015
@sand1k sand1k deleted the Andrey-heavy-debug branch June 17, 2015 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecma core Related to core ECMA functionality enhancement An improvement parser Related to the JavaScript parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants