Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: src/objects.cc

Issue 2636493003: Revert of [compiler] Support Object.create(null) inlining in TF (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index c052987896cc908ef456ae21f984fd06890aa27d..bef1046fc16a0c00723d1e0a7c36f54cb3852a66 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4705,36 +4705,6 @@
map->UpdateDescriptors(*new_descriptors, layout_descriptor);
}
-// static
-Handle<Map> Map::GetObjectCreateMap(Handle<HeapObject> prototype) {
- Isolate* isolate = prototype->GetIsolate();
- Handle<Map> map(isolate->native_context()->object_function()->initial_map(),
- isolate);
- if (map->prototype() == *prototype) return map;
- if (prototype->IsNull(isolate)) {
- return isolate->slow_object_with_null_prototype_map();
- }
- if (prototype->IsJSObject()) {
- Handle<JSObject> js_prototype = Handle<JSObject>::cast(prototype);
- if (!js_prototype->map()->is_prototype_map()) {
- JSObject::OptimizeAsPrototype(js_prototype, FAST_PROTOTYPE);
- }
- Handle<PrototypeInfo> info =
- Map::GetOrCreatePrototypeInfo(js_prototype, isolate);
- // TODO(verwaest): Use inobject slack tracking for this map.
- if (info->HasObjectCreateMap()) {
- map = handle(info->ObjectCreateMap(), isolate);
- } else {
- map = Map::CopyInitialMap(map);
- Map::SetPrototype(map, prototype, FAST_PROTOTYPE);
- PrototypeInfo::SetObjectCreateMap(info, map);
- }
- return map;
- }
-
- return Map::TransitionToPrototype(map, prototype, REGULAR_PROTOTYPE);
-}
-
template <class T>
static int AppendUniqueCallbacks(Handle<TemplateList> callbacks,
Handle<typename T::Array> array,
@@ -8232,8 +8202,8 @@
// Wrapped string elements aren't explicitly stored in the elements backing
// store, but are loaded indirectly from the underlying string.
return !IsStringWrapperElementsKind(elements_kind()) &&
- !IsSpecialReceiverMap() && !has_hidden_prototype() &&
- !is_dictionary_map();
+ instance_type() > LAST_SPECIAL_RECEIVER_TYPE &&
+ !has_hidden_prototype() && !is_dictionary_map();
}
MUST_USE_RESULT Maybe<bool> FastGetOwnValuesOrEntries(
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698