• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5bitfield struct PrototypeInfoFlags extends uint31 {
6  should_be_fast: bool: 1 bit;
7}
8
9@generateCppClass
10extern class PrototypeInfo extends Struct {
11  // [module_namespace]: A backpointer to JSModuleNamespace from its
12  // PrototypeInfo (or undefined). This field is only used for JSModuleNamespace
13  // maps.  TODO(jkummerow): Figure out if there's a way to store the namespace
14  // pointer elsewhere to save memory.
15  module_namespace: JSModuleNamespace|Undefined;
16
17  // [prototype_users]: WeakArrayList containing weak references to maps using
18  // this prototype, or Smi(0) if uninitialized.
19  prototype_users: WeakArrayList|Zero;
20
21  prototype_chain_enum_cache: FixedArray|Zero|Undefined;
22
23  // [registry_slot]: Slot in prototype's user registry where this user
24  // is stored. Returns UNREGISTERED if this prototype has not been registered.
25  registry_slot: Smi;
26
27  // [object_create_map]: A field caching the map for Object.create(prototype).
28  object_create_map: Weak<Map>|Undefined;
29
30  bit_field: SmiTagged<PrototypeInfoFlags>;
31}
32