2013-04-16 13:47:10 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
* vim: set ts=8 sts=4 et sw=4 tw=99:
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-06-19 17:59:46 -07:00
|
|
|
#ifndef jsversion_h
|
|
|
|
#define jsversion_h
|
2012-09-06 17:51:42 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/*
|
2013-04-23 15:45:04 -07:00
|
|
|
* JS Capability Macros.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2007-05-17 18:41:17 -07:00
|
|
|
#define JS_HAS_STR_HTML_HELPERS 1 /* has str.anchor, str.bold, etc. */
|
|
|
|
#define JS_HAS_OBJ_PROTO_PROP 1 /* has o.__proto__ etc. */
|
|
|
|
#define JS_HAS_OBJ_WATCHPOINT 1 /* has o.watch and o.unwatch */
|
|
|
|
#define JS_HAS_TOSOURCE 1 /* has Object/Array toSource method */
|
|
|
|
#define JS_HAS_CATCH_GUARD 1 /* has exception handling catch guard */
|
|
|
|
#define JS_HAS_UNEVAL 1 /* has uneval() top-level function */
|
|
|
|
#define JS_HAS_CONST 1 /* has JS2 const as alternative var */
|
|
|
|
#define JS_HAS_FUN_EXPR_STMT 1 /* has function expression statement */
|
|
|
|
#define JS_HAS_NO_SUCH_METHOD 1 /* has o.__noSuchMethod__ handler */
|
2012-12-21 03:48:36 -08:00
|
|
|
#define JS_HAS_FOR_EACH_IN 1 /* has for each (lhs in iterable) */
|
2007-05-17 18:41:17 -07:00
|
|
|
#define JS_HAS_GENERATORS 1 /* has yield in generator function */
|
|
|
|
#define JS_HAS_BLOCK_SCOPE 1 /* has block scope via let/arraycomp */
|
2008-01-29 22:27:13 -08:00
|
|
|
#define JS_HAS_DESTRUCTURING 2 /* has [a,b] = ... or {p:a,q:b} = ... */
|
2007-05-17 18:41:17 -07:00
|
|
|
#define JS_HAS_GENERATOR_EXPRS 1 /* has (expr for (lhs in iterable)) */
|
2007-05-29 18:49:42 -07:00
|
|
|
#define JS_HAS_EXPR_CLOSURES 1 /* has function (formals) listexpr */
|
2014-06-11 05:21:35 -07:00
|
|
|
#ifdef NIGHTLY_BUILD
|
|
|
|
#define JS_HAS_TEMPLATE_STRINGS 1 /* has template string support */
|
|
|
|
#endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-06-04 16:32:10 -07:00
|
|
|
/* Support for JS_NewGlobalObject. */
|
|
|
|
#define JS_HAS_NEW_GLOBAL_OBJECT 1
|
|
|
|
|
|
|
|
/* Support for JS_MakeSystemObject. */
|
|
|
|
#define JS_HAS_MAKE_SYSTEM_OBJECT 1
|
|
|
|
|
2008-01-29 22:27:13 -08:00
|
|
|
/* Feature-test macro for evolving destructuring support. */
|
|
|
|
#define JS_HAS_DESTRUCTURING_SHORTHAND (JS_HAS_DESTRUCTURING == 2)
|
2009-10-06 12:35:33 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Feature for Object.prototype.__{define,lookup}{G,S}etter__ legacy support;
|
|
|
|
* support likely to be made opt-in at some future time.
|
|
|
|
*/
|
2013-08-26 17:09:27 -07:00
|
|
|
#define JS_OLD_GETTER_SETTER_METHODS 1
|
2012-03-21 13:32:55 -07:00
|
|
|
|
2013-06-19 17:59:46 -07:00
|
|
|
#endif /* jsversion_h */
|