| 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 class WorkItem { | 5 class WorkItem { |
| 6 final Element element; | 6 final Element element; |
| 7 TreeElements resolutionTree; | 7 TreeElements resolutionTree; |
| 8 Function run; | 8 Function run; |
| 9 bool allowSpeculativeOptimization = true; | 9 bool allowSpeculativeOptimization = true; |
| 10 List<HTypeGuard> guards = const <HTypeGuard>[]; | 10 List<HTypeGuard> guards = const <HTypeGuard>[]; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 | 394 |
| 395 Type resolveType(ClassElement element) { | 395 Type resolveType(ClassElement element) { |
| 396 return withCurrentElement(element, () => resolver.resolveType(element)); | 396 return withCurrentElement(element, () => resolver.resolveType(element)); |
| 397 } | 397 } |
| 398 | 398 |
| 399 FunctionParameters resolveSignature(FunctionElement element) { | 399 FunctionParameters resolveSignature(FunctionElement element) { |
| 400 return withCurrentElement(element, | 400 return withCurrentElement(element, |
| 401 () => resolver.resolveSignature(element)); | 401 () => resolver.resolveSignature(element)); |
| 402 } | 402 } |
| 403 | 403 |
| 404 Object compileVariable(VariableElement element) { | 404 Constant compileVariable(VariableElement element) { |
| 405 return withCurrentElement(element, () { | 405 return withCurrentElement(element, () { |
| 406 return constantHandler.compileVariable(element); | 406 return constantHandler.compileVariable(element); |
| 407 }); | 407 }); |
| 408 } | 408 } |
| 409 | 409 |
| 410 reportWarning(Node node, var message) { | 410 reportWarning(Node node, var message) { |
| 411 if (message is ResolutionWarning) { | 411 if (message is ResolutionWarning) { |
| 412 // TODO(ahe): Don't supress this warning when we support type variables. | 412 // TODO(ahe): Don't supress this warning when we support type variables. |
| 413 if (message.message.kind === MessageKind.CANNOT_RESOLVE_TYPE) return; | 413 if (message.message.kind === MessageKind.CANNOT_RESOLVE_TYPE) return; |
| 414 } else if (message is TypeWarning) { | 414 } else if (message is TypeWarning) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 543 } |
| 544 } | 544 } |
| 545 | 545 |
| 546 class SourceSpan { | 546 class SourceSpan { |
| 547 final Uri uri; | 547 final Uri uri; |
| 548 final int begin; | 548 final int begin; |
| 549 final int end; | 549 final int end; |
| 550 | 550 |
| 551 const SourceSpan(this.uri, this.begin, this.end); | 551 const SourceSpan(this.uri, this.begin, this.end); |
| 552 } | 552 } |
| OLD | NEW |