Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(481)

Side by Side Diff: src/compiler/verifier.cc

Issue 1460583003: [turbofan] Remove case_count >= 3 limit for switch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 } 244 }
245 ++count_case; 245 ++count_case;
246 break; 246 break;
247 } 247 }
248 case IrOpcode::kIfDefault: { 248 case IrOpcode::kIfDefault: {
249 ++count_default; 249 ++count_default;
250 break; 250 break;
251 } 251 }
252 default: { 252 default: {
253 UNREACHABLE(); 253 V8_Fatal(__FILE__, __LINE__, "Switch #%d illegally used by #%d:%s",
254 node->id(), use->id(), use->op()->mnemonic());
254 break; 255 break;
255 } 256 }
256 } 257 }
257 } 258 }
258 CHECK_LE(1, count_case);
259 CHECK_EQ(1, count_default); 259 CHECK_EQ(1, count_default);
260 CHECK_EQ(node->op()->ControlOutputCount(), count_case + count_default); 260 CHECK_EQ(node->op()->ControlOutputCount(), count_case + count_default);
261 // Type is empty. 261 // Type is empty.
262 CheckNotTyped(node); 262 CheckNotTyped(node);
263 break; 263 break;
264 } 264 }
265 case IrOpcode::kIfValue: 265 case IrOpcode::kIfValue:
266 case IrOpcode::kIfDefault: 266 case IrOpcode::kIfDefault:
267 CHECK_EQ(IrOpcode::kSwitch, 267 CHECK_EQ(IrOpcode::kSwitch,
268 NodeProperties::GetControlInput(node)->opcode()); 268 NodeProperties::GetControlInput(node)->opcode());
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 replacement->op()->EffectOutputCount() > 0); 1234 replacement->op()->EffectOutputCount() > 0);
1235 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1235 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1236 replacement->opcode() == IrOpcode::kFrameState); 1236 replacement->opcode() == IrOpcode::kFrameState);
1237 } 1237 }
1238 1238
1239 #endif // DEBUG 1239 #endif // DEBUG
1240 1240
1241 } // namespace compiler 1241 } // namespace compiler
1242 } // namespace internal 1242 } // namespace internal
1243 } // namespace v8 1243 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698