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

Side by Side Diff: pkg/compiler/lib/src/ssa/codegen.dart

Issue 1402913003: Avoid creating invalid TypeMask.nonNullExact (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years, 2 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 ssa; 5 part of ssa;
6 6
7 class SsaCodeGeneratorTask extends CompilerTask { 7 class SsaCodeGeneratorTask extends CompilerTask {
8 8
9 final JavaScriptBackend backend; 9 final JavaScriptBackend backend;
10 final SourceInformationStrategy sourceInformationFactory; 10 final SourceInformationStrategy sourceInformationFactory;
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1749 } else { 1749 } else {
1750 Selector selector = node.selector; 1750 Selector selector = node.selector;
1751 1751
1752 if (!backend.maybeRegisterAliasedSuperMember(superMethod, selector)) { 1752 if (!backend.maybeRegisterAliasedSuperMember(superMethod, selector)) {
1753 js.Name methodName; 1753 js.Name methodName;
1754 if (selector.isGetter) { 1754 if (selector.isGetter) {
1755 // If the selector we need to register a typed getter to the 1755 // If the selector we need to register a typed getter to the
1756 // [world]. The emitter needs to know if it needs to emit a 1756 // [world]. The emitter needs to know if it needs to emit a
1757 // bound closure for a method. 1757 // bound closure for a method.
1758 TypeMask receiverType = 1758 TypeMask receiverType =
1759 new TypeMask.nonNullExact(superClass, compiler.world); 1759 new TypeMask.nonNullExact(node.caller.superclass, compiler.world);
Johnni Winther 2015/10/13 10:14:55 superMethod is mixed in [superClass] might not be
floitsch 2015/10/13 12:15:42 add comment.
Johnni Winther 2015/10/13 13:06:37 Done.
1760 // TODO(floitsch): we know the target. We shouldn't register a 1760 // TODO(floitsch): we know the target. We shouldn't register a
1761 // dynamic getter. 1761 // dynamic getter.
1762 registry.registerDynamicGetter( 1762 registry.registerDynamicGetter(
1763 new UniverseSelector(selector, receiverType)); 1763 new UniverseSelector(selector, receiverType));
1764 registry.registerGetterForSuperMethod(node.element); 1764 registry.registerGetterForSuperMethod(node.element);
1765 methodName = backend.namer.invocationName(selector); 1765 methodName = backend.namer.invocationName(selector);
1766 } else { 1766 } else {
1767 assert(invariant(node, compiler.hasIncrementalSupport)); 1767 assert(invariant(node, compiler.hasIncrementalSupport));
1768 methodName = backend.namer.instanceMethodName(superMethod); 1768 methodName = backend.namer.instanceMethodName(superMethod);
1769 } 1769 }
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 } 2877 }
2878 registry.registerStaticUse(helper); 2878 registry.registerStaticUse(helper);
2879 return backend.emitter.staticFunctionAccess(helper); 2879 return backend.emitter.staticFunctionAccess(helper);
2880 } 2880 }
2881 2881
2882 @override 2882 @override
2883 void visitRef(HRef node) { 2883 void visitRef(HRef node) {
2884 visit(node.value); 2884 visit(node.value);
2885 } 2885 }
2886 } 2886 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698