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

Side by Side Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10168009: Revert "Only emit typeguards if we think they are valuable." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 interface HVisitor<R> { 5 interface HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBitAnd(HBitAnd node); 7 R visitBitAnd(HBitAnd node);
8 R visitBitNot(HBitNot node); 8 R visitBitNot(HBitNot node);
9 R visitBitOr(HBitOr node); 9 R visitBitOr(HBitOr node);
10 R visitBitXor(HBitXor node); 10 R visitBitXor(HBitXor node);
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 438
439 int hashCode() => id; 439 int hashCode() => id;
440 440
441 bool isNew() => status == STATUS_NEW; 441 bool isNew() => status == STATUS_NEW;
442 bool isOpen() => status == STATUS_OPEN; 442 bool isOpen() => status == STATUS_OPEN;
443 bool isClosed() => status == STATUS_CLOSED; 443 bool isClosed() => status == STATUS_CLOSED;
444 444
445 bool isLoopHeader() => blockInformation is HLoopInformation; 445 bool isLoopHeader() => blockInformation is HLoopInformation;
446 bool isLabeledBlock() => blockInformation is HLabeledBlockInformation; 446 bool isLabeledBlock() => blockInformation is HLabeledBlockInformation;
447 447
448 HBasicBlock get enclosingLoopHeader() {
449 if (isLoopHeader()) return this;
450 return parentLoopHeader;
451 }
452
453 bool hasGuards() => !guards.isEmpty(); 448 bool hasGuards() => !guards.isEmpty();
454 449
455 void open() { 450 void open() {
456 assert(isNew()); 451 assert(isNew());
457 status = STATUS_OPEN; 452 status = STATUS_OPEN;
458 } 453 }
459 454
460 void close(HControlFlow end) { 455 void close(HControlFlow end) {
461 assert(isOpen()); 456 assert(isOpen());
462 addAfter(last, end); 457 addAfter(last, end);
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2304 final bool isAnd; 2299 final bool isAnd;
2305 final SubExpression left; 2300 final SubExpression left;
2306 final SubExpression right; 2301 final SubExpression right;
2307 final HBasicBlock joinBlock; 2302 final HBasicBlock joinBlock;
2308 HAndOrBlockInformation(this.isAnd, 2303 HAndOrBlockInformation(this.isAnd,
2309 this.left, 2304 this.left,
2310 this.right, 2305 this.right,
2311 this.joinBlock); 2306 this.joinBlock);
2312 bool accept(HBlockInformationVisitor visitor) => visitor.visitAndOrInfo(this); 2307 bool accept(HBlockInformationVisitor visitor) => visitor.visitAndOrInfo(this);
2313 } 2308 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/bailout.dart ('k') | tests/language/src/ListDoubleIndexInLoop2Test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698