| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
| 8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart' show | 10 import '../common/names.dart' show |
| (...skipping 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3346 | 3346 |
| 3347 @override | 3347 @override |
| 3348 ir.Primitive handleStaticFieldGet(ast.Send node, FieldElement field, _) { | 3348 ir.Primitive handleStaticFieldGet(ast.Send node, FieldElement field, _) { |
| 3349 SourceInformation src = sourceInformationBuilder.buildGet(node); | 3349 SourceInformation src = sourceInformationBuilder.buildGet(node); |
| 3350 return buildStaticFieldGet(field, src); | 3350 return buildStaticFieldGet(field, src); |
| 3351 } | 3351 } |
| 3352 | 3352 |
| 3353 ir.Primitive buildStaticFieldGet(FieldElement field, SourceInformation src) { | 3353 ir.Primitive buildStaticFieldGet(FieldElement field, SourceInformation src) { |
| 3354 ConstantValue constant = getConstantForVariable(field); | 3354 ConstantValue constant = getConstantForVariable(field); |
| 3355 if (constant != null && !field.isAssignable) { | 3355 if (constant != null && !field.isAssignable) { |
| 3356 typeMaskSystem.associateConstantValueWithElement(constant, field); |
| 3356 return irBuilder.buildConstant(constant, sourceInformation: src); | 3357 return irBuilder.buildConstant(constant, sourceInformation: src); |
| 3357 } else if (backend.constants.lazyStatics.contains(field)) { | 3358 } else if (backend.constants.lazyStatics.contains(field)) { |
| 3358 return irBuilder.buildStaticFieldLazyGet(field, src); | 3359 return irBuilder.buildStaticFieldLazyGet(field, src); |
| 3359 } else { | 3360 } else { |
| 3360 return irBuilder.buildStaticFieldGet(field, src); | 3361 return irBuilder.buildStaticFieldGet(field, src); |
| 3361 } | 3362 } |
| 3362 } | 3363 } |
| 3363 | 3364 |
| 3364 /// Build code to handle foreign code, that is, native JavaScript code, or | 3365 /// Build code to handle foreign code, that is, native JavaScript code, or |
| 3365 /// builtin values and operations of the backend. | 3366 /// builtin values and operations of the backend. |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3596 if (compiler.backend.isForeign(function)) { | 3597 if (compiler.backend.isForeign(function)) { |
| 3597 return handleForeignCode(node, function, argumentList, callStructure); | 3598 return handleForeignCode(node, function, argumentList, callStructure); |
| 3598 } else { | 3599 } else { |
| 3599 return irBuilder.buildStaticFunctionInvocation(function, callStructure, | 3600 return irBuilder.buildStaticFunctionInvocation(function, callStructure, |
| 3600 translateStaticArguments(argumentList, function, callStructure), | 3601 translateStaticArguments(argumentList, function, callStructure), |
| 3601 sourceInformation: | 3602 sourceInformation: |
| 3602 sourceInformationBuilder.buildCall(node, node.selector)); | 3603 sourceInformationBuilder.buildCall(node, node.selector)); |
| 3603 } | 3604 } |
| 3604 } | 3605 } |
| 3605 } | 3606 } |
| OLD | NEW |