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

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

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Handle (bypass) external const constructors. Created 5 years, 5 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) 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 part of resolution; 5 part of resolution;
6 6
7 /// The state of constants in resolutions. 7 /// The state of constants in resolutions.
8 enum ConstantState { 8 enum ConstantState {
9 /// Expressions are not required to be constants. 9 /// Expressions are not required to be constants.
10 NON_CONSTANT, 10 NON_CONSTANT,
(...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 if (node.isCall) { 2061 if (node.isCall) {
2062 ArgumentsResult argumentsResult = 2062 ArgumentsResult argumentsResult =
2063 resolveArguments(node.argumentsNode); 2063 resolveArguments(node.argumentsNode);
2064 CallStructure callStructure = argumentsResult.callStructure; 2064 CallStructure callStructure = argumentsResult.callStructure;
2065 selector = new Selector(SelectorKind.CALL, name, callStructure); 2065 selector = new Selector(SelectorKind.CALL, name, callStructure);
2066 2066
2067 bool isIncompatibleInvoke = false; 2067 bool isIncompatibleInvoke = false;
2068 switch (semantics.kind) { 2068 switch (semantics.kind) {
2069 case AccessKind.STATIC_METHOD: 2069 case AccessKind.STATIC_METHOD:
2070 case AccessKind.TOPLEVEL_METHOD: 2070 case AccessKind.TOPLEVEL_METHOD:
2071 MethodElementX method = semantics.element; 2071 MethodElement method = semantics.element;
2072 method.computeSignature(compiler); 2072 method.computeType(compiler);
2073 if (!callStructure.signatureApplies(method.functionSignature)) { 2073 if (!callStructure.signatureApplies(method.functionSignature)) {
2074 registry.registerThrowNoSuchMethod(); 2074 registry.registerThrowNoSuchMethod();
2075 registry.registerDynamicInvocation( 2075 registry.registerDynamicInvocation(
2076 new UniverseSelector(selector, null)); 2076 new UniverseSelector(selector, null));
2077 isIncompatibleInvoke = true; 2077 isIncompatibleInvoke = true;
2078 } else { 2078 } else {
2079 registry.registerStaticUse(semantics.element); 2079 registry.registerStaticUse(semantics.element);
2080 handleForeignCall(node, semantics.element, selector); 2080 handleForeignCall(node, semantics.element, selector);
2081 if (method == compiler.identicalFunction && 2081 if (method == compiler.identicalFunction &&
2082 argumentsResult.isValidAsConstant) { 2082 argumentsResult.isValidAsConstant) {
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 } 3673 }
3674 return const NoneResult(); 3674 return const NoneResult();
3675 } 3675 }
3676 } 3676 }
3677 3677
3678 /// Looks up [name] in [scope] and unwraps the result. 3678 /// Looks up [name] in [scope] and unwraps the result.
3679 Element lookupInScope(Compiler compiler, Node node, 3679 Element lookupInScope(Compiler compiler, Node node,
3680 Scope scope, String name) { 3680 Scope scope, String name) {
3681 return Elements.unwrap(scope.lookup(name), compiler, node); 3681 return Elements.unwrap(scope.lookup(name), compiler, node);
3682 } 3682 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/enum_creator.dart ('k') | pkg/compiler/lib/src/resolution/operators.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698