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

Side by Side Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 893963005: Refactor handling of source map information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 5 years, 10 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 part of ssa; 5 part of ssa;
6 6
7 abstract class HVisitor<R> { 7 abstract class HVisitor<R> {
8 R visitAdd(HAdd node); 8 R visitAdd(HAdd node);
9 R visitBitAnd(HBitAnd node); 9 R visitBitAnd(HBitAnd node);
10 R visitBitNot(HBitNot node); 10 R visitBitNot(HBitNot node);
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 do { 752 do {
753 if (identical(this, other)) return dominatesCache[other] = true; 753 if (identical(this, other)) return dominatesCache[other] = true;
754 other = other.dominator; 754 other = other.dominator;
755 } while (other != null && other.id >= id); 755 } while (other != null && other.id >= id);
756 return dominatesCache[other] = false; 756 return dominatesCache[other] = false;
757 } 757 }
758 } 758 }
759 759
760 abstract class HInstruction implements Spannable { 760 abstract class HInstruction implements Spannable {
761 Entity sourceElement; 761 Entity sourceElement;
762 SourceFileLocation sourcePosition; 762 SourceInformation sourceInformation;
763 763
764 final int id; 764 final int id;
765 static int idCounter; 765 static int idCounter;
766 766
767 final List<HInstruction> inputs; 767 final List<HInstruction> inputs;
768 final List<HInstruction> usedBy; 768 final List<HInstruction> usedBy;
769 769
770 HBasicBlock block; 770 HBasicBlock block;
771 HInstruction previous = null; 771 HInstruction previous = null;
772 HInstruction next = null; 772 HInstruction next = null;
(...skipping 2102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 static const int SWITCH_CONTINUE_LOOP = 4; 2875 static const int SWITCH_CONTINUE_LOOP = 4;
2876 static const int NOT_A_LOOP = -1; 2876 static const int NOT_A_LOOP = -1;
2877 2877
2878 final int kind; 2878 final int kind;
2879 final HExpressionInformation initializer; 2879 final HExpressionInformation initializer;
2880 final HExpressionInformation condition; 2880 final HExpressionInformation condition;
2881 final HStatementInformation body; 2881 final HStatementInformation body;
2882 final HExpressionInformation updates; 2882 final HExpressionInformation updates;
2883 final JumpTarget target; 2883 final JumpTarget target;
2884 final List<LabelDefinition> labels; 2884 final List<LabelDefinition> labels;
2885 final SourceFileLocation sourcePosition; 2885 final SourceInformation sourceInformation;
2886 final SourceFileLocation endSourcePosition;
2887 2886
2888 HLoopBlockInformation(this.kind, 2887 HLoopBlockInformation(this.kind,
2889 this.initializer, 2888 this.initializer,
2890 this.condition, 2889 this.condition,
2891 this.body, 2890 this.body,
2892 this.updates, 2891 this.updates,
2893 this.target, 2892 this.target,
2894 this.labels, 2893 this.labels,
2895 this.sourcePosition, 2894 this.sourceInformation) {
2896 this.endSourcePosition) {
2897 assert( 2895 assert(
2898 (kind == DO_WHILE_LOOP ? body.start : condition.start).isLoopHeader()); 2896 (kind == DO_WHILE_LOOP ? body.start : condition.start).isLoopHeader());
2899 } 2897 }
2900 2898
2901 HBasicBlock get start { 2899 HBasicBlock get start {
2902 if (initializer != null) return initializer.start; 2900 if (initializer != null) return initializer.start;
2903 if (kind == DO_WHILE_LOOP) { 2901 if (kind == DO_WHILE_LOOP) {
2904 return body.start; 2902 return body.start;
2905 } 2903 }
2906 return condition.start; 2904 return condition.start;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
3100 class HDynamicType extends HRuntimeType { 3098 class HDynamicType extends HRuntimeType {
3101 HDynamicType(DynamicType dartType, TypeMask instructionType) 3099 HDynamicType(DynamicType dartType, TypeMask instructionType)
3102 : super(const <HInstruction>[], dartType, instructionType); 3100 : super(const <HInstruction>[], dartType, instructionType);
3103 3101
3104 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3102 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3105 3103
3106 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3104 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3107 3105
3108 bool typeEquals(HInstruction other) => other is HDynamicType; 3106 bool typeEquals(HInstruction other) => other is HDynamicType;
3109 } 3107 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/interceptor_simplifier.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698