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 /* This library defines the operations that define and manipulate Dart | 5 /* This library defines the operations that define and manipulate Dart |
6 * classes. Included in this are: | 6 * classes. Included in this are: |
7 * - Generics | 7 * - Generics |
8 * - Class metadata | 8 * - Class metadata |
9 * - Extension methods | 9 * - Extension methods |
10 */ | 10 */ |
11 | 11 |
12 // TODO(leafp): Consider splitting some of this out. | 12 // TODO(leafp): Consider splitting some of this out. |
13 dart_library.library('dart/_classes', null, /* Imports */[ | 13 dart_library.library('dart/_classes', null, /* Imports */[ |
14 ], /* Lazy Imports */[ | 14 ], /* Lazy Imports */[ |
| 15 'dart/_utils', |
15 'dart/core', | 16 'dart/core', |
16 'dart/_interceptors', | 17 'dart/_interceptors', |
17 'dart/_types', | 18 'dart/_types', |
18 'dart/_rtti', | 19 'dart/_rtti', |
19 ], function(exports, core, _interceptors, types, rtti) { | 20 ], function(exports, dart_utils, core, _interceptors, types, rtti) { |
20 'use strict'; | 21 'use strict'; |
21 | 22 |
22 const assert = dart_utils.assert; | 23 const assert = dart_utils.assert_; |
23 const copyProperties = dart_utils.copyProperties; | 24 const copyProperties = dart_utils.copyProperties; |
24 const copyTheseProperties = dart_utils.copyTheseProperties; | 25 const copyTheseProperties = dart_utils.copyTheseProperties; |
25 const defineMemoizedGetter = dart_utils.defineMemoizedGetter; | 26 const defineMemoizedGetter = dart_utils.defineMemoizedGetter; |
26 const safeGetOwnProperty = dart_utils.safeGetOwnProperty; | 27 const safeGetOwnProperty = dart_utils.safeGetOwnProperty; |
27 const throwInternalError = dart_utils.throwInternalError; | 28 const throwInternalError = dart_utils.throwInternalError; |
28 | 29 |
29 const defineProperty = Object.defineProperty; | 30 const defineProperty = Object.defineProperty; |
30 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | 31 const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; |
31 const getOwnPropertySymbols = Object.getOwnPropertySymbols; | 32 const getOwnPropertySymbols = Object.getOwnPropertySymbols; |
32 | 33 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } | 410 } |
410 exports.list = list; | 411 exports.list = list; |
411 | 412 |
412 function setBaseClass(derived, base) { | 413 function setBaseClass(derived, base) { |
413 // Link the extension to the type it's extending as a base class. | 414 // Link the extension to the type it's extending as a base class. |
414 derived.prototype.__proto__ = base.prototype; | 415 derived.prototype.__proto__ = base.prototype; |
415 } | 416 } |
416 exports.setBaseClass = setBaseClass; | 417 exports.setBaseClass = setBaseClass; |
417 | 418 |
418 }); | 419 }); |
OLD | NEW |