Commit 21a62391 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[classes] Set proper representation during fast class boilerplate instantiation.

Bug: chromium:791368
Change-Id: I86d9df38698d9c8b6109d0a11579fa28810ba1dc
Reviewed-on: https://chromium-review.googlesource.com/833908Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50206}
parent cbd30894
......@@ -310,6 +310,9 @@ bool AddDescriptorsByTemplate(
value = GetMethodWithSharedNameAndSetHomeObject(isolate, args, value,
*receiver);
}
details =
details.CopyWithRepresentation(value->OptimalRepresentation());
} else {
DCHECK_EQ(kAccessor, details.kind());
if (value->IsAccessorPair()) {
......@@ -330,6 +333,7 @@ bool AddDescriptorsByTemplate(
DCHECK_EQ(kField, details.location());
DCHECK(!details.representation().IsDouble());
}
DCHECK(value->FitsRepresentation(details.representation()));
descriptors->Set(i, name, value, details);
}
......
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