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

Side by Side Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 107673004: Revert r31212. Some tests fail. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library mock_compiler; 5 library mock_compiler;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 operator &(other) => 42; 144 operator &(other) => 42;
145 operator ^(other) => 42; 145 operator ^(other) => 42;
146 146
147 operator >(other) => true; 147 operator >(other) => true;
148 operator >=(other) => true; 148 operator >=(other) => true;
149 operator <(other) => true; 149 operator <(other) => true;
150 operator <=(other) => true; 150 operator <=(other) => true;
151 operator ==(other) => true; 151 operator ==(other) => true;
152 get hashCode => throw "JSNumber.hashCode not implemented."; 152 get hashCode => throw "JSNumber.hashCode not implemented.";
153 153
154 // We force side effects on _tdivFast to mimic the shortcomings of 154 _tdivFast(other) => 42;
155 // the effect analysis: because the `_tdivFast` implementation of
156 // the core library has calls that may not already be analyzed,
157 // the analysis will conclude that `_tdivFast` may have side
158 // effects.
159 _tdivFast(other) => new List()..length = 42;
160 _shlPositive(other) => 42; 155 _shlPositive(other) => 42;
161 _shrBothPositive(other) => 42; 156 _shrBothPositive(other) => 42;
162 _shrReceiverPositive(other) => 42; 157 _shrReceiverPositive(other) => 42;
163 _shrOtherPositive(other) => 42; 158 _shrOtherPositive(other) => 42;
164 159
165 abs() => (this is JSInt) ? 42 : 42.2; 160 abs() => (this is JSInt) ? 42 : 42.2;
166 remainder(other) => (this is JSInt) ? 42 : 42.2; 161 remainder(other) => (this is JSInt) ? 42 : 42.2;
167 truncate() => 42; 162 truncate() => 42;
168 } 163 }
169 class JSInt extends JSNumber implements int { 164 class JSInt extends JSNumber implements int {
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 } else { 558 } else {
564 sourceFile = compiler.sourceFiles[uri.toString()]; 559 sourceFile = compiler.sourceFiles[uri.toString()];
565 } 560 }
566 if (sourceFile != null && begin != null && end != null) { 561 if (sourceFile != null && begin != null && end != null) {
567 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x)); 562 print(sourceFile.getLocationMessage(message, begin, end, true, (x) => x));
568 } else { 563 } else {
569 print(message); 564 print(message);
570 } 565 }
571 }; 566 };
572 } 567 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698