Nikita Popov
f98937fa80
Don't copy in ZEND_CAST if type is already correct
2014-04-16 22:39:50 +02:00
Dmitry Stogov
050d7e38ad
Cleanup (1-st round)
2014-04-15 15:40:40 +04:00
Dmitry Stogov
cc50ebc487
Fixed memory leak
2014-04-14 23:53:25 +04:00
Dmitry Stogov
5dc52e4880
Fixed interface constants inheritance.
...
Now we use IS_REFERENCE for inhereted class constants.
I might miss some edje cases.
2014-04-14 13:24:43 +04:00
Bob Weinand
35b895fdf0
Removed useless void* parameter and replaced with zend_bool on zval_update_constant* functions
2014-04-11 19:18:58 +02:00
Dmitry Stogov
13f0c8b18c
Fixed double free
2014-04-11 16:48:38 +04:00
Bob Weinand
f614fc6898
Fix bug #66015 by reverting "Removed operations on constant arrays."
2014-04-11 10:08:44 +02:00
Dmitry Stogov
91ed685e26
Close all files and resources before before destroying object storage, because resources may point to objects. (THIS CHANGE MAY BE DANGEROUS)
2014-04-11 02:22:00 +04:00
Nikita Popov
f449b04713
Fix some ZTS issues and leaks
2014-04-10 13:50:25 +02:00
Nikita Popov
3ce96eabc0
Fix function copying in ZTS
...
Still doesn't entirely work :/
2014-04-09 23:41:16 +02:00
Nikita Popov
20f2e5986e
Fix ZTS build
...
This only makes it compile, it doesn't actually work, presumably
because interned strings are assumed in some places.
2014-04-09 23:41:16 +02:00
Dmitry Stogov
eaeb3c39b4
Optimized RECV_* opcodes
2014-04-04 14:36:34 +04:00
Dmitry Stogov
3bc8810b1e
Constant duplication optimization
...
Argument receiving optimization
2014-04-04 03:55:27 +04:00
Dmitry Stogov
76cc99fe60
Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc)
2014-04-03 15:26:23 +04:00
Dmitry Stogov
d8099d0468
Changed data layout to allow more efficient operations
2014-04-02 14:34:44 +04:00
Dmitry Stogov
042c937f69
Use STR_COPY() instead of STR_DUP() where possible
2014-04-01 17:10:15 +04:00
Dmitry Stogov
015e5dc43b
In case the string can't be interned it must not be released
2014-04-01 14:35:34 +04:00
Dmitry Stogov
9b196ca6e8
Added check for interned strings
2014-04-01 14:19:43 +04:00
Dmitry Stogov
47fdb9eae3
fixed craches at request shutdown and memory leaks
2014-03-31 16:09:45 +04:00
Dmitry Stogov
9a8fbdf2f4
Use CV variable offset instead of CV variable number
2014-03-27 16:00:25 +04:00
Dmitry Stogov
25d55d16fc
Fixed foreach (now we store HashPointer in additional IS_TMP_VAR slot(s))
2014-03-13 17:01:28 +04:00
Dmitry Stogov
3733737328
Handle interned strings as non-refcounted scalars
2014-03-05 13:55:56 +04:00
Dmitry Stogov
04d04d01c8
Fixed memory leak
2014-02-28 14:24:35 +04:00
Dmitry Stogov
54095e8c56
Converting from reference to regular value
2014-02-28 11:03:05 +04:00
Dmitry Stogov
cb181c512a
I don't know how to fix it
2014-02-27 23:51:00 +04:00
Dmitry Stogov
3810b4ab4a
Fixed constant expressions in array indeces handling
2014-02-27 16:41:41 +04:00
Nikita Popov
d3b484df82
Disallow use of positional args after unpacking
...
This commit disallows the use of trailing positional arguments
after argument unpacking was used. The following calls are no
longer valid:
fn(...$array, $var);
fn(...$array1, $var, ...$array2);
However, all of the following continue to be valid:
fn($var, ...$array);
fn(...$array1, ...$array2);
fn($var, ...$array1, ...$array2);
The reason behind this change is a stack allocation issue pointed
out by Dmitry: As of PHP 5.5 the stack necessary for pushing
arguments is precomputed and preallocated, as such the individual
SEND opcodes no longer verify that there is enough stack space.
The unpacked arguments will occupy some of that preallocated
space and as such following positional arguments could write past
a stack page boundary.
An alternative resolution for this issue is to ensure that there
is enough space for the remaining arguments in the UNPACK opcode.
However making this allocation precise (rather than using a
conversative over-estimate) would require some effort. Given that
this particular aspect of the feature wasn't very popular in the
first place, it doesn't seem worth the effort.
2014-02-26 16:40:25 +01:00
Nikita Popov
2eae187949
Store arg_num in fcall entry
...
Instead of storing the argument number in the znode of the parameter
list, store it in fcall->arg_num. This mainly cleans up the parameter
parsing code, which previously had to duplicate all rules (this
becomes more excessive as more features are added, e.g. named params
would already require a minimum of 14 rules...)
2014-02-26 16:40:25 +01:00
Nikita Popov
cefa7f8d08
Introduce zend_function_call_entry structure
...
Instead of directly pushing the zend_function* onto the
function_call_stack, push this structure. This allows us to store
additional data on this stack.
2014-02-26 16:40:25 +01:00
Dmitry Stogov
60eadc80b8
Fixed return anf yield by reference
2014-02-26 18:07:16 +04:00
Dmitry Stogov
e4b5848859
Fixed handling of "static" variables
2014-02-25 23:56:09 +04:00
Dmitry Stogov
ff162410f0
Fixed traits support
2014-02-25 01:18:06 +04:00
Dmitry Stogov
595fc4d901
More constant related fixes
2014-02-24 15:49:15 +04:00
Dmitry Stogov
f4c2810ab4
fixed support for constant expressions
2014-02-24 15:25:24 +04:00
Dmitry Stogov
62e7ac77e5
Fixed arg_info[].class_name destruction
2014-02-24 13:33:30 +04:00
Dmitry Stogov
d149228b69
Use better data structures (incomplete)
2014-02-21 23:51:08 +04:00
Dmitry Stogov
52bd62eca8
Fixed assertions
2014-02-21 20:35:40 +04:00
Dmitry Stogov
6d5ce339e6
Merge branch 'refactoring2' of github.com:zend-dev/php into refactoring2
2014-02-21 19:05:15 +04:00
Xinchen Hui
47fb198533
Revert "Use zend_string for arg_info to fixed segfault in Zend/tests/argument_restriction_003.phpt"
...
This reverts commit b96318105b
.
2014-02-21 23:02:24 +08:00
Dmitry Stogov
a4f2c6ea15
Merge branch 'refactoring2' of github.com:zend-dev/php into refactoring2
2014-02-21 18:55:26 +04:00
Dmitry Stogov
686ea7f20e
Fixed compound name resolution
2014-02-21 18:55:04 +04:00
Xinchen Hui
013cc55395
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
...
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l
2014-02-21 22:41:48 +08:00
Xinchen Hui
b96318105b
Use zend_string for arg_info to fixed segfault in Zend/tests/argument_restriction_003.phpt
2014-02-21 22:34:30 +08:00
Dmitry Stogov
2549010278
Fixed error messages
2014-02-21 18:23:56 +04:00
Dmitry Stogov
b2e7b89041
Fix non-zero terminated strings
2014-02-21 18:14:47 +04:00
Dmitry Stogov
0907a1b3f8
Fixed error messages
2014-02-21 17:35:19 +04:00
Dmitry Stogov
0fc85fbdff
Fixed error messages
2014-02-21 17:27:53 +04:00
Anatol Belski
47204c6341
some missing pieces for __debugInfo
2014-02-20 02:07:34 +01:00
Dmitry Stogov
8bae1daa0c
Use better data structures (incomplete)
2014-02-19 14:35:28 +04:00
Dmitry Stogov
9067dbcd0d
Use better data structures (incomplete)
2014-02-19 12:03:01 +04:00