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

Unified Diff: src/objects.cc

Issue 1690923002: [runtime] Speed up allocating instances in the runtime by having a quick-check for inobject slack t… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 581ac0eaa054989339eec9070ca2fd555aece0b7..54c557f795c62e21ac72bf68d17e9814683159e9 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -9326,8 +9326,6 @@ Handle<Map> Map::RawCopy(Handle<Map> map, int instance_size) {
if (!map->is_dictionary_map()) {
new_bit_field3 = IsUnstable::update(new_bit_field3, false);
}
- new_bit_field3 =
- ConstructionCounter::update(new_bit_field3, kNoSlackTracking);
result->set_bit_field3(new_bit_field3);
return result;
}
@@ -9414,6 +9412,7 @@ Handle<Map> Map::CopyNormalized(Handle<Map> map,
result->set_dictionary_map(true);
result->set_migration_target(false);
+ result->set_construction_counter(kNoSlackTracking);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) result->DictionaryMapVerify();
@@ -12729,6 +12728,7 @@ static void ShrinkInstanceSize(Map* map, void* data) {
map->SetInObjectProperties(map->GetInObjectProperties() - slack);
map->set_unused_property_fields(map->unused_property_fields() - slack);
map->set_instance_size(map->instance_size() - slack * kPointerSize);
+ map->set_construction_counter(Map::kNoSlackTracking);
// Visitor id might depend on the instance size, recalculate it.
map->set_visitor_id(Heap::GetStaticVisitorIdForMap(map));
@@ -12739,8 +12739,6 @@ void Map::CompleteInobjectSlackTracking() {
// Has to be an initial map.
DCHECK(GetBackPointer()->IsUndefined());
- set_construction_counter(kNoSlackTracking);
-
int slack = unused_property_fields();
TransitionArray::TraverseTransitionTree(this, &GetMinInobjectSlack, &slack);
if (slack != 0) {
@@ -13332,6 +13330,7 @@ MaybeHandle<Map> JSFunction::GetDerivedMap(Isolate* isolate,
JSFunction::SetInitialMap(function, map, prototype);
map->SetConstructor(*constructor);
+ map->set_construction_counter(Map::kNoSlackTracking);
map->StartInobjectSlackTracking();
return map;
}
« 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