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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1579073002: Fix BoundsCheck copying. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
index 0728da8106b5b88877c06392897082cf5d1cf643..96b094540f230ffe0a00a57bc5e15785336c88c6 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart
@@ -800,7 +800,7 @@ class BoundsCheck extends Primitive {
[this.checks = BOTH_BOUNDS, this.sourceInformation])
: this.object = new Reference<Primitive>(object),
this.index = new Reference<Primitive>(index),
- this.length = new Reference<Primitive>(length);
+ this.length = length == null ? null : new Reference<Primitive>(length);
BoundsCheck.noCheck(Primitive object, [this.sourceInformation])
: this.object = new Reference<Primitive>(object),
@@ -2679,7 +2679,7 @@ class DefinitionCopyingVisitor extends Visitor<Definition> {
node.sourceInformation);
} else {
return new BoundsCheck(getCopy(node.object), getCopy(node.index),
- getCopy(node.length),
+ node.length == null ? null : getCopy(node.length),
node.checks,
node.sourceInformation);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698