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
Dmitry Stogov
557994d50d
Use better data structures (incomplete)
2014-02-19 01:12:05 +04:00
Dmitry Stogov
5de7115679
Use better data structures (incomplete; able to run bench.php)
2014-02-18 16:27:38 +04:00
Sara Golemon
1e752ce9c5
Add __debugInfo() magic method
...
class Foo {
private $val = 'Random, meaningless data';
public function count() { return 42; }
public function __debugInfo() {
return ['count' => $this->count()];
}
}
$f = new Foo;
var_dump($f);
2014-02-17 19:33:56 -08:00
Dmitry Stogov
a0fe8e5a91
Use better data structures (incomplete)
2014-02-18 01:41:23 +04:00
Dmitry Stogov
2b9b9afa7a
Use better data structures (incomplete)
2014-02-17 17:59:18 +04:00
Dmitry Stogov
0e425121b3
Use better data structures (incomplete)
2014-02-17 11:50:32 +04:00
Dmitry Stogov
f4cfaf36e2
Use better data structures (incomplete)
2014-02-10 10:04:30 +04:00
Nikita Popov
2c47dfbaeb
Implement argument unpacking
...
RFC: https://wiki.php.net/rfc/argument_unpacking
2014-01-11 12:42:08 +01:00
Nikita Popov
c7bb283338
Minor cleanup in zend_do_pass_param()
2014-01-11 12:40:16 +01:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772
Bump year
2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0
Bump year
2014-01-03 11:04:26 +08:00
Dmitry Stogov
03a37de9b3
Improved empty string handling. Now ZE uses an interned string instead of allocation new empty string each time. (Some extensions might need to be fixed using str_efree() instead of efree() to support interned strings).
2013-12-26 14:47:13 +04:00
Xinchen Hui
eeb37c40e6
Save one char compare
2013-12-17 15:09:52 +08:00
Dmitry Stogov
49d7e98025
Fixed memory leaks introdused by:
...
commit 611da37617
Author: Igor Wiedler <igor@wiedler.ch>
Date: Sat Nov 9 13:48:23 2013 -0500
2013-12-10 15:13:53 +04:00