Andrea Faulds
ab45f13a0b
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-08 21:00:49 +01:00
Andrea Faulds
5358c7cf5e
Replace dead branch with ZEND_ASSERT()
2016-08-08 20:56:11 +01:00
Nikita Popov
3859bcd1f8
Merge branch 'PHP-7.0' into PHP-7.1
2016-08-05 19:56:27 +02:00
Nikita Popov
807e81937b
Fix bug #72767
...
The page size calculation did not account for the size of the
stack header (or rather it did account for it, but in the wrong
direction...)
2016-08-05 19:55:10 +02:00
Nikita Popov
0bda0422af
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_execute.h
2016-07-14 18:39:48 +02:00
Nikita Popov
82ce2a4e4d
Add missing call opcodes in cleanup_unfinished_calls()
...
Otherwise we may leak if an exception is thrown from them.
2016-07-14 18:37:28 +02:00
Nikita Popov
5f6effed43
Add opcodes to zend_wrong_string_offset()
2016-07-10 15:15:34 +02:00
Aaron Piotrowski
d9a9cf8eca
Merge branch 'master' into iterable
2016-07-03 22:42:10 -05:00
Dmitry Stogov
044e2718fe
Fixed executor without global register variales (gcc warnings or clang errors)
2016-06-27 10:36:41 +03:00
Dmitry Stogov
d0460d8f6b
Turn safe timeout handling into general interrupt handling ability.
2016-06-23 15:01:23 +03:00
Dmitry Stogov
1616038698
Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
...
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Dmitry Stogov
ff363e2e7c
Implemented RFC: Replace "Missing argument" warning with "Too few arguments" exception
...
Squashed commit of the following:
commit 8b45fa2acb
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 01:52:50 2016 +0300
Separate slow path of ZEND_RECV into a cold function.
commit 9e18895ee5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 23:26:28 2016 +0300
Required argument can't be IS_UNDEF anymore.
commit 662db66e39
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 17:14:50 2016 +0300
Replace "Missing argument" warning by "Too few arguments" exception.
2016-06-16 02:32:02 +03:00
Dmitry Stogov
a9512af810
Implemented RFC: Fix inconsistent behavior of $this variable
...
Squashed commit of the following:
commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 00:19:42 2016 +0300
Fixed GOTO VM
commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 21:01:57 2016 +0300
Removed unused variable
commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 19:06:16 2016 +0300
Protection from $this reassign through mb_parse_str()
commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:14:50 2016 +0300
Added type inference rule for FETCH_THIS opcode
commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:11:18 2016 +0300
Restored PHP-7 behavior of isset($this->foo).
It throws exception if not in object context.
Removed useless opcode handlers.
commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 12:25:47 2016 +0300
Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".
commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:02:43 2016 +0300
Throw exception on attempt to re-assign $this through extract() and parse_str().
commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 22:18:36 2016 +0300
Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Dmitry Stogov
e7e79aa409
Delay IS_ERROR checks
2016-06-09 12:39:38 +03:00
Nikita Popov
766ad0d970
Followup for bug #53432
...
Assign-ops and nested accesses now get the same treatment.
2016-06-08 15:43:58 +02:00
Aaron Piotrowski
8146c47d85
Fix error message
2016-06-03 18:29:24 -05:00
Aaron Piotrowski
72692e9a9c
Add iterable pseudo-type
2016-06-03 17:42:04 -05:00
Dmitry Stogov
b111da96d9
Split ZEND_SEND_VAR_NO_REF into ZEND_SEND_VAR_NO_REF and ZEND_SEND_VAR_NO_REF_EX (similar to ZEND_SEND_VAL) and remove ZEND_ARG_* flags.
2016-05-31 04:06:00 +03:00
Nikita Popov
91f5940329
Forbid dynamic calls to scope introspection functions
...
Per RFC:
https://wiki.php.net/rfc/forbid_dynamic_scope_introspection
2016-05-24 20:48:24 +02:00
Dmitry Stogov
c466df6813
Inlined fast paths of the freqently execute handlers for FETCH_DIM_R.
2016-05-17 15:08:04 +03:00
Dmitry Stogov
ccf18da450
Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
...
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization.
Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.
2016-05-13 01:40:15 +03:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00
Dmitry Stogov
8a7a913a7a
Use main VM stack for generators. Only single call frame for generator itself is allocated on heap, call frames for nested functions are allocated on main VM stack. In case "yield" used in context of another function call, call stack has to be frozen and then restored.
2016-05-12 00:44:18 +03:00
Dmitry Stogov
cca2c8ecc4
Reimplemented Bob's commit bac6fdb0c5
without insignificant renaming and white-space changes
2016-05-06 10:47:58 +03:00
Dmitry Stogov
c19cb70dac
Revert "Refactor zval cleanup into single function"
...
This reverts commit bac6fdb0c5
.
2016-05-06 10:47:58 +03:00
Bob Weinand
bac6fdb0c5
Refactor zval cleanup into single function
...
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Dmitry Stogov
b91197c8a3
Inlined fast path
2016-05-04 17:33:35 +03:00
Joe Watkins
c38310f25a
change fcall and statement handlers to accept frame
2016-05-04 09:28:13 +01:00
Bob Weinand
f59de7ea36
Export zend_pass_function to allow comparisons against it
2016-04-30 20:46:52 +02:00
Dmitry Stogov
3e9419dd28
Fixed compilation warnings
2016-04-29 14:03:33 +03:00
Dmitry Stogov
747a482b9c
Don't initialize EX(call)->symbol_table on each function call.
...
Keep it uninitialized, and check ZEND_CALL_HAS_SYMBOL_TABLE flag when necessary.
2016-04-28 15:17:24 +03: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
Dmitry Stogov
c026ca6cdc
Merge branch 'master' into safe_timeout
...
* master:
Fixed bug #72059 - Reference the bug id directly in NEWS
Fix magic constants (__LINE__) with ?? for constant scalar exprs
Add NEWS entry for ?? in constant scalar expressions
allow null coalescing (??) on constant expressions
Fix intl tests for ICU < 52
Fix ZTS builds by adding a missing TSRMLS_FETCH().
Fix bug #71737
Update NEWS
Fix RECV opcode to handle all kinds of exceptions
Fix RECV opcode to handle all kinds of exceptions
2016-04-21 10:15:57 +03:00
Bob Weinand
a287c3f776
Fix magic constants (__LINE__) with ?? for constant scalar exprs
...
Also fix general memory leak when root ast gets replaced in compile time evaluation
2016-04-21 02:45:09 +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
650c1c0a7d
Safe execution timeout handling.
2016-04-20 13:52:21 +03:00
Dmitry Stogov
f484801483
Reduced amount of code generated for interrupt handling.
...
Improved ZEND_VM_INTERRUPT_CHECK() placement (always perform checks after opcode handler completion, when instruction pointer value is alredy changed to the next opcode).
2016-04-20 11:06:52 +03:00
Nikita Popov
64f91774f2
Remove IS_VAR_RET_REF flag
...
Instead decide whether a function returned by reference or by value
by checking whether the return value has REFERENCE type. This means
that functions returning by reference must always return a reference
and functions returning by value must not return a reference.
2016-04-15 15:32:20 +02:00
Dmitry Stogov
562d6315b1
Optimize zend_binary_assign_op_dim_helper()
2016-04-14 02:35:53 +03:00
Dmitry Stogov
e95efb6312
Move rare cases of DO_FCALL into separate helpers.
2016-04-13 20:13:17 +03:00
Dmitry Stogov
85f35a8fc1
Separate unspecializeble code of INCLIDE_OR_EVAL into helper functions
2016-04-13 15:29:01 +03:00
Dmitry Stogov
a809444b64
Delay IS_UNDEF check for FETCH_DIM_W and family
2016-04-13 01:19:20 +03:00
Dmitry Stogov
0b3e2fe2b1
Delay IS_UNDEF check for FETCH_DIM_R and family
2016-04-13 00:05:19 +03:00
Dmitry Stogov
23b65bf732
Reuse zend_fetch_dimension_address_read() for FETCH_LIST
2016-04-12 22:53:01 +03:00
Dmitry Stogov
eaf489ac2b
Optimize ASSIGN_DIM (separate common unspecializeble code into helper functions).
2016-04-12 19:36:24 +03:00
Dmitry Stogov
ef0099918f
Separate unspecializeble code of INIT_DYNAMIC_CALL into separate helper functions.
2016-04-12 14:41:06 +03: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
d0c6c179cd
Initialize op_array->run_time_cache on slow path of INIT_FCALL opcode and omit corresponding check on fast path of DO_FCALL.
2016-04-05 00:01:00 +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