summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/bigint.tq
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/objects/bigint.tq')
-rw-r--r--deps/v8/src/objects/bigint.tq21
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/v8/src/objects/bigint.tq b/deps/v8/src/objects/bigint.tq
new file mode 100644
index 0000000000..60be844cc6
--- /dev/null
+++ b/deps/v8/src/objects/bigint.tq
@@ -0,0 +1,21 @@
+// Copyright 2020 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(nicohartmann): Discuss whether types used by multiple builtins should be
+// in global namespace
+extern class BigIntBase extends PrimitiveHeapObject
+ generates 'TNode<BigInt>' {}
+
+type BigInt extends BigIntBase;
+
+@noVerifier
+@hasSameInstanceTypeAsParent
+@doNotGenerateCast
+extern class MutableBigInt extends BigIntBase generates 'TNode<BigInt>' {
+}
+
+Convert<BigInt, MutableBigInt>(i: MutableBigInt): BigInt {
+ assert(bigint::IsCanonicalized(i));
+ return %RawDownCast<BigInt>(Convert<BigIntBase>(i));
+}