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

Side by Side Diff: lib/runtime/dart_runtime.js

Issue 1138533003: fixes #175, fixed arrays (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 | « no previous file | test/browser/runtime_tests.js » ('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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
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) { 969 function import_(value) {
970 if (!value) throw 'missing required module'; 970 // TODO(jmesserly): enable this once we're loading all of core libs.
971 // if (!value) throw 'missing required module';
vsm 2015/05/08 21:27:21 Log a warning instead?
Jennifer Messerly 2015/05/08 21:33:25 sure thing.
971 return value; 972 return value;
972 } 973 }
973 dart.import = import_; 974 dart.import = import_;
974 975
975 function lazyImport(value) { 976 function lazyImport(value) {
976 return defineLibrary(value, {}); 977 return defineLibrary(value, {});
977 } 978 }
978 dart.lazyImport = lazyImport; 979 dart.lazyImport = lazyImport;
979 980
980 function defineLibrary(value, defaultValue) { 981 function defineLibrary(value, defaultValue) {
981 return value ? value : defaultValue; 982 return value ? value : defaultValue;
982 } 983 }
983 dart.defineLibrary = defineLibrary; 984 dart.defineLibrary = defineLibrary;
984 985
985 // TODO(jmesserly): hack to bootstrap the SDK 986 // TODO(jmesserly): hack to bootstrap the SDK
986 _js_helper = _js_helper || {}; 987 _js_helper = _js_helper || {};
987 _js_helper.checkNum = notNull; 988 _js_helper.checkNum = notNull;
988 989
989 _js_primitives = _js_primitives || {}; 990 _js_primitives = _js_primitives || {};
990 _js_primitives.printString = (s) => console.log(s); 991 _js_primitives.printString = (s) => console.log(s);
991 992
992 })(dart || (dart = {})); 993 })(dart || (dart = {}));
OLDNEW
« no previous file with comments | « no previous file | test/browser/runtime_tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698