| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.test.memory_compiler; | 5 library dart2js.test.memory_compiler; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:compiler/compiler.dart' show | 9 import 'package:compiler/compiler.dart' show |
| 10 DiagnosticHandler; | 10 DiagnosticHandler; |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // is a stale reference to an old compiler object. By nulling out the old | 256 // is a stale reference to an old compiler object. By nulling out the old |
| 257 // compiler's fields, such stale references are easier to identify. | 257 // compiler's fields, such stale references are easier to identify. |
| 258 cachedCompiler.scanner = null; | 258 cachedCompiler.scanner = null; |
| 259 cachedCompiler.dietParser = null; | 259 cachedCompiler.dietParser = null; |
| 260 cachedCompiler.parser = null; | 260 cachedCompiler.parser = null; |
| 261 cachedCompiler.patchParser = null; | 261 cachedCompiler.patchParser = null; |
| 262 cachedCompiler.libraryLoader = null; | 262 cachedCompiler.libraryLoader = null; |
| 263 cachedCompiler.resolver = null; | 263 cachedCompiler.resolver = null; |
| 264 cachedCompiler.closureToClassMapper = null; | 264 cachedCompiler.closureToClassMapper = null; |
| 265 cachedCompiler.checker = null; | 265 cachedCompiler.checker = null; |
| 266 cachedCompiler.irBuilder = null; | |
| 267 cachedCompiler.typesTask = null; | 266 cachedCompiler.typesTask = null; |
| 268 cachedCompiler.backend = null; | 267 cachedCompiler.backend = null; |
| 269 // Don't null out the enqueuer as it prevents us from using cachedCompiler | 268 // Don't null out the enqueuer as it prevents us from using cachedCompiler |
| 270 // more than once. | 269 // more than once. |
| 271 cachedCompiler.deferredLoadTask = null; | 270 cachedCompiler.deferredLoadTask = null; |
| 272 cachedCompiler.mirrorUsageAnalyzerTask = null; | 271 cachedCompiler.mirrorUsageAnalyzerTask = null; |
| 273 cachedCompiler.dumpInfoTask = null; | 272 cachedCompiler.dumpInfoTask = null; |
| 274 cachedCompiler.buildId = null; | 273 cachedCompiler.buildId = null; |
| 275 } | 274 } |
| 276 return compiler; | 275 return compiler; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); | 330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); |
| 332 | 331 |
| 333 List<Uri> libraries = <Uri>[]; | 332 List<Uri> libraries = <Uri>[]; |
| 334 memorySourceFiles.forEach((String path, _) { | 333 memorySourceFiles.forEach((String path, _) { |
| 335 libraries.add(new Uri(scheme: 'memory', path: path)); | 334 libraries.add(new Uri(scheme: 'memory', path: path)); |
| 336 }); | 335 }); |
| 337 | 336 |
| 338 return analyze(libraries, libraryRoot, packageRoot, | 337 return analyze(libraries, libraryRoot, packageRoot, |
| 339 provider, handler, options); | 338 provider, handler, options); |
| 340 } | 339 } |
| OLD | NEW |