| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
| 6 * This library contains the infrastructure to parse and integrate patch files. | 6 * This library contains the infrastructure to parse and integrate patch files. |
| 7 * | 7 * |
| 8 * Three types of elements can be patched: [LibraryElement], [ClassElement], | 8 * Three types of elements can be patched: [LibraryElement], [ClassElement], |
| 9 * [FunctionElement]. Patches are introduced in patch libraries which are loaded | 9 * [FunctionElement]. Patches are introduced in patch libraries which are loaded |
| 10 * together with the corresponding origin library. Which libraries that are | 10 * together with the corresponding origin library. Which libraries that are |
| 11 * patched is determined by the dart2jsPatchPath field of LibraryInfo found | 11 * patched is determined by the dart2jsPatchPath field of LibraryInfo found |
| 12 * in [:lib/_internal/libraries.dart:]. | 12 * in [:lib/_internal/sdk_library_metadata/lib/libraries.dart:]. |
| 13 * | 13 * |
| 14 * Patch libraries are parsed like regular library and thus provided with their | 14 * Patch libraries are parsed like regular library and thus provided with their |
| 15 * own elements. These elements which are distinct from the elements from the | 15 * own elements. These elements which are distinct from the elements from the |
| 16 * patched library and the relation between patched and patch elements is | 16 * patched library and the relation between patched and patch elements is |
| 17 * established through the [:patch:] and [:origin:] fields found on | 17 * established through the [:patch:] and [:origin:] fields found on |
| 18 * [LibraryElement], [ClassElement] and [FunctionElement]. The [:patch:] fields | 18 * [LibraryElement], [ClassElement] and [FunctionElement]. The [:patch:] fields |
| 19 * are set on the patched elements to point to their corresponding patch | 19 * are set on the patched elements to point to their corresponding patch |
| 20 * element, and the [:origin:] elements are set on the patch elements to point | 20 * element, and the [:origin:] elements are set on the patch elements to point |
| 21 * their corresponding patched elements. | 21 * their corresponding patched elements. |
| 22 * | 22 * |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 | 568 |
| 569 class PatchVersion { | 569 class PatchVersion { |
| 570 final String tag; | 570 final String tag; |
| 571 | 571 |
| 572 const PatchVersion(this.tag); | 572 const PatchVersion(this.tag); |
| 573 | 573 |
| 574 bool isActive(String patchTag) => tag == null || tag == patchTag; | 574 bool isActive(String patchTag) => tag == null || tag == patchTag; |
| 575 | 575 |
| 576 String toString() => 'PatchVersion($tag)'; | 576 String toString() => 'PatchVersion($tag)'; |
| 577 } | 577 } |
| OLD | NEW |