blob: 60be844cc665f129b5de5697302b2a3922feb627 [file] [log] [blame]
// 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));
}