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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 } | 401 } |
402 | 402 |
403 /** | 403 /** |
404 * Try to inline [element] within the correct context of the builder. The | 404 * Try to inline [element] within the correct context of the builder. The |
405 * insertion point is the state of the builder. | 405 * insertion point is the state of the builder. |
406 */ | 406 */ |
407 bool tryInlineMethod(Element element, Selector selector, TypeMask mask, | 407 bool tryInlineMethod(Element element, Selector selector, TypeMask mask, |
408 List<HInstruction> providedArguments, ast.Node currentNode, | 408 List<HInstruction> providedArguments, ast.Node currentNode, |
409 {InterfaceType instanceType}) { | 409 {InterfaceType instanceType}) { |
410 registry | 410 registry |
411 .addImpact(backend.registerStaticUse(element, forResolution: false)); | 411 .addImpact(backend.registerUsedElement(element, forResolution: false)); |
412 | 412 |
413 if (backend.isJsInterop(element) && !element.isFactoryConstructor) { | 413 if (backend.isJsInterop(element) && !element.isFactoryConstructor) { |
414 // We only inline factory JavaScript interop constructors. | 414 // We only inline factory JavaScript interop constructors. |
415 return false; | 415 return false; |
416 } | 416 } |
417 | 417 |
418 // Ensure that [element] is an implementation element. | 418 // Ensure that [element] is an implementation element. |
419 element = element.implementation; | 419 element = element.implementation; |
420 | 420 |
421 if (compiler.elementHasCompileTimeError(element)) return false; | 421 if (compiler.elementHasCompileTimeError(element)) return false; |
(...skipping 6329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6751 this.oldReturnLocal, | 6751 this.oldReturnLocal, |
6752 this.oldReturnType, | 6752 this.oldReturnType, |
6753 this.oldResolvedAst, | 6753 this.oldResolvedAst, |
6754 this.oldStack, | 6754 this.oldStack, |
6755 this.oldLocalsHandler, | 6755 this.oldLocalsHandler, |
6756 this.inTryStatement, | 6756 this.inTryStatement, |
6757 this.allFunctionsCalledOnce, | 6757 this.allFunctionsCalledOnce, |
6758 this.oldElementInferenceResults) | 6758 this.oldElementInferenceResults) |
6759 : super(function); | 6759 : super(function); |
6760 } | 6760 } |
OLD | NEW |