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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.dart

Issue 48243002: When doing SSA type propagation, refine the receiver after a call. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
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 abstract class HVisitor<R> { 7 abstract class HVisitor<R> {
8 R visitAdd(HAdd node); 8 R visitAdd(HAdd node);
9 R visitBitAnd(HBitAnd node); 9 R visitBitAnd(HBitAnd node);
10 R visitBitNot(HBitNot node); 10 R visitBitNot(HBitNot node);
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 bool get isInterceptedCall { 1231 bool get isInterceptedCall {
1232 // We know it's a selector call if it follows the interceptor 1232 // We know it's a selector call if it follows the interceptor
1233 // calling convention, which adds the actual receiver as a 1233 // calling convention, which adds the actual receiver as a
1234 // parameter to the call. 1234 // parameter to the call.
1235 return (selector != null) && (inputs.length - 2 == selector.argumentCount); 1235 return (selector != null) && (inputs.length - 2 == selector.argumentCount);
1236 } 1236 }
1237 } 1237 }
1238 1238
1239 abstract class HInvokeDynamic extends HInvoke { 1239 abstract class HInvokeDynamic extends HInvoke {
1240 final InvokeDynamicSpecializer specializer; 1240 final InvokeDynamicSpecializer specializer;
1241 final Selector selector; 1241 Selector selector;
1242 Element element; 1242 Element element;
1243 1243
1244 HInvokeDynamic(Selector selector, 1244 HInvokeDynamic(Selector selector,
1245 this.element, 1245 this.element,
1246 List<HInstruction> inputs, 1246 List<HInstruction> inputs,
1247 [bool isIntercepted = false]) 1247 [bool isIntercepted = false])
1248 : super(inputs), 1248 : super(inputs),
1249 this.selector = selector, 1249 this.selector = selector,
1250 specializer = isIntercepted 1250 specializer = isIntercepted
1251 ? InvokeDynamicSpecializer.lookupSpecializer(selector) 1251 ? InvokeDynamicSpecializer.lookupSpecializer(selector)
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 HBasicBlock get start => expression.start; 2735 HBasicBlock get start => expression.start;
2736 HBasicBlock get end { 2736 HBasicBlock get end {
2737 // We don't create a switch block if there are no cases. 2737 // We don't create a switch block if there are no cases.
2738 assert(!statements.isEmpty); 2738 assert(!statements.isEmpty);
2739 return statements.last.end; 2739 return statements.last.end;
2740 } 2740 }
2741 2741
2742 bool accept(HStatementInformationVisitor visitor) => 2742 bool accept(HStatementInformationVisitor visitor) =>
2743 visitor.visitSwitchInfo(this); 2743 visitor.visitSwitchInfo(this);
2744 } 2744 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698