Commit b501bf93 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "[compiler] Remove dead code in CodeGenerator::BuildTranslation."

This reverts commit 8d9de7ff.

Reason for revert: Breaks roll:
https://chromium-review.googlesource.com/c/chromium/src/+/806714

  # Fatal error in ../../v8/src/compiler/code-generator.cc, line 1032
  # unreachable code

  #3 v8::internal::compiler::CodeGenerator::AddTranslationForOperand()
  #4 v8::internal::compiler::CodeGenerator::TranslateFrameStateDescriptorOperands()
  #5 v8::internal::compiler::CodeGenerator::BuildTranslation()
  #6 v8::internal::compiler::CodeGenerator::AssembleInstruction()
  #7 v8::internal::compiler::CodeGenerator::AssembleCode()
  #8 v8::internal::compiler::PipelineImpl::AssembleCode()

Original change's description:
> [compiler] Remove dead code in CodeGenerator::BuildTranslation.
> 
> R=​jarin@chromium.org
> 
> Bug: 
> Change-Id: Id219fb91c4c4f40677edea6f9c04763284e14373
> Reviewed-on: https://chromium-review.googlesource.com/800934
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49831}

TBR=jarin@chromium.org,neis@chromium.org

Change-Id: I6f5e13e70dc816a4e0c4a362bd3a30091c14c637
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/807944Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49852}
parent 99b5f699
......@@ -1014,6 +1014,18 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
}
}
break;
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(8, kPointerSize);
{
Smi* smi = reinterpret_cast<Smi*>(constant.ToInt64());
DCHECK(smi->IsSmi());
literal = DeoptimizationLiteral(smi->value());
}
break;
case Constant::kFloat32:
DCHECK(type.representation() == MachineRepresentation::kFloat32 ||
type.representation() == MachineRepresentation::kTagged);
......@@ -1028,15 +1040,8 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
DCHECK_EQ(MachineRepresentation::kTagged, type.representation());
literal = DeoptimizationLiteral(constant.ToHeapObject());
break;
case Constant::kInt64:
UNREACHABLE();
break;
case Constant::kExternalReference:
default:
UNREACHABLE();
break;
case Constant::kRpoNumber:
UNREACHABLE();
break;
}
if (literal.object().equals(info()->closure())) {
translation->StoreJSFrameFunction();
......
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