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

Bug: chromium:791368
Change-Id: I86d9df38698d9c8b6109d0a11579fa28810ba1dc
Reviewed-on: https://chromium-review.googlesource.com/833908
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50206}
This commit is contained in:
Igor Sheludko 2017-12-19 13:22:31 +01:00 committed by Commit Bot
parent cbd308945f
commit 21a6239113

View File

@ -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);
}