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

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

Issue 111553003: Fix regression on side effects of tdiv. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/mock_compiler.dart
===================================================================
--- tests/compiler/dart2js/mock_compiler.dart (revision 31023)
+++ tests/compiler/dart2js/mock_compiler.dart (working copy)
@@ -151,7 +151,12 @@
operator ==(other) => true;
get hashCode => throw "JSNumber.hashCode not implemented.";
- _tdivFast(other) => 42;
+ // We force side effects on _tdivFast to mimic the shortcomings of
+ // the effect analysis: because the `_tdivFast` implementation of
+ // the core library has calls that may not already be analyzed,
+ // the analysis will conclude that `_tdivFast` may have side
+ // effects.
+ _tdivFast(other) => new List()..length = 42;
_shlPositive(other) => 42;
_shrBothPositive(other) => 42;
_shrReceiverPositive(other) => 42;

Powered by Google App Engine
This is Rietveld 408576698