| 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: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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 } | 259 } |
| 260 | 260 |
| 261 LibraryElement scanBuiltinLibrary(String name) { | 261 LibraryElement scanBuiltinLibrary(String name) { |
| 262 // Do nothing. The mock core library is already handled in the constructor. | 262 // Do nothing. The mock core library is already handled in the constructor. |
| 263 } | 263 } |
| 264 | 264 |
| 265 void importCoreLibrary(LibraryElement library) { | 265 void importCoreLibrary(LibraryElement library) { |
| 266 scanner.importLibrary(library, coreLibrary, null); | 266 scanner.importLibrary(library, coreLibrary, null); |
| 267 } | 267 } |
| 268 | 268 |
| 269 Uri translateResolvedUri(LibraryElement importingLibrary, |
| 270 Uri resolvedUri, Node node) => resolvedUri; |
| 271 |
| 269 // The mock library doesn't need any patches. | 272 // The mock library doesn't need any patches. |
| 270 Uri resolvePatchUri(String dartLibraryName) => null; | 273 Uri resolvePatchUri(String dartLibraryName) => null; |
| 271 | 274 |
| 272 Script readScript(Uri uri, [ScriptTag node]) { | 275 Script readScript(Uri uri, [ScriptTag node]) { |
| 273 SourceFile sourceFile = sourceFiles[uri.toString()]; | 276 SourceFile sourceFile = sourceFiles[uri.toString()]; |
| 274 if (sourceFile == null) throw new ArgumentError(uri); | 277 if (sourceFile == null) throw new ArgumentError(uri); |
| 275 return new Script(uri, sourceFile); | 278 return new Script(uri, sourceFile); |
| 276 } | 279 } |
| 277 | 280 |
| 278 Element lookupElementIn(ScopeContainerElement container, name) { | 281 Element lookupElementIn(ScopeContainerElement container, name) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 operator []=(Node node, Element element) { | 333 operator []=(Node node, Element element) { |
| 331 map[node] = element; | 334 map[node] = element; |
| 332 } | 335 } |
| 333 | 336 |
| 334 operator [](Node node) => map[node]; | 337 operator [](Node node) => map[node]; |
| 335 | 338 |
| 336 void remove(Node node) { | 339 void remove(Node node) { |
| 337 map.remove(node); | 340 map.remove(node); |
| 338 } | 341 } |
| 339 } | 342 } |
| OLD | NEW |