|
|
1.1 root 1: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2: *
3: * ***** BEGIN LICENSE BLOCK *****
4: * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5: *
6: * The contents of this file are subject to the Mozilla Public License Version
7: * 1.1 (the "License"); you may not use this file except in compliance with
8: * the License. You may obtain a copy of the License at
9: * http://www.mozilla.org/MPL/
10: *
11: * Software distributed under the License is distributed on an "AS IS" basis,
12: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13: * for the specific language governing rights and limitations under the
14: * License.
15: *
16: * The Original Code is Mozilla Communicator client code, released
17: * March 31, 1998.
18: *
19: * The Initial Developer of the Original Code is
20: * Netscape Communications Corporation.
21: * Portions created by the Initial Developer are Copyright (C) 1998
22: * the Initial Developer. All Rights Reserved.
23: *
24: * Contributor(s):
25: *
26: * Alternatively, the contents of this file may be used under the terms of
27: * either of the GNU General Public License Version 2 or later (the "GPL"),
28: * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29: * in which case the provisions of the GPL or the LGPL are applicable instead
30: * of those above. If you wish to allow use of your version of this file only
31: * under the terms of either the GPL or the LGPL, and not to allow others to
32: * use your version of this file under the terms of the MPL, indicate your
33: * decision by deleting the provisions above and replace them with the notice
34: * and other provisions required by the GPL or the LGPL. If you do not delete
35: * the provisions above, a recipient may use your version of this file under
36: * the terms of any one of the MPL, the GPL or the LGPL.
37: *
38: * ***** END LICENSE BLOCK ***** */
39:
40: /*
41: * JS configuration macros.
42: */
43: #ifndef JS_VERSION
44: #define JS_VERSION 150
45: #endif
46:
47: /*
48: * Compile-time JS version configuration. The JS version numbers lie on the
49: * number line like so:
50: *
51: * 1.0 1.1 1.2 1.3 1.4 ECMAv3 1.5
52: * ^ ^
53: * | |
54: * basis for ECMAv1 close to ECMAv2
55: *
56: * where ECMAv3 stands for ECMA-262 Edition 3. See the runtime version enum
57: * JSVersion in jspubtd.h. Code in the engine can therefore count on version
58: * <= JSVERSION_1_4 to mean "before the Third Edition of ECMA-262" and version
59: * > JSVERSION_1_4 to mean "at or after the Third Edition".
60: *
61: * In the unlikely event that SpiderMonkey ever implements JavaScript 2.0, or
62: * ECMA-262 Edition 4 (JS2 without certain extensions), the version number to
63: * use would be near 200, or greater.
64: *
65: * The JS_VERSION_ECMA_3 version is the minimal configuration conforming to
66: * the ECMA-262 Edition 3 specification. Use it for minimal embeddings, where
67: * you're sure you don't need any of the extensions disabled in this version.
68: * In order to facilitate testing, JS_HAS_OBJ_PROTO_PROP is defined as part of
69: * the JS_VERSION_ECMA_3_TEST version.
70: */
71: #define JS_VERSION_ECMA_3 148
72: #define JS_VERSION_ECMA_3_TEST 149
73:
74: #if JS_VERSION == JS_VERSION_ECMA_3 || \
75: JS_VERSION == JS_VERSION_ECMA_3_TEST
76:
77: #define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */
78: #define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
79: #define JS_BUG_EAGER_TOSTRING 0 /* o.toString() trumps o.valueOf() */
80: #define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
81: #define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
82: #define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
83: #define JS_BUG_FALLIBLE_EQOPS 0 /* fallible/intransitive equality ops */
84: #define JS_BUG_FALLIBLE_TONUM 0 /* fallible ValueToNumber primitive */
85: #define JS_BUG_WITH_CLOSURE 0 /* with(o)function f(){} sets o.f */
86:
87: #define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */
88: #define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */
89: #define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */
90: #define JS_HAS_DO_WHILE_LOOP 1 /* has do {...} while (b) */
91: #define JS_HAS_SWITCH_STATEMENT 1 /* has switch (v) {case c: ...} */
92: #define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */
93: #define JS_HAS_MORE_PERL_FUN 1 /* has array.push, array.pop, etc */
94: #define JS_HAS_STR_HTML_HELPERS 0 /* has str.anchor, str.bold, etc. */
95: #define JS_HAS_PERL_SUBSTR 0 /* has str.substr */
96: #define JS_HAS_VALUEOF_HINT 1 /* valueOf(hint) where hint is typeof */
97: #define JS_HAS_LEXICAL_CLOSURE 1 /* nested functions, lexically closed */
98: #define JS_HAS_APPLY_FUNCTION 1 /* has fun.apply(obj, argArray) */
99: #define JS_HAS_CALL_FUNCTION 1 /* has fun.call(obj, arg1, ... argN) */
100: #if JS_VERSION == JS_VERSION_ECMA_3_TEST
101: #define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */
102: #else
103: #define JS_HAS_OBJ_PROTO_PROP 0 /* has o.__proto__ etc. */
104: #endif
105: #define JS_HAS_REGEXPS 1 /* has perl r.e.s via RegExp, /pat/ */
106: #define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */
107: #define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */
108: #define JS_HAS_OBJ_WATCHPOINT 0 /* has o.watch and o.unwatch */
109: #define JS_HAS_EXPORT_IMPORT 0 /* has export fun; import obj.fun */
110: #define JS_HAS_EVAL_THIS_SCOPE 0 /* Math.eval is same as with (Math) */
111: #define JS_HAS_TRIPLE_EQOPS 1 /* has === and !== identity eqops */
112: #define JS_HAS_SHARP_VARS 0 /* has #n=, #n# for object literals */
113: #define JS_HAS_REPLACE_LAMBDA 1 /* has string.replace(re, lambda) */
114: #define JS_HAS_SCRIPT_OBJECT 0 /* has (new Script("x++")).exec() */
115: #define JS_HAS_XDR 0 /* has XDR API and internal support */
116: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
117: #define JS_HAS_EXCEPTIONS 1 /* has exception handling */
118: #define JS_HAS_UNDEFINED 1 /* has global "undefined" property */
119: #define JS_HAS_TOSOURCE 0 /* has Object/Array toSource method */
120: #define JS_HAS_IN_OPERATOR 1 /* has in operator ('p' in {p:1}) */
121: #define JS_HAS_INSTANCEOF 1 /* has {p:1} instanceof Object */
122: #define JS_HAS_ARGS_OBJECT 1 /* has minimal ECMA arguments object */
123: #define JS_HAS_DEBUGGER_KEYWORD 0 /* has hook for debugger keyword */
124: #define JS_HAS_ERROR_EXCEPTIONS 1 /* has error object hierarchy */
125: #define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */
126: #define JS_HAS_NEW_OBJ_METHODS 1 /* has Object.prototype query methods */
127: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
128: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
129: #define JS_HAS_NUMBER_FORMATS 1 /* numbers have formatting methods */
130: #define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
131: #define JS_HAS_UNEVAL 0 /* has uneval() top-level function */
132: #define JS_HAS_CONST 0 /* has JS2 const as alternative var */
133: #define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
134: #define JS_HAS_LVALUE_RETURN 1 /* has o.item(i) = j; for native item */
135: #define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
136:
137: #elif JS_VERSION == 100
138:
139: #define JS_BUG_NULL_INDEX_PROPS 1 /* o[0] defaults to null, not void */
140: #define JS_BUG_EMPTY_INDEX_ZERO 1 /* o[""] is equivalent to o[0] */
141: #define JS_BUG_EAGER_TOSTRING 1 /* o.toString() trumps o.valueOf() */
142: #define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
143: #define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
144: #define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
145: #define JS_BUG_FALLIBLE_EQOPS 1 /* fallible/intransitive equality ops */
146: #define JS_BUG_FALLIBLE_TONUM 1 /* fallible ValueToNumber primitive */
147: #define JS_BUG_WITH_CLOSURE 0 /* with(o)function f(){} sets o.f */
148:
149: #define JS_HAS_PROP_DELETE 0 /* delete o.p removes p from o */
150: #define JS_HAS_CALL_OBJECT 0 /* fun.caller is stack frame obj */
151: #define JS_HAS_LABEL_STATEMENT 0 /* has break/continue to label: */
152: #define JS_HAS_DO_WHILE_LOOP 0 /* has do {...} while (b) */
153: #define JS_HAS_SWITCH_STATEMENT 0 /* has switch (v) {case c: ...} */
154: #define JS_HAS_SOME_PERL_FUN 0 /* has array.join/reverse/sort */
155: #define JS_HAS_MORE_PERL_FUN 0 /* has array.push, str.substr, etc */
156: #define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
157: #define JS_HAS_PERL_SUBSTR 0 /* has str.substr */
158: #define JS_HAS_VALUEOF_HINT 0 /* valueOf(hint) where hint is typeof */
159: #define JS_HAS_LEXICAL_CLOSURE 0 /* nested functions, lexically closed */
160: #define JS_HAS_APPLY_FUNCTION 0 /* has fun.apply(obj, argArray) */
161: #define JS_HAS_CALL_FUNCTION 0 /* has fun.call(obj, arg1, ... argN) */
162: #define JS_HAS_OBJ_PROTO_PROP 0 /* has o.__proto__ etc. */
163: #define JS_HAS_REGEXPS 0 /* has perl r.e.s via RegExp, /pat/ */
164: #define JS_HAS_SEQUENCE_OPS 0 /* has array.slice, string.concat */
165: #define JS_HAS_INITIALIZERS 0 /* has var o = {'foo': 42, 'bar':3} */
166: #define JS_HAS_OBJ_WATCHPOINT 0 /* has o.watch and o.unwatch */
167: #define JS_HAS_EXPORT_IMPORT 0 /* has export fun; import obj.fun */
168: #define JS_HAS_EVAL_THIS_SCOPE 0 /* Math.eval is same as with (Math) */
169: #define JS_HAS_TRIPLE_EQOPS 0 /* has === and !== identity eqops */
170: #define JS_HAS_SHARP_VARS 0 /* has #n=, #n# for object literals */
171: #define JS_HAS_REPLACE_LAMBDA 0 /* has string.replace(re, lambda) */
172: #define JS_HAS_SCRIPT_OBJECT 0 /* has (new Script("x++")).exec() */
173: #define JS_HAS_XDR 0 /* has XDR API and internal support */
174: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
175: #define JS_HAS_EXCEPTIONS 0 /* has exception handling */
176: #define JS_HAS_UNDEFINED 0 /* has global "undefined" property */
177: #define JS_HAS_TOSOURCE 0 /* has Object/Array toSource method */
178: #define JS_HAS_IN_OPERATOR 0 /* has in operator ('p' in {p:1}) */
179: #define JS_HAS_INSTANCEOF 0 /* has {p:1} instanceof Object */
180: #define JS_HAS_ARGS_OBJECT 0 /* has minimal ECMA arguments object */
181: #define JS_HAS_DEBUGGER_KEYWORD 0 /* has hook for debugger keyword */
182: #define JS_HAS_ERROR_EXCEPTIONS 0 /* has error object hierarchy */
183: #define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */
184: #define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
185: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
186: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
187: #define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */
188: #define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
189: #define JS_HAS_UNEVAL 0 /* has uneval() top-level function */
190: #define JS_HAS_CONST 0 /* has JS2 const as alternative var */
191: #define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
192: #define JS_HAS_LVALUE_RETURN 0 /* has o.item(i) = j; for native item */
193: #define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
194:
195: #elif JS_VERSION == 110
196:
197: #define JS_BUG_NULL_INDEX_PROPS 1 /* o[0] defaults to null, not void */
198: #define JS_BUG_EMPTY_INDEX_ZERO 1 /* o[""] is equivalent to o[0] */
199: #define JS_BUG_EAGER_TOSTRING 1 /* o.toString() trumps o.valueOf() */
200: #define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
201: #define JS_BUG_EVAL_THIS_FUN 1 /* eval('this') in function f is f */
202: #define JS_BUG_EVAL_THIS_SCOPE 1 /* Math.eval('sin(x)') vs. local x */
203: #define JS_BUG_FALLIBLE_EQOPS 1 /* fallible/intransitive equality ops */
204: #define JS_BUG_FALLIBLE_TONUM 1 /* fallible ValueToNumber primitive */
205: #define JS_BUG_WITH_CLOSURE 0 /* with(o)function f(){} sets o.f */
206:
207: #define JS_HAS_PROP_DELETE 0 /* delete o.p removes p from o */
208: #define JS_HAS_CALL_OBJECT 0 /* fun.caller is stack frame obj */
209: #define JS_HAS_LABEL_STATEMENT 0 /* has break/continue to label: */
210: #define JS_HAS_DO_WHILE_LOOP 0 /* has do {...} while (b) */
211: #define JS_HAS_SWITCH_STATEMENT 0 /* has switch (v) {case c: ...} */
212: #define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */
213: #define JS_HAS_MORE_PERL_FUN 0 /* has array.push, str.substr, etc */
214: #define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
215: #define JS_HAS_PERL_SUBSTR 0 /* has str.substr */
216: #define JS_HAS_VALUEOF_HINT 0 /* valueOf(hint) where hint is typeof */
217: #define JS_HAS_LEXICAL_CLOSURE 0 /* nested functions, lexically closed */
218: #define JS_HAS_APPLY_FUNCTION 0 /* has apply(fun, arg1, ... argN) */
219: #define JS_HAS_CALL_FUNCTION 0 /* has fun.call(obj, arg1, ... argN) */
220: #define JS_HAS_OBJ_PROTO_PROP 0 /* has o.__proto__ etc. */
221: #define JS_HAS_REGEXPS 0 /* has perl r.e.s via RegExp, /pat/ */
222: #define JS_HAS_SEQUENCE_OPS 0 /* has array.slice, string.concat */
223: #define JS_HAS_INITIALIZERS 0 /* has var o = {'foo': 42, 'bar':3} */
224: #define JS_HAS_OBJ_WATCHPOINT 0 /* has o.watch and o.unwatch */
225: #define JS_HAS_EXPORT_IMPORT 0 /* has export fun; import obj.fun */
226: #define JS_HAS_EVAL_THIS_SCOPE 0 /* Math.eval is same as with (Math) */
227: #define JS_HAS_TRIPLE_EQOPS 0 /* has === and !== identity eqops */
228: #define JS_HAS_SHARP_VARS 0 /* has #n=, #n# for object literals */
229: #define JS_HAS_REPLACE_LAMBDA 0 /* has string.replace(re, lambda) */
230: #define JS_HAS_SCRIPT_OBJECT 0 /* has (new Script("x++")).exec() */
231: #define JS_HAS_XDR 0 /* has XDR API and internal support */
232: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
233: #define JS_HAS_EXCEPTIONS 0 /* has exception handling */
234: #define JS_HAS_UNDEFINED 0 /* has global "undefined" property */
235: #define JS_HAS_TOSOURCE 0 /* has Object/Array toSource method */
236: #define JS_HAS_IN_OPERATOR 0 /* has in operator ('p' in {p:1}) */
237: #define JS_HAS_INSTANCEOF 0 /* has {p:1} instanceof Object */
238: #define JS_HAS_ARGS_OBJECT 0 /* has minimal ECMA arguments object */
239: #define JS_HAS_DEBUGGER_KEYWORD 0 /* has hook for debugger keyword */
240: #define JS_HAS_ERROR_EXCEPTIONS 0 /* has error object hierarchy */
241: #define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */
242: #define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
243: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
244: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
245: #define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */
246: #define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
247: #define JS_HAS_UNEVAL 0 /* has uneval() top-level function */
248: #define JS_HAS_CONST 0 /* has JS2 const as alternative var */
249: #define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
250: #define JS_HAS_LVALUE_RETURN 0 /* has o.item(i) = j; for native item */
251: #define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
252:
253: #elif JS_VERSION == 120
254:
255: #define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */
256: #define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
257: #define JS_BUG_EAGER_TOSTRING 0 /* o.toString() trumps o.valueOf() */
258: #define JS_BUG_VOID_TOSTRING 1 /* void 0 + 0 == "undefined0" */
259: #define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
260: #define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
261: #define JS_BUG_FALLIBLE_EQOPS 0 /* fallible/intransitive equality ops */
262: #define JS_BUG_FALLIBLE_TONUM 0 /* fallible ValueToNumber primitive */
263: #define JS_BUG_WITH_CLOSURE 1 /* with(o)function f(){} sets o.f */
264:
265: #define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */
266: #define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */
267: #define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */
268: #define JS_HAS_DO_WHILE_LOOP 1 /* has do {...} while (b) */
269: #define JS_HAS_SWITCH_STATEMENT 1 /* has switch (v) {case c: ...} */
270: #define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */
271: #define JS_HAS_MORE_PERL_FUN 1 /* has array.push, str.substr, etc */
272: #define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
273: #define JS_HAS_PERL_SUBSTR 1 /* has str.substr */
274: #define JS_HAS_VALUEOF_HINT 1 /* valueOf(hint) where hint is typeof */
275: #define JS_HAS_LEXICAL_CLOSURE 1 /* nested functions, lexically closed */
276: #define JS_HAS_APPLY_FUNCTION 1 /* has apply(fun, arg1, ... argN) */
277: #define JS_HAS_CALL_FUNCTION 0 /* has fun.call(obj, arg1, ... argN) */
278: #define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */
279: #define JS_HAS_REGEXPS 1 /* has perl r.e.s via RegExp, /pat/ */
280: #define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */
281: #define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */
282: #define JS_HAS_OBJ_WATCHPOINT 1 /* has o.watch and o.unwatch */
283: #define JS_HAS_EXPORT_IMPORT 1 /* has export fun; import obj.fun */
284: #define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */
285: #define JS_HAS_TRIPLE_EQOPS 0 /* has === and !== identity eqops */
286: #define JS_HAS_SHARP_VARS 0 /* has #n=, #n# for object literals */
287: #define JS_HAS_REPLACE_LAMBDA 0 /* has string.replace(re, lambda) */
288: #define JS_HAS_SCRIPT_OBJECT 0 /* has (new Script("x++")).exec() */
289: #define JS_HAS_XDR 0 /* has XDR API and internal support */
290: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
291: #define JS_HAS_EXCEPTIONS 0 /* has exception handling */
292: #define JS_HAS_UNDEFINED 0 /* has global "undefined" property */
293: #define JS_HAS_TOSOURCE 0 /* has Object/Array toSource method */
294: #define JS_HAS_IN_OPERATOR 0 /* has in operator ('p' in {p:1}) */
295: #define JS_HAS_INSTANCEOF 0 /* has {p:1} instanceof Object */
296: #define JS_HAS_ARGS_OBJECT 0 /* has minimal ECMA arguments object */
297: #define JS_HAS_DEBUGGER_KEYWORD 0 /* has hook for debugger keyword */
298: #define JS_HAS_ERROR_EXCEPTIONS 0 /* has error object hierarchy */
299: #define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */
300: #define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
301: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
302: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
303: #define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */
304: #define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
305: #define JS_HAS_UNEVAL 0 /* has uneval() top-level function */
306: #define JS_HAS_CONST 0 /* has JS2 const as alternative var */
307: #define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
308: #define JS_HAS_LVALUE_RETURN 0 /* has o.item(i) = j; for native item */
309: #define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
310:
311: #elif JS_VERSION == 130
312:
313: #define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */
314: #define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
315: #define JS_BUG_EAGER_TOSTRING 0 /* o.toString() trumps o.valueOf() */
316: #define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
317: #define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
318: #define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
319: #define JS_BUG_FALLIBLE_EQOPS 0 /* fallible/intransitive equality ops */
320: #define JS_BUG_FALLIBLE_TONUM 0 /* fallible ValueToNumber primitive */
321: #define JS_BUG_WITH_CLOSURE 1 /* with(o)function f(){} sets o.f */
322:
323: #define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */
324: #define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */
325: #define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */
326: #define JS_HAS_DO_WHILE_LOOP 1 /* has do {...} while (b) */
327: #define JS_HAS_SWITCH_STATEMENT 1 /* has switch (v) {case c: ...} */
328: #define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */
329: #define JS_HAS_MORE_PERL_FUN 1 /* has array.push, str.substr, etc */
330: #define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
331: #define JS_HAS_PERL_SUBSTR 1 /* has str.substr */
332: #define JS_HAS_VALUEOF_HINT 1 /* valueOf(hint) where hint is typeof */
333: #define JS_HAS_LEXICAL_CLOSURE 1 /* nested functions, lexically closed */
334: #define JS_HAS_APPLY_FUNCTION 1 /* has apply(fun, arg1, ... argN) */
335: #define JS_HAS_CALL_FUNCTION 1 /* has fun.call(obj, arg1, ... argN) */
336: #define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */
337: #define JS_HAS_REGEXPS 1 /* has perl r.e.s via RegExp, /pat/ */
338: #define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */
339: #define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */
340: #define JS_HAS_OBJ_WATCHPOINT 1 /* has o.watch and o.unwatch */
341: #define JS_HAS_EXPORT_IMPORT 1 /* has export fun; import obj.fun */
342: #define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */
343: #define JS_HAS_TRIPLE_EQOPS 1 /* has === and !== identity eqops */
344: #define JS_HAS_SHARP_VARS 1 /* has #n=, #n# for object literals */
345: #define JS_HAS_REPLACE_LAMBDA 1 /* has string.replace(re, lambda) */
346: #define JS_HAS_SCRIPT_OBJECT 1 /* has (new Script("x++")).exec() */
347: #define JS_HAS_XDR 1 /* has XDR API and internal support */
348: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
349: #define JS_HAS_EXCEPTIONS 0 /* has exception handling */
350: #define JS_HAS_UNDEFINED 1 /* has global "undefined" property */
351: #define JS_HAS_TOSOURCE 1 /* has Object/Array toSource method */
352: #define JS_HAS_IN_OPERATOR 0 /* has in operator ('p' in {p:1}) */
353: #define JS_HAS_INSTANCEOF 0 /* has {p:1} instanceof Object */
354: #define JS_HAS_ARGS_OBJECT 1 /* has minimal ECMA arguments object */
355: #define JS_HAS_DEBUGGER_KEYWORD 1 /* has hook for debugger keyword */
356: #define JS_HAS_ERROR_EXCEPTIONS 0 /* has error object hierarchy */
357: #define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */
358: #define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
359: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
360: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
361: #define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */
362: #define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
363: #define JS_HAS_UNEVAL 0 /* has uneval() top-level function */
364: #define JS_HAS_CONST 0 /* has JS2 const as alternative var */
365: #define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
366: #define JS_HAS_LVALUE_RETURN 0 /* has o.item(i) = j; for native item */
367: #define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
368:
369: #elif JS_VERSION == 140
370:
371: #define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */
372: #define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
373: #define JS_BUG_EAGER_TOSTRING 0 /* o.toString() trumps o.valueOf() */
374: #define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
375: #define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
376: #define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
377: #define JS_BUG_FALLIBLE_EQOPS 0 /* fallible/intransitive equality ops */
378: #define JS_BUG_FALLIBLE_TONUM 0 /* fallible ValueToNumber primitive */
379: #define JS_BUG_WITH_CLOSURE 1 /* with(o)function f(){} sets o.f */
380:
381: #define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */
382: #define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */
383: #define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */
384: #define JS_HAS_DO_WHILE_LOOP 1 /* has do {...} while (b) */
385: #define JS_HAS_SWITCH_STATEMENT 1 /* has switch (v) {case c: ...} */
386: #define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */
387: #define JS_HAS_MORE_PERL_FUN 1 /* has array.push, str.substr, etc */
388: #define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
389: #define JS_HAS_PERL_SUBSTR 1 /* has str.substr */
390: #define JS_HAS_VALUEOF_HINT 1 /* valueOf(hint) where hint is typeof */
391: #define JS_HAS_LEXICAL_CLOSURE 1 /* nested functions, lexically closed */
392: #define JS_HAS_APPLY_FUNCTION 1 /* has apply(fun, arg1, ... argN) */
393: #define JS_HAS_CALL_FUNCTION 1 /* has fun.call(obj, arg1, ... argN) */
394: #define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */
395: #define JS_HAS_REGEXPS 1 /* has perl r.e.s via RegExp, /pat/ */
396: #define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */
397: #define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */
398: #define JS_HAS_OBJ_WATCHPOINT 1 /* has o.watch and o.unwatch */
399: #define JS_HAS_EXPORT_IMPORT 1 /* has export fun; import obj.fun */
400: #define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */
401: #define JS_HAS_TRIPLE_EQOPS 1 /* has === and !== identity eqops */
402: #define JS_HAS_SHARP_VARS 1 /* has #n=, #n# for object literals */
403: #define JS_HAS_REPLACE_LAMBDA 1 /* has string.replace(re, lambda) */
404: #define JS_HAS_SCRIPT_OBJECT 1 /* has (new Script("x++")).exec() */
405: #define JS_HAS_XDR 1 /* has XDR API and internal support */
406: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
407: #define JS_HAS_EXCEPTIONS 1 /* has exception handling */
408: #define JS_HAS_UNDEFINED 1 /* has global "undefined" property */
409: #define JS_HAS_TOSOURCE 1 /* has Object/Array toSource method */
410: #define JS_HAS_IN_OPERATOR 1 /* has in operator ('p' in {p:1}) */
411: #define JS_HAS_INSTANCEOF 1 /* has {p:1} instanceof Object */
412: #define JS_HAS_ARGS_OBJECT 1 /* has minimal ECMA arguments object */
413: #define JS_HAS_DEBUGGER_KEYWORD 1 /* has hook for debugger keyword */
414: #define JS_HAS_ERROR_EXCEPTIONS 0 /* rt errors reflected as exceptions */
415: #define JS_HAS_CATCH_GUARD 0 /* has exception handling catch guard */
416: #define JS_HAS_NEW_OBJ_METHODS 0 /* has Object.prototype query methods */
417: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
418: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
419: #define JS_HAS_NUMBER_FORMATS 0 /* numbers have formatting methods */
420: #define JS_HAS_GETTER_SETTER 0 /* has JS2 getter/setter functions */
421: #define JS_HAS_UNEVAL 0 /* has uneval() top-level function */
422: #define JS_HAS_CONST 0 /* has JS2 const as alternative var */
423: #define JS_HAS_FUN_EXPR_STMT 0 /* has function expression statement */
424: #define JS_HAS_LVALUE_RETURN 0 /* has o.item(i) = j; for native item */
425: #define JS_HAS_NO_SUCH_METHOD 0 /* has o.__noSuchMethod__ handler */
426:
427: #elif JS_VERSION == 150
428:
429: #define JS_BUG_NULL_INDEX_PROPS 0 /* o[0] defaults to null, not void */
430: #define JS_BUG_EMPTY_INDEX_ZERO 0 /* o[""] is equivalent to o[0] */
431: #define JS_BUG_EAGER_TOSTRING 0 /* o.toString() trumps o.valueOf() */
432: #define JS_BUG_VOID_TOSTRING 0 /* void 0 + 0 == "undefined0" */
433: #define JS_BUG_EVAL_THIS_FUN 0 /* eval('this') in function f is f */
434: #define JS_BUG_EVAL_THIS_SCOPE 0 /* Math.eval('sin(x)') vs. local x */
435: #define JS_BUG_FALLIBLE_EQOPS 0 /* fallible/intransitive equality ops */
436: #define JS_BUG_FALLIBLE_TONUM 0 /* fallible ValueToNumber primitive */
437: #define JS_BUG_WITH_CLOSURE 0 /* with(o)function f(){} sets o.f */
438:
439: #define JS_HAS_PROP_DELETE 1 /* delete o.p removes p from o */
440: #define JS_HAS_CALL_OBJECT 1 /* fun.caller is stack frame obj */
441: #define JS_HAS_LABEL_STATEMENT 1 /* has break/continue to label: */
442: #define JS_HAS_DO_WHILE_LOOP 1 /* has do {...} while (b) */
443: #define JS_HAS_SWITCH_STATEMENT 1 /* has switch (v) {case c: ...} */
444: #define JS_HAS_SOME_PERL_FUN 1 /* has array.join/reverse/sort */
445: #define JS_HAS_MORE_PERL_FUN 1 /* has array.push, str.substr, etc */
446: #define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
447: #define JS_HAS_PERL_SUBSTR 1 /* has str.substr */
448: #define JS_HAS_VALUEOF_HINT 1 /* valueOf(hint) where hint is typeof */
449: #define JS_HAS_LEXICAL_CLOSURE 1 /* nested functions, lexically closed */
450: #define JS_HAS_APPLY_FUNCTION 1 /* has apply(fun, arg1, ... argN) */
451: #define JS_HAS_CALL_FUNCTION 1 /* has fun.call(obj, arg1, ... argN) */
452: #define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */
453: #define JS_HAS_REGEXPS 1 /* has perl r.e.s via RegExp, /pat/ */
454: #define JS_HAS_SEQUENCE_OPS 1 /* has array.slice, string.concat */
455: #define JS_HAS_INITIALIZERS 1 /* has var o = {'foo': 42, 'bar':3} */
456: #define JS_HAS_OBJ_WATCHPOINT 1 /* has o.watch and o.unwatch */
457: #define JS_HAS_EXPORT_IMPORT 1 /* has export fun; import obj.fun */
458: #define JS_HAS_EVAL_THIS_SCOPE 1 /* Math.eval is same as with (Math) */
459: #define JS_HAS_TRIPLE_EQOPS 1 /* has === and !== identity eqops */
460: #define JS_HAS_SHARP_VARS 1 /* has #n=, #n# for object literals */
461: #define JS_HAS_REPLACE_LAMBDA 1 /* has string.replace(re, lambda) */
462: #define JS_HAS_SCRIPT_OBJECT 1 /* has (new Script("x++")).exec() */
463: #define JS_HAS_XDR 1 /* has XDR API and internal support */
464: #define JS_HAS_XDR_FREEZE_THAW 0 /* has XDR freeze/thaw script methods */
465: #define JS_HAS_EXCEPTIONS 1 /* has exception handling */
466: #define JS_HAS_UNDEFINED 1 /* has global "undefined" property */
467: #define JS_HAS_TOSOURCE 1 /* has Object/Array toSource method */
468: #define JS_HAS_IN_OPERATOR 1 /* has in operator ('p' in {p:1}) */
469: #define JS_HAS_INSTANCEOF 1 /* has {p:1} instanceof Object */
470: #define JS_HAS_ARGS_OBJECT 1 /* has minimal ECMA arguments object */
471: #define JS_HAS_DEBUGGER_KEYWORD 1 /* has hook for debugger keyword */
472: #define JS_HAS_ERROR_EXCEPTIONS 1 /* rt errors reflected as exceptions */
473: #define JS_HAS_CATCH_GUARD 1 /* has exception handling catch guard */
474: #define JS_HAS_NEW_OBJ_METHODS 1 /* has Object.prototype query methods */
475: #define JS_HAS_SPARSE_ARRAYS 0 /* array methods preserve empty elems */
476: #define JS_HAS_DFLT_MSG_STRINGS 1 /* provides English error messages */
477: #define JS_HAS_NUMBER_FORMATS 1 /* numbers have formatting methods */
478: #define JS_HAS_GETTER_SETTER 1 /* has JS2 getter/setter functions */
479: #define JS_HAS_UNEVAL 1 /* has uneval() top-level function */
480: #define JS_HAS_CONST 1 /* has JS2 const as alternative var */
481: #define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
482: #define JS_HAS_LVALUE_RETURN 1 /* has o.item(i) = j; for native item */
483: #define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
484:
485: #else
486:
487: #error "unknown JS_VERSION"
488:
489: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.