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

Unified Diff: dart/pkg/compiler/lib/src/ssa/builder.dart

Issue 710173005: Disable source maps completely. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update fallbackCompiler to new API. Created 6 years, 1 month 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: dart/pkg/compiler/lib/src/ssa/builder.dart
diff --git a/dart/pkg/compiler/lib/src/ssa/builder.dart b/dart/pkg/compiler/lib/src/ssa/builder.dart
index d48f3b1bdaef56640536938f7b870675de68e6bc..a12ebdc735cfc911590858011e3c7787acc1ccf5 100644
--- a/dart/pkg/compiler/lib/src/ssa/builder.dart
+++ b/dart/pkg/compiler/lib/src/ssa/builder.dart
@@ -9,9 +9,9 @@ class SsaFunctionCompiler implements FunctionCompiler {
SsaBuilderTask builder;
SsaOptimizerTask optimizer;
- SsaFunctionCompiler(JavaScriptBackend backend)
+ SsaFunctionCompiler(JavaScriptBackend backend, bool generateSourceMap)
: generator = new SsaCodeGeneratorTask(backend),
- builder = new SsaBuilderTask(backend),
+ builder = new SsaBuilderTask(backend, generateSourceMap),
optimizer = new SsaOptimizerTask(backend);
/// Generates JavaScript code for `work.element`.
@@ -41,10 +41,11 @@ class SyntheticLocal extends Local {
class SsaBuilderTask extends CompilerTask {
final CodeEmitterTask emitter;
final JavaScriptBackend backend;
+ final bool generateSourceMap;
String get name => 'SSA builder';
- SsaBuilderTask(JavaScriptBackend backend)
+ SsaBuilderTask(JavaScriptBackend backend, this.generateSourceMap)
: emitter = backend.emitter,
backend = backend,
super(backend.compiler);
@@ -55,7 +56,8 @@ class SsaBuilderTask extends CompilerTask {
return compiler.withCurrentElement(element, () {
HInstruction.idCounter = 0;
SsaBuilder builder =
- new SsaBuilder(backend, work, emitter.nativeEmitter);
+ new SsaBuilder(
+ backend, work, emitter.nativeEmitter, generateSourceMap);
HGraph graph;
ElementKind kind = element.kind;
if (kind == ElementKind.GENERATIVE_CONSTRUCTOR) {
@@ -931,6 +933,7 @@ class SsaBuilder extends ResolvedVisitor {
final ConstantSystem constantSystem;
final CodegenWorkItem work;
final RuntimeTypes rti;
+ final bool generateSourceMap;
/* This field is used by the native handler. */
final NativeEmitter nativeEmitter;
@@ -1009,7 +1012,8 @@ class SsaBuilder extends ResolvedVisitor {
SsaBuilder(JavaScriptBackend backend,
CodegenWorkItem work,
- this.nativeEmitter)
+ this.nativeEmitter,
+ this.generateSourceMap)
: this.compiler = backend.compiler,
this.backend = backend,
this.constantSystem = backend.constantSystem,
@@ -2414,7 +2418,7 @@ class SsaBuilder extends ResolvedVisitor {
}
HInstruction attachPosition(HInstruction target, ast.Node node) {
- if (node != null) {
+ if (generateSourceMap && node != null) {
target.sourcePosition = sourceFileLocationForBeginToken(node);
}
return target;
« no previous file with comments | « dart/pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698