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

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

Issue 9619020: Don't cancel when naming a typedef. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « frog/leg/namer.dart ('k') | tests/co19/co19-leg.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA code generator'; 7 String get name() => 'SSA code generator';
8 8
9 String generate(WorkItem work, HGraph graph) { 9 String generate(WorkItem work, HGraph graph) {
10 return measure(() { 10 return measure(() {
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 || isSupertypeOfNativeClass(element))) { 980 || isSupertypeOfNativeClass(element))) {
981 buffer.add("("); 981 buffer.add("(");
982 endParen = true; 982 endParen = true;
983 } else { 983 } else {
984 beginExpression(precedence); 984 beginExpression(precedence);
985 } 985 }
986 buffer.add('!!'); 986 buffer.add('!!');
987 use(input, JSPrecedence.MEMBER_PRECEDENCE); 987 use(input, JSPrecedence.MEMBER_PRECEDENCE);
988 buffer.add('.'); 988 buffer.add('.');
989 buffer.add(compiler.namer.operatorIs(node.typeExpression)); 989 buffer.add(compiler.namer.operatorIs(node.typeExpression));
990 if (element.isNative() || isSupertypeOfNativeClass(element)) { 990 if (element.isClass() && (element.dynamic.isNative()
991 || isSupertypeOfNativeClass(element))) {
991 buffer.add(' || '); 992 buffer.add(' || ');
992 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 993 beginExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
993 // First check if the object is not a Dart object. If the 994 // First check if the object is not a Dart object. If the
994 // object is a Dart object, we know the property check was 995 // object is a Dart object, we know the property check was
995 // sufficient. 996 // sufficient.
996 buffer.add('!'); 997 buffer.add('!');
997 use(input, JSPrecedence.MEMBER_PRECEDENCE); 998 use(input, JSPrecedence.MEMBER_PRECEDENCE);
998 buffer.add('.'); 999 buffer.add('.');
999 buffer.add(compiler.namer.operatorIs(objectClass)); 1000 buffer.add(compiler.namer.operatorIs(objectClass));
1000 buffer.add(' && '); 1001 buffer.add(' && ');
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 startBailoutSwitch(); 1393 startBailoutSwitch();
1393 } 1394 }
1394 } 1395 }
1395 1396
1396 void endElse(HIf node) { 1397 void endElse(HIf node) {
1397 if (node.elseBlock.hasBailouts()) { 1398 if (node.elseBlock.hasBailouts()) {
1398 endBailoutSwitch(); 1399 endBailoutSwitch();
1399 } 1400 }
1400 } 1401 }
1401 } 1402 }
OLDNEW
« no previous file with comments | « frog/leg/namer.dart ('k') | tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698