2019-01-04 00:37:01 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
/* Property descriptors and flags. */
|
|
|
|
|
|
|
|
#ifndef js_PropertySpec_h
|
|
|
|
#define js_PropertySpec_h
|
|
|
|
|
|
|
|
#include "mozilla/Assertions.h" // MOZ_ASSERT{,_IF}
|
|
|
|
|
|
|
|
#include <stddef.h> // size_t
|
|
|
|
#include <stdint.h> // uint8_t, uint16_t, int32_t, uint32_t, uintptr_t
|
|
|
|
#include <type_traits> // std::enable_if
|
|
|
|
|
|
|
|
#include "jstypes.h" // JS_PUBLIC_API
|
|
|
|
|
|
|
|
#include "js/CallArgs.h" // JSNative
|
|
|
|
#include "js/PropertyDescriptor.h" // JSPROP_*
|
|
|
|
#include "js/RootingAPI.h" // JS::MutableHandle
|
2019-05-13 13:26:48 +03:00
|
|
|
#include "js/Symbol.h" // JS::SymbolCode, PropertySpecNameIsSymbol
|
2019-01-04 00:37:01 +03:00
|
|
|
#include "js/Value.h" // JS::Value
|
|
|
|
|
|
|
|
struct JSContext;
|
|
|
|
struct JSJitInfo;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Wrapper to relace JSNative for JSPropertySpecs and JSFunctionSpecs. This will
|
|
|
|
* allow us to pass one JSJitInfo per function with the property/function spec,
|
|
|
|
* without additional field overhead.
|
|
|
|
*/
|
|
|
|
struct JSNativeWrapper {
|
2019-04-26 04:01:15 +03:00
|
|
|
JSNative op = nullptr;
|
|
|
|
const JSJitInfo* info = nullptr;
|
2019-01-04 00:37:01 +03:00
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
JSNativeWrapper() = default;
|
|
|
|
|
|
|
|
JSNativeWrapper(const JSNativeWrapper& other) = default;
|
|
|
|
|
|
|
|
constexpr JSNativeWrapper(JSNative op, const JSJitInfo* info)
|
|
|
|
: op(op), info(info) {}
|
|
|
|
};
|
2019-01-04 00:37:01 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Description of a property. JS_DefineProperties and JS_InitClass take arrays
|
|
|
|
* of these and define many properties at once. JS_PSG, JS_PSGS and JS_PS_END
|
|
|
|
* are helper macros for defining such arrays.
|
|
|
|
*/
|
|
|
|
struct JSPropertySpec {
|
|
|
|
struct SelfHostedWrapper {
|
2019-04-26 04:01:15 +03:00
|
|
|
// The same type as JSNativeWrapper's first field, so that the access in
|
|
|
|
// JSPropertySpec::checkAccessorsAreSelfHosted become valid.
|
|
|
|
JSNative unused = nullptr;
|
|
|
|
|
2019-01-04 00:37:01 +03:00
|
|
|
const char* funname;
|
2019-04-26 04:01:15 +03:00
|
|
|
|
|
|
|
SelfHostedWrapper() = delete;
|
|
|
|
|
|
|
|
explicit constexpr SelfHostedWrapper(const char* funname)
|
|
|
|
: funname(funname) {}
|
2019-01-04 00:37:01 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct ValueWrapper {
|
|
|
|
uintptr_t type;
|
|
|
|
union {
|
|
|
|
const char* string;
|
|
|
|
int32_t int32;
|
|
|
|
};
|
2019-04-26 04:01:15 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
ValueWrapper() = delete;
|
|
|
|
|
|
|
|
explicit constexpr ValueWrapper(int32_t n)
|
|
|
|
: type(JSVAL_TYPE_INT32), int32(n) {}
|
|
|
|
|
|
|
|
explicit constexpr ValueWrapper(const char* s)
|
|
|
|
: type(JSVAL_TYPE_STRING), string(s) {}
|
|
|
|
|
|
|
|
public:
|
|
|
|
ValueWrapper(const ValueWrapper& other) = default;
|
|
|
|
|
|
|
|
static constexpr ValueWrapper int32Value(int32_t n) {
|
|
|
|
return ValueWrapper(n);
|
|
|
|
}
|
|
|
|
|
|
|
|
static constexpr ValueWrapper stringValue(const char* s) {
|
|
|
|
return ValueWrapper(s);
|
|
|
|
}
|
2019-01-04 00:37:01 +03:00
|
|
|
};
|
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
union Accessor {
|
|
|
|
JSNativeWrapper native;
|
|
|
|
SelfHostedWrapper selfHosted;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Accessor() = delete;
|
|
|
|
|
|
|
|
constexpr Accessor(JSNative op, const JSJitInfo* info) : native(op, info) {}
|
|
|
|
|
|
|
|
explicit constexpr Accessor(const char* funname) : selfHosted(funname) {}
|
|
|
|
|
|
|
|
public:
|
|
|
|
Accessor(const Accessor& other) = default;
|
|
|
|
|
|
|
|
static constexpr Accessor nativeAccessor(JSNative op,
|
|
|
|
const JSJitInfo* info = nullptr) {
|
|
|
|
return Accessor(op, info);
|
|
|
|
}
|
|
|
|
|
|
|
|
static constexpr Accessor selfHostedAccessor(const char* funname) {
|
|
|
|
return Accessor(funname);
|
|
|
|
}
|
|
|
|
|
|
|
|
static constexpr Accessor noAccessor() {
|
|
|
|
return Accessor(nullptr, nullptr);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
union AccessorsOrValue {
|
|
|
|
struct Accessors {
|
|
|
|
Accessor getter;
|
|
|
|
Accessor setter;
|
|
|
|
|
|
|
|
constexpr Accessors(Accessor getter, Accessor setter)
|
|
|
|
: getter(getter), setter(setter) {}
|
2019-01-04 00:37:01 +03:00
|
|
|
} accessors;
|
|
|
|
ValueWrapper value;
|
2019-04-26 04:01:15 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
AccessorsOrValue() = delete;
|
|
|
|
|
|
|
|
constexpr AccessorsOrValue(Accessor getter, Accessor setter)
|
|
|
|
: accessors(getter, setter) {}
|
|
|
|
|
|
|
|
explicit constexpr AccessorsOrValue(ValueWrapper value) : value(value) {}
|
|
|
|
|
|
|
|
public:
|
|
|
|
AccessorsOrValue(const AccessorsOrValue& other) = default;
|
|
|
|
|
|
|
|
static constexpr AccessorsOrValue fromAccessors(Accessor getter,
|
|
|
|
Accessor setter) {
|
|
|
|
return AccessorsOrValue(getter, setter);
|
|
|
|
}
|
|
|
|
|
|
|
|
static constexpr AccessorsOrValue fromValue(ValueWrapper value) {
|
|
|
|
return AccessorsOrValue(value);
|
|
|
|
}
|
2019-01-04 00:37:01 +03:00
|
|
|
};
|
|
|
|
|
2019-05-13 13:26:48 +03:00
|
|
|
union Name {
|
|
|
|
private:
|
|
|
|
const char* string_;
|
|
|
|
uintptr_t symbol_;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Name() = delete;
|
|
|
|
|
|
|
|
explicit constexpr Name(const char* str) : string_(str) {}
|
|
|
|
explicit constexpr Name(JS::SymbolCode symbol)
|
|
|
|
: symbol_(uint32_t(symbol) + 1) {}
|
|
|
|
|
|
|
|
explicit operator bool() const { return !!symbol_; }
|
|
|
|
|
|
|
|
bool isSymbol() const { return JS::PropertySpecNameIsSymbol(symbol_); }
|
|
|
|
JS::SymbolCode symbol() const {
|
|
|
|
MOZ_ASSERT(isSymbol());
|
|
|
|
return JS::SymbolCode(symbol_ - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool isString() const { return !isSymbol(); }
|
|
|
|
const char* string() const {
|
|
|
|
MOZ_ASSERT(isString());
|
|
|
|
return string_;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
Name name;
|
2019-04-26 04:01:15 +03:00
|
|
|
uint8_t flags;
|
|
|
|
AccessorsOrValue u;
|
|
|
|
|
|
|
|
private:
|
|
|
|
JSPropertySpec() = delete;
|
|
|
|
|
|
|
|
constexpr JSPropertySpec(const char* name, uint8_t flags, AccessorsOrValue u)
|
|
|
|
: name(name), flags(flags), u(u) {}
|
2019-05-13 13:26:48 +03:00
|
|
|
constexpr JSPropertySpec(JS::SymbolCode name, uint8_t flags,
|
|
|
|
AccessorsOrValue u)
|
|
|
|
: name(name), flags(flags), u(u) {}
|
2019-04-26 04:01:15 +03:00
|
|
|
|
|
|
|
public:
|
|
|
|
JSPropertySpec(const JSPropertySpec& other) = default;
|
|
|
|
|
|
|
|
static constexpr JSPropertySpec nativeAccessors(
|
|
|
|
const char* name, uint8_t flags, JSNative getter,
|
|
|
|
const JSJitInfo* getterInfo, JSNative setter = nullptr,
|
|
|
|
const JSJitInfo* setterInfo = nullptr) {
|
|
|
|
return JSPropertySpec(
|
|
|
|
name, flags,
|
|
|
|
AccessorsOrValue::fromAccessors(
|
|
|
|
JSPropertySpec::Accessor::nativeAccessor(getter, getterInfo),
|
|
|
|
JSPropertySpec::Accessor::nativeAccessor(setter, setterInfo)));
|
|
|
|
}
|
|
|
|
|
2019-05-13 13:26:48 +03:00
|
|
|
static constexpr JSPropertySpec nativeAccessors(
|
|
|
|
JS::SymbolCode name, uint8_t flags, JSNative getter,
|
|
|
|
const JSJitInfo* getterInfo, JSNative setter = nullptr,
|
|
|
|
const JSJitInfo* setterInfo = nullptr) {
|
|
|
|
return JSPropertySpec(
|
|
|
|
name, flags,
|
|
|
|
AccessorsOrValue::fromAccessors(
|
|
|
|
JSPropertySpec::Accessor::nativeAccessor(getter, getterInfo),
|
|
|
|
JSPropertySpec::Accessor::nativeAccessor(setter, setterInfo)));
|
|
|
|
}
|
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
static constexpr JSPropertySpec selfHostedAccessors(
|
|
|
|
const char* name, uint8_t flags, const char* getterName,
|
|
|
|
const char* setterName = nullptr) {
|
|
|
|
return JSPropertySpec(
|
|
|
|
name, flags | JSPROP_GETTER | (setterName ? JSPROP_SETTER : 0),
|
|
|
|
AccessorsOrValue::fromAccessors(
|
|
|
|
JSPropertySpec::Accessor::selfHostedAccessor(getterName),
|
|
|
|
setterName
|
|
|
|
? JSPropertySpec::Accessor::selfHostedAccessor(setterName)
|
|
|
|
: JSPropertySpec::Accessor::noAccessor()));
|
|
|
|
}
|
|
|
|
|
2019-05-13 13:26:48 +03:00
|
|
|
static constexpr JSPropertySpec selfHostedAccessors(
|
|
|
|
JS::SymbolCode name, uint8_t flags, const char* getterName,
|
|
|
|
const char* setterName = nullptr) {
|
|
|
|
return JSPropertySpec(
|
|
|
|
name, flags | JSPROP_GETTER | (setterName ? JSPROP_SETTER : 0),
|
|
|
|
AccessorsOrValue::fromAccessors(
|
|
|
|
JSPropertySpec::Accessor::selfHostedAccessor(getterName),
|
|
|
|
setterName
|
|
|
|
? JSPropertySpec::Accessor::selfHostedAccessor(setterName)
|
|
|
|
: JSPropertySpec::Accessor::noAccessor()));
|
|
|
|
}
|
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
static constexpr JSPropertySpec int32Value(const char* name, uint8_t flags,
|
|
|
|
int32_t n) {
|
|
|
|
return JSPropertySpec(name, flags | JSPROP_INTERNAL_USE_BIT,
|
|
|
|
AccessorsOrValue::fromValue(
|
|
|
|
JSPropertySpec::ValueWrapper::int32Value(n)));
|
|
|
|
}
|
|
|
|
|
2019-05-13 13:26:48 +03:00
|
|
|
static constexpr JSPropertySpec int32Value(JS::SymbolCode name, uint8_t flags,
|
|
|
|
int32_t n) {
|
|
|
|
return JSPropertySpec(name, flags | JSPROP_INTERNAL_USE_BIT,
|
|
|
|
AccessorsOrValue::fromValue(
|
|
|
|
JSPropertySpec::ValueWrapper::int32Value(n)));
|
|
|
|
}
|
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
static constexpr JSPropertySpec stringValue(const char* name, uint8_t flags,
|
|
|
|
const char* s) {
|
|
|
|
return JSPropertySpec(name, flags | JSPROP_INTERNAL_USE_BIT,
|
|
|
|
AccessorsOrValue::fromValue(
|
|
|
|
JSPropertySpec::ValueWrapper::stringValue(s)));
|
|
|
|
}
|
|
|
|
|
2019-05-13 13:26:48 +03:00
|
|
|
static constexpr JSPropertySpec stringValue(JS::SymbolCode name,
|
|
|
|
uint8_t flags, const char* s) {
|
|
|
|
return JSPropertySpec(name, flags | JSPROP_INTERNAL_USE_BIT,
|
|
|
|
AccessorsOrValue::fromValue(
|
|
|
|
JSPropertySpec::ValueWrapper::stringValue(s)));
|
|
|
|
}
|
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
static constexpr JSPropertySpec sentinel() {
|
|
|
|
return JSPropertySpec(nullptr, 0,
|
|
|
|
AccessorsOrValue::fromAccessors(
|
|
|
|
JSPropertySpec::Accessor::noAccessor(),
|
|
|
|
JSPropertySpec::Accessor::noAccessor()));
|
|
|
|
}
|
|
|
|
|
2019-01-04 00:37:01 +03:00
|
|
|
bool isAccessor() const { return !(flags & JSPROP_INTERNAL_USE_BIT); }
|
|
|
|
JS_PUBLIC_API bool getValue(JSContext* cx,
|
|
|
|
JS::MutableHandle<JS::Value> value) const;
|
|
|
|
|
|
|
|
bool isSelfHosted() const {
|
|
|
|
MOZ_ASSERT(isAccessor());
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
// Verify that our accessors match our JSPROP_GETTER flag.
|
|
|
|
if (flags & JSPROP_GETTER) {
|
|
|
|
checkAccessorsAreSelfHosted();
|
|
|
|
} else {
|
|
|
|
checkAccessorsAreNative();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
return (flags & JSPROP_GETTER);
|
|
|
|
}
|
|
|
|
|
|
|
|
static_assert(sizeof(SelfHostedWrapper) == sizeof(JSNativeWrapper),
|
|
|
|
"JSPropertySpec::getter/setter must be compact");
|
2019-04-26 04:01:15 +03:00
|
|
|
static_assert(offsetof(SelfHostedWrapper, unused) ==
|
|
|
|
offsetof(JSNativeWrapper, op) &&
|
|
|
|
offsetof(SelfHostedWrapper, funname) ==
|
2019-01-04 00:37:01 +03:00
|
|
|
offsetof(JSNativeWrapper, info),
|
2019-04-26 04:01:15 +03:00
|
|
|
"checkAccessorsAreNative below require that "
|
2019-01-04 00:37:01 +03:00
|
|
|
"SelfHostedWrapper::funname overlay "
|
2019-04-26 04:01:15 +03:00
|
|
|
"JSNativeWrapper::info and "
|
|
|
|
"SelfHostedWrapper::unused overlay "
|
|
|
|
"JSNativeWrapper::op");
|
2019-01-04 00:37:01 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
void checkAccessorsAreNative() const {
|
2019-01-09 19:45:05 +03:00
|
|
|
// We may have a getter or a setter or both. And whichever ones we have
|
|
|
|
// should not have a SelfHostedWrapper for the accessor.
|
2019-04-26 04:01:15 +03:00
|
|
|
MOZ_ASSERT_IF(u.accessors.getter.native.info, u.accessors.getter.native.op);
|
|
|
|
MOZ_ASSERT_IF(u.accessors.setter.native.info, u.accessors.setter.native.op);
|
2019-01-04 00:37:01 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
void checkAccessorsAreSelfHosted() const {
|
2019-04-26 04:01:15 +03:00
|
|
|
MOZ_ASSERT(!u.accessors.getter.selfHosted.unused);
|
|
|
|
MOZ_ASSERT(!u.accessors.setter.selfHosted.unused);
|
2019-01-04 00:37:01 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#define JS_CHECK_ACCESSOR_FLAGS(flags) \
|
|
|
|
(static_cast<std::enable_if<((flags) & ~(JSPROP_ENUMERATE | \
|
|
|
|
JSPROP_PERMANENT)) == 0>::type>(0), \
|
|
|
|
(flags))
|
|
|
|
|
2019-04-26 04:01:15 +03:00
|
|
|
#define JS_PSG(name, getter, flags) \
|
|
|
|
JSPropertySpec::nativeAccessors(name, JS_CHECK_ACCESSOR_FLAGS(flags), \
|
|
|
|
getter, nullptr)
|
|
|
|
#define JS_PSGS(name, getter, setter, flags) \
|
|
|
|
JSPropertySpec::nativeAccessors(name, JS_CHECK_ACCESSOR_FLAGS(flags), \
|
|
|
|
getter, nullptr, setter, nullptr)
|
2019-05-13 13:26:48 +03:00
|
|
|
#define JS_SYM_GET(symbol, getter, flags) \
|
|
|
|
JSPropertySpec::nativeAccessors(::JS::SymbolCode::symbol, \
|
|
|
|
JS_CHECK_ACCESSOR_FLAGS(flags), getter, \
|
|
|
|
nullptr)
|
2019-04-26 04:01:15 +03:00
|
|
|
#define JS_SELF_HOSTED_GET(name, getterName, flags) \
|
|
|
|
JSPropertySpec::selfHostedAccessors(name, JS_CHECK_ACCESSOR_FLAGS(flags), \
|
|
|
|
getterName)
|
|
|
|
#define JS_SELF_HOSTED_GETSET(name, getterName, setterName, flags) \
|
|
|
|
JSPropertySpec::selfHostedAccessors(name, JS_CHECK_ACCESSOR_FLAGS(flags), \
|
|
|
|
getterName, setterName)
|
2019-05-07 09:53:28 +03:00
|
|
|
#define JS_SELF_HOSTED_SYM_GET(symbol, getterName, flags) \
|
|
|
|
JSPropertySpec::selfHostedAccessors( \
|
2019-05-13 13:26:48 +03:00
|
|
|
::JS::SymbolCode::symbol, JS_CHECK_ACCESSOR_FLAGS(flags), getterName)
|
2019-01-04 00:37:01 +03:00
|
|
|
#define JS_STRING_PS(name, string, flags) \
|
2019-04-26 04:01:15 +03:00
|
|
|
JSPropertySpec::stringValue(name, flags, string)
|
|
|
|
#define JS_STRING_SYM_PS(symbol, string, flags) \
|
2019-05-13 13:26:48 +03:00
|
|
|
JSPropertySpec::stringValue(::JS::SymbolCode::symbol, flags, string)
|
2019-01-04 00:37:01 +03:00
|
|
|
#define JS_INT32_PS(name, value, flags) \
|
2019-04-26 04:01:15 +03:00
|
|
|
JSPropertySpec::int32Value(name, flags, value)
|
|
|
|
#define JS_PS_END JSPropertySpec::sentinel()
|
2019-01-04 00:37:01 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* To define a native function, set call to a JSNativeWrapper. To define a
|
|
|
|
* self-hosted function, set selfHostedName to the name of a function
|
|
|
|
* compiled during JSRuntime::initSelfHosting.
|
|
|
|
*/
|
|
|
|
struct JSFunctionSpec {
|
2019-05-13 13:26:48 +03:00
|
|
|
using Name = JSPropertySpec::Name;
|
|
|
|
|
|
|
|
Name name;
|
2019-01-04 00:37:01 +03:00
|
|
|
JSNativeWrapper call;
|
|
|
|
uint16_t nargs;
|
|
|
|
uint16_t flags;
|
|
|
|
const char* selfHostedName;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Terminating sentinel initializer to put at the end of a JSFunctionSpec array
|
|
|
|
* that's passed to JS_DefineFunctions or JS_InitClass.
|
|
|
|
*/
|
|
|
|
#define JS_FS_END JS_FN(nullptr, nullptr, 0, 0)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initializer macros for a JSFunctionSpec array element. JS_FNINFO allows the
|
|
|
|
* simple adding of JSJitInfos. JS_SELF_HOSTED_FN declares a self-hosted
|
|
|
|
* function. JS_INLINABLE_FN allows specifying an InlinableNative enum value for
|
|
|
|
* natives inlined or specialized by the JIT. Finally JS_FNSPEC has slots for
|
|
|
|
* all the fields.
|
|
|
|
*
|
|
|
|
* The _SYM variants allow defining a function with a symbol key rather than a
|
|
|
|
* string key. For example, use JS_SYM_FN(iterator, ...) to define an
|
|
|
|
* @@iterator method.
|
|
|
|
*/
|
|
|
|
#define JS_FN(name, call, nargs, flags) \
|
|
|
|
JS_FNSPEC(name, call, nullptr, nargs, flags, nullptr)
|
|
|
|
#define JS_INLINABLE_FN(name, call, nargs, flags, native) \
|
|
|
|
JS_FNSPEC(name, call, &js::jit::JitInfo_##native, nargs, flags, nullptr)
|
|
|
|
#define JS_SYM_FN(symbol, call, nargs, flags) \
|
|
|
|
JS_SYM_FNSPEC(symbol, call, nullptr, nargs, flags, nullptr)
|
|
|
|
#define JS_FNINFO(name, call, info, nargs, flags) \
|
|
|
|
JS_FNSPEC(name, call, info, nargs, flags, nullptr)
|
|
|
|
#define JS_SELF_HOSTED_FN(name, selfHostedName, nargs, flags) \
|
|
|
|
JS_FNSPEC(name, nullptr, nullptr, nargs, flags, selfHostedName)
|
|
|
|
#define JS_SELF_HOSTED_SYM_FN(symbol, selfHostedName, nargs, flags) \
|
|
|
|
JS_SYM_FNSPEC(symbol, nullptr, nullptr, nargs, flags, selfHostedName)
|
2019-05-13 13:26:48 +03:00
|
|
|
#define JS_SYM_FNSPEC(symbol, call, info, nargs, flags, selfHostedName) \
|
|
|
|
JS_FNSPEC(::JS::SymbolCode::symbol, call, info, nargs, flags, selfHostedName)
|
2019-01-04 00:37:01 +03:00
|
|
|
#define JS_FNSPEC(name, call, info, nargs, flags, selfHostedName) \
|
2019-05-13 13:26:48 +03:00
|
|
|
{ JSFunctionSpec::Name(name), {call, info}, nargs, flags, selfHostedName }
|
2019-01-04 00:37:01 +03:00
|
|
|
|
|
|
|
#endif // js_PropertySpec_h
|