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

Side by Side Diff: pkg/compiler/lib/src/patch_parser.dart

Issue 1413213004: Move remaining helpers to BackendHelpers (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/ssa/builder.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) 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
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 return hasJsInterop ? true : null; 495 return hasJsInterop ? true : null;
496 } 496 }
497 497
498 @override 498 @override
499 void validate(Compiler compiler, 499 void validate(Compiler compiler,
500 Element element, 500 Element element,
501 MetadataAnnotation annotation, 501 MetadataAnnotation annotation,
502 ConstantValue constant) { 502 ConstantValue constant) {
503 JavaScriptBackend backend = compiler.backend; 503 JavaScriptBackend backend = compiler.backend;
504 if (constant.getType(compiler.coreTypes).element != 504 if (constant.getType(compiler.coreTypes).element !=
505 backend.jsAnnotationClass) { 505 backend.helpers.jsAnnotationClass) {
506 compiler.reporter.internalError(annotation, 'Invalid @JS(...) annotation.' ); 506 compiler.reporter.internalError(annotation, 'Invalid @JS(...) annotation.' );
507 } 507 }
508 } 508 }
509 } 509 }
510 510
511 /// Annotation handler for pre-resolution detection of `@patch` annotations. 511 /// Annotation handler for pre-resolution detection of `@patch` annotations.
512 class PatchAnnotationHandler implements EagerAnnotationHandler<PatchVersion> { 512 class PatchAnnotationHandler implements EagerAnnotationHandler<PatchVersion> {
513 const PatchAnnotationHandler(); 513 const PatchAnnotationHandler();
514 514
515 PatchVersion getPatchVersion(MetadataAnnotation annotation) { 515 PatchVersion getPatchVersion(MetadataAnnotation annotation) {
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 class PatchVersion { 689 class PatchVersion {
690 final String tag; 690 final String tag;
691 691
692 const PatchVersion(this.tag); 692 const PatchVersion(this.tag);
693 693
694 bool isActive(String patchTag) => tag == null || tag == patchTag; 694 bool isActive(String patchTag) => tag == null || tag == patchTag;
695 695
696 String toString() => 'PatchVersion($tag)'; 696 String toString() => 'PatchVersion($tag)';
697 } 697 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/native.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698