Closed
Bug 523139
Opened 15 years ago
Closed 15 years ago
ES5: SpiderMonkey versioning machinery should recognize ECMAScript 5
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jimb, Assigned: jimb)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
2.94 KB,
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
The JSVersion enum should have a value for ECMAScript 5, and the functions JS_GetVersion, JS_SetVersion, JS_StringToVersion, and JS_VersionToString should understand it.
Assignee | ||
Comment 1•15 years ago
|
||
Attachment #407070 -
Flags: review?(brendan)
Comment 2•15 years ago
|
||
Comment on attachment 407070 [details] [diff] [review]
Add an ECMAScript 5 value to the JSVersion type.
>Bug 523139: Add an ECMAScript 5 value to the JSVersion type.
>
>diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
>--- a/js/src/jsapi.cpp
>+++ b/js/src/jsapi.cpp
>@@ -1134,6 +1134,7 @@ static struct v2smap {
> {JSVERSION_1_6, "1.6"},
> {JSVERSION_1_7, "1.7"},
> {JSVERSION_1_8, "1.8"},
>+ {JSVERSION_1_8, "ECMAv5"},
Copy/paste error (kill/yank ;-) there.
Can you update the jsversion.h comment that talks about JS and ECMA versions, including the number line (use tw=99 or larger if you need to)?
>diff --git a/js/src/jspubtd.h b/js/src/jspubtd.h
>--- a/js/src/jspubtd.h
>+++ b/js/src/jspubtd.h
>@@ -72,6 +72,7 @@ typedef enum JSVersion {
> JSVERSION_1_6 = 160,
> JSVERSION_1_7 = 170,
> JSVERSION_1_8 = 180,
>+ JSVERSION_ECMA_5 = 185,
Have we decided what version shipped in Firefox 3.5? IIRC it was going to be called JS1.8.1 at one point. Sorry I've lost track.
185 is probably a fine value, and has the mnemonic 5 at the end.
/be
Assignee | ||
Comment 3•15 years ago
|
||
Various corrections: update JSVERSION_LATEST, map and settings in jsversion.h. Use '200', as suggested in comments in jsversion.h.
Attachment #407070 -
Attachment is obsolete: true
Attachment #407121 -
Flags: review?(brendan)
Attachment #407070 -
Flags: review?(brendan)
Assignee | ||
Comment 4•15 years ago
|
||
Passed in transit. Will revise per comment #2.
Assignee | ||
Comment 5•15 years ago
|
||
Use 185 as enum value. Retain horizontal version timeline. JS2 > ES5.
Attachment #407121 -
Attachment is obsolete: true
Attachment #407130 -
Flags: review?(brendan)
Attachment #407121 -
Flags: review?(brendan)
Comment 6•15 years ago
|
||
Comment on attachment 407130 [details] [diff] [review]
Add an ECMAScript 5 value to the JSVersion type.
>Bug 523139: Add an ECMAScript 5 value to the JSVersion type.
>
>diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
>--- a/js/src/jsapi.cpp
>+++ b/js/src/jsapi.cpp
>@@ -1134,6 +1134,7 @@ static struct v2smap {
> {JSVERSION_1_6, "1.6"},
> {JSVERSION_1_7, "1.7"},
> {JSVERSION_1_8, "1.8"},
>+ {JSVERSION_ECMA_5, "ECMAv5"},
> {JSVERSION_DEFAULT, js_default_str},
> {JSVERSION_UNKNOWN, NULL}, /* must be last, NULL is sentinel */
Suggest noting 1.8.1 (coded as 181, we won't split between 180 and it) to memorialize
https://developer.mozilla.org/En/New_in_JavaScript_1.8.1
>+#elif JS_VERSION == 180 || JS_VERSION == 185
We aren't #if'ing these days, at least not for the additions in 1.8.1 that the MDC page lists. But given the published docs, this test wants to include 181 or else test the range [180, 185].
r=me with that
/be
Attachment #407130 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 7•15 years ago
|
||
Changed JS_VERSION conditional as requested.
http://hg.mozilla.org/tracemonkey/rev/4429fdb969e7
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•15 years ago
|
||
Fixed-in-tracemonkey, that is.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Whiteboard: fixed-in-tracemonkey
Comment 9•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•