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

Unified Diff: src/layout-descriptor.cc

Issue 885003002: Layout descriptor sharing issue fixed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/layout-descriptor.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/layout-descriptor.cc
diff --git a/src/layout-descriptor.cc b/src/layout-descriptor.cc
index 77b8ec4d1f63a01b35527815812e4a540ac0e065..70380ce1921eb567c8d5bd8b4e8d20308bfce67c 100644
--- a/src/layout-descriptor.cc
+++ b/src/layout-descriptor.cc
@@ -72,13 +72,16 @@ Handle<LayoutDescriptor> LayoutDescriptor::New(
}
-Handle<LayoutDescriptor> LayoutDescriptor::Append(Handle<Map> map,
- PropertyDetails details) {
+Handle<LayoutDescriptor> LayoutDescriptor::ShareAppend(
+ Handle<Map> map, PropertyDetails details) {
+ DCHECK(map->owns_descriptors());
Isolate* isolate = map->GetIsolate();
Handle<LayoutDescriptor> layout_descriptor(map->GetLayoutDescriptor(),
isolate);
if (!InobjectUnboxedField(map->inobject_properties(), details)) {
+ DCHECK(details.location() != kField ||
+ layout_descriptor->IsTagged(details.field_index()));
return layout_descriptor;
}
int field_index = details.field_index();
@@ -104,6 +107,8 @@ Handle<LayoutDescriptor> LayoutDescriptor::AppendIfFastOrUseFull(
return full_layout_descriptor;
}
if (!InobjectUnboxedField(map->inobject_properties(), details)) {
+ DCHECK(details.location() != kField ||
+ layout_descriptor->IsTagged(details.field_index()));
return handle(layout_descriptor, map->GetIsolate());
}
int field_index = details.field_index();
@@ -127,7 +132,6 @@ Handle<LayoutDescriptor> LayoutDescriptor::EnsureCapacity(
int new_capacity) {
int old_capacity = layout_descriptor->capacity();
if (new_capacity <= old_capacity) {
- // Nothing to do with layout in Smi-form.
return layout_descriptor;
}
Handle<LayoutDescriptor> new_layout_descriptor =
« no previous file with comments | « src/layout-descriptor.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698