DescriptionTwo-phase constructors
This CL fixes the initializer evaluation order and brings the VM fully up to spec.
Constructors are executed in two phases: the initializer phase and the constructor body phase. An additional implicit parameter tells the constructor code whether to execute the initializer list or the body (or both).
If the super initializer call is not at the end of the initializer list, the super constructor has to be called twice. The arguments to the super initializer have to be evaluated and stored in temporary local variables. At the beginning of the constructor block, a second implicit super call is inserted.
If the super initializer call happens to be at the end of the list, none of this madness has to happen, except for the extra implicit parameter to the constructor.
Committed: https://code.google.com/p/dart/source/detail?r=1102
Patch Set 1 #Patch Set 2 : '' #
Total comments: 8
Patch Set 3 : '' #
Messages
Total messages: 4 (0 generated)
|