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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1250633002: Add operators test to source_mapping_test. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index 8c5bf34b55f808e940905dfae91c7e40c761d332..c865877aaa3cc9c47521d0945a0fe7f0e6cfc2d0 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -100,6 +100,10 @@ abstract class Primitive extends Definition<Primitive> {
/// True if time-of-evaluation is irrelevant for the given primitive,
/// assuming its inputs are the same values.
bool get isSafeForReordering;
+
+ /// The source information associated with this primitive.
+ // TODO(johnniwinther): Require source information for all primitives.
+ SourceInformation get sourceInformation => null;
}
/// Operands to invocations and primitives are always variables. They point to
@@ -325,7 +329,7 @@ class InvokeMethod extends Expression implements Invoke {
this.mask,
this.arguments,
this.continuation,
- [this.sourceInformation]);
+ this.sourceInformation);
accept(Visitor visitor) => visitor.visitInvokeMethod(this);
}
@@ -476,8 +480,11 @@ class TypeCast extends Expression {
class ApplyBuiltinOperator extends Primitive {
BuiltinOperator operator;
List<Reference<Primitive>> arguments;
+ final SourceInformation sourceInformation;
- ApplyBuiltinOperator(this.operator, List<Primitive> arguments)
+ ApplyBuiltinOperator(this.operator,
+ List<Primitive> arguments,
+ this.sourceInformation)
: this.arguments = _referenceList(arguments);
accept(Visitor visitor) => visitor.visitApplyBuiltinOperator(this);
@@ -833,7 +840,9 @@ class CreateInstance extends Primitive {
class Interceptor extends Primitive {
final Reference<Primitive> input;
final Set<ClassElement> interceptedClasses;
- Interceptor(Primitive input, this.interceptedClasses)
+ final SourceInformation sourceInformation;
+
+ Interceptor(Primitive input, this.interceptedClasses, this.sourceInformation)
: this.input = new Reference<Primitive>(input);
accept(Visitor visitor) => visitor.visitInterceptor(this);

Powered by Google App Engine
This is Rietveld 408576698