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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 var dart, _js_helper, _js_primitives; 5 var dart, _js_helper, _js_primitives;
6 (function (dart) { 6 (function (dart) {
7 'use strict'; 7 'use strict';
8 8
9 let defineProperty = Object.defineProperty; 9 let defineProperty = Object.defineProperty;
10 let getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 10 let getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 959
960 // TODO(jmesserly): right now this is a sentinel. It should be a type object 960 // TODO(jmesserly): right now this is a sentinel. It should be a type object
961 // of some sort, assuming we keep around `dynamic` at runtime. 961 // of some sort, assuming we keep around `dynamic` at runtime.
962 dart.dynamic = { toString() { return 'dynamic'; } }; 962 dart.dynamic = { toString() { return 'dynamic'; } };
963 dart.void = { toString() { return 'void'; } }; 963 dart.void = { toString() { return 'void'; } };
964 dart.bottom = { toString() { return 'bottom'; } }; 964 dart.bottom = { toString() { return 'bottom'; } };
965 965
966 dart.global = window || global; 966 dart.global = window || global;
967 dart.JsSymbol = Symbol; 967 dart.JsSymbol = Symbol;
968 968
969 function import_(value) {
970 if (!value) throw 'missing required module';
971 return value;
972 }
973 dart.import = import_;
974
975 function lazyImport(value) {
976 return defineLibrary(value, {});
977 }
978 dart.lazyImport = lazyImport;
979
980 function defineLibrary(value, defaultValue) {
981 return value ? value : defaultValue;
982 }
983 dart.defineLibrary = defineLibrary;
984
969 // TODO(jmesserly): hack to bootstrap the SDK 985 // TODO(jmesserly): hack to bootstrap the SDK
970 _js_helper = _js_helper || {}; 986 _js_helper = _js_helper || {};
971 _js_helper.checkNum = notNull; 987 _js_helper.checkNum = notNull;
972 988
973 _js_primitives = _js_primitives || {}; 989 _js_primitives = _js_primitives || {};
974 _js_primitives.printString = (s) => console.log(s); 990 _js_primitives.printString = (s) => console.log(s);
975 991
976 })(dart || (dart = {})); 992 })(dart || (dart = {}));
OLDNEW
« 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