From 1feee1c6fc41f0fb1a977a3c47d8ca54c937b8e1 Mon Sep 17 00:00:00 2001 From: bmeurer Date: Tue, 3 Feb 2015 06:45:28 -0800 Subject: [PATCH] [turbofan] Parameter nodes are not idempotent. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/896463004 Cr-Commit-Position: refs/heads/master@{#26403} --- src/compiler/common-operator.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc index b9aadefdae..e67759ebaa 100644 --- a/src/compiler/common-operator.cc +++ b/src/compiler/common-operator.cc @@ -204,11 +204,12 @@ struct CommonOperatorGlobalCache FINAL { template struct ParameterOperator FINAL : public Operator1 { ParameterOperator() - : Operator1( // -- - IrOpcode::kParameter, Operator::kPure, // opcode - "Parameter", // name - 1, 0, 0, 1, 0, 0, // counts, - kIndex) {} // parameter + : Operator1( // -- + IrOpcode::kParameter, // opcode + Operator::kFoldable | Operator::kNoThrow, // flags + "Parameter", // name + 1, 0, 0, 1, 0, 0, // counts, + kIndex) {} // parameter }; #define CACHED_PARAMETER(index) \ ParameterOperator kParameter##index##Operator; @@ -306,11 +307,12 @@ const Operator* CommonOperatorBuilder::Parameter(int index) { break; } // Uncached. - return new (zone()) Operator1( // -- - IrOpcode::kParameter, Operator::kPure, // opcode - "Parameter", // name - 1, 0, 0, 1, 0, 0, // counts - index); // parameter + return new (zone()) Operator1( // -- + IrOpcode::kParameter, // opcode + Operator::kFoldable | Operator::kNoThrow, // flags + "Parameter", // name + 1, 0, 0, 1, 0, 0, // counts + index); // parameter }