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

Unified Diff: pkg/compiler/lib/src/ssa/codegen.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/ssa/codegen.dart
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index 6057d6f42e863dc7db5cadaf37af619a2a82f30b..998ed3659b960fef0607defa01649abe4011f5cf 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -1911,8 +1911,12 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
registry.registerTypeConstant(element);
}
}
- push(backend.emitter.constantReference(constant)
- .withSourceInformation(sourceInformation));
+ js.Expression expression = backend.emitter.constantReference(constant);
+ if (!constant.isDummy) {
+ // TODO(johnniwinther): Support source information on synthetic constants.
+ expression = expression.withSourceInformation(sourceInformation);
+ }
+ push(expression);
}
visitConstant(HConstant node) {
@@ -2709,7 +2713,9 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
js.Statement body = new js.Block.empty();
currentContainer = body;
if (node.isArgumentTypeCheck) {
- generateThrowWithHelper('iae', node.checkedInput);
+ generateThrowWithHelper('iae',
+ node.checkedInput,
+ sourceInformation: node.sourceInformation);
} else if (node.isReceiverTypeCheck) {
use(node.checkedInput);
js.Name methodName =
@@ -2859,4 +2865,9 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
registry.registerStaticUse(helper);
return backend.emitter.staticFunctionAccess(helper);
}
+
+ @override
+ void visitRef(HRef node) {
+ visit(node.value);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698