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

Unified Diff: src/objects.cc

Issue 955433002: Prototype objects never share their map, and hence cannot be in deprecated state. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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') | no next file » | 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 ea4b6644c11c3ddda184b086a35969637533821c..7a3490286ae12379c78838aa97a7890a94a8f955 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2931,30 +2931,7 @@ Handle<Map> Map::GeneralizeAllFieldRepresentations(
// static
-MaybeHandle<Map> Map::TryUpdate(Handle<Map> map) {
- Handle<Map> proto_map(map);
- while (proto_map->prototype()->IsJSObject()) {
- Handle<JSObject> holder(JSObject::cast(proto_map->prototype()));
- proto_map = Handle<Map>(holder->map());
- if (proto_map->is_deprecated() && JSObject::TryMigrateInstance(holder)) {
- proto_map = Handle<Map>(holder->map());
- }
- }
- return TryUpdateInternal(map);
-}
-
-
-// static
-Handle<Map> Map::Update(Handle<Map> map) {
- if (!map->is_deprecated()) return map;
- return ReconfigureProperty(map, -1, kData, NONE, Representation::None(),
- HeapType::None(map->GetIsolate()),
- ALLOW_IN_DESCRIPTOR);
-}
-
-
-// static
-MaybeHandle<Map> Map::TryUpdateInternal(Handle<Map> old_map) {
+MaybeHandle<Map> Map::TryUpdate(Handle<Map> old_map) {
DisallowHeapAllocation no_allocation;
DisallowDeoptimization no_deoptimization(old_map->GetIsolate());
@@ -3018,6 +2995,15 @@ MaybeHandle<Map> Map::TryUpdateInternal(Handle<Map> old_map) {
}
+// static
+Handle<Map> Map::Update(Handle<Map> map) {
+ if (!map->is_deprecated()) return map;
+ return ReconfigureProperty(map, -1, kData, NONE, Representation::None(),
+ HeapType::None(map->GetIsolate()),
+ ALLOW_IN_DESCRIPTOR);
+}
+
+
MaybeHandle<Object> JSObject::SetPropertyWithInterceptor(LookupIterator* it,
Handle<Object> value) {
Handle<Name> name = it->name();
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698