Skip to content

Stackless execution of magic __call() and __callStatick() methods. - #1234

Closed
dstogov wants to merge 20 commits into
php:masterfrom
dstogov:opcodefy-call
Closed

dstogov wants to merge 20 commits into
php:masterfrom
dstogov:opcodefy-call

Conversation

@dstogov

@dstogov dstogov commented Apr 9, 2015

Copy link
Copy Markdown
Member
  • __call() and __callStatic() don't call execute_ex() recursively any more.
  • Recursive calls trough __call() won't lead to crash because of stack overflow.
  • We don't keep temporary call frames for "fake" functions (save VM stack).
  • Now __call() almost 2 times faster

laruence and others added 18 commits April 8, 2015 18:21
…defy-call

* 'opcodefy-call' of github.com:laruence/php-src:
  Ready for PR
  Fixed static call
  Improve performance by using prealloated op_arrray
  Respect called_scope
  Support internal magical __call/__callStatic
  opcode-fy magical __callStatic
  Opcode-fy magical __call
* master:
  Fixed GOTO executor
  Fixed typo
  Changed ArrayIterator implementation using zend_hash_iterator_... API. Allowed modification of itterated ArrayObject using the same behavior as proposed in `Fix "foreach" behavior`. Removed "Array was modified outside object and internal position is no longer valid" hack.
…rom zend_objects_API to zend_object_handlers.
Generalize API to allow reuse EG(trampline) for other purposes.
…. Keep ZEND_ACC_CALL_VIA_HANDLER for compatibility.
Comment thread Zend/zend_vm_execute.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EG(scope) is already set properly by previously call to this function (trampoline op_array). we don't need set it again here...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree. This may be removed.

@dstogov

dstogov commented Apr 10, 2015

Copy link
Copy Markdown
Member Author

Merger into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants