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

Side by Side Diff: pkg/front_end/lib/src/fasta/dill/dill_member_builder.dart

Issue 2991993002: Reapply 47ecf72 after it was reverted in e431e93e872d9a1c97a5177ebb09d5416f1d659a. (Closed)
Patch Set: Created 3 years, 4 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library fasta.dill_member_builder; 5 library fasta.dill_member_builder;
6 6
7 import 'package:kernel/ast.dart' 7 import 'package:kernel/ast.dart'
8 show Constructor, Field, Member, Procedure, ProcedureKind; 8 show Constructor, Field, Member, Procedure, ProcedureKind;
9 9
10 import '../kernel/kernel_builder.dart' 10 import '../kernel/kernel_builder.dart'
11 show 11 show
12 Builder, 12 Builder,
13 MemberBuilder, 13 MemberBuilder,
14 isRedirectingGenerativeConstructorImplementation; 14 isRedirectingGenerativeConstructorImplementation;
15 15
16 import '../modifier.dart' 16 import '../modifier.dart'
17 show abstractMask, constMask, externalMask, finalMask, staticMask; 17 show abstractMask, constMask, externalMask, finalMask, staticMask;
18 18
19 import '../problems.dart' show unhandled; 19 import '../problems.dart' show unhandled;
20 20
21 class DillMemberBuilder extends MemberBuilder { 21 class DillMemberBuilder extends MemberBuilder {
22 final int modifiers; 22 final int modifiers;
23 23
24 final Member member; 24 final Member member;
25 25
26 DillMemberBuilder(Member member, Builder parent) 26 DillMemberBuilder(Member member, Builder parent)
27 : modifiers = computeModifiers(member), 27 : modifiers = computeModifiers(member),
28 member = member, 28 member = member,
29 super(parent, member.fileOffset); 29 super(parent, member.fileOffset, member.documentationComment);
30 30
31 String get debugName => "DillMemberBuilder"; 31 String get debugName => "DillMemberBuilder";
32 32
33 Member get target => member; 33 Member get target => member;
34 34
35 String get name => member.name.name; 35 String get name => member.name.name;
36 36
37 bool get isConstructor => member is Constructor; 37 bool get isConstructor => member is Constructor;
38 38
39 ProcedureKind get kind { 39 ProcedureKind get kind {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 modifier |= member.isStatic ? staticMask : 0; 76 modifier |= member.isStatic ? staticMask : 0;
77 } else if (member is Constructor) { 77 } else if (member is Constructor) {
78 modifier |= member.isConst ? constMask : 0; 78 modifier |= member.isConst ? constMask : 0;
79 } else { 79 } else {
80 dynamic parent = member.parent; 80 dynamic parent = member.parent;
81 unhandled("${member.runtimeType}", "computeModifiers", member.fileOffset, 81 unhandled("${member.runtimeType}", "computeModifiers", member.fileOffset,
82 Uri.base.resolve(parent.fileUri)); 82 Uri.base.resolve(parent.fileUri));
83 } 83 }
84 return modifier; 84 return modifier;
85 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698