| 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
| 8 | 8 |
| 9 import '../closure.dart'; | 9 import '../closure.dart'; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 : this.infoReporter = backend.compiler.dumpInfoTask, | 264 : this.infoReporter = backend.compiler.dumpInfoTask, |
| 265 this.backend = backend, | 265 this.backend = backend, |
| 266 this.constantSystem = backend.constantSystem, | 266 this.constantSystem = backend.constantSystem, |
| 267 this.rtiSubstitutions = backend.rtiSubstitutions { | 267 this.rtiSubstitutions = backend.rtiSubstitutions { |
| 268 assert(target.isImplementation); | 268 assert(target.isImplementation); |
| 269 elementInferenceResults = _resultOf(target); | 269 elementInferenceResults = _resultOf(target); |
| 270 assert(elementInferenceResults != null); | 270 assert(elementInferenceResults != null); |
| 271 graph.element = target; | 271 graph.element = target; |
| 272 sourceElementStack.add(target); | 272 sourceElementStack.add(target); |
| 273 sourceInformationBuilder = | 273 sourceInformationBuilder = |
| 274 sourceInformationFactory.createBuilderForContext(resolvedAst); | 274 sourceInformationFactory.createBuilderForContext(target); |
| 275 graph.sourceInformation = | 275 graph.sourceInformation = |
| 276 sourceInformationBuilder.buildVariableDeclaration(); | 276 sourceInformationBuilder.buildVariableDeclaration(); |
| 277 localsHandler = new LocalsHandler( | 277 localsHandler = new LocalsHandler( |
| 278 this, | 278 this, |
| 279 target, | 279 target, |
| 280 target.memberContext, | 280 target.memberContext, |
| 281 target.contextClass, | 281 target.contextClass, |
| 282 null, | 282 null, |
| 283 closedWorld.nativeData, | 283 closedWorld.nativeData, |
| 284 closedWorld.interceptorData); | 284 closedWorld.interceptorData); |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element); | 658 return allInlinedFunctionsCalledOnce && isFunctionCalledOnce(element); |
| 659 } | 659 } |
| 660 | 660 |
| 661 inlinedFrom(ResolvedAst resolvedAst, f()) { | 661 inlinedFrom(ResolvedAst resolvedAst, f()) { |
| 662 MemberElement element = resolvedAst.element; | 662 MemberElement element = resolvedAst.element; |
| 663 assert(element is FunctionElement || element is VariableElement); | 663 assert(element is FunctionElement || element is VariableElement); |
| 664 return reporter.withCurrentElement(element.implementation, () { | 664 return reporter.withCurrentElement(element.implementation, () { |
| 665 // The [sourceElementStack] contains declaration elements. | 665 // The [sourceElementStack] contains declaration elements. |
| 666 SourceInformationBuilder oldSourceInformationBuilder = | 666 SourceInformationBuilder oldSourceInformationBuilder = |
| 667 sourceInformationBuilder; | 667 sourceInformationBuilder; |
| 668 sourceInformationBuilder = | 668 sourceInformationBuilder = sourceInformationBuilder.forContext(element); |
| 669 sourceInformationBuilder.forContext(resolvedAst); | |
| 670 sourceElementStack.add(element.declaration); | 669 sourceElementStack.add(element.declaration); |
| 671 var result = f(); | 670 var result = f(); |
| 672 sourceInformationBuilder = oldSourceInformationBuilder; | 671 sourceInformationBuilder = oldSourceInformationBuilder; |
| 673 sourceElementStack.removeLast(); | 672 sourceElementStack.removeLast(); |
| 674 return result; | 673 return result; |
| 675 }); | 674 }); |
| 676 } | 675 } |
| 677 | 676 |
| 678 /** | 677 /** |
| 679 * Return null so it is simple to remove the optional parameters completely | 678 * Return null so it is simple to remove the optional parameters completely |
| (...skipping 6121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6801 this.oldReturnLocal, | 6800 this.oldReturnLocal, |
| 6802 this.oldReturnType, | 6801 this.oldReturnType, |
| 6803 this.oldResolvedAst, | 6802 this.oldResolvedAst, |
| 6804 this.oldStack, | 6803 this.oldStack, |
| 6805 this.oldLocalsHandler, | 6804 this.oldLocalsHandler, |
| 6806 this.inTryStatement, | 6805 this.inTryStatement, |
| 6807 this.allFunctionsCalledOnce, | 6806 this.allFunctionsCalledOnce, |
| 6808 this.oldElementInferenceResults) | 6807 this.oldElementInferenceResults) |
| 6809 : super(function); | 6808 : super(function); |
| 6810 } | 6809 } |
| OLD | NEW |