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

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

Issue 2005843002: Yet another unnecessary ElementX reference (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | tests/compiler/dart2js/serialization/test_data.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 Selectors; 8 import '../common/names.dart' show Selectors;
9 import '../common/resolution.dart' show Feature; 9 import '../common/resolution.dart' show Feature;
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
11 import '../constants/constructors.dart' 11 import '../constants/constructors.dart'
12 show RedirectingFactoryConstantConstructor; 12 show RedirectingFactoryConstantConstructor;
13 import '../constants/expressions.dart'; 13 import '../constants/expressions.dart';
14 import '../constants/values.dart'; 14 import '../constants/values.dart';
15 import '../core_types.dart'; 15 import '../core_types.dart';
16 import '../dart_types.dart'; 16 import '../dart_types.dart';
17 import '../elements/elements.dart'; 17 import '../elements/elements.dart';
18 import '../elements/modelx.dart' 18 import '../elements/modelx.dart'
19 show 19 show
20 BaseFunctionElementX, 20 BaseFunctionElementX,
21 ConstructorElementX, 21 ConstructorElementX,
22 ErroneousElementX, 22 ErroneousElementX,
23 FunctionElementX, 23 FunctionElementX,
24 JumpTargetX, 24 JumpTargetX,
25 LocalFunctionElementX, 25 LocalFunctionElementX,
26 LocalParameterElementX, 26 LocalParameterElementX,
27 MethodElementX,
28 ParameterElementX, 27 ParameterElementX,
29 VariableElementX, 28 VariableElementX,
30 VariableList; 29 VariableList;
31 import '../tokens/token.dart' show isUserDefinableOperator; 30 import '../tokens/token.dart' show isUserDefinableOperator;
32 import '../tree/tree.dart'; 31 import '../tree/tree.dart';
33 import '../universe/call_structure.dart' show CallStructure; 32 import '../universe/call_structure.dart' show CallStructure;
34 import '../universe/selector.dart' show Selector; 33 import '../universe/selector.dart' show Selector;
35 import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse; 34 import '../universe/use.dart' show DynamicUse, StaticUse, TypeUse;
36 import '../util/util.dart' show Link; 35 import '../util/util.dart' show Link;
37 import 'access_semantics.dart'; 36 import 'access_semantics.dart';
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 } 1538 }
1540 AccessSemantics semantics = checkSuperAccess(node); 1539 AccessSemantics semantics = checkSuperAccess(node);
1541 if (semantics == null) { 1540 if (semantics == null) {
1542 semantics = computeSuperAccessSemanticsForSelector(node, selector, 1541 semantics = computeSuperAccessSemanticsForSelector(node, selector,
1543 alternateName: name.setter); 1542 alternateName: name.setter);
1544 } 1543 }
1545 if (node.isCall) { 1544 if (node.isCall) {
1546 bool isIncompatibleInvoke = false; 1545 bool isIncompatibleInvoke = false;
1547 switch (semantics.kind) { 1546 switch (semantics.kind) {
1548 case AccessKind.SUPER_METHOD: 1547 case AccessKind.SUPER_METHOD:
1549 MethodElementX superMethod = semantics.element; 1548 MethodElement superMethod = semantics.element;
1550 superMethod.computeType(resolution); 1549 superMethod.computeType(resolution);
1551 if (!callStructure.signatureApplies(superMethod.functionSignature)) { 1550 if (!callStructure.signatureApplies(superMethod.functionSignature)) {
1552 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); 1551 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
1553 registry.registerDynamicUse(new DynamicUse(selector, null)); 1552 registry.registerDynamicUse(new DynamicUse(selector, null));
1554 registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD); 1553 registry.registerFeature(Feature.SUPER_NO_SUCH_METHOD);
1555 isIncompatibleInvoke = true; 1554 isIncompatibleInvoke = true;
1556 } else { 1555 } else {
1557 registry.registerStaticUse( 1556 registry.registerStaticUse(
1558 new StaticUse.superInvoke(semantics.element, callStructure)); 1557 new StaticUse.superInvoke(semantics.element, callStructure));
1559 } 1558 }
(...skipping 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after
4697 } 4696 }
4698 return const NoneResult(); 4697 return const NoneResult();
4699 } 4698 }
4700 } 4699 }
4701 4700
4702 /// Looks up [name] in [scope] and unwraps the result. 4701 /// Looks up [name] in [scope] and unwraps the result.
4703 Element lookupInScope( 4702 Element lookupInScope(
4704 DiagnosticReporter reporter, Node node, Scope scope, String name) { 4703 DiagnosticReporter reporter, Node node, Scope scope, String name) {
4705 return Elements.unwrap(scope.lookup(name), reporter, node); 4704 return Elements.unwrap(scope.lookup(name), reporter, node);
4706 } 4705 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698