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

Side by Side Diff: dart/frog/leg/ssa/builder.dart

Issue 9423040: Fix crash in SSA builder for receiver-less calls. Not sure this is correct. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments and sort status file Created 8 years, 10 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) 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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 isNotEquals = name.stringValue === '!='; 1489 isNotEquals = name.stringValue === '!=';
1490 dartMethodName = Elements.constructOperatorName( 1490 dartMethodName = Elements.constructOperatorName(
1491 const SourceString('operator'), 1491 const SourceString('operator'),
1492 name, 1492 name,
1493 node.argumentsNode is Prefix); 1493 node.argumentsNode is Prefix);
1494 } else { 1494 } else {
1495 dartMethodName = node.selector.asIdentifier().source; 1495 dartMethodName = node.selector.asIdentifier().source;
1496 } 1496 }
1497 1497
1498 Element interceptor = null; 1498 Element interceptor = null;
1499 if (methodInterceptionEnabled) { 1499 if (methodInterceptionEnabled && node.receiver !== null) {
ngeoffray 2012/02/20 17:14:08 Maybe it would be clearer to check if you actually
1500 interceptor = interceptors.getStaticInterceptor(dartMethodName, 1500 interceptor = interceptors.getStaticInterceptor(dartMethodName,
1501 node.argumentCount()); 1501 node.argumentCount());
1502 } 1502 }
1503 if (interceptor != null) { 1503 if (interceptor != null) {
1504 HStatic target = new HStatic(interceptor); 1504 HStatic target = new HStatic(interceptor);
1505 add(target); 1505 add(target);
1506 inputs.add(target); 1506 inputs.add(target);
1507 visit(node.receiver); 1507 visit(node.receiver);
1508 inputs.add(pop()); 1508 inputs.add(pop());
1509 addGenericSendArgumentsToList(node.arguments, inputs); 1509 addGenericSendArgumentsToList(node.arguments, inputs);
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 } 2096 }
2097 2097
2098 visitCatchBlock(CatchBlock node) { 2098 visitCatchBlock(CatchBlock node) {
2099 visit(node.block); 2099 visit(node.block);
2100 } 2100 }
2101 2101
2102 visitTypedef(Typedef node) { 2102 visitTypedef(Typedef node) {
2103 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2103 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2104 } 2104 }
2105 } 2105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698