Commit ac52db3b authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[turbofan] Int64 constants in translations are only allowed for Smis.

When the backend sees an Int64Constant in a translation, this currently
indicates the value is a Smi value.

Bug: v8:8015
Change-Id: I1527a6374b395d3a33ae0339df4b563084ea678e
Reviewed-on: https://chromium-review.googlesource.com/1226593Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55916}
parent b13825d1
......@@ -1184,8 +1184,7 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
case Constant::kInt64:
// When pointers are 8 bytes, we can use int64 constants to represent
// Smis.
DCHECK(type.representation() == MachineRepresentation::kWord64 ||
type.representation() == MachineRepresentation::kTagged);
DCHECK_EQ(MachineRepresentation::kTagged, type.representation());
DCHECK_EQ(8, kPointerSize);
{
Smi* smi = reinterpret_cast<Smi*>(constant.ToInt64());
......
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