Bob Weinand
f59de7ea36
Export zend_pass_function to allow comparisons against it
2016-04-30 20:46:52 +02:00
Dmitry Stogov
6499162ff0
- get rid of EG(scope). zend_get_executed_scope() should be used instead.
...
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Nikita Popov
89fbce5c5f
Mark zend_timeout as noreturn
...
Otherwise we get a compiler warning...
2016-04-21 23:35:51 +02:00
Bob Weinand
36202ef056
Merge remote-tracking branch 'origin/PHP-7.0'
2016-04-21 01:26:48 +02:00
Márcio Almada
9f3eab44df
allow null coalescing (??) on constant expressions
2016-04-21 01:22:28 +02:00
Dmitry Stogov
a186ac0e47
IS_CONST operands don't have to be separated. Use reference-counting instead of duplication.
...
- with opcache all IS_CONST operands are not refcounted (scalars, interned strings or immutable arrays)
- without opcache IS_CONST operands are not shared between processes or threads and may use common reference counters
2016-04-05 20:09:14 +03:00
Dmitry Stogov
7abfaac901
Merge zend_execute_data->called_scope into zend_execute_data->This.
...
"called_scope" made sense only for static method calls, for dynamic calls it was always equal to the class of $this.
Now EG(This) may store IS_OBJECT + $this or IS_UNUSED + "called_scope" (of course, "called_scope" may be NULL).
Some code might need to be adopted to support this change.
Checks (Z_OBJ(EX(This))) might need to be converted into (Z_TYPE(EX(This)) == IS_OBJECT).
2016-04-01 16:17:49 +03:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Dmitry Stogov
4c9e4caab4
Fixed typo
2015-12-10 21:17:24 +03:00
Xinchen Hui
a8ae88162f
Fixed bug #70689 (Exception handler does not work as expected)
2015-10-13 17:40:58 +08:00
Dmitry Stogov
37f0c6b5cb
Add myself into list of authors of the most refactored files.
2015-08-31 11:38:16 +03:00
Dmitry Stogov
9e290a44f1
Attempt to fix Windows build (vc14)
2015-08-12 02:47:37 +03:00
Dmitry Stogov
a658465ef2
Export argument type checking functions
2015-08-11 19:11:21 +03:00
Xinchen Hui
84e07b08bd
Reorder the conditions
2015-07-06 15:24:51 +08:00
Xinchen Hui
ce550cefde
Fixed segfault while with generating ext info
2015-07-06 15:22:40 +08:00
Dmitry Stogov
2a2f42c25d
Optimize out usless conditions used by specializer
2015-06-25 18:56:14 +03:00
Dmitry Stogov
567aa1783e
Added comments
2015-06-22 16:39:07 +03:00
Dmitry Stogov
44d545b8e1
Avoid overhead in RELEASE build.
2015-06-22 13:08:33 +03:00
Nikita Popov
ddf41d3aeb
Fix generator memory leak
...
Make sure HANDLE_EXCEPTION and generator unwinds stay in sync in
the future by extracting a common function.
2015-06-20 18:37:28 +02:00
Bob Weinand
7adc0ae631
Fix potential writes into wrong memory, ensure vm_stack integrity
...
Fixes also a segfault on stack frames > 1 << 18 bytes
Stack frames, when reallocated, need to be marked as top frame of current stack page
2015-06-20 18:29:09 +02:00
Dmitry Stogov
a524a375d9
Improved class type hints checks, by caching resolved class entries in run-time cache.
2015-06-17 12:07:43 +03:00
Dmitry Stogov
0586702d32
Mark first call frames of stack segment with ZEND_CALL_ALLOCATED flag to simplify checks on stack deallocation.
2015-05-12 15:56:42 +03:00
Dmitry Stogov
a989c0a1a9
Improved fast path locality
2015-05-07 17:26:35 +03:00
Dmitry Stogov
49cf7c5d12
Don't propogate "fake" EX(called_scope) and EX(This) into each internal function.
...
They need quite seldom and it's cheaper to get them from corresponfing upper stack frame.
2015-04-23 12:16:37 +03:00
Dmitry Stogov
5b0d86edcc
Safe destruction (variables and arguments may need to be cuptured by exception)
2015-04-16 21:45:40 +03:00
Dmitry Stogov
2ca2d0938b
Micro optimizations for the more frequently paths
2015-04-16 14:46:54 +03:00
Dmitry Stogov
a759967dd1
Mark call frames to closures with ZEND_CALL_CLOSURE flag to avoid expensive check at zend_leave_helper()
2015-04-16 12:16:03 +03:00
Dmitry Stogov
6aee1ee4a1
Optimization of stack-frame construction
2015-04-15 17:02:21 +03:00
Dmitry Stogov
cddb5eb3e9
Fixed memory leak
2015-04-14 00:57:45 +03:00
Dmitry Stogov
adcf0c6052
Improved reference counting
2015-04-03 01:32:20 +03:00
Dmitry Stogov
ea09a9fa32
Convert fatal errors into EngineExceptions
...
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Anthony Ferrara
0529eeb4a6
Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages
2015-03-18 15:22:21 -04:00
Anthony Ferrara
7feebead1b
Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function
2015-03-18 12:23:09 -04:00
Dmitry Stogov
6289f7e52f
Executor cleanup: fix GOTO and SWITCH VMs, remove aility to build additional PHP-5.0 compatible VM, hide executor implementation details.
2015-03-12 20:39:04 +03:00
Dmitry Stogov
6d065a8545
Avoid repeatable strlen() calls
2015-03-05 18:18:39 +03:00
Dmitry Stogov
5f278e4d3a
Use cache_slot offsets instead of indexes (simplify run-time instructions)
2015-02-25 01:52:35 +03:00
Levi Morrison
c8576c5a46
Implement return types
...
RFC is documented here: https://wiki.php.net/rfc/return_types
2015-01-27 11:49:56 -07:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Dmitry Stogov
ab0b15b8ff
Optimized destruction of extra arguments passed to user functions.
...
If no refcounted arguments are passed, then destruction code is not triggered at all.
(Full rebuild required)
2014-12-26 22:34:44 +03:00
Dmitry Stogov
2646f7bcb9
Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code.
2014-12-22 16:44:39 +03:00
Anatol Belski
9c354ba182
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
Better fix for #68601 for perf 81e9a993f2
Added EXPECTED(). Most functions have arguments.
2014-12-17 11:53:45 +01:00
Dmitry Stogov
4d21ad31dd
Added EXPECTED(). Most functions have arguments.
2014-12-17 12:16:02 +03:00
Anatol Belski
2eef2abee5
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
Optimize argument passing handlers:
Fix pcre non-FAST_ZPP build
Conflicts:
Zend/zend_compile.c
Zend/zend_execute.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/pcre/php_pcre.c
2014-12-16 17:13:47 +01:00
Dmitry Stogov
3a18597774
Optimize argument passing handlers:
...
- predcalculate offsets of passed argument and store it in opline->result.var for ZEND_SEND_*;
- don't update "number of passed arguments" op each ZEND_SEND_* opcode, store it on call frame creation
- Change ZEND_HANDLE_EXCEPTION to determine "number of passed arguments" in incomplete calls fefore freeing
2014-12-16 18:40:52 +03:00
Anatol Belski
bdeb220f48
first shot remove TSRMLS_* things
2014-12-13 23:06:14 +01:00
Anatol Belski
f4311686cc
Merge branch 'PHP-5.6'
...
* PHP-5.6:
updated NEWS
Fixed bug #68583 Crash in timeout thread
Conflicts:
Zend/zend_execute.h
Zend/zend_execute_API.c
2014-12-12 13:26:17 +01:00
Anatol Belski
c96ffaa653
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
Fixed bug #68583 Crash in timeout thread
Conflicts:
Zend/zend_execute.h
2014-12-12 12:05:47 +01:00
Anatol Belski
3affc0e8a2
Fixed bug #68583 Crash in timeout thread
...
This replaces the GUI element used for execution timeout handling
on Windows. Instead a timer queue technique is used, which is indeed
a thread pool. A timer queue timer is a lightweight object handled
but that thread pool and the timer thread spends most of the time
sleeping and waiting for an alert.
Please note also that this introduces neither binary nor source
breach. The custom timeout thread functions are deleted, however
they was not exported throug DLL, so couldn't be used by any
external code. As well they couldn't be used anywhere in the core
except in executor api, because those custom timeout thread
functions they used to operate on static variables which would
be overwritten (and that would blow).
So instead a relatively modern technique is used for the timeout
handling. It's still not perfect because the executor still has to
check EX(timed_out). This can be a topic for an improvement in
master. But brobably can be tricky as currently it seems to be not
possible to signal an individual thread. Also note another issue
that static variables aren't thread safe, but the current timer
implementation is.
2014-12-12 10:43:31 +01:00