Bug 1877642 - Disable browser_fullscreen-tab-close-race.js on apple_silicon !debug...
[gecko.git] / js / src / builtin / BigInt.h
blob8fb2d85dbfb1edd16dde81f496d096dee71ecf3b
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: set ts=8 sts=2 et sw=2 tw=80:
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef builtin_BigInt_h
8 #define builtin_BigInt_h
10 #include "js/Class.h"
11 #include "js/RootingAPI.h"
12 #include "vm/NativeObject.h"
14 namespace js {
16 class GlobalObject;
18 class BigIntObject : public NativeObject {
19 static const unsigned PRIMITIVE_VALUE_SLOT = 0;
20 static const unsigned RESERVED_SLOTS = 1;
22 public:
23 static const ClassSpec classSpec_;
24 static const JSClass class_;
25 static const JSClass protoClass_;
27 static JSObject* create(JSContext* cx, JS::Handle<JS::BigInt*> bi);
29 // Methods defined on BigInt.prototype.
30 static bool valueOf_impl(JSContext* cx, const CallArgs& args);
31 static bool valueOf(JSContext* cx, unsigned argc, JS::Value* vp);
32 static bool toString_impl(JSContext* cx, const CallArgs& args);
33 static bool toString(JSContext* cx, unsigned argc, JS::Value* vp);
34 #ifndef JS_HAS_INTL_API
35 static bool toLocaleString_impl(JSContext* cx, const CallArgs& args);
36 static bool toLocaleString(JSContext* cx, unsigned argc, JS::Value* vp);
37 #endif
38 static bool asUintN(JSContext* cx, unsigned argc, JS::Value* vp);
39 static bool asIntN(JSContext* cx, unsigned argc, JS::Value* vp);
41 JS::BigInt* unbox() const;
43 private:
44 static const JSPropertySpec properties[];
45 static const JSFunctionSpec methods[];
46 static const JSFunctionSpec staticMethods[];
49 extern JSObject* InitBigIntClass(JSContext* cx, Handle<GlobalObject*> global);
51 } // namespace js
53 #endif