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