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

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

Issue 23353002: Fix receiver refining optimization in the presence of null: any Object method can be called on the … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 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:collection'; 8 import 'dart:collection';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 remainder(other) => (this is JSInt) ? 42 : 42.0; 147 remainder(other) => (this is JSInt) ? 42 : 42.0;
148 truncate() => 42; 148 truncate() => 42;
149 } 149 }
150 class JSInt extends JSNumber implements int { 150 class JSInt extends JSNumber implements int {
151 } 151 }
152 class JSDouble extends JSNumber implements double { 152 class JSDouble extends JSNumber implements double {
153 } 153 }
154 class JSNull extends Interceptor { 154 class JSNull extends Interceptor {
155 bool operator==(other) => identical(null, other); 155 bool operator==(other) => identical(null, other);
156 get hashCode => throw "JSNull.hashCode not implemented."; 156 get hashCode => throw "JSNull.hashCode not implemented.";
157 String toString() => 'Null';
158 Type get runtimeType => null;
157 } 159 }
158 class JSBool extends Interceptor implements bool { 160 class JSBool extends Interceptor implements bool {
159 } 161 }
160 class JSFunction extends Interceptor implements Function { 162 class JSFunction extends Interceptor implements Function {
161 } 163 }
162 class ObjectInterceptor { 164 class ObjectInterceptor {
163 } 165 }
164 getInterceptor(x) {} 166 getInterceptor(x) {}
165 getNativeInterceptor(x) {} 167 getNativeInterceptor(x) {}
166 var dispatchPropertyName; 168 var dispatchPropertyName;
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 458 }
457 } 459 }
458 460
459 class MockDeferredLoadTask extends DeferredLoadTask { 461 class MockDeferredLoadTask extends DeferredLoadTask {
460 MockDeferredLoadTask(Compiler compiler) : super(compiler); 462 MockDeferredLoadTask(Compiler compiler) : super(compiler);
461 463
462 void registerMainApp(LibraryElement mainApp) { 464 void registerMainApp(LibraryElement mainApp) {
463 // Do nothing. 465 // Do nothing.
464 } 466 }
465 } 467 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/interceptors.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698