| 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 Map<int, BailoutInfo> bailouts = null; | 9 Map<int, BailoutInfo> bailouts = null; |
| 10 bool allowSpeculativeOptimization = true; | 10 bool allowSpeculativeOptimization = true; |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 378 |
| 379 Type resolveType(ClassElement element) { | 379 Type resolveType(ClassElement element) { |
| 380 return withCurrentElement(element, () => resolver.resolveType(element)); | 380 return withCurrentElement(element, () => resolver.resolveType(element)); |
| 381 } | 381 } |
| 382 | 382 |
| 383 FunctionParameters resolveSignature(FunctionElement element) { | 383 FunctionParameters resolveSignature(FunctionElement element) { |
| 384 return withCurrentElement(element, | 384 return withCurrentElement(element, |
| 385 () => resolver.resolveSignature(element)); | 385 () => resolver.resolveSignature(element)); |
| 386 } | 386 } |
| 387 | 387 |
| 388 Object compileVariable(VariableElement element) { | 388 Constant compileVariable(VariableElement element) { |
| 389 return withCurrentElement(element, () { | 389 return withCurrentElement(element, () { |
| 390 return constantHandler.compileVariable(element); | 390 return constantHandler.compileVariable(element); |
| 391 }); | 391 }); |
| 392 } | 392 } |
| 393 | 393 |
| 394 reportWarning(Node node, var message) { | 394 reportWarning(Node node, var message) { |
| 395 if (message is ResolutionWarning) { | 395 if (message is ResolutionWarning) { |
| 396 // TODO(ahe): Don't supress this warning when we support type variables. | 396 // TODO(ahe): Don't supress this warning when we support type variables. |
| 397 if (message.message.kind === MessageKind.CANNOT_RESOLVE_TYPE) return; | 397 if (message.message.kind === MessageKind.CANNOT_RESOLVE_TYPE) return; |
| 398 } else if (message is TypeWarning) { | 398 } else if (message is TypeWarning) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 } | 527 } |
| 528 } | 528 } |
| 529 | 529 |
| 530 class SourceSpan { | 530 class SourceSpan { |
| 531 final Uri uri; | 531 final Uri uri; |
| 532 final int begin; | 532 final int begin; |
| 533 final int end; | 533 final int end; |
| 534 | 534 |
| 535 const SourceSpan(this.uri, this.begin, this.end); | 535 const SourceSpan(this.uri, this.begin, this.end); |
| 536 } | 536 } |
| OLD | NEW |