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

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

Issue 10695174: [RFC] Associate AST nodes with HIstructions when building HGraph. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 8 years, 5 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
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 if (this === other) return true; 697 if (this === other) return true;
698 other = other.dominator; 698 other = other.dominator;
699 } while (other !== null && other.id >= id); 699 } while (other !== null && other.id >= id);
700 return false; 700 return false;
701 } 701 }
702 } 702 }
703 703
704 704
705 class HInstruction implements Hashable { 705 class HInstruction implements Hashable {
706 Element sourceElement; 706 Element sourceElement;
707 Token sourcePosition;
707 708
708 final int id; 709 final int id;
709 static int idCounter; 710 static int idCounter;
710 711
711 final List<HInstruction> inputs; 712 final List<HInstruction> inputs;
712 final List<HInstruction> usedBy; 713 final List<HInstruction> usedBy;
713 714
714 HBasicBlock block; 715 HBasicBlock block;
715 HInstruction previous = null; 716 HInstruction previous = null;
716 HInstruction next = null; 717 HInstruction next = null;
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 HBasicBlock get start() => expression.start; 2661 HBasicBlock get start() => expression.start;
2661 HBasicBlock get end() { 2662 HBasicBlock get end() {
2662 // We don't create a switch block if there are no cases. 2663 // We don't create a switch block if there are no cases.
2663 assert(!statements.isEmpty()); 2664 assert(!statements.isEmpty());
2664 return statements.last().end; 2665 return statements.last().end;
2665 } 2666 }
2666 2667
2667 bool accept(HStatementInformationVisitor visitor) => 2668 bool accept(HStatementInformationVisitor visitor) =>
2668 visitor.visitSwitchInfo(this); 2669 visitor.visitSwitchInfo(this);
2669 } 2670 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698