Nikita Popov
44ed1cb5c0
Remove ZEND_CALL_CTOR_RESULT_UNUSED
...
Instead emit a FREE on the result of NEW.
2016-02-11 22:15:11 +01:00
Dmitry Stogov
8c2d55962e
Combine conditions
2016-02-11 23:11:19 +03:00
Nikita Popov
5faedf5b3e
Remove EXT_TYPE_UNUSED in favor of IS_UNUSED
...
This means we no longer allocate an unused VAR for the retval of
instructions that support unused results.
Nearly all instructions already used the result variable only if
it was used. The only exception to this was the return value
variable for internal function call results. I've adjusted the code
to use a stack zval for the unused return case now. As we have
retval specialization now, we know that it doesn't matter.
2016-02-11 18:02:19 +01:00
Nikita Popov
f75be35312
Support partial GC for unfinished generators
...
This doesn't cover everything yet, but should be a good start for
cycled in unfinished generators.
2016-02-11 16:38:30 +01:00
Nikita Popov
68516091c1
Merge branch 'PHP-7.0'
2016-02-11 16:33:23 +01:00
Nikita Popov
9cebdc5d47
Fix yield-by-ref of constant
...
Typo in the condition...
2016-02-11 16:32:45 +01:00
Nikita Popov
7453348ca8
Merge branch 'PHP-7.0'
2016-02-11 16:25:55 +01:00
Nikita Popov
1322672c0b
Fix dangling send target when using yield from
...
Also drop some unnecessary TRY_DELREFs -- leftovers from the days
when null was refcounted.
2016-02-11 16:25:16 +01:00
Nikita Popov
c6f2d61c7c
Merge branch 'PHP-7.0'
2016-02-10 19:04:33 +01:00
Nikita Popov
aa3f44a395
Crude generator GC for value/key/retval
...
These values remain live after the generator has been closed, so
they are particularly susceptible to leaking cycles.
2016-02-10 19:03:02 +01:00
Xinchen Hui
4fcc3f7711
Merge branch 'PHP-7.0'
2016-02-09 12:20:33 +08:00
Xinchen Hui
a219fc1753
Fixed bug (Low probability segfault in zend_arena)
2016-02-09 12:20:11 +08:00
Nikita Popov
abc06b91cd
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_compile.c
2016-02-06 16:43:54 +01:00
Nikita Popov
9f82f21d01
Fix bug #71529
2016-02-06 16:43:28 +01:00
Dmitry Stogov
81721a7ddd
Specialize DO_FCALL (and variations) according to used/unused return value
2016-02-05 15:46:52 +03:00
Dmitry Stogov
2f5a119281
Use extra specialization to eliminate run-time checks for conditions known at compile time in SEND_VAL_EX and SEND_VAR_EX.
2016-02-05 15:07:58 +03:00
Dmitry Stogov
ef98adce30
Specialize ASSIGN according to used/unused return value
2016-02-05 13:18:58 +03:00
Bob Weinand
00a2c30c59
Add extra VM operand specialization
...
For now RETVAL and OP_DATA= are supported
2016-02-04 16:49:50 +01:00
Nikita Popov
af66ad2857
Remove use of register keyword in headers
...
Headers must be C++ compatible -- this throws warnings.
The register keyword is not used for optimization, at least not
in optimized builds.
2016-02-04 13:34:19 +01:00
Dmitry Stogov
d510255879
Rename IS_ERROR into _IS_ERROR (to prevent redefinition on Windows).
2016-02-01 11:12:28 +03:00
Xinchen Hui
08e5dc461d
Merge branch 'PHP-7.0'
2016-01-29 22:05:59 -08:00
Xinchen Hui
e062759401
Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws exception).
2016-01-29 22:05:52 -08:00
Dmitry Stogov
86f54fcdf7
Use special type IS_ERROR instread of EG(error_zval). (we still need EG(error_zval) for SPL support).
2016-01-28 18:00:06 +03:00
Dmitry Stogov
e99fe9865e
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:54:48 +03:00
Dmitry Stogov
6039d2d914
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:41:15 +03:00
Xinchen Hui
c58ad955a9
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71443 (Segfault using built-in webserver with intl using symfony)
Fix memory leak with not freeing OpenSSL errors
check for NULL and avoid crashes
Update libmagic.patch for PHP-5.6
Fixed bug #7143 (finfo throws notice for specific python file)
2016-01-26 15:57:49 +08:00
Xinchen Hui
9ff08ae17c
Fixed bug #71443 (Segfault using built-in webserver with intl using symfony)
2016-01-26 15:57:39 +08:00
Bob Weinand
9017bb94d4
Merge branch 'PHP-7.0'
2016-01-24 19:55:31 +01:00
Bob Weinand
001ce475ee
Fixed bug #71441 (Typehinted Generator with return in try/finally crashes)
2016-01-24 19:55:16 +01:00
Xinchen Hui
0df9b51479
Return meaningful value
2016-01-22 15:34:56 +08:00
Xinchen Hui
9b61479166
We don't need to dup zend_class_constant here.
...
quote why the internal class is still using duplication:
```
for internal classes, the zend_class_constant is malloc-ed. we need to
free it.
if (const->ce == ce) {
zval_ptr_dtor(&const->value);
free(const)
}
so, if two classes share one const, and it(parent class) was freed
before, this read(in child class, const->ce) is invalid..
and destroy_zend_class is called via zend_hash_destroy(class_table).
which is not in reverse order... so, parent classes are dtor first.
if we want this work, we should change that order.
```
2016-01-22 11:22:37 +08:00
Nikita Popov
7899498c6f
Mark op1 of INIT_FCALL as NUM
2016-01-21 21:31:14 +01:00
Nikita Popov
9b57e07298
Consolidate op1/op2 vm flags
2016-01-21 21:15:05 +01:00
Xinchen Hui
4ed5b4cdf5
Typo (SKIPF -> SKIPIF)
2016-01-21 15:27:53 +08:00
Xinchen Hui
b27e10284a
Empty line
2016-01-21 14:37:54 +08:00
Xinchen Hui
145555f81c
Cover overloaded functions
2016-01-21 14:31:03 +08:00
Xinchen Hui
2ee73ee094
Let's add a class entry for testing
2016-01-21 13:53:29 +08:00
Xinchen Hui
62c1c11ad3
Fixed bug #71413 (Crash with constants on internal interfaces)
2016-01-21 13:30:41 +08:00
Anatol Belski
9ceb53b071
add proper noinline specifier for VC
2016-01-18 18:32:12 +01:00
Xinchen Hui
86883b793b
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71336 (Wrong is_ref on properties as exposed via get_object_vars())
2016-01-13 17:38:36 +08:00
Xinchen Hui
39f0950746
Fixed bug #71336 (Wrong is_ref on properties as exposed via get_object_vars())
2016-01-13 17:38:18 +08:00
Dmitry Stogov
d47285648c
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71248 (Wrong interface is enforced)
Update NEWS
2016-01-13 11:42:50 +03:00
Dmitry Stogov
50be2c89be
Fixed bug #71248 (Wrong interface is enforced)
2016-01-13 11:41:57 +03:00
Nikita Popov
35662c9bd3
Forbid double use() and use() of param
...
Also commit a test I forgot to add for forbidden use() of
auto-globals.
2016-01-12 15:37:39 +01:00
Julien Pauli
65e592e477
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Trigger op_array_handler() if HAVE_OP_ARRAY_HANDLER is set
2016-01-12 15:19:39 +01:00
Julien Pauli
bec0aec116
Trigger op_array_handler() if HAVE_OP_ARRAY_HANDLER is set
2016-01-12 15:19:14 +01:00
Dmitry Stogov
6579e48417
Introduced BIND_STATIC opcode instead of FETCH_R/FETCH_W(static)+ASSIGN/ASSIGN_REF (similar to BIND_GLOBAL).
...
In the future we may refer to static variable by index instead of name, to eliminate hash lookup.
2016-01-12 12:20:35 +03:00
Xinchen Hui
9c2dde98db
Merge branch 'PHP-7.0'
2016-01-07 07:05:31 -08:00
Xinchen Hui
16a2b47394
Fixed bug #71300 (Segfault in zend_fetch_string_offset)
2016-01-07 07:05:17 -08:00
Bob Weinand
abae897a24
Merge branch 'PHP-7.0'
2016-01-07 15:13:07 +01:00