Commit 21f61361 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[literals] Remove needless slack tracking for the empty object literal

Bug: v8:6211
Change-Id: If61c91e65abf0201651b894e348a7b342c5d0968
Reviewed-on: https://chromium-review.googlesource.com/654662Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47966}
parent 05720af2
......@@ -756,10 +756,13 @@ Node* ConstructorBuiltinsAssembler::EmitCreateEmptyObjectLiteral(
Node* map = LoadObjectField(object_function,
JSFunction::kPrototypeOrInitialMapOffset);
CSA_ASSERT(this, IsMap(map));
// Ensure that slack tracking is disabled for the map.
STATIC_ASSERT(Map::kNoSlackTracking == 0);
CSA_ASSERT(this,
IsClearWord32<Map::ConstructionCounter>(LoadMapBitField3(map)));
Node* empty_fixed_array = EmptyFixedArrayConstant();
Node* result =
AllocateJSObjectFromMap(map, empty_fixed_array, empty_fixed_array);
HandleSlackTracking(context, result, map, JSObject::kHeaderSize);
return result;
}
......
......@@ -7327,6 +7327,7 @@ void CodeStubAssembler::HandleSlackTracking(Node* context, Node* object,
// Perform in-object slack tracking if requested.
Node* bit_field3 = LoadMapBitField3(initial_map);
Label end(this), slack_tracking(this), finalize(this, Label::kDeferred);
STATIC_ASSERT(Map::kNoSlackTracking == 0);
GotoIf(IsSetWord32<Map::ConstructionCounter>(bit_field3), &slack_tracking);
// Initialize remaining fields.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment