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

Unified Diff: lib/runtime/dart_runtime.js

Issue 1122133003: fixes #157, renaming local library identifiers if needed. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebase and format Created 5 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
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_runtime.js
diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js
index b0e879e0a50402c807072554599b76778a1ee543..4dd786854bbc73cbf361ae368de82cd4a0757c5c 100644
--- a/lib/runtime/dart_runtime.js
+++ b/lib/runtime/dart_runtime.js
@@ -966,6 +966,22 @@ var dart, _js_helper, _js_primitives;
dart.global = window || global;
dart.JsSymbol = Symbol;
+ function import_(value) {
+ if (!value) throw 'missing required module';
+ return value;
+ }
+ dart.import = import_;
+
+ function lazyImport(value) {
+ return defineLibrary(value, {});
+ }
+ dart.lazyImport = lazyImport;
+
+ function defineLibrary(value, defaultValue) {
+ return value ? value : defaultValue;
+ }
+ dart.defineLibrary = defineLibrary;
+
// TODO(jmesserly): hack to bootstrap the SDK
_js_helper = _js_helper || {};
_js_helper.checkNum = notNull;
« no previous file with comments | « lib/runtime/dart/typed_data.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698