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

Unified Diff: tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart

Issue 1223813006: dart2js cps: Direct access on JS arrays. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update unit tests and remove unused functions Created 5 years, 5 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: tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
index 60f97176f626e2ec6f530604fef4030919f929b9..374b75197ef44920457e3fb6ca80560a4322852f 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart
@@ -34,9 +34,11 @@ main() {
r"""
function() {
var l = ["hest", ["h", "e", "s", "t"]], i = 0, x, j;
- P.print(J.getInterceptor$as(l).get$length(l));
- while (i < J.getInterceptor$as(l).get$length(l)) {
- x = J.getInterceptor$as(l).$index(l, i);
+ P.print(l.length);
+ while (i < l.length) {
+ if (i < 0 || i >= l.length)
+ H.ioore(l, i);
+ x = l[i];
j = 0;
while (j < J.getInterceptor$as(x).get$length(x)) {
P.print(J.getInterceptor$as(x).$index(x, j));

Powered by Google App Engine
This is Rietveld 408576698