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

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

Issue 10310037: Fix regression on constant folding an interceptor into a dynamic invocation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 interface HVisitor<R> { 5 interface HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBitAnd(HBitAnd node); 7 R visitBitAnd(HBitAnd node);
8 R visitBitNot(HBitNot node); 8 R visitBitNot(HBitNot node);
9 R visitBitOr(HBitOr node); 9 R visitBitOr(HBitOr node);
10 R visitBitXor(HBitXor node); 10 R visitBitXor(HBitXor node);
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 1139
1140 class HInvokeSuper extends HInvokeStatic { 1140 class HInvokeSuper extends HInvokeStatic {
1141 HInvokeSuper(selector, inputs) : super(selector, inputs); 1141 HInvokeSuper(selector, inputs) : super(selector, inputs);
1142 toString() => 'invoke super: ${element.name}'; 1142 toString() => 'invoke super: ${element.name}';
1143 accept(HVisitor visitor) => visitor.visitInvokeSuper(this); 1143 accept(HVisitor visitor) => visitor.visitInvokeSuper(this);
1144 } 1144 }
1145 1145
1146 class HInvokeInterceptor extends HInvokeStatic { 1146 class HInvokeInterceptor extends HInvokeStatic {
1147 final SourceString name; 1147 final SourceString name;
1148 final bool getter; 1148 final bool getter;
1149 final bool setter;
1149 1150
1150 HInvokeInterceptor(Selector selector, 1151 HInvokeInterceptor(Selector selector,
1151 SourceString this.name, 1152 SourceString this.name,
1152 bool this.getter,
1153 List<HInstruction> inputs, 1153 List<HInstruction> inputs,
1154 [HType knownType = HType.UNKNOWN]) 1154 [HType knownType = HType.UNKNOWN,
1155 bool this.getter = false,
1156 bool this.setter = false])
1155 : super(selector, inputs, knownType); 1157 : super(selector, inputs, knownType);
1156 1158
1157 toString() => 'invoke interceptor: ${element.name}'; 1159 toString() => 'invoke interceptor: ${element.name}';
1158 accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this); 1160 accept(HVisitor visitor) => visitor.visitInvokeInterceptor(this);
1159 1161
1160 bool isLengthGetter() { 1162 bool isLengthGetter() {
1161 return getter && name == const SourceString('length'); 1163 return getter && name == const SourceString('length');
1162 } 1164 }
1163 1165
1164 bool isLengthGetterOnStringOrArray() { 1166 bool isLengthGetterOnStringOrArray() {
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2405 this.finallyBlock, 2407 this.finallyBlock,
2406 this.joinBlock); 2408 this.joinBlock);
2407 2409
2408 HBasicBlock get start() => body.start; 2410 HBasicBlock get start() => body.start;
2409 HBasicBlock get end() => 2411 HBasicBlock get end() =>
2410 finallyBlock === null ? catchBlock.end : finallyBlock.end; 2412 finallyBlock === null ? catchBlock.end : finallyBlock.end;
2411 2413
2412 bool accept(HStatementInformationVisitor visitor) => 2414 bool accept(HStatementInformationVisitor visitor) =>
2413 visitor.visitTryInfo(this); 2415 visitor.visitTryInfo(this);
2414 } 2416 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698