From 8a3aeb62d0585efdb348515ae7aba6aeb9e030be Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Wed, 5 Nov 2014 13:23:15 +0000 Subject: [PATCH] HPhis with HParameter inputs must have Tagged representation BUG=v8:3670 LOG=n R=verwaest@chromium.org Review URL: https://codereview.chromium.org/702053002 Cr-Commit-Position: refs/heads/master@{#25153} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen-instructions.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 5723d4a..233ca42 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -5356,6 +5356,12 @@ class HParameter FINAL : public HTemplateInstruction<0> { return Representation::None(); } + virtual Representation KnownOptimalRepresentation() OVERRIDE { + // If a parameter is an input to a phi, that phi should not + // choose any more optimistic representation than Tagged. + return Representation::Tagged(); + } + DECLARE_CONCRETE_INSTRUCTION(Parameter) private: -- 2.7.4