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

Unified Diff: tests/compiler/dart2js/cps_ir/input/optimize_indexers.dart

Issue 1685893002: cpsir: insert guard and force specialization for [] and []= (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « tests/compiler/dart2js/cps_ir/expected/redundant_condition.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/cps_ir/input/optimize_indexers.dart
diff --git a/tests/compiler/dart2js/cps_ir/input/optimize_indexers.dart b/tests/compiler/dart2js/cps_ir/input/optimize_indexers.dart
index 084bc34b64571361dd47fbc7914931837895e2f5..8150653aaeee8f78bd7ba70fc25d09f78a34b7c1 100644
--- a/tests/compiler/dart2js/cps_ir/input/optimize_indexers.dart
+++ b/tests/compiler/dart2js/cps_ir/input/optimize_indexers.dart
@@ -4,13 +4,16 @@ import 'package:expect/expect.dart';
// This example illustrates a case we wish to do better in terms of inlining and
// code generation.
//
-// Today this function is compiled without inlining Wrapper.[], JSArray.[] and
-// Wrapper.[]= because:
+// Naively this function would be compiled without inlining Wrapper.[],
+// JSArray.[] and Wrapper.[]= because:
// JSArray.[] is too big (14 nodes)
// Wrapper.[] is too big if we force inlining of JSArray (15 nodes)
// Wrapper.[]= is even bigger (46 nodes)
//
-// See #25478 for ideas on how to make this better.
+// We now do specialization of [] and []= by adding guards and injecting builtin
+// operators. This made it possible to inline []. We still don't see []= inlined
+// yet, that might require that we improve the inlining counting heuristics a
+// bit.
@NoInline()
test(data, x) {
data[x + 1] = data[x];
« no previous file with comments | « tests/compiler/dart2js/cps_ir/expected/redundant_condition.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698