HomePhabricator

Consolidate ContDone into ContRetC

Description

Consolidate ContDone into ContRetC

Merge ContDone+ContExit into ContRetC with added support of passing results. This variable passing mechanism is not exposed to the PHP as the ReturnStatements in generators do not contain result expression. However, this is exposed by restored hphp_continuation_done() built-in to allow experimentation.

The idea is that once we introduce ContYield opcode (merge of all opcodes used by YieldExpression), we could change ContRetC and ContYield to leave result and done-status on the stack and leave it up to the caller (ContNext/ContSend/ContRaise) to fill in Continuation fields. This will make these opcodes more generic and useful for other things, while allowing us to move some properties to the VM and kill opcodes like ContCurrent.

Details

Provenance
janAuthored on
Sara GolemonCommitted on Mar 28 2013, 6:05 PM
Parents
rOSHDcd6fa358d5f0: Split up ConvToDbl into sub-opcodes.
Branches
Unknown
Tags
Unknown
ChangeId
None

Event Timeline