| 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 dart2js.compiler_base; | 5 library dart2js.compiler_base; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 EventSink, | 8 EventSink, |
| 9 Future; | 9 Future; |
| 10 | 10 |
| (...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 } | 1396 } |
| 1397 } | 1397 } |
| 1398 return libraryUri; | 1398 return libraryUri; |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 void diagnoseCrashInUserCode(String message, exception, stackTrace) { | 1401 void diagnoseCrashInUserCode(String message, exception, stackTrace) { |
| 1402 // Overridden by Compiler in apiimpl.dart. | 1402 // Overridden by Compiler in apiimpl.dart. |
| 1403 } | 1403 } |
| 1404 | 1404 |
| 1405 void forgetElement(Element element) { | 1405 void forgetElement(Element element) { |
| 1406 resolution.forgetElement(element); |
| 1406 enqueuer.forgetElement(element); | 1407 enqueuer.forgetElement(element); |
| 1407 if (element is MemberElement) { | 1408 if (element is MemberElement) { |
| 1408 for (Element closure in element.nestedClosures) { | 1409 for (Element closure in element.nestedClosures) { |
| 1409 // TODO(ahe): It would be nice to reuse names of nested closures. | 1410 // TODO(ahe): It would be nice to reuse names of nested closures. |
| 1410 closureToClassMapper.forgetElement(closure); | 1411 closureToClassMapper.forgetElement(closure); |
| 1411 } | 1412 } |
| 1412 } | 1413 } |
| 1413 backend.forgetElement(element); | 1414 backend.forgetElement(element); |
| 1414 } | 1415 } |
| 1415 | 1416 |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2003 compiler.backend.impactTransformer.transformResolutionImpact( | 2004 compiler.backend.impactTransformer.transformResolutionImpact( |
| 2004 resolutionImpact); | 2005 resolutionImpact); |
| 2005 return worldImpact; | 2006 return worldImpact; |
| 2006 }); | 2007 }); |
| 2007 } | 2008 } |
| 2008 | 2009 |
| 2009 @override | 2010 @override |
| 2010 bool hasBeenResolved(Element element) { | 2011 bool hasBeenResolved(Element element) { |
| 2011 return _worldImpactCache.containsKey(element); | 2012 return _worldImpactCache.containsKey(element); |
| 2012 } | 2013 } |
| 2014 |
| 2015 @override |
| 2016 void forgetElement(Element element) { |
| 2017 _worldImpactCache.remove(element); |
| 2018 } |
| 2013 } | 2019 } |
| 2014 | 2020 |
| 2015 // TODO(johnniwinther): Move [ParserTask], [PatchParserTask], [DietParserTask] | 2021 // TODO(johnniwinther): Move [ParserTask], [PatchParserTask], [DietParserTask] |
| 2016 // and [ScannerTask] here. | 2022 // and [ScannerTask] here. |
| 2017 class _CompilerParsing implements Parsing { | 2023 class _CompilerParsing implements Parsing { |
| 2018 final Compiler compiler; | 2024 final Compiler compiler; |
| 2019 | 2025 |
| 2020 _CompilerParsing(this.compiler); | 2026 _CompilerParsing(this.compiler); |
| 2021 | 2027 |
| 2022 @override | 2028 @override |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2056 if (_otherDependencies == null) { | 2062 if (_otherDependencies == null) { |
| 2057 _otherDependencies = new Setlet<Element>(); | 2063 _otherDependencies = new Setlet<Element>(); |
| 2058 } | 2064 } |
| 2059 _otherDependencies.add(element.implementation); | 2065 _otherDependencies.add(element.implementation); |
| 2060 } | 2066 } |
| 2061 | 2067 |
| 2062 Iterable<Element> get otherDependencies { | 2068 Iterable<Element> get otherDependencies { |
| 2063 return _otherDependencies != null ? _otherDependencies : const <Element>[]; | 2069 return _otherDependencies != null ? _otherDependencies : const <Element>[]; |
| 2064 } | 2070 } |
| 2065 } | 2071 } |
| OLD | NEW |