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

Unified Diff: lib/compiler/implementation/js/printer.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/code_buffer.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js/printer.dart
diff --git a/lib/compiler/implementation/js/printer.dart b/lib/compiler/implementation/js/printer.dart
index e168062e1c520bfe3fa1f46a18f86344ba57cb1d..95f4a3d88d9cbf7287290e7b65af8132b3ce39c4 100644
--- a/lib/compiler/implementation/js/printer.dart
+++ b/lib/compiler/implementation/js/printer.dart
@@ -5,14 +5,13 @@
class Printer implements NodeVisitor {
final bool shouldCompressOutput;
leg.Compiler compiler;
- var positionElement;
leg.CodeBuffer outBuffer;
int indentLevel = 0;
bool inForInit = false;
bool atStatementBegin = false;
final DanglingElseVisitor danglingElseVisitor;
- Printer(leg.Compiler compiler, this.positionElement)
+ Printer(leg.Compiler compiler)
: shouldCompressOutput = compiler.enableMinification,
this.compiler = compiler,
outBuffer = new leg.CodeBuffer(),
@@ -54,7 +53,7 @@ class Printer implements NodeVisitor {
void recordSourcePosition(var position) {
if (position != null) {
- outBuffer.setSourceLocation(positionElement, position);
+ outBuffer.setSourceLocation(position);
}
}
@@ -821,9 +820,8 @@ class DanglingElseVisitor extends BaseVisitor<bool> {
leg.CodeBuffer prettyPrint(Node node,
- leg.Compiler compiler,
- Dynamic positionElement) {
- Printer printer = new Printer(compiler, positionElement);
+ leg.Compiler compiler) {
+ Printer printer = new Printer(compiler);
printer.visit(node);
return printer.outBuffer;
}
« no previous file with comments | « lib/compiler/implementation/code_buffer.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698