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

Unified Diff: pkg/compiler/lib/src/ssa/nodes.dart

Issue 1315523012: dart2js ssa: Open coding of removeLast should use -1 as index (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/nodes.dart
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index b23f32d6ecc357c67ab91285fcce0199de06a25d..dfcc4d367582ad41324d5bee88c4b651fb8e5c41 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -1393,6 +1393,9 @@ class HBoundsCheck extends HCheck {
HInstruction get length => inputs[1];
HInstruction get index => inputs[0];
HInstruction get array => inputs[2];
+ // There can be an additional fourth input which is the index to report to
+ // [ioore]. This is used by the expansion of [JSArray.removeLast].
+ HInstruction get reportedIndex => inputs.length > 3 ? inputs[3] : index;
bool isControlFlow() => true;
accept(HVisitor visitor) => visitor.visitBoundsCheck(this);
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698