home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / js / src / jsconfig.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  10.6 KB  |  171 lines

  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 License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. /*
  20.  * JS configuration macros.
  21.  */
  22. #ifndef JS_VERSION
  23. #define JS_VERSION 13
  24. #endif
  25.  
  26. #if JS_VERSION == 10
  27.  
  28. #define JS_BUG_AUTO_INDEX_PROPS 1       /* new object o: o.p = v sets o[0]? */
  29. #define JS_BUG_NULL_INDEX_PROPS 1       /* o[0] defaults to null, not void? */
  30. #define JS_BUG_EMPTY_INDEX_ZERO 1       /* o[""] is equivalent to o[0]? */
  31. #define JS_BUG_SHORT_CIRCUIT    1       /* 1 && 1 => true, 1 && 0 => 0 bug? */
  32. #define JS_BUG_EAGER_TOSTRING   1       /* o.toString() trumps o.valueOf()? */
  33. #define JS_BUG_VOID_TOSTRING    0       /* void 0 + 0 == "undefined0"? */
  34. #define JS_BUG_EVAL_THIS_FUN    0       /* eval('this') in function f is f */
  35. #define JS_BUG_EVAL_THIS_SCOPE  0       /* Math.eval('sin(x)') vs. local x */
  36. #define JS_BUG_FALLIBLE_EQOPS   1       /* fallible/intransitive equality ops */
  37. #define JS_BUG_FALLIBLE_TONUM   1       /* fallible ValueToNumber primitive */
  38. #define JS_BUG_WITH_CLOSURE     0       /* with(o)function f(){} sets o.f? */
  39.  
  40. #define JS_HAS_PROP_DELETE      0       /* delete o.p removes p from o? */
  41. #define JS_HAS_CALL_OBJECT      0       /* fun.caller is stack frame obj? */
  42. #define JS_HAS_LABEL_STATEMENT  0       /* have break/continue to label:? */
  43. #define JS_HAS_DO_WHILE_LOOP    0       /* have do {...} while (b)? */
  44. #define JS_HAS_SWITCH_STATEMENT 0       /* have switch (v) {case c: ...}? */
  45. #define JS_HAS_SOME_PERL_FUN    0       /* have array.join/reverse/sort? */
  46. #define JS_HAS_MORE_PERL_FUN    0       /* have array.push, str.substr, etc? */
  47. #define JS_HAS_VALUEOF_HINT     0       /* valueOf(hint) where hint is typeof */
  48. #define JS_HAS_LEXICAL_CLOSURE  0       /* nested functions, lexically closed */
  49. #define JS_HAS_APPLY_FUNCTION   0       /* have apply(fun, arg1, ... argN)? */
  50. #define JS_HAS_OBJ_PROTO_PROP   0       /* have o.__proto__ etc.? */
  51. #define JS_HAS_REGEXPS          0       /* have perl r.e.s via RegExp, /pat/ */
  52. #define JS_HAS_SEQUENCE_OPS     0       /* have array.slice, string.concat? */
  53. #define JS_HAS_OBJECT_LITERAL   0       /* have var o = {'foo': 42, 'bar':3}? */
  54. #define JS_HAS_OBJ_WATCHPOINT   0       /* have o.watch and o.unwatch? */
  55. #define JS_HAS_EXPORT_IMPORT    0       /* have export fun; import obj.fun? */
  56. #define JS_HAS_EVAL_THIS_SCOPE  0       /* Math.eval is same as with (Math) */
  57. #define JS_HAS_TRIPLE_EQOPS     0       /* have === and !== identity eqops? */
  58. #define JS_HAS_SHARP_VARS       0       /* have #n=, #n# for object literals */
  59. #define JS_HAS_REPLACE_LAMBDA   0       /* have string.replace(re, lambda)? */
  60.  
  61. #elif JS_VERSION == 11
  62.  
  63. #define JS_BUG_AUTO_INDEX_PROPS 0       /* new object o: o.p = v sets o[0]? */
  64. #define JS_BUG_NULL_INDEX_PROPS 1       /* o[0] defaults to null, not void? */
  65. #define JS_BUG_EMPTY_INDEX_ZERO 1       /* o[""] is equivalent to o[0]? */
  66. #define JS_BUG_SHORT_CIRCUIT    1       /* 1 && 1 => true, 1 && 0 => 0 bug? */
  67. #define JS_BUG_EAGER_TOSTRING   1       /* o.toString() trumps o.valueOf()? */
  68. #define JS_BUG_VOID_TOSTRING    0       /* void 0 + 0 == "undefined0"? */
  69. #define JS_BUG_EVAL_THIS_FUN    1       /* eval('this') in function f is f */
  70. #define JS_BUG_EVAL_THIS_SCOPE  1       /* Math.eval('sin(x)') vs. local x */
  71. #define JS_BUG_FALLIBLE_EQOPS   1       /* fallible/intransitive equality ops */
  72. #define JS_BUG_FALLIBLE_TONUM   1       /* fallible ValueToNumber primitive */
  73. #define JS_BUG_WITH_CLOSURE     0       /* with(o)function f(){} sets o.f? */
  74.  
  75. #define JS_HAS_PROP_DELETE      0       /* delete o.p removes p from o? */
  76. #define JS_HAS_CALL_OBJECT      0       /* fun.caller is stack frame obj? */
  77. #define JS_HAS_LABEL_STATEMENT  0       /* have break/continue to label:? */
  78. #define JS_HAS_DO_WHILE_LOOP    0       /* have do {...} while (b)? */
  79. #define JS_HAS_SWITCH_STATEMENT 0       /* have switch (v) {case c: ...}? */
  80. #define JS_HAS_SOME_PERL_FUN    1       /* have array.join/reverse/sort? */
  81. #define JS_HAS_MORE_PERL_FUN    0       /* have array.push, str.substr, etc? */
  82. #define JS_HAS_VALUEOF_HINT     0       /* valueOf(hint) where hint is typeof */
  83. #define JS_HAS_LEXICAL_CLOSURE  0       /* nested functions, lexically closed */
  84. #define JS_HAS_APPLY_FUNCTION   0       /* have apply(fun, arg1, ... argN)? */
  85. #define JS_HAS_OBJ_PROTO_PROP   0       /* have o.__proto__ etc.? */
  86. #define JS_HAS_REGEXPS          0       /* have perl r.e.s via RegExp, /pat/ */
  87. #define JS_HAS_SEQUENCE_OPS     0       /* have array.slice, string.concat? */
  88. #define JS_HAS_OBJECT_LITERAL   0       /* have var o = {'foo': 42, 'bar':3}? */
  89. #define JS_HAS_OBJ_WATCHPOINT   0       /* have o.watch and o.unwatch? */
  90. #define JS_HAS_EXPORT_IMPORT    0       /* have export fun; import obj.fun? */
  91. #define JS_HAS_EVAL_THIS_SCOPE  0       /* Math.eval is same as with (Math) */
  92. #define JS_HAS_TRIPLE_EQOPS     0       /* have === and !== identity eqops? */
  93. #define JS_HAS_SHARP_VARS       0       /* have #n=, #n# for object literals */
  94. #define JS_HAS_REPLACE_LAMBDA   0       /* have string.replace(re, lambda)? */
  95.  
  96. #elif JS_VERSION == 12
  97.  
  98. #define JS_BUG_AUTO_INDEX_PROPS 0       /* new object o: o.p = v sets o[0]? */
  99. #define JS_BUG_NULL_INDEX_PROPS 0       /* o[0] defaults to null, not void? */
  100. #define JS_BUG_EMPTY_INDEX_ZERO 0       /* o[""] is equivalent to o[0]? */
  101. #define JS_BUG_SHORT_CIRCUIT    0       /* 1 && 1 => true, 1 && 0 => 0 bug? */
  102. #define JS_BUG_EAGER_TOSTRING   0       /* o.toString() trumps o.valueOf()? */
  103. #define JS_BUG_VOID_TOSTRING    1       /* void 0 + 0 == "undefined0"? */
  104. #define JS_BUG_EVAL_THIS_FUN    0       /* eval('this') in function f is f */
  105. #define JS_BUG_EVAL_THIS_SCOPE  0       /* Math.eval('sin(x)') vs. local x */
  106. #define JS_BUG_FALLIBLE_EQOPS   0       /* fallible/intransitive equality ops */
  107. #define JS_BUG_FALLIBLE_TONUM   0       /* fallible ValueToNumber primitive */
  108. #define JS_BUG_WITH_CLOSURE     1       /* with(o)function f(){} sets o.f? */
  109.  
  110. #define JS_HAS_PROP_DELETE      1       /* delete o.p removes p from o? */
  111. #define JS_HAS_CALL_OBJECT      1       /* fun.caller is stack frame obj? */
  112. #define JS_HAS_LABEL_STATEMENT  1       /* have break/continue to label:? */
  113. #define JS_HAS_DO_WHILE_LOOP    1       /* have do {...} while (b)? */
  114. #define JS_HAS_SWITCH_STATEMENT 1       /* have switch (v) {case c: ...}? */
  115. #define JS_HAS_SOME_PERL_FUN    1       /* have array.join/reverse/sort? */
  116. #define JS_HAS_MORE_PERL_FUN    1       /* have array.push, str.substr, etc? */
  117. #define JS_HAS_VALUEOF_HINT     1       /* valueOf(hint) where hint is typeof */
  118. #define JS_HAS_LEXICAL_CLOSURE  1       /* nested functions, lexically closed */
  119. #define JS_HAS_APPLY_FUNCTION   1       /* have apply(fun, arg1, ... argN)? */
  120. #define JS_HAS_OBJ_PROTO_PROP   1       /* have o.__proto__ etc.? */
  121. #define JS_HAS_REGEXPS          1       /* have perl r.e.s via RegExp, /pat/ */
  122. #define JS_HAS_SEQUENCE_OPS     1       /* have array.slice, string.concat? */
  123. #define JS_HAS_OBJECT_LITERAL   1       /* have var o = {'foo': 42, 'bar':3}? */
  124. #define JS_HAS_OBJ_WATCHPOINT   1       /* have o.watch and o.unwatch? */
  125. #define JS_HAS_EXPORT_IMPORT    1       /* have export fun; import obj.fun? */
  126. #define JS_HAS_EVAL_THIS_SCOPE  1       /* Math.eval is same as with (Math) */
  127. #define JS_HAS_TRIPLE_EQOPS     0       /* have === and !== identity eqops? */
  128. #define JS_HAS_SHARP_VARS       0       /* have #n=, #n# for object literals */
  129. #define JS_HAS_REPLACE_LAMBDA   0       /* have string.replace(re, lambda)? */
  130.  
  131. #elif JS_VERSION == 13
  132.  
  133. #define JS_BUG_AUTO_INDEX_PROPS 0       /* new object o: o.p = v sets o[0]? */
  134. #define JS_BUG_NULL_INDEX_PROPS 0       /* o[0] defaults to null, not void? */
  135. #define JS_BUG_EMPTY_INDEX_ZERO 0       /* o[""] is equivalent to o[0]? */
  136. #define JS_BUG_SHORT_CIRCUIT    0       /* 1 && 1 => true, 1 && 0 => 0 bug? */
  137. #define JS_BUG_EAGER_TOSTRING   0       /* o.toString() trumps o.valueOf()? */
  138. #define JS_BUG_VOID_TOSTRING    0       /* void 0 + 0 == "undefined0"? */
  139. #define JS_BUG_EVAL_THIS_FUN    0       /* eval('this') in function f is f */
  140. #define JS_BUG_EVAL_THIS_SCOPE  0       /* Math.eval('sin(x)') vs. local x */
  141. #define JS_BUG_FALLIBLE_EQOPS   0       /* fallible/intransitive equality ops */
  142. #define JS_BUG_FALLIBLE_TONUM   0       /* fallible ValueToNumber primitive */
  143. #define JS_BUG_WITH_CLOSURE     1       /* with(o)function f(){} sets o.f? */
  144.  
  145. #define JS_HAS_PROP_DELETE      1       /* delete o.p removes p from o? */
  146. #define JS_HAS_CALL_OBJECT      1       /* fun.caller is stack frame obj? */
  147. #define JS_HAS_LABEL_STATEMENT  1       /* have break/continue to label:? */
  148. #define JS_HAS_DO_WHILE_LOOP    1       /* have do {...} while (b)? */
  149. #define JS_HAS_SWITCH_STATEMENT 1       /* have switch (v) {case c: ...}? */
  150. #define JS_HAS_SOME_PERL_FUN    1       /* have array.join/reverse/sort? */
  151. #define JS_HAS_MORE_PERL_FUN    1       /* have array.push, str.substr, etc? */
  152. #define JS_HAS_VALUEOF_HINT     1       /* valueOf(hint) where hint is typeof */
  153. #define JS_HAS_LEXICAL_CLOSURE  1       /* nested functions, lexically closed */
  154. #define JS_HAS_APPLY_FUNCTION   1       /* have apply(fun, arg1, ... argN)? */
  155. #define JS_HAS_OBJ_PROTO_PROP   1       /* have o.__proto__ etc.? */
  156. #define JS_HAS_REGEXPS          1       /* have perl r.e.s via RegExp, /pat/ */
  157. #define JS_HAS_SEQUENCE_OPS     1       /* have array.slice, string.concat? */
  158. #define JS_HAS_OBJECT_LITERAL   1       /* have var o = {'foo': 42, 'bar':3}? */
  159. #define JS_HAS_OBJ_WATCHPOINT   1       /* have o.watch and o.unwatch? */
  160. #define JS_HAS_EXPORT_IMPORT    1       /* have export fun; import obj.fun? */
  161. #define JS_HAS_EVAL_THIS_SCOPE  1       /* Math.eval is same as with (Math) */
  162. #define JS_HAS_TRIPLE_EQOPS     1       /* have === and !== identity eqops? */
  163. #define JS_HAS_SHARP_VARS       1       /* have #n=, #n# for object literals */
  164. #define JS_HAS_REPLACE_LAMBDA   1       /* have string.replace(re, lambda)? */
  165.  
  166. #else
  167.  
  168. #error "unknown JS_VERSION"
  169.  
  170. #endif
  171.