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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart

Issue 3004703002: Don't export unnamed mixins. (Closed)
Patch Set: Created 3 years, 3 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.kernel_library_builder; 5 library fasta.kernel_library_builder;
6 6
7 import 'dart:convert' show JSON; 7 import 'dart:convert' show JSON;
8 8
9 import 'package:front_end/src/fasta/combinator.dart' as fasta; 9 import 'package:front_end/src/fasta/combinator.dart' as fasta;
10 import 'package:front_end/src/fasta/export.dart'; 10 import 'package:front_end/src/fasta/export.dart';
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 bool isNamed = name != null; 235 bool isNamed = name != null;
236 SourceClassBuilder builder; 236 SourceClassBuilder builder;
237 if (isNamed) { 237 if (isNamed) {
238 modifiers |= namedMixinApplicationMask; 238 modifiers |= namedMixinApplicationMask;
239 } else { 239 } else {
240 name = supertype.name; 240 name = supertype.name;
241 int index = name.indexOf("^"); 241 int index = name.indexOf("^");
242 if (index != -1) { 242 if (index != -1) {
243 name = name.substring(0, index); 243 name = name.substring(0, index);
244 } 244 }
245 name = "$name&${mixin.name}$signature"; 245 name = "_$name&${mixin.name}$signature";
Siggi Cherem (dart-lang) 2017/08/28 15:57:54 minor style question for the generated code: do we
ahe 2017/08/28 18:22:45 Actually, I started with a check that I only added
246 builder = mixinApplicationClasses[name]; 246 builder = mixinApplicationClasses[name];
247 } 247 }
248 if (builder == null) { 248 if (builder == null) {
249 builder = new SourceClassBuilder( 249 builder = new SourceClassBuilder(
250 documentationComment, 250 documentationComment,
251 metadata, 251 metadata,
252 modifiers, 252 modifiers,
253 name, 253 name,
254 typeVariables, 254 typeVariables,
255 supertype, 255 supertype,
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 mixinApplicationClasses.putIfAbsent(name, () => builder); 954 mixinApplicationClasses.putIfAbsent(name, () => builder);
955 if (existing != builder) { 955 if (existing != builder) {
956 part.scope.local.remove(name); 956 part.scope.local.remove(name);
957 } 957 }
958 }); 958 });
959 super.includePart(part); 959 super.includePart(part);
960 nativeMethods.addAll(part.nativeMethods); 960 nativeMethods.addAll(part.nativeMethods);
961 boundlessTypeVariables.addAll(part.boundlessTypeVariables); 961 boundlessTypeVariables.addAll(part.boundlessTypeVariables);
962 } 962 }
963 } 963 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/test/mixin_export_test.dart » ('j') | pkg/front_end/testcases/shaker.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698