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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/unsugar.dart

Issue 1250633002: Add operators test to source_mapping_test. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
index bbe998f1f396f742fb02e2570ed10aa6e2a32156..332e07b5cf21454dbd9f094f09102a1cb8fc314d 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/unsugar.dart
@@ -127,7 +127,8 @@ class UnsugarVisitor extends RecursiveVisitor {
Primitive nullPrimitive = nullConstant;
Primitive test = new ApplyBuiltinOperator(
BuiltinOperator.Identical,
- <Primitive>[function.parameters.single, nullPrimitive]);
+ <Primitive>[function.parameters.single, nullPrimitive],
+ function.parameters.single.sourceInformation);
Expression newBody =
new LetCont.many(<Continuation>[returnFalse, originalBody],
@@ -158,8 +159,8 @@ class UnsugarVisitor extends RecursiveVisitor {
Selector selector = new Selector.fromElement(function);
// TODO(johnniwinther): Come up with an implementation of SourceInformation
// for calls such as this one that don't appear in the original source.
- InvokeStatic invoke =
- new InvokeStatic(function, selector, arguments, continuation, null);
+ InvokeStatic invoke = new InvokeStatic(
+ function, selector, arguments, continuation, null);
_parentVisitor.processInvokeStatic(invoke);
LetCont letCont = new LetCont(continuation, invoke);
@@ -245,7 +246,8 @@ class UnsugarVisitor extends RecursiveVisitor {
Set<ClassElement> interceptedClasses =
_glue.getInterceptedClassesOn(selector);
_glue.registerSpecializedGetInterceptor(interceptedClasses);
- newReceiver = new Interceptor(receiver, interceptedClasses);
+ newReceiver = new Interceptor(
+ receiver, interceptedClasses, node.sourceInformation);
insertLetPrim(newReceiver, node);
}
@@ -274,7 +276,8 @@ class UnsugarVisitor extends RecursiveVisitor {
Primitive t = trueConstant;
Primitive i = new ApplyBuiltinOperator(
BuiltinOperator.Identical,
- <Primitive>[condition.value.definition, t]);
+ <Primitive>[condition.value.definition, t],
+ condition.value.definition.sourceInformation);
LetPrim newNode = new LetPrim(t,
new LetPrim(i,
new Branch(new IsTrue(i),
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698