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

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

Issue 10915122: Fix source locations for inlined and patched functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 3 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) 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 visitBailoutTarget(HBailoutTarget node); 7 R visitBailoutTarget(HBailoutTarget node);
8 R visitBitAnd(HBitAnd node); 8 R visitBitAnd(HBitAnd node);
9 R visitBitNot(HBitNot node); 9 R visitBitNot(HBitNot node);
10 R visitBitOr(HBitOr node); 10 R visitBitOr(HBitOr node);
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 if (this === other) return true; 734 if (this === other) return true;
735 other = other.dominator; 735 other = other.dominator;
736 } while (other !== null && other.id >= id); 736 } while (other !== null && other.id >= id);
737 return false; 737 return false;
738 } 738 }
739 } 739 }
740 740
741 741
742 class HInstruction implements Hashable { 742 class HInstruction implements Hashable {
743 Element sourceElement; 743 Element sourceElement;
744 Token sourcePosition; 744 SourceFileLocation sourcePosition;
745 745
746 final int id; 746 final int id;
747 static int idCounter; 747 static int idCounter;
748 748
749 final List<HInstruction> inputs; 749 final List<HInstruction> inputs;
750 final List<HInstruction> usedBy; 750 final List<HInstruction> usedBy;
751 751
752 HBasicBlock block; 752 HBasicBlock block;
753 HInstruction previous = null; 753 HInstruction previous = null;
754 HInstruction next = null; 754 HInstruction next = null;
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 static const int FOR_IN_LOOP = 3; 2746 static const int FOR_IN_LOOP = 3;
2747 static const int NOT_A_LOOP = -1; 2747 static const int NOT_A_LOOP = -1;
2748 2748
2749 final int kind; 2749 final int kind;
2750 final HExpressionInformation initializer; 2750 final HExpressionInformation initializer;
2751 final HExpressionInformation condition; 2751 final HExpressionInformation condition;
2752 final HStatementInformation body; 2752 final HStatementInformation body;
2753 final HExpressionInformation updates; 2753 final HExpressionInformation updates;
2754 final TargetElement target; 2754 final TargetElement target;
2755 final List<LabelElement> labels; 2755 final List<LabelElement> labels;
2756 final Node sourcePosition; 2756 final SourceFileLocation sourcePosition;
2757 final SourceFileLocation endSourcePosition;
2757 2758
2758 HLoopBlockInformation(this.kind, 2759 HLoopBlockInformation(this.kind,
2759 this.initializer, 2760 this.initializer,
2760 this.condition, 2761 this.condition,
2761 this.body, 2762 this.body,
2762 this.updates, 2763 this.updates,
2763 this.target, 2764 this.target,
2764 this.labels, 2765 this.labels,
2765 this.sourcePosition); 2766 this.sourcePosition,
2767 this.endSourcePosition);
2766 2768
2767 HBasicBlock get start { 2769 HBasicBlock get start {
2768 if (initializer !== null) return initializer.start; 2770 if (initializer !== null) return initializer.start;
2769 if (kind == DO_WHILE_LOOP) { 2771 if (kind == DO_WHILE_LOOP) {
2770 return body.start; 2772 return body.start;
2771 } 2773 }
2772 return condition.start; 2774 return condition.start;
2773 } 2775 }
2774 2776
2775 HBasicBlock get loopHeader { 2777 HBasicBlock get loopHeader {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 HBasicBlock get start => expression.start; 2868 HBasicBlock get start => expression.start;
2867 HBasicBlock get end { 2869 HBasicBlock get end {
2868 // We don't create a switch block if there are no cases. 2870 // We don't create a switch block if there are no cases.
2869 assert(!statements.isEmpty()); 2871 assert(!statements.isEmpty());
2870 return statements.last().end; 2872 return statements.last().end;
2871 } 2873 }
2872 2874
2873 bool accept(HStatementInformationVisitor visitor) => 2875 bool accept(HStatementInformationVisitor visitor) =>
2874 visitor.visitSwitchInfo(this); 2876 visitor.visitSwitchInfo(this);
2875 } 2877 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | tests/compiler/dart2js/source_mapping_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698