-
Notifications
You must be signed in to change notification settings - Fork 683
Change the CONFIG_ECMA_NUMBER_TYPE default value to CONFIG_ECMA_NUMBE… #1229
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
Change the CONFIG_ECMA_NUMBER_TYPE default value to CONFIG_ECMA_NUMBE… #1229
Conversation
@@ -171,7 +170,9 @@ elseif(FEATURE_PROFILE STREQUAL "minimal") | |||
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN) | |||
|
|||
else() | |||
message(FATAL_ERROR "FEATURE_PROFILE='${FEATURE_PROFILE}' doesn't supported") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use elseif like above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I've updated the patch.
81475c3
to
6ce67c1
Compare
LGTM |
set(DEFINES_JERRY | ||
${DEFINES_JERRY} | ||
CONFIG_ECMA_COMPACT_PROFILE | ||
CONFIG_ECMA_NUMBER_TYPE=CONFIG_ECMA_NUMBER_FLOAT32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this line added by mistake? (CONFIG_ECMA_NUMBER_TYPE=CONFIG_ECMA_NUMBER_FLOAT32)
This would give us:
- Minimal profile: FLOAT64
- Compact profile: FLOAT32
- Full profile: FLOAT64
I think we want the default to be FLOAT64 in all three profiles :)
LGTM (minus feedback above) Can you please mention in the commit message that we're changing the default to FLOAT64 to ensure compliance with ECMAScript 5.1 which requires numbers to be represented in double precision floating-point format? I'm thinking we should not expose FLOAT32 as a CMake option to have a higher barrier to ensure that only experienced users who understand the performance/precision trade-off of going with FLOAT32 (and are willing to sacrifice ECMAScript 5.1 conformance) will actually use this. |
… compliance with ECMAScript 5.1 which requires numbers to be represented in double precision floating-point format. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
6ce67c1
to
15ba287
Compare
@tilmannOSG : Thanks, I've updated this patch based on your comments. |
@robertsipka Thanks, looks good! |
LGTM |
…R_FLOAT64.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com