Skip to content

Don't use messages for errors by default #941

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

Conversation

LaszloLango
Copy link
Contributor

Related issue: #897

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com

@LaszloLango LaszloLango added enhancement An improvement binary size Affects binary size labels Mar 7, 2016
@LaszloLango
Copy link
Contributor Author

File size of release.mcu_stm32f3 target

  • before: 188956 byte
  • after: 187320 byte

Result of size command
before:

   text    data     bss     dec     hex filename
 188884      72   22300  211256   33938 jerry

after:

   text    data     bss     dec     hex filename
 187248      72   22300  209620   332d4 jerry

#ifndef JERRY_NDEBUG
#define ERROR_MSG(msg) msg
#else /* JERRY_NDEBUG */
#define ERROR_MSG(msg) NULL
Copy link
Member

Choose a reason for hiding this comment

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

I'd suggest prefixing this macro, e.g., with ECMA_.

@LaszloLango LaszloLango force-pushed the add-error-msg-macro branch from 58e5cba to 3053e02 Compare March 8, 2016 13:36
@LaszloLango LaszloLango changed the title Don't use messages for errors in release mode Don't use messages for errors by default Mar 8, 2016
@LaszloLango
Copy link
Contributor Author

@zherczeg, @akiss77 the patch is updated. I introduced a new build option (ERROR_MESSAGES). With the current settings both release and debug build will use empty messages by default. Please review.

@akosthekiss
Copy link
Member

LGTM (FWIW)

@zherczeg
Copy link
Member

zherczeg commented Mar 9, 2016

LGTM

Use empty string for message property of builtin error objects
by default. Add ERROR_MESSAGES build option.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
@LaszloLango LaszloLango force-pushed the add-error-msg-macro branch from 3053e02 to ab26d57 Compare March 9, 2016 10:45
@LaszloLango LaszloLango merged commit ab26d57 into jerryscript-project:master Mar 9, 2016
@LaszloLango LaszloLango deleted the add-error-msg-macro branch April 1, 2016 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
binary size Affects binary size enhancement An improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants