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

Unified Diff: web/web_command.dart

Issue 2249233002: fix #626, add AMD module format and make it default (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged Created 4 years, 4 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 | « tool/input_sdk/private/ddc_runtime/operations.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: web/web_command.dart
diff --git a/web/web_command.dart b/web/web_command.dart
index 8b67a3a63bc89d04833f16e5cb2b833c44b97223..02a2d8b7905edf43ebbe5aa34ccbaf4b2d3ff43f 100644
--- a/web/web_command.dart
+++ b/web/web_command.dart
@@ -8,20 +8,18 @@ import 'dart:async';
import 'dart:html' show HttpRequest;
import 'dart:convert' show BASE64;
-import 'package:analyzer/file_system/file_system.dart'
- show ResourceUriResolver;
+import 'package:analyzer/file_system/file_system.dart' show ResourceUriResolver;
import 'package:analyzer/file_system/memory_file_system.dart'
show MemoryResourceProvider;
import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
-import 'package:analyzer/src/generated/source.dart'
- show DartUriResolver;
+import 'package:analyzer/src/generated/source.dart' show DartUriResolver;
import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
import 'package:analyzer/src/summary/package_bundle_reader.dart'
show
- SummaryDataStore,
- InSummaryPackageUriResolver,
- InputPackagesResultProvider,
- InSummarySource;
+ SummaryDataStore,
+ InSummaryPackageUriResolver,
+ InputPackagesResultProvider,
+ InSummarySource;
import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk;
import 'package:args/command_runner.dart';
@@ -30,6 +28,7 @@ import 'package:dev_compiler/src/analyzer/context.dart' show AnalyzerOptions;
import 'package:dev_compiler/src/compiler/compiler.dart'
show BuildUnit, CompilerOptions, JSModuleFile, ModuleCompiler;
+import 'package:dev_compiler/src/compiler/module_builder.dart';
import 'package:js/js.dart';
typedef void MessageHandler(Object message);
@@ -104,7 +103,7 @@ class WebCompileCommand extends Command {
resourceProvider: resourceProvider);
(compiler.context as AnalysisContextImpl).resultProvider =
- new InputPackagesResultProvider(compiler.context, summaryDataStore);
+ new InputPackagesResultProvider(compiler.context, summaryDataStore);
var compilerOptions = new CompilerOptions.fromArguments(argResults);
@@ -119,7 +118,10 @@ class WebCompileCommand extends Command {
module.errors.forEach(messageHandler);
if (!module.isValid) throw new CompileErrorException();
- return module.code;
+
+ var code =
+ module.getCode(ModuleFormat.amd, unit.name, unit.name + '.map');
+ return code.code;
};
return allowInterop(compileFn);
« no previous file with comments | « tool/input_sdk/private/ddc_runtime/operations.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698