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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart

Issue 15915013: Revert "Add --version option to dart2js and add version information (if available) to generated cod… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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: 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 d6c1b6062225e31c36744108514c8151aa490f45..6ecbfd5099e1e4ab723fd545a494966e5544cb0b 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(buildGeneratedBy());
+ mainBuffer.add(GENERATED_BY);
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(buildGeneratedBy());
+ buffer.write(GENERATED_BY);
buffer.write('var old${namer.CURRENT_ISOLATE}$_='
'$_${namer.CURRENT_ISOLATE}$N');
@@ -3186,12 +3186,6 @@ if (typeof document !== "undefined" && document.readyState !== "complete") {
'$_${namer.isolateName}.prototype$N$n');
}
- String buildGeneratedBy() {
- var suffix = '';
- if (BUILD_ID != null) suffix = ' version: $BUILD_ID';
- return '// Generated by dart2js, the Dart to JavaScript compiler$suffix.\n';
- }
-
String buildSourceMap(CodeBuffer buffer, SourceFile compiledFile) {
SourceMapBuilder sourceMapBuilder =
new SourceMapBuilder(compiler.sourceMapUri);
@@ -3220,6 +3214,10 @@ 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

Powered by Google App Engine
This is Rietveld 408576698