| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.js_emitter.program_builder; | 5 library dart2js.js_emitter.program_builder; |
| 6 | 6 |
| 7 import '../../closure.dart' show ClosureFieldElement; | 7 import '../../closure.dart' show ClosureFieldElement; |
| 8 import '../../common.dart'; | 8 import '../../common.dart'; |
| 9 import '../../common/names.dart' show Names, Selectors; | 9 import '../../common/names.dart' show Names, Selectors; |
| 10 import '../../compiler.dart' show Compiler; | 10 import '../../compiler.dart' show Compiler; |
| (...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 } | 668 } |
| 669 | 669 |
| 670 bool _methodCanBeReflected(FunctionElement method) { | 670 bool _methodCanBeReflected(FunctionElement method) { |
| 671 return backend.isAccessibleByReflection(method) || | 671 return backend.isAccessibleByReflection(method) || |
| 672 // During incremental compilation, we have to assume that reflection | 672 // During incremental compilation, we have to assume that reflection |
| 673 // *might* get enabled. | 673 // *might* get enabled. |
| 674 _compiler.options.hasIncrementalSupport; | 674 _compiler.options.hasIncrementalSupport; |
| 675 } | 675 } |
| 676 | 676 |
| 677 bool _methodCanBeApplied(FunctionElement method) { | 677 bool _methodCanBeApplied(FunctionElement method) { |
| 678 return _compiler.enabledFunctionApply && | 678 return _compiler.hasFunctionApplySupport && |
| 679 _compiler.closedWorld.getMightBePassedToApply(method); | 679 _compiler.closedWorld.getMightBePassedToApply(method); |
| 680 } | 680 } |
| 681 | 681 |
| 682 // TODO(herhut): Refactor incremental compilation and remove method. | 682 // TODO(herhut): Refactor incremental compilation and remove method. |
| 683 Method buildMethodHackForIncrementalCompilation(FunctionElement element) { | 683 Method buildMethodHackForIncrementalCompilation(FunctionElement element) { |
| 684 assert(_compiler.options.hasIncrementalSupport); | 684 assert(_compiler.options.hasIncrementalSupport); |
| 685 if (element.isInstanceMember) { | 685 if (element.isInstanceMember) { |
| 686 return _buildMethod(element); | 686 return _buildMethod(element); |
| 687 } else { | 687 } else { |
| 688 return _buildStaticMethod(element); | 688 return _buildStaticMethod(element); |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 Constant constant = new Constant(name, holder, constantValue); | 981 Constant constant = new Constant(name, holder, constantValue); |
| 982 _constants[constantValue] = constant; | 982 _constants[constantValue] = constant; |
| 983 } | 983 } |
| 984 } | 984 } |
| 985 | 985 |
| 986 Holder _registerStaticStateHolder() { | 986 Holder _registerStaticStateHolder() { |
| 987 return _registry.registerHolder(namer.staticStateHolder, | 987 return _registry.registerHolder(namer.staticStateHolder, |
| 988 isStaticStateHolder: true); | 988 isStaticStateHolder: true); |
| 989 } | 989 } |
| 990 } | 990 } |
| OLD | NEW |