name.tq 937 Bytes
Newer Older
Tobias Tebbi's avatar
Tobias Tebbi committed
1 2 3 4 5 6 7 8 9 10 11 12 13
// Copyright 2019 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.

@abstract
@generateCppClass
extern class Name extends PrimitiveHeapObject {
  hash_field: uint32;
}
// This is the same as Name, but with the information that there are no other
// kinds of names.
type AnyName = PrivateSymbol|PublicSymbol|String;

14 15 16 17 18 19 20 21 22
bitfield struct SymbolFlags extends uint32 {
  is_private: bool: 1 bit;
  is_well_known_symbol: bool: 1 bit;
  is_in_public_symbol_table: bool: 1 bit;
  is_interesting_symbol: bool: 1 bit;
  is_private_name: bool: 1 bit;
  is_private_brand: bool: 1 bit;
}

Tobias Tebbi's avatar
Tobias Tebbi committed
23 24
@generateCppClass
extern class Symbol extends Name {
25
  flags: SymbolFlags;
Tobias Tebbi's avatar
Tobias Tebbi committed
26 27 28 29 30
  description: String|Undefined;
}

type PublicSymbol extends Symbol;
type PrivateSymbol extends Symbol;
31 32 33

const kNameEmptyHashField:
    constexpr uint32 generates 'Name::kEmptyHashField';