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

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

Issue 10579014: Postpone the argument type optimizations until the types are stable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comment. 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 /** 5 /**
6 * Instead of emitting each SSA instruction with a temporary variable 6 * Instead of emitting each SSA instruction with a temporary variable
7 * mark instructions that can be emitted at their use-site. 7 * mark instructions that can be emitted at their use-site.
8 * For example, in: 8 * For example, in:
9 * t0 = 4; 9 * t0 = 4;
10 * t1 = 3; 10 * t1 = 3;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // A type guard should not generate its input at use site, otherwise 46 // A type guard should not generate its input at use site, otherwise
47 // they would not be alive. 47 // they would not be alive.
48 void visitTypeGuard(HTypeGuard instruction) {} 48 void visitTypeGuard(HTypeGuard instruction) {}
49 49
50 void visitTypeConversion(HTypeConversion instruction) { 50 void visitTypeConversion(HTypeConversion instruction) {
51 if (!instruction.isChecked()) { 51 if (!instruction.isChecked()) {
52 generateAtUseSite.add(instruction); 52 generateAtUseSite.add(instruction);
53 } else if (instruction.isCheckedModeCheck()) { 53 } else if (instruction.isCheckedModeCheck()) {
54 // Checked mode checks compile to code that only use their input 54 // Checked mode checks compile to code that only use their input
55 // once, so we can safely visit them an try to merge the input. 55 // once, so we can safely visit them and try to merge the input.
56 visitInstruction(instruction); 56 visitInstruction(instruction);
57 } 57 }
58 } 58 }
59 59
60 void tryGenerateAtUseSite(HInstruction instruction) { 60 void tryGenerateAtUseSite(HInstruction instruction) {
61 if (instruction.isControlFlow()) return; 61 if (instruction.isControlFlow()) return;
62 generateAtUseSite.add(instruction); 62 generateAtUseSite.add(instruction);
63 } 63 }
64 64
65 bool isBlockSinglePredecessor(HBasicBlock block) { 65 bool isBlockSinglePredecessor(HBasicBlock block) {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 }; 335 };
336 } 336 }
337 337
338 class JSBinaryOperatorPrecedence { 338 class JSBinaryOperatorPrecedence {
339 final int left; 339 final int left;
340 final int right; 340 final int right;
341 const JSBinaryOperatorPrecedence(this.left, this.right); 341 const JSBinaryOperatorPrecedence(this.left, this.right);
342 // All binary operators (excluding assignment) are left associative. 342 // All binary operators (excluding assignment) are left associative.
343 int get precedence() => left; 343 int get precedence() => left;
344 } 344 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/nodes.dart » ('j') | lib/compiler/implementation/ssa/types_propagation.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698