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 9extern class PrototypeInfo extends Struct { 10 // [module_namespace]: A backpointer to JSModuleNamespace from its 11 // PrototypeInfo (or undefined). This field is only used for JSModuleNamespace 12 // maps. TODO(jkummerow): Figure out if there's a way to store the namespace 13 // pointer elsewhere to save memory. 14 module_namespace: JSModuleNamespace|Undefined; 15 16 // [prototype_users]: WeakArrayList containing weak references to maps using 17 // this prototype, or Smi(0) if uninitialized. 18 prototype_users: WeakArrayList|Zero; 19 20 prototype_chain_enum_cache: FixedArray|Zero|Undefined; 21 22 // [registry_slot]: Slot in prototype's user registry where this user 23 // is stored. Returns UNREGISTERED if this prototype has not been registered. 24 registry_slot: Smi; 25 26 bit_field: SmiTagged<PrototypeInfoFlags>; 27 28 // [object_create_map]: A field caching the map for Object.create(prototype). 29 object_create_map: Weak<Map>|Undefined; 30} 31