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

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

Issue 1462333002: 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 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 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 void registerStaticUses(AccessSemantics semantics) { 3354 void registerStaticUses(AccessSemantics semantics) {
3355 switch (semantics.kind) { 3355 switch (semantics.kind) {
3356 case AccessKind.SUPER_METHOD: 3356 case AccessKind.SUPER_METHOD:
3357 registry.registerStaticUse( 3357 registry.registerStaticUse(
3358 new StaticUse.superTearOff(semantics.element)); 3358 new StaticUse.superTearOff(semantics.element));
3359 break; 3359 break;
3360 case AccessKind.SUPER_GETTER: 3360 case AccessKind.SUPER_GETTER:
3361 registry.registerStaticUse(new StaticUse.superGet(semantics.getter)); 3361 registry.registerStaticUse(new StaticUse.superGet(semantics.getter));
3362 break; 3362 break;
3363 case AccessKind.SUPER_SETTER: 3363 case AccessKind.SUPER_SETTER:
3364 registry.registerStaticUse( 3364 registry.registerStaticUse(new StaticUse.superSet(semantics.setter));
3365 new StaticUse.superSetterSet(semantics.setter));
3366 break; 3365 break;
3367 case AccessKind.SUPER_FIELD: 3366 case AccessKind.SUPER_FIELD:
3368 registry.registerStaticUse( 3367 registry.registerStaticUse(
3369 new StaticUse.superGet(semantics.element)); 3368 new StaticUse.superGet(semantics.element));
3370 registry.registerStaticUse( 3369 registry.registerStaticUse(
3371 new StaticUse.superFieldSet(semantics.element)); 3370 new StaticUse.superSet(semantics.element));
3372 break; 3371 break;
3373 case AccessKind.SUPER_FINAL_FIELD: 3372 case AccessKind.SUPER_FINAL_FIELD:
3374 registry.registerStaticUse( 3373 registry.registerStaticUse(
3375 new StaticUse.superGet(semantics.element)); 3374 new StaticUse.superGet(semantics.element));
3376 break; 3375 break;
3377 case AccessKind.COMPOUND: 3376 case AccessKind.COMPOUND:
3378 CompoundAccessSemantics compoundSemantics = semantics; 3377 CompoundAccessSemantics compoundSemantics = semantics;
3379 switch (compoundSemantics.compoundAccessKind) { 3378 switch (compoundSemantics.compoundAccessKind) {
3379 case CompoundAccessKind.SUPER_GETTER_SETTER:
3380 case CompoundAccessKind.SUPER_GETTER_FIELD: 3380 case CompoundAccessKind.SUPER_GETTER_FIELD:
3381 case CompoundAccessKind.SUPER_FIELD_SETTER:
3381 case CompoundAccessKind.SUPER_FIELD_FIELD: 3382 case CompoundAccessKind.SUPER_FIELD_FIELD:
3382 registry.registerStaticUse( 3383 registry.registerStaticUse(
3383 new StaticUse.superGet(semantics.getter)); 3384 new StaticUse.superGet(semantics.getter));
3384 registry.registerStaticUse( 3385 registry.registerStaticUse(
3385 new StaticUse.superFieldSet(semantics.setter)); 3386 new StaticUse.superSet(semantics.setter));
3386 break;
3387 case CompoundAccessKind.SUPER_FIELD_SETTER:
3388 case CompoundAccessKind.SUPER_GETTER_SETTER:
3389 registry.registerStaticUse(
3390 new StaticUse.superGet(semantics.getter));
3391 registry.registerStaticUse(
3392 new StaticUse.superSetterSet(semantics.setter));
3393 break; 3387 break;
3394 case CompoundAccessKind.SUPER_METHOD_SETTER: 3388 case CompoundAccessKind.SUPER_METHOD_SETTER:
3395 registry.registerStaticUse( 3389 registry.registerStaticUse(
3396 new StaticUse.superSetterSet(semantics.setter)); 3390 new StaticUse.superSet(semantics.setter));
3397 break; 3391 break;
3398 case CompoundAccessKind.UNRESOLVED_SUPER_GETTER: 3392 case CompoundAccessKind.UNRESOLVED_SUPER_GETTER:
3399 registry.registerStaticUse( 3393 registry.registerStaticUse(
3400 new StaticUse.superSetterSet(semantics.setter)); 3394 new StaticUse.superSet(semantics.setter));
3401 break; 3395 break;
3402 case CompoundAccessKind.UNRESOLVED_SUPER_SETTER: 3396 case CompoundAccessKind.UNRESOLVED_SUPER_SETTER:
3403 registry.registerStaticUse( 3397 registry.registerStaticUse(
3404 new StaticUse.superGet(semantics.getter)); 3398 new StaticUse.superGet(semantics.getter));
3405 break; 3399 break;
3406 default: 3400 default:
3407 break; 3401 break;
3408 } 3402 }
3409 break; 3403 break;
3410 default: 3404 default:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 reporter.reportWarningMessage( 3439 reporter.reportWarningMessage(
3446 node, MessageKind.ASSIGNING_METHOD_IN_SUPER, 3440 node, MessageKind.ASSIGNING_METHOD_IN_SUPER,
3447 {'name': name, 3441 {'name': name,
3448 'superclassName': semantics.setter.enclosingClass.name}); 3442 'superclassName': semantics.setter.enclosingClass.name});
3449 // TODO(johnniwinther): This shouldn't be needed. 3443 // TODO(johnniwinther): This shouldn't be needed.
3450 registry.registerDynamicUse( 3444 registry.registerDynamicUse(
3451 new DynamicUse(setterSelector, null)); 3445 new DynamicUse(setterSelector, null));
3452 registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD); 3446 registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
3453 break; 3447 break;
3454 case AccessKind.SUPER_FIELD: 3448 case AccessKind.SUPER_FIELD:
3455 registry.registerStaticUse(
3456 new StaticUse.superFieldSet(semantics.setter));
3457 break;
3458 case AccessKind.SUPER_SETTER: 3449 case AccessKind.SUPER_SETTER:
3459 registry.registerStaticUse( 3450 registry.registerStaticUse(
3460 new StaticUse.superSetterSet(semantics.setter)); 3451 new StaticUse.superSet(semantics.setter));
3461 break; 3452 break;
3462 default: 3453 default:
3463 break; 3454 break;
3464 } 3455 }
3465 } 3456 }
3466 return handleUpdate(node, name, semantics); 3457 return handleUpdate(node, name, semantics);
3467 } else { 3458 } else {
3468 // `super.a += b`. 3459 // `super.a += b`.
3469 if (semantics == null) { 3460 if (semantics == null) {
3470 semantics = computeSuperAccessSemanticsForSelectors( 3461 semantics = computeSuperAccessSemanticsForSelectors(
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
4851 } 4842 }
4852 return const NoneResult(); 4843 return const NoneResult();
4853 } 4844 }
4854 } 4845 }
4855 4846
4856 /// Looks up [name] in [scope] and unwraps the result. 4847 /// Looks up [name] in [scope] and unwraps the result.
4857 Element lookupInScope(DiagnosticReporter reporter, Node node, 4848 Element lookupInScope(DiagnosticReporter reporter, Node node,
4858 Scope scope, String name) { 4849 Scope scope, String name) {
4859 return Elements.unwrap(scope.lookup(name), reporter, node); 4850 return Elements.unwrap(scope.lookup(name), reporter, node);
4860 } 4851 }
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