Commit 06c26f64 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[ic] Optimize length access in AccessorAssembler::ExtendPropertiesBackingStore.

When the optimal parameter mode is untagged (i.e. on x64), it's more
efficient to read the length of the properties backing store untagged
instead of reading the tagged value first and then untagging it
explicitly.

Change-Id: I0f685523e11da12fe51fad138bf972ee743c3ac8
Reviewed-on: https://chromium-review.googlesource.com/461138Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44169}
parent 6226576e
......@@ -1055,11 +1055,12 @@ Node* AccessorAssembler::PrepareValueForStore(Node* handler_word, Node* holder,
}
void AccessorAssembler::ExtendPropertiesBackingStore(Node* object) {
Node* properties = LoadProperties(object);
Node* length = LoadFixedArrayBaseLength(properties);
ParameterMode mode = OptimalParameterMode();
length = TaggedToParameter(length, mode);
Node* properties = LoadProperties(object);
Node* length = (mode == INTPTR_PARAMETERS)
? LoadAndUntagFixedArrayBaseLength(properties)
: LoadFixedArrayBaseLength(properties);
Node* delta = IntPtrOrSmiConstant(JSObject::kFieldsAdded, mode);
Node* new_capacity = IntPtrOrSmiAdd(length, delta, mode);
......
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