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

Unified Diff: lib/compiler/implementation/ssa/codegen_helpers.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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/ssa/codegen_helpers.dart
diff --git a/lib/compiler/implementation/ssa/codegen_helpers.dart b/lib/compiler/implementation/ssa/codegen_helpers.dart
index 610c7455b9f31adf79835765a6caf778b0eaeb0c..f1b5fa7747187cd0ba3ef1213abebed835aec021 100644
--- a/lib/compiler/implementation/ssa/codegen_helpers.dart
+++ b/lib/compiler/implementation/ssa/codegen_helpers.dart
@@ -48,8 +48,13 @@ class SsaInstructionMerger extends HBaseVisitor {
void visitTypeGuard(HTypeGuard instruction) {}
void visitTypeConversion(HTypeConversion instruction) {
- if (!instruction.checked) generateAtUseSite.add(instruction);
- visitInstruction(instruction);
+ if (!instruction.isChecked()) {
+ generateAtUseSite.add(instruction);
+ } else if (instruction.isCheckedModeCheck()) {
+ // Checked mode checks compile to code that only use their input
+ // once, so we can safely visit them an try to merge the input.
floitsch 2012/06/19 11:15:58 and
kasperl 2012/06/19 11:22:06 Done.
+ visitInstruction(instruction);
+ }
}
void tryGenerateAtUseSite(HInstruction instruction) {

Powered by Google App Engine
This is Rietveld 408576698