Last Comment Bug 752632 - Support building SpiderMonkey without E4X by doing: configure --disable-e4x
: Support building SpiderMonkey without E4X by doing: configure --disable-e4x
Status: RESOLVED FIXED
[js:p1:fx15]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: All All
: -- normal (vote)
: mozilla15
Assigned To: Jason Orendorff [:jorendorff]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on: 752092
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-07 12:32 PDT by Jason Orendorff [:jorendorff]
Modified: 2012-05-31 06:30 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (7.13 KB, patch)
2012-05-07 12:32 PDT, Jason Orendorff [:jorendorff]
jimb: review+
Details | Diff | Splinter Review

Description Jason Orendorff [:jorendorff] 2012-05-07 12:32:03 PDT
Created attachment 621686 [details] [diff] [review]
v1

Terrence asked for this in bug 752092 and it was pretty straightforward.
Comment 1 Jason Orendorff [:jorendorff] 2012-05-07 12:39:18 PDT
Up to now, E4X support has been on by default. It depends on the preprocessor macro JS_HAS_XML_SUPPORT which is (conditionally -- but always, in practice) defined to be 1 in jsversion.h. There's no convenient way to turn it off.

With this patch, E4X support is still on by default. However JS_HAS_XML_SUPPORT is now defined in js-config.h (1 by default) and you can turn it off by configuring with --disable-e4x.
Comment 2 Jason Orendorff [:jorendorff] 2012-05-15 12:24:41 PDT
Review ping.
Comment 3 Jim Blandy :jimb 2012-05-18 16:09:22 PDT
Comment on attachment 621686 [details] [diff] [review]
v1

Review of attachment 621686 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/configure.in
@@ +4420,5 @@
> +dnl = E4X support (ECMA-357)
> +dnl ========================================================
> +JS_HAS_XML_SUPPORT=1
> +MOZ_ARG_DISABLE_BOOL(e4x,
> +[  --disable-e4x Disable JS support for XML (ECMA-357)],

Most of these try to indent the description to appear at column 26.

::: js/src/jsversion.h
@@ -90,5 @@
>  #define JS_HAS_UNEVAL           0       /* has uneval() top-level function */
>  #define JS_HAS_CONST            0       /* has JS2 const as alternative var */
>  #define JS_HAS_FUN_EXPR_STMT    0       /* has function expression statement */
>  #define JS_HAS_NO_SUCH_METHOD   0       /* has o.__noSuchMethod__ handler */
> -#define JS_HAS_XML_SUPPORT      0       /* has ECMAScript for XML support */

Huh. I wonder if embedders are selecting old versions of the language, and counting on E4X not being there. (Not worth holding the bug for, though.)
Comment 4 Jason Orendorff [:jorendorff] 2012-05-30 13:16:31 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/1a4d8e3ce3d6
Comment 5 Ed Morley [:emorley] 2012-05-31 06:30:51 PDT
https://hg.mozilla.org/mozilla-central/rev/1a4d8e3ce3d6

Note You need to log in before you can comment on or make changes to this bug.