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

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

Issue 12610004: Start using the new union/intersection code for HType.INDEXABLE_PRIMITIVE. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify even further. Created 7 years, 9 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 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 class Dynamic_ {} 56 class Dynamic_ {}
57 class LinkedHashMap {} 57 class LinkedHashMap {}
58 S() {} 58 S() {}
59 unwrapException(e) {} 59 unwrapException(e) {}
60 assertHelper(a){} 60 assertHelper(a){}
61 createRuntimeType(a) {} 61 createRuntimeType(a) {}
62 throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {} 62 throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}
63 throwAbstractClassInstantiationError(className) {}'''; 63 throwAbstractClassInstantiationError(className) {}''';
64 64
65 const String DEFAULT_INTERCEPTORSLIB = r''' 65 const String DEFAULT_INTERCEPTORSLIB = r'''
66 class JSArray implements List { 66 class JSIndexable {}
67 class JSArray implements List, JSIndexable {
67 var length; 68 var length;
68 operator[](index) {} 69 operator[](index) {}
69 operator[]=(index, value) {} 70 operator[]=(index, value) {}
70 var add; 71 var add;
71 } 72 }
72 class JSString implements String { 73 class JSString implements String, JSIndexable {
73 var length; 74 var length;
74 operator[](index) {} 75 operator[](index) {}
75 toString() {} 76 toString() {}
76 } 77 }
77 class JSNumber implements num { 78 class JSNumber implements num {
78 // All these methods return a number to please type inferencing. 79 // All these methods return a number to please type inferencing.
79 operator-() => (this is JSInt) ? 42 : 42.0; 80 operator-() => (this is JSInt) ? 42 : 42.0;
80 operator +(other) => (this is JSInt) ? 42 : 42.0; 81 operator +(other) => (this is JSInt) ? 42 : 42.0;
81 operator -(other) => (this is JSInt) ? 42 : 42.0; 82 operator -(other) => (this is JSInt) ? 42 : 42.0;
82 operator ~/(other) => 42; 83 operator ~/(other) => 42;
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 365 }
365 } 366 }
366 367
367 class MockDeferredLoadTask extends DeferredLoadTask { 368 class MockDeferredLoadTask extends DeferredLoadTask {
368 MockDeferredLoadTask(Compiler compiler) : super(compiler); 369 MockDeferredLoadTask(Compiler compiler) : super(compiler);
369 370
370 void registerMainApp(LibraryElement mainApp) { 371 void registerMainApp(LibraryElement mainApp) {
371 // Do nothing. 372 // Do nothing.
372 } 373 }
373 } 374 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/types.dart ('k') | tests/compiler/dart2js/type_combination_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698