| OLD | NEW |
| 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:uri'; | 7 import 'dart:uri'; |
| 8 | 8 |
| 9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; | 9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; |
| 10 import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t'; | 10 import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t'; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); | 135 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); |
| 136 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); | 136 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); |
| 137 | 137 |
| 138 mainApp = mockLibrary(this, ""); | 138 mainApp = mockLibrary(this, ""); |
| 139 initializeSpecialClasses(); | 139 initializeSpecialClasses(); |
| 140 // We need to make sure the Object class is resolved. When registering a | 140 // We need to make sure the Object class is resolved. When registering a |
| 141 // dynamic invocation the ArgumentTypesRegistry eventually iterates over | 141 // dynamic invocation the ArgumentTypesRegistry eventually iterates over |
| 142 // the interfaces of the Object class which would be 'null' if the class | 142 // the interfaces of the Object class which would be 'null' if the class |
| 143 // wasn't resolved. | 143 // wasn't resolved. |
| 144 objectClass.ensureResolved(this); | 144 objectClass.ensureResolved(this); |
| 145 |
| 146 // Our unit tests check code generation output that is affected by |
| 147 // inlining support. |
| 148 disableInlining = true; |
| 145 } | 149 } |
| 146 | 150 |
| 147 /** | 151 /** |
| 148 * Registers the [source] with [uri] making it possible load [source] as a | 152 * Registers the [source] with [uri] making it possible load [source] as a |
| 149 * library. | 153 * library. |
| 150 */ | 154 */ |
| 151 void registerSource(Uri uri, String source) { | 155 void registerSource(Uri uri, String source) { |
| 152 sourceFiles[uri.toString()] = new MockFile(source); | 156 sourceFiles[uri.toString()] = new MockFile(source); |
| 153 } | 157 } |
| 154 | 158 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 operator []=(Node node, Element element) { | 311 operator []=(Node node, Element element) { |
| 308 map[node] = element; | 312 map[node] = element; |
| 309 } | 313 } |
| 310 | 314 |
| 311 operator [](Node node) => map[node]; | 315 operator [](Node node) => map[node]; |
| 312 | 316 |
| 313 void remove(Node node) { | 317 void remove(Node node) { |
| 314 map.remove(node); | 318 map.remove(node); |
| 315 } | 319 } |
| 316 } | 320 } |
| OLD | NEW |