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

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

Issue 23565007: Make sure we're not trying to optimize an int check if the input can be a number. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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/mock_compiler.dart
===================================================================
--- tests/compiler/dart2js/mock_compiler.dart (revision 27024)
+++ tests/compiler/dart2js/mock_compiler.dart (working copy)
@@ -123,13 +123,13 @@
}
class JSNumber extends Interceptor implements num {
// All these methods return a number to please type inferencing.
- operator-() => (this is JSInt) ? 42 : 42.0;
- operator +(other) => (this is JSInt) ? 42 : 42.0;
- operator -(other) => (this is JSInt) ? 42 : 42.0;
+ operator-() => (this is JSInt) ? 42 : 42.2;
+ operator +(other) => (this is JSInt) ? 42 : 42.2;
+ operator -(other) => (this is JSInt) ? 42 : 42.2;
operator ~/(other) => 42;
- operator /(other) => (this is JSInt) ? 42 : 42.0;
- operator *(other) => (this is JSInt) ? 42 : 42.0;
- operator %(other) => (this is JSInt) ? 42 : 42.0;
+ operator /(other) => (this is JSInt) ? 42 : 42.2;
+ operator *(other) => (this is JSInt) ? 42 : 42.2;
+ operator %(other) => (this is JSInt) ? 42 : 42.2;
operator <<(other) => 42;
operator >>(other) => 42;
operator |(other) => 42;
@@ -143,8 +143,8 @@
operator ==(other) => true;
get hashCode => throw "JSNumber.hashCode not implemented.";
- abs() => (this is JSInt) ? 42 : 42.0;
- remainder(other) => (this is JSInt) ? 42 : 42.0;
+ abs() => (this is JSInt) ? 42 : 42.2;
+ remainder(other) => (this is JSInt) ? 42 : 42.2;
truncate() => 42;
}
class JSInt extends JSNumber implements int {
« no previous file with comments | « tests/compiler/dart2js/concrete_type_inference_test.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698