| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /** | 5 /** |
| 6 * This library is capable of producing linked summaries from unlinked | 6 * This library is capable of producing linked summaries from unlinked |
| 7 * ones (or prelinked ones). It functions by building a miniature | 7 * ones (or prelinked ones). It functions by building a miniature |
| 8 * element model to represent the contents of the summaries, and then | 8 * element model to represent the contents of the summaries, and then |
| 9 * scanning the element model to gather linked information and adding | 9 * scanning the element model to gather linked information and adding |
| 10 * it to the summary data structures. | 10 * it to the summary data structures. |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 return result; | 240 return result; |
| 241 } | 241 } |
| 242 // TODO(paulberry): implement other cases. | 242 // TODO(paulberry): implement other cases. |
| 243 throw new UnimplementedError('${element.runtimeType}'); | 243 throw new UnimplementedError('${element.runtimeType}'); |
| 244 } | 244 } |
| 245 // TODO(paulberry): implement other cases. | 245 // TODO(paulberry): implement other cases. |
| 246 throw new UnimplementedError('${type.runtimeType}'); | 246 throw new UnimplementedError('${type.runtimeType}'); |
| 247 } | 247 } |
| 248 | 248 |
| 249 DartType _dynamicIfNull(DartType type) { | 249 DartType _dynamicIfNull(DartType type) { |
| 250 if (type == null || type.isBottom || type.isVoid) { | 250 if (type == null || type.isBottom || type.isDartCoreNull || type.isVoid) { |
| 251 return DynamicTypeImpl.instance; | 251 return DynamicTypeImpl.instance; |
| 252 } | 252 } |
| 253 return type; | 253 return type; |
| 254 } | 254 } |
| 255 | 255 |
| 256 /** | 256 /** |
| 257 * Create an [UnlinkedParam] representing the given [parameter], which should be | 257 * Create an [UnlinkedParam] representing the given [parameter], which should be |
| 258 * a parameter of a synthetic function type (e.g. one produced during type | 258 * a parameter of a synthetic function type (e.g. one produced during type |
| 259 * inference as a result of computing the least upper bound of two function | 259 * inference as a result of computing the least upper bound of two function |
| 260 * types). | 260 * types). |
| (...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1999 break; | 1999 break; |
| 2000 case UnlinkedExprOperation.concatenate: | 2000 case UnlinkedExprOperation.concatenate: |
| 2001 stack.length -= _getNextInt(); | 2001 stack.length -= _getNextInt(); |
| 2002 stack.add(typeProvider.stringType); | 2002 stack.add(typeProvider.stringType); |
| 2003 break; | 2003 break; |
| 2004 case UnlinkedExprOperation.makeSymbol: | 2004 case UnlinkedExprOperation.makeSymbol: |
| 2005 strPtr++; | 2005 strPtr++; |
| 2006 stack.add(typeProvider.symbolType); | 2006 stack.add(typeProvider.symbolType); |
| 2007 break; | 2007 break; |
| 2008 case UnlinkedExprOperation.pushNull: | 2008 case UnlinkedExprOperation.pushNull: |
| 2009 stack.add(BottomTypeImpl.instance); | 2009 stack.add(typeProvider.nullType); |
| 2010 break; | 2010 break; |
| 2011 case UnlinkedExprOperation.pushReference: | 2011 case UnlinkedExprOperation.pushReference: |
| 2012 _doPushReference(); | 2012 _doPushReference(); |
| 2013 break; | 2013 break; |
| 2014 case UnlinkedExprOperation.extractProperty: | 2014 case UnlinkedExprOperation.extractProperty: |
| 2015 _doExtractProperty(); | 2015 _doExtractProperty(); |
| 2016 break; | 2016 break; |
| 2017 case UnlinkedExprOperation.invokeConstructor: | 2017 case UnlinkedExprOperation.invokeConstructor: |
| 2018 _doInvokeConstructor(); | 2018 _doInvokeConstructor(); |
| 2019 break; | 2019 break; |
| (...skipping 2929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4949 * there are no type parameters in scope. | 4949 * there are no type parameters in scope. |
| 4950 */ | 4950 */ |
| 4951 TypeParameterizedElementMixin get _typeParameterContext; | 4951 TypeParameterizedElementMixin get _typeParameterContext; |
| 4952 | 4952 |
| 4953 @override | 4953 @override |
| 4954 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 4954 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 4955 | 4955 |
| 4956 @override | 4956 @override |
| 4957 String toString() => '$enclosingElement.$name'; | 4957 String toString() => '$enclosingElement.$name'; |
| 4958 } | 4958 } |
| OLD | NEW |