js/src/jsversion.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jsversion.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
     1.5 + * vim: set ts=8 sts=4 et sw=4 tw=99:
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef jsversion_h
    1.11 +#define jsversion_h
    1.12 +
    1.13 +/*
    1.14 + * JS Capability Macros.
    1.15 + */
    1.16 +#define JS_HAS_STR_HTML_HELPERS 1       /* has str.anchor, str.bold, etc. */
    1.17 +#define JS_HAS_OBJ_PROTO_PROP   1       /* has o.__proto__ etc. */
    1.18 +#define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
    1.19 +#define JS_HAS_TOSOURCE         1       /* has Object/Array toSource method */
    1.20 +#define JS_HAS_CATCH_GUARD      1       /* has exception handling catch guard */
    1.21 +#define JS_HAS_UNEVAL           1       /* has uneval() top-level function */
    1.22 +#define JS_HAS_CONST            1       /* has JS2 const as alternative var */
    1.23 +#define JS_HAS_FUN_EXPR_STMT    1       /* has function expression statement */
    1.24 +#define JS_HAS_NO_SUCH_METHOD   1       /* has o.__noSuchMethod__ handler */
    1.25 +#define JS_HAS_FOR_EACH_IN      1       /* has for each (lhs in iterable) */
    1.26 +#define JS_HAS_GENERATORS       1       /* has yield in generator function */
    1.27 +#define JS_HAS_BLOCK_SCOPE      1       /* has block scope via let/arraycomp */
    1.28 +#define JS_HAS_DESTRUCTURING    2       /* has [a,b] = ... or {p:a,q:b} = ... */
    1.29 +#define JS_HAS_GENERATOR_EXPRS  1       /* has (expr for (lhs in iterable)) */
    1.30 +#define JS_HAS_EXPR_CLOSURES    1       /* has function (formals) listexpr */
    1.31 +
    1.32 +/* Support for JS_NewGlobalObject. */
    1.33 +#define JS_HAS_NEW_GLOBAL_OBJECT        1
    1.34 +
    1.35 +/* Support for JS_MakeSystemObject. */
    1.36 +#define JS_HAS_MAKE_SYSTEM_OBJECT       1
    1.37 +
    1.38 +/* Feature-test macro for evolving destructuring support. */
    1.39 +#define JS_HAS_DESTRUCTURING_SHORTHAND  (JS_HAS_DESTRUCTURING == 2)
    1.40 +
    1.41 +/*
    1.42 + * Feature for Object.prototype.__{define,lookup}{G,S}etter__ legacy support;
    1.43 + * support likely to be made opt-in at some future time.
    1.44 + */
    1.45 +#define JS_OLD_GETTER_SETTER_METHODS    1
    1.46 +
    1.47 +#endif /* jsversion_h */

mercurial