nikic · GitHub

nikic

nikic

dstogov

dstogov

dstogov

dstogov

dstogov

@bp1222

@bp1222 bp1222 changed the title RFC: list() reference syntax - bug 7930 RFC: list() reference syntax - bug 6768 & 7930

Feb 7, 2017

dstogov

dstogov

@emilv emilv mentioned this pull request

Feb 23, 2017

Closed

nikic

nikic

nikic

nikic

nikic

@bp1222

nikic

nikic

nikic

nikic

nikic

David Walker and others added 2 commits

November 20, 2017 08:12
Add unit tests
Update opcode name
Remove obsolete test
Apply changes requested
- Make _w fetch from list a ref
- Raise compiler error when assigning to a known non referencable value
Remove unused condition in VM
Fix logic for compile error, drop const from LIST_W op1
Add additional make ref, for write access
Add ZEND_FETCH_LIST_W to switches and places DIM_W exists

@bp1222

* Don't generate MAKE_REF for CVs normally
* But do generate it for self-assign CVs

@nikic

Let assign_ref handle the MAKE_REF emission. Only explicitly emit
the MAKE_REF if it's for a (non-leaf) list() assignment.
Rather than recomputing it on every access, propagate only once and
store it in elem_ast->attr, consistently with direct references.
Make all compile_list_assign() calls explicit, instead of
automatically calling it from assign_znode(). I did not like the
asymmetry between assign_znode() and assign_ref_znode() here.

Read the original on github.com ↗