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

Unified Diff: sdk/lib/_internal/compiler/compiler.dart

Issue 11364134: Merge libv1. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Reupload due to error Created 8 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
« no previous file with comments | « samples/ui_lib/view/view.dart ('k') | sdk/lib/_internal/compiler/implementation/apiimpl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/compiler.dart
diff --git a/sdk/lib/_internal/compiler/compiler.dart b/sdk/lib/_internal/compiler/compiler.dart
index 258a8b430d5cb9ee62a2154f00ebf33cd0808c04..af37116e0c2f886f24101922d9fe9355027b2617 100644
--- a/sdk/lib/_internal/compiler/compiler.dart
+++ b/sdk/lib/_internal/compiler/compiler.dart
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#library('compiler');
+library compiler;
-#import('dart:uri');
-#import('implementation/apiimpl.dart');
+import 'dart:uri';
+import 'implementation/apiimpl.dart';
// Unless explicitly allowed, passing [:null:] for any argument to the
// methods of library will result in a NullPointerException being
@@ -43,6 +43,12 @@ Future<String> compile(Uri script,
ReadStringFromUri provider,
DiagnosticHandler handler,
[List<String> options = const []]) {
+ if (!libraryRoot.path.endsWith("/")) {
+ throw new ArgumentError("libraryRoot must end with a /");
+ }
+ if (packageRoot != null && !packageRoot.path.endsWith("/")) {
+ throw new ArgumentError("packageRoot must end with a /");
+ }
// TODO(ahe): Consider completing the future with an exception if
// code is null.
Compiler compiler = new Compiler(provider, handler, libraryRoot, packageRoot,
« no previous file with comments | « samples/ui_lib/view/view.dart ('k') | sdk/lib/_internal/compiler/implementation/apiimpl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698