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

Side by Side Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 1441853005: Revert "Register super field set explicitly in the universe." (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/enqueue.dart ('k') | pkg/compiler/lib/src/ssa/codegen.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 library dart2js.resolution.members; 5 library dart2js.resolution.members;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show 8 import '../common/names.dart' show
9 Selectors; 9 Selectors;
10 import '../common/resolution.dart' show 10 import '../common/resolution.dart' show
(...skipping 3332 matching lines...) Expand 10 before | Expand all | Expand 10 after
3343 void registerStaticUses(AccessSemantics semantics) { 3343 void registerStaticUses(AccessSemantics semantics) {
3344 switch (semantics.kind) { 3344 switch (semantics.kind) {
3345 case AccessKind.SUPER_METHOD: 3345 case AccessKind.SUPER_METHOD:
3346 registry.registerStaticUse( 3346 registry.registerStaticUse(
3347 new StaticUse.superTearOff(semantics.element)); 3347 new StaticUse.superTearOff(semantics.element));
3348 break; 3348 break;
3349 case AccessKind.SUPER_GETTER: 3349 case AccessKind.SUPER_GETTER:
3350 registry.registerStaticUse(new StaticUse.superGet(semantics.getter)); 3350 registry.registerStaticUse(new StaticUse.superGet(semantics.getter));
3351 break; 3351 break;
3352 case AccessKind.SUPER_SETTER: 3352 case AccessKind.SUPER_SETTER:
3353 registry.registerStaticUse( 3353 registry.registerStaticUse(new StaticUse.superSet(semantics.setter));
3354 new StaticUse.superSetterSet(semantics.setter));
3355 break; 3354 break;
3356 case AccessKind.SUPER_FIELD: 3355 case AccessKind.SUPER_FIELD:
3357 registry.registerStaticUse( 3356 registry.registerStaticUse(
3358 new StaticUse.superGet(semantics.element)); 3357 new StaticUse.superGet(semantics.element));
3359 registry.registerStaticUse( 3358 registry.registerStaticUse(
3360 new StaticUse.superFieldSet(semantics.element)); 3359 new StaticUse.superSet(semantics.element));
3361 break; 3360 break;
3362 case AccessKind.SUPER_FINAL_FIELD: 3361 case AccessKind.SUPER_FINAL_FIELD:
3363 registry.registerStaticUse( 3362 registry.registerStaticUse(
3364 new StaticUse.superGet(semantics.element)); 3363 new StaticUse.superGet(semantics.element));
3365 break; 3364 break;
3366 case AccessKind.COMPOUND: 3365 case AccessKind.COMPOUND:
3367 CompoundAccessSemantics compoundSemantics = semantics; 3366 CompoundAccessSemantics compoundSemantics = semantics;
3368 switch (compoundSemantics.compoundAccessKind) { 3367 switch (compoundSemantics.compoundAccessKind) {
3368 case CompoundAccessKind.SUPER_GETTER_SETTER:
3369 case CompoundAccessKind.SUPER_GETTER_FIELD: 3369 case CompoundAccessKind.SUPER_GETTER_FIELD:
3370 case CompoundAccessKind.SUPER_FIELD_SETTER:
3370 case CompoundAccessKind.SUPER_FIELD_FIELD: 3371 case CompoundAccessKind.SUPER_FIELD_FIELD:
3371 registry.registerStaticUse( 3372 registry.registerStaticUse(
3372 new StaticUse.superGet(semantics.getter)); 3373 new StaticUse.superGet(semantics.getter));
3373 registry.registerStaticUse( 3374 registry.registerStaticUse(
3374 new StaticUse.superFieldSet(semantics.setter)); 3375 new StaticUse.superSet(semantics.setter));
3375 break;
3376 case CompoundAccessKind.SUPER_FIELD_SETTER:
3377 case CompoundAccessKind.SUPER_GETTER_SETTER:
3378 registry.registerStaticUse(
3379 new StaticUse.superGet(semantics.getter));
3380 registry.registerStaticUse(
3381 new StaticUse.superSetterSet(semantics.setter));
3382 break; 3376 break;
3383 case CompoundAccessKind.SUPER_METHOD_SETTER: 3377 case CompoundAccessKind.SUPER_METHOD_SETTER:
3384 registry.registerStaticUse( 3378 registry.registerStaticUse(
3385 new StaticUse.superSetterSet(semantics.setter)); 3379 new StaticUse.superSet(semantics.setter));
3386 break; 3380 break;
3387 case CompoundAccessKind.UNRESOLVED_SUPER_GETTER: 3381 case CompoundAccessKind.UNRESOLVED_SUPER_GETTER:
3388 registry.registerStaticUse( 3382 registry.registerStaticUse(
3389 new StaticUse.superSetterSet(semantics.setter)); 3383 new StaticUse.superSet(semantics.setter));
3390 break; 3384 break;
3391 case CompoundAccessKind.UNRESOLVED_SUPER_SETTER: 3385 case CompoundAccessKind.UNRESOLVED_SUPER_SETTER:
3392 registry.registerStaticUse( 3386 registry.registerStaticUse(
3393 new StaticUse.superGet(semantics.getter)); 3387 new StaticUse.superGet(semantics.getter));
3394 break; 3388 break;
3395 default: 3389 default:
3396 break; 3390 break;
3397 } 3391 }
3398 break; 3392 break;
3399 default: 3393 default:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 reporter.reportWarningMessage( 3428 reporter.reportWarningMessage(
3435 node, MessageKind.ASSIGNING_METHOD_IN_SUPER, 3429 node, MessageKind.ASSIGNING_METHOD_IN_SUPER,
3436 {'name': name, 3430 {'name': name,
3437 'superclassName': semantics.setter.enclosingClass.name}); 3431 'superclassName': semantics.setter.enclosingClass.name});
3438 // TODO(johnniwinther): This shouldn't be needed. 3432 // TODO(johnniwinther): This shouldn't be needed.
3439 registry.registerDynamicUse( 3433 registry.registerDynamicUse(
3440 new DynamicUse(setterSelector, null)); 3434 new DynamicUse(setterSelector, null));
3441 registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD); 3435 registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
3442 break; 3436 break;
3443 case AccessKind.SUPER_FIELD: 3437 case AccessKind.SUPER_FIELD:
3444 registry.registerStaticUse(
3445 new StaticUse.superFieldSet(semantics.setter));
3446 break;
3447 case AccessKind.SUPER_SETTER: 3438 case AccessKind.SUPER_SETTER:
3448 registry.registerStaticUse( 3439 registry.registerStaticUse(
3449 new StaticUse.superSetterSet(semantics.setter)); 3440 new StaticUse.superSet(semantics.setter));
3450 break; 3441 break;
3451 default: 3442 default:
3452 break; 3443 break;
3453 } 3444 }
3454 } 3445 }
3455 return handleUpdate(node, name, semantics); 3446 return handleUpdate(node, name, semantics);
3456 } else { 3447 } else {
3457 // `super.a += b`. 3448 // `super.a += b`.
3458 if (semantics == null) { 3449 if (semantics == null) {
3459 semantics = computeSuperAccessSemanticsForSelectors( 3450 semantics = computeSuperAccessSemanticsForSelectors(
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
4840 } 4831 }
4841 return const NoneResult(); 4832 return const NoneResult();
4842 } 4833 }
4843 } 4834 }
4844 4835
4845 /// Looks up [name] in [scope] and unwraps the result. 4836 /// Looks up [name] in [scope] and unwraps the result.
4846 Element lookupInScope(DiagnosticReporter reporter, Node node, 4837 Element lookupInScope(DiagnosticReporter reporter, Node node,
4847 Scope scope, String name) { 4838 Scope scope, String name) {
4848 return Elements.unwrap(scope.lookup(name), reporter, node); 4839 return Elements.unwrap(scope.lookup(name), reporter, node);
4849 } 4840 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698