[turbofan] Fix properties of IrOpcode::kThrow operator.
authormstarzinger <mstarzinger@chromium.org>
Tue, 31 Mar 2015 13:43:56 +0000 (06:43 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 31 Mar 2015 13:44:04 +0000 (13:44 +0000)
This changes the IrOpcode::kThrow operator to have kNoThrow property,
which sounds unintuitive, but holds for our graphs. The operators is
used to indicate exceptional control flow out of the function, but in
itself does not throw, the throwing is done by a runtime call.

R=titzer@chromium.org
TEST=unittests/CommonOperatorTest/CommonSharedOperatorTest.Properties

Review URL: https://codereview.chromium.org/1046173002

Cr-Commit-Position: refs/heads/master@{#27541}

src/compiler/common-operator.cc
test/unittests/compiler/common-operator-unittest.cc

index 304f6fe..1d3e2cf 100644 (file)
@@ -118,7 +118,7 @@ size_t ProjectionIndexOf(const Operator* const op) {
   V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1)       \
   V(IfException, Operator::kKontrol, 0, 0, 1, 1, 0, 1)     \
   V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1)       \
-  V(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1)          \
+  V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1)           \
   V(Deoptimize, Operator::kNoThrow, 1, 1, 1, 0, 0, 1)      \
   V(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1)          \
   V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
index 162368d..51cd6b1 100644 (file)
@@ -55,7 +55,7 @@ const SharedOperator kSharedOperators[] = {
     SHARED(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
     SHARED(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
     SHARED(IfException, Operator::kKontrol, 0, 0, 1, 1, 0, 1),
-    SHARED(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1),
+    SHARED(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1),
     SHARED(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1)
 #undef SHARED
 };