| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 void onElementResolved(Element element, TreeElements elements) {} | 486 void onElementResolved(Element element, TreeElements elements) {} |
| 487 | 487 |
| 488 // Does this element belong in the output | 488 // Does this element belong in the output |
| 489 bool shouldOutput(Element element) => true; | 489 bool shouldOutput(Element element) => true; |
| 490 | 490 |
| 491 FunctionElement helperForBadMain() => null; | 491 FunctionElement helperForBadMain() => null; |
| 492 | 492 |
| 493 FunctionElement helperForMissingMain() => null; | 493 FunctionElement helperForMissingMain() => null; |
| 494 | 494 |
| 495 FunctionElement helperForMainArity() => null; | 495 FunctionElement helperForMainArity() => null; |
| 496 |
| 497 void forgetElement(Element element) {} |
| 496 } | 498 } |
| 497 | 499 |
| 498 /// Backend callbacks function specific to the resolution phase. | 500 /// Backend callbacks function specific to the resolution phase. |
| 499 class ResolutionCallbacks { | 501 class ResolutionCallbacks { |
| 500 /// Register that [node] is a call to `assert`. | 502 /// Register that [node] is a call to `assert`. |
| 501 void onAssert(Send node, Registry registry) {} | 503 void onAssert(Send node, Registry registry) {} |
| 502 | 504 |
| 503 /// Called during resolution to notify to the backend that the | 505 /// Called during resolution to notify to the backend that the |
| 504 /// program uses string interpolation. | 506 /// program uses string interpolation. |
| 505 void onStringInterpolation(Registry registry) {} | 507 void onStringInterpolation(Registry registry) {} |
| (...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1990 } | 1992 } |
| 1991 | 1993 |
| 1992 void forgetElement(Element element) { | 1994 void forgetElement(Element element) { |
| 1993 enqueuer.forgetElement(element); | 1995 enqueuer.forgetElement(element); |
| 1994 if (element is MemberElement) { | 1996 if (element is MemberElement) { |
| 1995 for (Element closure in element.nestedClosures) { | 1997 for (Element closure in element.nestedClosures) { |
| 1996 // TODO(ahe): It would be nice to reuse names of nested closures. | 1998 // TODO(ahe): It would be nice to reuse names of nested closures. |
| 1997 closureToClassMapper.forgetElement(closure); | 1999 closureToClassMapper.forgetElement(closure); |
| 1998 } | 2000 } |
| 1999 } | 2001 } |
| 2002 backend.forgetElement(element); |
| 2000 } | 2003 } |
| 2001 } | 2004 } |
| 2002 | 2005 |
| 2003 class CompilerTask { | 2006 class CompilerTask { |
| 2004 final Compiler compiler; | 2007 final Compiler compiler; |
| 2005 final Stopwatch watch; | 2008 final Stopwatch watch; |
| 2006 UserTag profilerTag; | 2009 UserTag profilerTag; |
| 2007 | 2010 |
| 2008 CompilerTask(Compiler compiler) | 2011 CompilerTask(Compiler compiler) |
| 2009 : this.compiler = compiler, | 2012 : this.compiler = compiler, |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2148 int warnings = 0; | 2151 int warnings = 0; |
| 2149 int hints = 0; | 2152 int hints = 0; |
| 2150 } | 2153 } |
| 2151 | 2154 |
| 2152 class GenericTask extends CompilerTask { | 2155 class GenericTask extends CompilerTask { |
| 2153 final String name; | 2156 final String name; |
| 2154 | 2157 |
| 2155 GenericTask(this.name, Compiler compiler) | 2158 GenericTask(this.name, Compiler compiler) |
| 2156 : super(compiler); | 2159 : super(compiler); |
| 2157 } | 2160 } |
| OLD | NEW |