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

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

Issue 1570353002: dart2js cps: Do not count refinement nodes when measuring size. (Closed) Base URL: git@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/inline.dart
diff --git a/pkg/compiler/lib/src/cps_ir/inline.dart b/pkg/compiler/lib/src/cps_ir/inline.dart
index e33438fc71e1b01ae9d3ef9e73a01de72b54d159..cc046eec2c56c6588041c26cee5f3c652ae5b072 100644
--- a/pkg/compiler/lib/src/cps_ir/inline.dart
+++ b/pkg/compiler/lib/src/cps_ir/inline.dart
@@ -220,7 +220,11 @@ class SizeVisitor extends TrampolineRecursiveVisitor {
// Inlining a function incurs a cost equal to the number of primitives and
// non-jump tail expressions.
// TODO(kmillikin): Tune the size computation and size bound.
- processLetPrim(LetPrim node) => ++size;
+ processLetPrim(LetPrim node) {
+ if (node.primitive is! Refinement) {
+ ++size;
+ }
+ }
processLetMutable(LetMutable node) => ++size;
processBranch(Branch node) => ++size;
processThrow(Throw nose) => ++size;
« 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