Lines Matching refs:broker
5 #include "src/compiler/js-heap-broker.h"
27 static ObjectData* Serialize(JSHeapBroker* broker, Handle<Object> object);
30 : broker(broker_), object(object_), is_smi(is_smi_) {
31 broker->AddData(object, this);
40 JSHeapBroker* const broker;
49 broker->GetOrCreateData(handle(object_->name(), broker->isolate()))
53 static HeapObjectData* Serialize(JSHeapBroker* broker,
141 NameData(JSHeapBroker* broker, Handle<Name> object, HeapObjectType type)
142 : HeapObjectData(broker, object, type) {}
147 StringData(JSHeapBroker* broker, Handle<String> object, HeapObjectType type)
148 : NameData(broker, object, type),
154 broker->isolate(), broker->isolate()->unicode_cache(), object, flags);
168 InternalizedStringData(JSHeapBroker* broker,
170 : StringData(broker, object, type) {}
261 AllocationSiteData(JSHeapBroker* broker, Handle<AllocationSite> object_,
263 : HeapObjectData(broker, object_, type_),
269 handle(object_->boilerplate(), broker->isolate()))) {
325 elements_kind_generalizations_(broker->zone()) {}
344 broker->Trace("Computing ElementsKind generalizations of %p.\n", *object);
352 Map::AsElementsKind(broker->isolate(), self.object<Map>(), to_kind);
354 broker->GetOrCreateData(target)->AsMap());
378 ? broker->GetOrCreateData(
379 handle(value->ToObject(), broker->isolate()))
487 if (broker->mode() == JSHeapBroker::kDisabled) { \
497 CHECK_NE(broker->mode(), JSHeapBroker::kDisabled); \
504 ObjectData* ObjectData::Serialize(JSHeapBroker* broker, Handle<Object> object) {
505 CHECK(broker->SerializingAllowed());
506 return object->IsSmi() ? new (broker->zone()) ObjectData(broker, object, true)
508 broker, Handle<HeapObject>::cast(object));
511 HeapObjectData* HeapObjectData::Serialize(JSHeapBroker* broker,
513 CHECK(broker->SerializingAllowed());
514 Handle<Map> map(object->map(), broker->isolate());
515 HeapObjectType type = broker->HeapObjectTypeFromMap(map);
519 return new (broker->zone()) \
520 name##Data(broker, Handle<name>::cast(object), type); \
534 return StringRef(broker(),
535 Object::TypeOf(broker()->isolate(), object<Object>()));
538 Isolate* ObjectRef::isolate() const { return broker()->isolate(); }
545 return ContextRef(broker(), handle(previous, broker()->isolate()));
551 Handle<Object> value(object<Context>()->get(index), broker()->isolate());
552 return ObjectRef(broker(), value);
560 Trace("%s", "Constructing heap broker.\n");
710 if (broker()->mode() == JSHeapBroker::kDisabled) {
712 return broker()->HeapObjectTypeFromMap(object<HeapObject>()->map());
722 if (Map::TryGetObjectCreateMap(broker()->isolate(), object<HeapObject>())
724 return MapRef(broker(), instance_map);
731 if (broker()->mode() == JSHeapBroker::kDisabled) {
735 return MapRef(broker(), Map::AsElementsKind(broker()->isolate(),
754 broker()->isolate());
764 if (!ScriptContextTable::Lookup(broker()->isolate(), table,
769 broker()->isolate(), table, lookup_result.context_index);
770 LookupResult result{ContextRef(broker(), script_context),
781 if (broker()->mode() == JSHeapBroker::kDisabled) {
785 broker()->isolate());
786 return ObjectRef(broker(), value);
805 return ObjectRef(broker(),
807 broker()->isolate()));
812 if (broker()->mode() == JSHeapBroker::kDisabled) {
818 handle(object<AllocationSite>()->boilerplate(), broker()->isolate()));
837 broker()->isolate()->factory()->CopyAndTenureFixedCOWArray(
861 return NameRef(broker(),
863 broker()->isolate()));
869 ReadOnlyRoots(broker()->isolate()).fixed_cow_array_map();
876 object<Map>()->FindFieldOwner(broker()->isolate(), descriptor),
877 broker()->isolate());
878 return MapRef(broker(), owner);
886 broker()->isolate());
887 return ObjectRef(broker(), field_type);
891 if (broker()->mode() == JSHeapBroker::kDisabled) {
900 if (broker()->mode() == JSHeapBroker::kDisabled) {
905 return StringToDouble(broker()->isolate(),
906 broker()->isolate()->unicode_cache(),
915 broker()->isolate(), i);
921 return ObjectRef(broker(),
922 handle(object<FixedArray>()->get(i), broker()->isolate()));
936 if (broker()->mode() == JSHeapBroker::kDisabled) { \
942 // Macros for definining a const getter that, depending on the broker mode,
948 if (broker()->mode() == JSHeapBroker::kDisabled) { \
952 broker(), handle(object<holder>()->name(), broker()->isolate())); \
980 return result##Ref(broker(), \
981 handle(object<holder>()->name(), broker()->isolate())); \
1097 return object<Object>()->BooleanValue(broker()->isolate());
1105 ObjectRef true_ref(broker(),
1106 broker()->isolate()->factory()->true_value());
1128 return CellRef(broker(), handle(object<Module>()->GetCell(cell_index),
1129 broker()->isolate()));
1132 ObjectRef::ObjectRef(JSHeapBroker* broker, Handle<Object> object) {
1133 switch (broker->mode()) {
1135 data_ = FLAG_strict_heap_broker ? broker->GetData(object)
1136 : broker->GetOrCreateData(object);
1139 data_ = broker->GetOrCreateData(object);
1142 data_ = broker->GetData(object);
1146 new (broker->zone()) ObjectData(broker, object, object->IsSmi());
1154 if (broker()->mode() == JSHeapBroker::kDisabled) {
1157 return JSObjectRef(broker(), handle(object<AllocationSite>()->boilerplate(),
1158 broker()->isolate()));
1175 JSHeapBroker* ObjectRef::broker() const { return data_->broker; }
1179 Reduction NoChangeBecauseOfMissingData(JSHeapBroker* broker,
1183 broker, function, line);