| 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.resolution; | 5 library dart2js.resolution; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart' show Identifiers; | 10 import '../common/names.dart' show Identifiers; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 break; | 200 break; |
| 201 } | 201 } |
| 202 cls?.ensureResolved(resolution); | 202 cls?.ensureResolved(resolution); |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool _isNativeClassOrExtendsNativeClass(ClassElement classElement) { | 207 bool _isNativeClassOrExtendsNativeClass(ClassElement classElement) { |
| 208 assert(classElement != null); | 208 assert(classElement != null); |
| 209 while (classElement != null) { | 209 while (classElement != null) { |
| 210 if (target.isNative(classElement)) return true; | 210 if (target.isNativeClass(classElement)) return true; |
| 211 classElement = classElement.superclass; | 211 classElement = classElement.superclass; |
| 212 } | 212 } |
| 213 return false; | 213 return false; |
| 214 } | 214 } |
| 215 | 215 |
| 216 WorldImpact resolveMethodElementImplementation( | 216 WorldImpact resolveMethodElementImplementation( |
| 217 FunctionElement element, FunctionExpression tree) { | 217 FunctionElement element, FunctionExpression tree) { |
| 218 return reporter.withCurrentElement(element, () { | 218 return reporter.withCurrentElement(element, () { |
| 219 if (element.isExternal && tree.hasBody) { | 219 if (element.isExternal && tree.hasBody) { |
| 220 reporter.reportErrorMessage(element, MessageKind.EXTERNAL_WITH_BODY, | 220 reporter.reportErrorMessage(element, MessageKind.EXTERNAL_WITH_BODY, |
| (...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1139 TreeElements get treeElements { | 1139 TreeElements get treeElements { |
| 1140 assert(invariant(this, _treeElements != null, | 1140 assert(invariant(this, _treeElements != null, |
| 1141 message: "TreeElements have not been computed for $this.")); | 1141 message: "TreeElements have not been computed for $this.")); |
| 1142 return _treeElements; | 1142 return _treeElements; |
| 1143 } | 1143 } |
| 1144 | 1144 |
| 1145 void reuseElement() { | 1145 void reuseElement() { |
| 1146 _treeElements = null; | 1146 _treeElements = null; |
| 1147 } | 1147 } |
| 1148 } | 1148 } |
| OLD | NEW |