Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| index 6ecbfd5099e1e4ab723fd545a494966e5544cb0b..0ef03d86c36c0fb8bc637223ec0ae032e4685b90 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| @@ -2948,7 +2948,7 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| computeNeededClasses(); |
| - mainBuffer.add(GENERATED_BY); |
| + mainBuffer.add(buildGeneratedBy()); |
| addComment(HOOKS_API_USAGE, mainBuffer); |
| mainBuffer.add('function ${namer.isolateName}()$_{}\n'); |
| mainBuffer.add('init()$N$n'); |
| @@ -3173,7 +3173,7 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| void emitDeferredPreambleWhenEmpty(CodeBuffer buffer) { |
| if (!buffer.isEmpty) return; |
| - buffer.write(GENERATED_BY); |
| + buffer.write(buildGeneratedBy()); |
| buffer.write('var old${namer.CURRENT_ISOLATE}$_=' |
| '$_${namer.CURRENT_ISOLATE}$N'); |
| @@ -3186,6 +3186,13 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| '$_${namer.isolateName}.prototype$N$n'); |
| } |
| + String buildGeneratedBy() { |
| + var suffix = (BUILD_ID == null) |
| + ? '.' |
| + : ' version: $BUILD_ID'; |
|
ngeoffray
2013/05/29 13:56:40
Add a '.' at the end?
kasperl
2013/05/29 14:01:31
I think it would look a little bit weird because t
|
| + return '// Generated by dart2js, the Dart to JavaScript compiler$suffix\n'; |
| + } |
| + |
| String buildSourceMap(CodeBuffer buffer, SourceFile compiledFile) { |
| SourceMapBuilder sourceMapBuilder = |
| new SourceMapBuilder(compiler.sourceMapUri); |
| @@ -3214,10 +3221,6 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| } |
| } |
| -const String GENERATED_BY = """ |
| -// Generated by dart2js, the Dart to JavaScript compiler. |
| -"""; |
| - |
| const String HOOKS_API_USAGE = """ |
| // The code supports the following hooks: |
| // dartPrint(message) - if this function is defined it is called |