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

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

Issue 10558022: Better bitwise and binary arithmetic when the left operand is known to be a number. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup HTypeConversion usage. Created 8 years, 6 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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 1100
1101 HType convertedType = new HType.fromBoundedType(type, compiler, true); 1101 HType convertedType = new HType.fromBoundedType(type, compiler, true);
1102 1102
1103 // No need to convert if we know the instruction has 1103 // No need to convert if we know the instruction has
1104 // [convertedType] as a bound. 1104 // [convertedType] as a bound.
1105 if (original.guaranteedType == convertedType) { 1105 if (original.guaranteedType == convertedType) {
1106 return original; 1106 return original;
1107 } 1107 }
1108 1108
1109 HInstruction instruction = 1109 HInstruction instruction =
1110 new HTypeConversion(convertedType, original, true); 1110 new HTypeConversion.checkedModeCheck(convertedType, original);
1111 add(instruction); 1111 add(instruction);
1112 return instruction; 1112 return instruction;
1113 } 1113 }
1114 1114
1115 HGraph closeFunction() { 1115 HGraph closeFunction() {
1116 // TODO(kasperl): Make this goto an implicit return. 1116 // TODO(kasperl): Make this goto an implicit return.
1117 if (!isAborted()) close(new HGoto()).addSuccessor(graph.exit); 1117 if (!isAborted()) close(new HGoto()).addSuccessor(graph.exit);
1118 graph.finalize(); 1118 graph.finalize();
1119 return graph; 1119 return graph;
1120 } 1120 }
(...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after
3462 void visitNodeList(NodeList node) { 3462 void visitNodeList(NodeList node) {
3463 node.visitChildren(this); 3463 node.visitChildren(this);
3464 } 3464 }
3465 3465
3466 HInstruction concat(HInstruction left, HInstruction right) { 3466 HInstruction concat(HInstruction left, HInstruction right) {
3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode); 3467 HInstruction instruction = new HStringConcat(left, right, diagnosticNode);
3468 builder.add(instruction); 3468 builder.add(instruction);
3469 return instruction; 3469 return instruction;
3470 } 3470 }
3471 } 3471 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/codegen.dart » ('j') | lib/compiler/implementation/ssa/codegen_helpers.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698