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

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

Issue 10115026: Address the remaining review comments on http://chromiumcodereview.appspot.com/9431029. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Break a long line. Created 8 years, 8 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 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 9
10 String generateMethod(WorkItem work, HGraph graph) { 10 String generateMethod(WorkItem work, HGraph graph) {
(...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); 1478 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE);
1479 checkArray(input, '==='); 1479 checkArray(input, '===');
1480 buffer.add(' || '); 1480 buffer.add(' || ');
1481 checkType(input, element); 1481 checkType(input, element);
1482 buffer.add(')'); 1482 buffer.add(')');
1483 endExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); 1483 endExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE);
1484 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); 1484 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE);
1485 } 1485 }
1486 1486
1487 void visitIs(HIs node) { 1487 void visitIs(HIs node) {
1488 Type type = node.typeName; 1488 Type type = node.typeExpression;
1489 Element element = type.element; 1489 Element element = type.element;
1490 if (element.kind === ElementKind.TYPE_VARIABLE) { 1490 if (element.kind === ElementKind.TYPE_VARIABLE) {
1491 compiler.unimplemented("visitIs for type variables"); 1491 compiler.unimplemented("visitIs for type variables", instruction: node);
1492 } else if (element.kind === ElementKind.TYPEDEF) { 1492 } else if (element.kind === ElementKind.TYPEDEF) {
1493 compiler.unimplemented("visitIs for typedefs"); 1493 compiler.unimplemented("visitIs for typedefs", instruction: node);
1494 } 1494 }
1495 compiler.registerIsCheck(element); 1495 compiler.registerIsCheck(element);
1496 LibraryElement coreLibrary = compiler.coreLibrary; 1496 LibraryElement coreLibrary = compiler.coreLibrary;
1497 ClassElement objectClass = compiler.objectClass; 1497 ClassElement objectClass = compiler.objectClass;
1498 HInstruction input = node.expression; 1498 HInstruction input = node.expression;
1499 if (node.nullOk) { 1499 if (node.nullOk) {
1500 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); 1500 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE);
1501 checkNull(input); 1501 checkNull(input);
1502 buffer.add(' || '); 1502 buffer.add(' || ');
1503 } 1503 }
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 startBailoutSwitch(); 1905 startBailoutSwitch();
1906 } 1906 }
1907 } 1907 }
1908 1908
1909 void endElse(HIf node) { 1909 void endElse(HIf node) {
1910 if (node.elseBlock.hasGuards()) { 1910 if (node.elseBlock.hasGuards()) {
1911 endBailoutSwitch(); 1911 endBailoutSwitch();
1912 } 1912 }
1913 } 1913 }
1914 } 1914 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698