| 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 closure; | 7 import '../closure.dart' as closure; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Names, | 10 Names, |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 ir.Primitive value = fieldValues[field]; | 445 ir.Primitive value = fieldValues[field]; |
| 446 if (value != null) { | 446 if (value != null) { |
| 447 instanceArguments.add(value); | 447 instanceArguments.add(value); |
| 448 } else { | 448 } else { |
| 449 assert(backend.isNativeOrExtendsNative(c)); | 449 assert(backend.isNativeOrExtendsNative(c)); |
| 450 // Native fields are initialized elsewhere. | 450 // Native fields are initialized elsewhere. |
| 451 } | 451 } |
| 452 }, includeSuperAndInjectedMembers: true); | 452 }, includeSuperAndInjectedMembers: true); |
| 453 | 453 |
| 454 ir.Primitive instance = new ir.CreateInstance( | 454 ir.Primitive instance = new ir.CreateInstance( |
| 455 classElement, | 455 classElement.thisType, |
| 456 instanceArguments, | 456 instanceArguments, |
| 457 typeInformation, | 457 typeInformation, |
| 458 constructor.hasNode | 458 constructor.hasNode |
| 459 ? sourceInformationBuilder.buildCreate(constructor.node) | 459 ? sourceInformationBuilder.buildCreate(constructor.node) |
| 460 // TODO(johnniwinther): Provide source information for creation | 460 // TODO(johnniwinther): Provide source information for creation |
| 461 // through synthetic constructors. | 461 // through synthetic constructors. |
| 462 : null); | 462 : null); |
| 463 irBuilder.add(new ir.LetPrim(instance)); | 463 irBuilder.add(new ir.LetPrim(instance)); |
| 464 | 464 |
| 465 // --- Call constructor bodies --- | 465 // --- Call constructor bodies --- |
| (...skipping 3083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3549 } | 3549 } |
| 3550 | 3550 |
| 3551 Element get closureConverter { | 3551 Element get closureConverter { |
| 3552 return _backend.helpers.closureConverter; | 3552 return _backend.helpers.closureConverter; |
| 3553 } | 3553 } |
| 3554 | 3554 |
| 3555 void addNativeMethod(FunctionElement function) { | 3555 void addNativeMethod(FunctionElement function) { |
| 3556 _backend.emitter.nativeEmitter.nativeMethods.add(function); | 3556 _backend.emitter.nativeEmitter.nativeMethods.add(function); |
| 3557 } | 3557 } |
| 3558 } | 3558 } |
| OLD | NEW |