Chromium Code Reviews| OLD | NEW |
|---|---|
| 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; | 5 var dart, _js_helper; |
| 6 (function (dart) { | 6 (function (dart) { |
| 7 'use strict'; | 7 'use strict'; |
| 8 | 8 |
| 9 var defineProperty = Object.defineProperty; | 9 var defineProperty = Object.defineProperty; |
| 10 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | 10 var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 } else if (typeof values === 'object') { | 258 } else if (typeof values === 'object') { |
| 259 var keys = Object.getOwnPropertyNames(values); | 259 var keys = Object.getOwnPropertyNames(values); |
| 260 for (var i = 0; i < keys.length; i++) { | 260 for (var i = 0; i < keys.length; i++) { |
| 261 var key = keys[i]; | 261 var key = keys[i]; |
| 262 var value = values[key]; | 262 var value = values[key]; |
| 263 map.set(key, value); | 263 map.set(key, value); |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 return map; | 266 return map; |
| 267 } | 267 } |
| 268 this.map = map; | |
|
Jennifer Messerly
2015/03/30 14:43:32
should be `dart.map = ` ?
Jacob
2015/03/30 16:40:52
Done.
| |
| 268 | 269 |
| 269 function assert(condition) { | 270 function assert(condition) { |
| 270 // TODO(jmesserly): throw assertion error. | 271 // TODO(jmesserly): throw assertion error. |
| 271 if (!condition) throw 'assertion failed'; | 272 if (!condition) throw 'assertion failed'; |
| 272 } | 273 } |
| 273 dart.assert = assert; | 274 dart.assert = assert; |
| 274 | 275 |
| 275 function throw_(obj) { throw obj; } | 276 function throw_(obj) { throw obj; } |
| 276 dart.throw_ = throw_; | 277 dart.throw_ = throw_; |
| 277 | 278 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 338 // of some sort, assuming we keep around `dynamic` at runtime. | 339 // of some sort, assuming we keep around `dynamic` at runtime. |
| 339 dart.dynamic = Object.create(null); | 340 dart.dynamic = Object.create(null); |
| 340 | 341 |
| 341 dart.JsSymbol = Symbol; | 342 dart.JsSymbol = Symbol; |
| 342 | 343 |
| 343 // TODO(jmesserly): hack to bootstrap the SDK | 344 // TODO(jmesserly): hack to bootstrap the SDK |
| 344 _js_helper = _js_helper || {}; | 345 _js_helper = _js_helper || {}; |
| 345 _js_helper.checkNum = notNull; | 346 _js_helper.checkNum = notNull; |
| 346 | 347 |
| 347 })(dart || (dart = {})); | 348 })(dart || (dart = {})); |
| OLD | NEW |