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

Side by Side Diff: pkg/compiler/lib/src/native/resolver.dart

Issue 2829033002: Rename KernelWorldBuilder to KernelElementBuilder (Closed)
Patch Set: Rename to KernelToElementMap Created 3 years, 8 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 | « pkg/compiler/lib/src/library_loader.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import 'package:front_end/src/fasta/scanner.dart' 5 import 'package:front_end/src/fasta/scanner.dart'
6 show BeginGroupToken, StringToken, Token; 6 show BeginGroupToken, StringToken, Token;
7 import 'package:front_end/src/fasta/scanner.dart' as Tokens show EOF_TOKEN; 7 import 'package:front_end/src/fasta/scanner.dart' as Tokens show EOF_TOKEN;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common_elements.dart' show CommonElements; 10 import '../common_elements.dart' show CommonElements;
11 import '../common/backend_api.dart'; 11 import '../common/backend_api.dart';
12 import '../common/resolution.dart'; 12 import '../common/resolution.dart';
13 import '../compiler.dart' show Compiler; 13 import '../compiler.dart' show Compiler;
14 import '../constants/values.dart'; 14 import '../constants/values.dart';
15 import '../elements/elements.dart' 15 import '../elements/elements.dart'
16 show 16 show
17 ClassElement, 17 ClassElement,
18 Element, 18 Element,
19 FieldElement, 19 FieldElement,
20 LibraryElement, 20 LibraryElement,
21 MemberElement, 21 MemberElement,
22 MetadataAnnotation, 22 MetadataAnnotation,
23 MethodElement; 23 MethodElement;
24 import '../elements/entities.dart'; 24 import '../elements/entities.dart';
25 import '../elements/modelx.dart' show FunctionElementX, MetadataAnnotationX; 25 import '../elements/modelx.dart' show FunctionElementX, MetadataAnnotationX;
26 import '../elements/resolution_types.dart' show ResolutionDartType; 26 import '../elements/resolution_types.dart' show ResolutionDartType;
27 import '../js_backend/js_backend.dart'; 27 import '../js_backend/js_backend.dart';
28 import '../js_backend/native_data.dart'; 28 import '../js_backend/native_data.dart';
29 import '../kernel/world_builder.dart' show KernelAnnotationProcessor; 29 import '../kernel/element_map.dart' show KernelAnnotationProcessor;
30 import '../patch_parser.dart'; 30 import '../patch_parser.dart';
31 import '../tree/tree.dart'; 31 import '../tree/tree.dart';
32 import 'behavior.dart'; 32 import 'behavior.dart';
33 33
34 /// Class that performs the mechanics to investigate annotations in the code. 34 /// Class that performs the mechanics to investigate annotations in the code.
35 abstract class AnnotationProcessor { 35 abstract class AnnotationProcessor {
36 factory AnnotationProcessor(Compiler compiler) => 36 factory AnnotationProcessor(Compiler compiler) =>
37 compiler.options.loadFromDill 37 compiler.options.loadFromDill
38 // TODO(johnniwinther): Pass the [KernelWorldBuilder] to 38 // TODO(johnniwinther): Pass the [KernelWorldBuilder] to
39 // [KernelAnnotationProcessor]. 39 // [KernelAnnotationProcessor].
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 605
606 Iterable<ConstantValue> fields = constructedObject.fields.values; 606 Iterable<ConstantValue> fields = constructedObject.fields.values;
607 // TODO(sra): Better validation of the constant. 607 // TODO(sra): Better validation of the constant.
608 if (fields.length != 1 || fields.single is! StringConstantValue) { 608 if (fields.length != 1 || fields.single is! StringConstantValue) {
609 throw new SpannableAssertionFailure( 609 throw new SpannableAssertionFailure(
610 spannable, 'Annotations needs one string: ${value.toStructuredText()}'); 610 spannable, 'Annotations needs one string: ${value.toStructuredText()}');
611 } 611 }
612 StringConstantValue specStringConstant = fields.single; 612 StringConstantValue specStringConstant = fields.single;
613 return specStringConstant.toDartString().slowToString(); 613 return specStringConstant.toDartString().slowToString();
614 } 614 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/library_loader.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698