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

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

Issue 1086643003: cps-ir: Register IndexSet calls like other calls in JS codegen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added two test cases (one currently disabled) Created 5 years, 8 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/js_backend/codegen/codegen.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
diff --git a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
index 18aa0c52aa30912733722fd6c0f2e4f78b50e86d..7b5e98743ed69ccbc54ce676e2438bb1b1a8f802 100644
--- a/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
+++ b/tests/compiler/dart2js/js_backend_cps_ir_operators_test.dart
@@ -43,6 +43,35 @@ main() { print(foo || foo); }""",
P.print(P.identical(V.foo(), true) || P.identical(V.foo(), true));
return null;
}"""),
+
+// Needs interceptor calling convention
+//const TestEntry("""
+//class Foo {
+// operator[]=(index, value) {
+// print(value);
+// }
+//}
+//main() {
+// var foo = new Foo();
+// foo[5] = 6;
+//}""", r"""
+//function() {
+// V.Foo$().$indexSet(5, 6);
+//}
+//"""),
+
+const TestEntry("""
+main() {
+ var list = [1, 2, 3];
+ list[1] = 6;
+ print(list);
+}""", r"""
+function() {
+ var list = [1, 2, 3];
+ J.getInterceptor$a(list).$indexSet(list, 1, 6);
+ P.print(list);
+ return null;
+}"""),
];
void main() {
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698