Dmitry Stogov
412ad4b254
Uinified call frame handling for user and internal functions.
...
Now EG(current_execute_data) always point to the call frame of the currently executed function.
2014-07-02 22:01:25 +04:00
Dmitry Stogov
04c87b9961
Merge branch 'phpng' into call-frame
...
* phpng:
Reverted 387c491559
(it broke ext/standard/tests/file/bug44607.phpt)
op2 is null terminated string
IS_OBJECT and IS_RESOURCE is obviously exclusive
No need to initialize it
More optimizations
Let's assume the name is already lowercased
Save some strlen
Use ZEND_HANDLE_NUMERIC
Fixed stack usage
2014-06-27 01:28:58 +04:00
Dmitry Stogov
c69781393c
Refactoring: merge call_frame and end_execute_data into single data structure. Keep only single copy of each argument on VM stack (previously ZE kept two copies of each arguments for user functions)
2014-06-26 23:51:14 +04:00
Xinchen Hui
f75c04ac8d
No need to initialize it
2014-06-26 18:10:18 +08:00
Xinchen Hui
a7ce96d01f
More optimizations
2014-06-26 18:09:04 +08:00
Xinchen Hui
64c5eb00b8
Let's assume the name is already lowercased
2014-06-26 17:56:55 +08:00
Dmitry Stogov
0f9d5baba2
Merge branch 'phpng' into call-frame
...
* phpng:
Remove temp file committed by accident
Don't use zend_string for other fields (only name here is enough)
Fixed _zend_get_parameters_array
Fixed use of uninitialized value
Cleanup (refactoring is finish)
We don't need extra 1 byte anymore
Conflicts:
Zend/zend_API.c
2014-06-25 11:12:32 +04:00
Xinchen Hui
284141ca8f
Fixed _zend_get_parameters_array
...
it should not decrease the refcount (spotted by
register_shutdown_function in ext/mysqli/tests/bug49442.phpt)
2014-06-25 00:39:37 +08:00
Dmitry Stogov
43477bc7a2
Refactoring: use call_frames instead of call_slots
2014-06-24 02:17:16 +04:00
Dmitry Stogov
e1b18e59f7
Use arena allocator for zend_class_entry, zend_op_array and zend_property_info that live till the end of request
2014-06-18 02:47:01 +04:00
Dmitry Stogov
909acec231
Avoid useles constants update
2014-06-16 23:32:58 +04:00
Dmitry Stogov
bd10db271c
Use new zend_hash iteration API
2014-06-16 21:11:52 +04:00
Dmitry Stogov
c1965f58d4
Use reference counting instead of zval duplication
2014-06-05 16:04:11 +04:00
Dmitry Stogov
6e7338700e
Avoid useless merge
2014-06-04 02:11:26 +04:00
Dmitry Stogov
e34a6e9211
Use new zend_hash API
2014-05-27 00:38:58 +04:00
Xinchen Hui
0175d994c0
Fixed apply_func_arg_t, and it's better not using cast (compiler friendly)
2014-05-25 19:56:51 +08:00
Xinchen Hui
c2082ece52
Fixed apply_func_t (they should be broken before)
2014-05-25 18:32:35 +08:00
Dmitry Stogov
3e131b41b2
Fixed memory leaks
2014-05-15 16:18:19 +04:00
Dmitry Stogov
c446e57588
ext/soap support for phpng (incomplete - just compilable)
2014-05-15 02:44:47 +04:00
Xinchen Hui
075a6ced0a
Save one type checking if the type is already string
2014-05-13 14:05:28 +08:00
Dmitry Stogov
f089be8291
Fixed wrong buffer length (added place for terminating zero)
2014-05-12 11:17:12 +04:00
Dmitry Stogov
0c6a6f0fba
Re-applyed Bob's patch with minor fixes
2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976
Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first).
2014-05-07 03:26:13 +04:00
Nikita Popov
4d8c59f0da
Fix parse_method_params
2014-05-06 21:56:01 +02:00
Nikita Popov
ccc2c8ae16
Fix error message in parse_method_params
2014-05-06 20:32:49 +02:00
Bob Weinand
f3c1881f1d
Re-added fix for bug #66015 and adapted for phpng branch
2014-05-06 14:59:03 +02:00
Xinchen Hui
bea30846bb
Refactor Zip (1 test failed)
2014-05-05 10:49:27 +08:00
Dmitry Stogov
17d027ed47
Split IS_BOOL into IS_FALSE and IS_TRUE
2014-04-30 18:32:42 +04:00
Dmitry Stogov
f9927a6c97
Merge mainstream 'master' branch into refactoring
...
During merge I had to revert:
Nikita's patch for php_splice() (it probably needs to be applyed again)
Bob Weinand's patches related to constant expression handling (we need to review them carefully)
I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)
Conflicts:
Zend/zend.h
Zend/zend_API.c
Zend/zend_ast.c
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_constants.c
Zend/zend_exceptions.c
Zend/zend_execute.c
Zend/zend_execute.h
Zend/zend_execute_API.c
Zend/zend_hash.c
Zend/zend_highlight.c
Zend/zend_language_parser.y
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
Zend/zend_variables.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/date/php_date.c
ext/dom/documenttype.c
ext/hash/hash.c
ext/iconv/iconv.c
ext/mbstring/tests/zend_multibyte-10.phpt
ext/mbstring/tests/zend_multibyte-11.phpt
ext/mbstring/tests/zend_multibyte-12.phpt
ext/mysql/php_mysql.c
ext/mysqli/mysqli.c
ext/mysqlnd/mysqlnd_reverse_api.c
ext/mysqlnd/php_mysqlnd.c
ext/opcache/ZendAccelerator.c
ext/opcache/zend_accelerator_util_funcs.c
ext/opcache/zend_persist.c
ext/opcache/zend_persist_calc.c
ext/pcre/php_pcre.c
ext/pdo/pdo_dbh.c
ext/pdo/pdo_stmt.c
ext/pdo_pgsql/pgsql_driver.c
ext/pgsql/pgsql.c
ext/reflection/php_reflection.c
ext/session/session.c
ext/spl/spl_array.c
ext/spl/spl_observer.c
ext/standard/array.c
ext/standard/basic_functions.c
ext/standard/html.c
ext/standard/mail.c
ext/standard/php_array.h
ext/standard/proc_open.c
ext/standard/streamsfuncs.c
ext/standard/user_filters.c
ext/standard/var_unserializer.c
ext/standard/var_unserializer.re
main/php_variables.c
sapi/phpdbg/phpdbg.c
sapi/phpdbg/phpdbg_bp.c
sapi/phpdbg/phpdbg_frame.c
sapi/phpdbg/phpdbg_help.c
sapi/phpdbg/phpdbg_list.c
sapi/phpdbg/phpdbg_print.c
sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
5864ce8a44
Fixed compilation warnings
2014-04-22 17:46:34 +04:00
Nikita Popov
0d43a277b8
Use zval_get_string in a few more places
2014-04-21 17:55:58 +02:00
Dmitry Stogov
acd77dec81
Use alloca() for temporary allocation
2014-04-21 15:18:19 +04:00
Dmitry Stogov
7652a977a8
Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family.
2014-04-18 19:18:11 +04:00
Dmitry Stogov
e96073b1e4
Moved zend_literal->cache_slot right into zval.
...
It should be accessed using Z_CACHE_SLOT() macro.
zend_literal structure is removed.
API functions that accepted pointer to zend_literal now accept pointer to zval or cache_slot directly.
Calls of such functiond that now accept cache_slot need to be changed to pass -1 instead of NULL.
2014-04-17 15:40:45 +04:00
Dmitry Stogov
f9b26bc39a
Cleanup (2-nd round)
2014-04-15 21:56:30 +04:00
Dmitry Stogov
050d7e38ad
Cleanup (1-st round)
2014-04-15 15:40:40 +04:00
Xinchen Hui
a0690ff288
Fixed zend_object_get_t in simpleXML
2014-04-15 11:05:03 +08:00
Bob Weinand
ccf863c8ce
Merge branch 'PHP-5.6'
2014-04-11 19:35:11 +02: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
Bob Weinand
9663193bbc
Merge branch 'PHP-5.6'
2014-04-11 10:11:58 +02:00
Bob Weinand
f614fc6898
Fix bug #66015 by reverting "Removed operations on constant arrays."
2014-04-11 10:08:44 +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
7402af380b
Fixed destruction of objects and iterators on unclean request shutdown and GC (few cases are still unfixed).
...
Now we destroy objects it two steps. At first - object properties of all objects and only then the objects their selves.
2014-04-09 01:50:15 +04:00
Dmitry Stogov
3bc8810b1e
Constant duplication optimization
...
Argument receiving optimization
2014-04-04 03:55:27 +04:00
Dmitry Stogov
58f0f2503c
Various VM optimizations
2014-04-04 02:52:53 +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
042c937f69
Use STR_COPY() instead of STR_DUP() where possible
2014-04-01 17:10:15 +04:00
Xinchen Hui
3647fc6fcc
Refactor session (incompleted)
2014-03-28 18:46:25 +08:00
Dmitry Stogov
ea85451b65
Refactored data structures to keep zend_object* instead of a whole zval in some places
2014-03-28 02:11:22 +04:00
Dmitry Stogov
d83d34ba6d
Cleanup
2014-03-27 14:55:52 +04:00
Dmitry Stogov
c6cba55454
Use ZVAL_DEREF() macro
2014-03-27 13:39:09 +04:00
Dmitry Stogov
54d559d893
Replaced (Z_TYPE(x) == IS_REFERENCE) with (Z_ISREF(x))
2014-03-27 11:50:45 +04:00
Dmitry Stogov
887189ca31
Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing
2014-03-26 18:07:31 +04:00
Dmitry Stogov
acc719766d
More accurate zval comparison
2014-03-19 22:43:36 +04:00
Dmitry Stogov
d708d3c596
Fixed passing arguments by reference from internal functions
2014-03-11 22:33:28 +04:00
Xinchen Hui
3da247e7a8
Forgot to remove unused codes
2014-03-07 17:41:02 +08:00
Xinchen Hui
4b3e6fc129
Refactor reference handling
2014-03-07 17:08:14 +08:00
Dmitry Stogov
81531116c1
Fixed support for references
2014-03-07 11:32:07 +04:00
Xinchen Hui
84f20dc212
Invalid free of args("+")
2014-03-05 22:19:02 +08:00
Xinchen Hui
581fa5822e
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
...
Conflicts:
ext/standard/array.c
2014-03-05 18:02:35 +08:00
Dmitry Stogov
3733737328
Handle interned strings as non-refcounted scalars
2014-03-05 13:55:56 +04:00
Xinchen Hui
36f01f158c
Fixed NULL pointer dereference
2014-03-05 17:29:29 +08:00
Dmitry Stogov
040dea8b82
Arguments taken by internal functions using zend_parse_parameters() with "+" and "*" specifications must not be deallocated anymore.
2014-03-05 11:10:52 +04:00
Dmitry Stogov
19670c2bbc
Fixied calling object closures from internal functions
2014-03-05 01:54:21 +04:00
Xinchen Hui
ca146a6e14
Elements in array could be reference
2014-03-03 17:44:21 +08:00
Dmitry Stogov
843423716b
Fixed user stream filters
2014-02-28 23:05:22 +04:00
Xinchen Hui
0680cdb4ac
Fixed refcount handling
2014-02-28 22:47:24 +08:00
Dmitry Stogov
d0311ad28e
Fixed method argument parsing
2014-02-28 15:47:12 +04:00
Dmitry Stogov
9d1294e33d
Fixed memory leak
2014-02-28 13:29:18 +04:00
Dmitry Stogov
3ed445f749
Fixed IS_REFERENCE support
2014-02-28 12:54:38 +04:00
Dmitry Stogov
1c3ba95bb5
Refactored read_property() and read_dimension() handlers
2014-02-27 15:40:13 +04:00
Dmitry Stogov
639e4e1afa
Changes zend_is_callable() to use zend_string* instead of char*
2014-02-25 16:03:34 +04:00
Xinchen Hui
71dac3d54f
Don't add_ref in add_*_str functions
2014-02-25 15:47:24 +08:00
Dmitry Stogov
ff162410f0
Fixed traits support
2014-02-25 01:18:06 +04:00
Dmitry Stogov
844887ed56
Fixed IS_RESOURCE handling
2014-02-24 13:12:53 +04:00
Xinchen Hui
6f6573ef6a
Fixed several memory leaks
2014-02-24 15:03:35 +08:00
Dmitry Stogov
bc3fb147cf
Fixed char/zend_string mesh
2014-02-22 00:31:39 +04:00
Dmitry Stogov
d149228b69
Use better data structures (incomplete)
2014-02-21 23:51:08 +04:00
Dmitry Stogov
008a42e7c8
Fixed error messages
2014-02-21 20:53:09 +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
Dmitry Stogov
5fa6dbba8e
Fixed class_alias()
2014-02-21 18:19:46 +04:00
Xinchen Hui
92450f9d6c
Fixed test tests/classes/__call_007.php
2014-02-21 21:47:41 +08:00
Dmitry Stogov
7e03f3712b
All zend_parse_parameters("Z") has to be replaced with zend_parse_parameters("z")
2014-02-21 17:22:02 +04:00
Xinchen Hui
2b7ca1c756
Fixed segfault due to missing REFCOUNTED check
2014-02-21 21:12:12 +08:00
Dmitry Stogov
6fbea9ce6a
Fixed exception constructor
2014-02-21 16:14:42 +04:00
Dmitry Stogov
8bae1daa0c
Use better data structures (incomplete)
2014-02-19 14:35:28 +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
837af67271
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Add __debugInfo() magic method
2014-02-17 19:37:55 -08: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
17bf59f895
Use better data structures (incomplete)
2014-02-14 17:48:45 +04:00
Dmitry Stogov
686a078258
Use better data structures (incomplete)
2014-02-14 14:55:48 +04:00
Dmitry Stogov
be82a07776
Use better data structures (incomplete)
2014-02-12 18:08:11 +04:00
Dmitry Stogov
f4cfaf36e2
Use better data structures (incomplete)
2014-02-10 10:04:30 +04:00
Xinchen Hui
0f53e37494
Merge branch 'PHP-5.6'
2014-01-03 11:09:07 +08:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Xinchen Hui
a9c503bc27
Merge branch 'PHP-5.6'
2013-12-17 15:10:56 +08:00
Xinchen Hui
eeb37c40e6
Save one char compare
2013-12-17 15:09:52 +08:00
Kalle Sommer Nielsen
0fc8e6af0a
Eliminate another straight forward TSRMLS_FETCH() in zend_startup_module()
...
# For THTTPD:
# The code that uses a call to this function is for older versions of PHP anyway so its not covered
# For Zend OpCache:
# Added a new define for 5.6 and wrapped the code around that so its still compatible with older version
2013-12-12 20:30:45 +01:00
Dmitry Stogov
5d25762646
Removed unused "pHashFunction" argument in _zend_hash_init() and family (must be 99% source compatible)
2013-11-28 18:40:46 +04:00
Bob Weinand
d36cf90291
Merge branch 'const_scalar_exprs' into PHP-5.6
...
Conflicts:
Zend/zend_extensions.h
2013-11-28 13:41:42 +01:00
Dmitry Stogov
57c1335fec
Don't check argument types for internal functions without type hinting
2013-11-28 11:44:14 +04:00
krakjoe
1a1e83a5d9
export more Zend API
2013-11-20 16:24:22 +00:00
Bob Weinand
82cd3779f4
Whitespace fix
2013-11-01 16:49:23 +01:00
Bob Weinand
b45043a1b7
converted several switches to ifs and made more opcache friendly
2013-11-01 16:16:58 +01:00
Bob Weinand
2361745806
Working commit for constant scalar expressions (with constants).
...
Tests will follow.
2013-10-31 08:57:12 +01:00
Nikita Popov
0d7a638866
Implement variadic function syntax
...
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02:00
Nikita Popov
96b1c2145c
Provide more macros for handling of interned strings
...
* str_erealloc behaves like erealloc for normal strings, but will
use emalloc+memcpy for interned strings.
* str_estrndup behaves like estrndup for normal strings, but will
not copy interned strings.
* str_strndup behaves like zend_strndup for normal strings, but
will not copy interned strings.
* str_efree_rel behaves like efree_rel for normal strings, but
will not free interned strings.
* str_hash will return INTERNED_HASH for interned strings and
compute it using zend_hash_func for normal strings.
2013-09-13 19:42:10 +02:00
Dmitry Stogov
0f3977bc0f
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
Conflicts:
NEWS
2013-08-29 11:19:02 +04:00
Dmitry Stogov
dfc6feb6e8
Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
2013-08-29 11:16:56 +04:00
Xinchen Hui
e356d790cc
Merge branch 'PHP-5.4' into PHP-5.5
2013-08-29 14:02:34 +08:00
Xinchen Hui
747daa5354
Avoid compiler warning
2013-08-29 14:02:15 +08:00
Xinchen Hui
f0cb67402f
Merge branch 'PHP-5.4' into PHP-5.5
2013-08-29 14:01:54 +08:00
Adam Harvey
72027cd084
Fix bug #65579 (Using traits with get_class_methods causes segfault).
...
Specifically, this checks if there are trait aliases defined in the class scope
before attempting to dereference the first trait alias. This handles the case
where a trait alias was used in a child trait but no aliases exist in the
concrete class.
2013-08-28 20:33:42 -07:00
Xinchen Hui
a6a3aa5d49
Merge branch 'PHP-5.4' into PHP-5.5
...
Conflicts:
Zend/zend_API.c
2013-06-24 23:49:30 +08:00
Xinchen Hui
9cf3e65391
Fixed bug (is_callable() triggers Fatal Error)
...
This bug is also exists in 5.4, and previous fix by dsp is not complete
for __callStatic stituation, see test script
2013-06-24 23:45:08 +08:00
David Soria Parra
ecd9d76250
Fix #65108 (is_callable() triggers Fatal Error)
...
We have to check if the fcall info cache contains a pointer if we
use __call, otherwise we endup in a static lookup.
2013-06-24 15:55:10 +02:00
Stanislav Malyshev
02e4d7a290
Merge branch 'pull-request/341'
...
* pull-request/341: (23 commits)
typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev
ac40c0b562
Merge branch 'pull-request/341'
...
* pull-request/341: (23 commits)
typofixes
2013-06-10 14:20:18 -07:00
Xinchen Hui
79925094c4
Merge branch 'PHP-5.4' into PHP-5.5
2013-03-21 21:10:32 +08:00
Xinchen Hui
7dce0194c8
Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11)
2013-03-21 21:09:30 +08:00
Anatol Belski
6f0f5d5281
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix C90 compat
2013-03-19 14:44:20 +01:00
Anatol Belski
7687b8b81c
fix C90 compat
2013-03-19 14:42:18 +01:00
Dmitry Stogov
4837bdb910
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #63976 (Parent class incorrectly using child constant in class property)
Conflicts:
NEWS
2013-03-19 17:04:35 +04:00
Dmitry Stogov
7b0993bfb4
Fixed bug #63976 (Parent class incorrectly using child constant in class property)
2013-03-19 16:59:01 +04:00
Nikita Popov
b7788c52f1
Fix wrong macro usage and add missing NEWS entry
2013-03-15 13:48:33 +01:00
Nikita Popov
fcc6611de9
Add support for non-scalar Iterator keys in foreach
...
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Gustavo Lopes
b8603035d0
Merge remote-tracking branch 'cataphract/zpp_improv' into PHP-5.5
...
See https://wiki.php.net/rfc/zpp_improv
* cataphract/zpp_improv:
Update README.PARAMETER_PARSING_API
Export zend_parse_parameter()
Expose zend_parse_arg() as zend_parse_parameter()
zend_parse_parameters: allow ! for non pointers
2013-01-16 23:37:06 +01:00
Gustavo Lopes
07590e6e45
Export zend_parse_parameter()
2013-01-09 17:00:04 +01:00
Xinchen Hui
a666285bc2
Happy New Year
2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
Xinchen Hui
3d86e6d881
Fixed bug #63726 (Memleak with static properties and internal/user classes)
...
No test scripts provided (will try to find one)
2012-12-10 20:29:51 +08:00
Dmitry Stogov
111aa9fd2e
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fixed bug #63468 (wrong called method as callback with inheritance)
Conflicts:
NEWS
2012-11-20 12:54:40 +04:00
Dmitry Stogov
396c1e990a
Fixed bug #63468 (wrong called method as callback with inheritance)
2012-11-20 12:51:55 +04:00
Dmitry Stogov
ed3a2eec9c
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fixed bug #63111 (is_callable() lies for abstract static method)
Conflicts:
NEWS
2012-09-21 14:18:37 +04:00
Dmitry Stogov
4db74b7f19
Fixed bug #63111 (is_callable() lies for abstract static method)
2012-09-21 13:07:14 +04:00
Xinchen Hui
ee620e9673
Merge branch 'PHP-5.3' into PHP-5.4
2012-09-15 11:51:25 +08:00
Xinchen Hui
4c6678d605
Fixed bug #63093 (Segfault while load extension failed in zts-build).
2012-09-15 11:50:16 +08:00
Anatoliy Belsky
22f55d5665
Fixed bug #62313 Zend\tests\errmsg_021.phpt fails
2012-08-22 11:43:12 +02:00
Felipe Pena
7a72405171
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
- Value stored to var is never used
2012-08-19 12:44:49 -03:00
Felipe Pena
001966c754
- Value stored to var is never used
2012-08-19 12:44:44 -03:00
Xinchen Hui
d289efb457
Merge branch 'PHP-5.3' into PHP-5.4
...
Conflicts:
Zend/zend_API.h
2012-08-04 11:14:03 +08:00
Xinchen Hui
f4a315fce2
This becomes useless, since we have set that in the INIT macro
2012-08-04 11:03:21 +08:00
Xinchen Hui
03a1fcabf3
Fixed bug #62744 (dangling pointers made by zend_disable_class)
...
the test will be added while commit the fix for #62737
2012-08-04 10:41:26 +08:00
Gustavo André dos Santos Lopes
13f1d53b68
Expose zend_parse_arg() as zend_parse_parameter()
...
Sometimes, one wants to accept several types for a given parameter. zpp
has special functionality for detecting the NULL type, since the NULL
type is frequently used to skip parameters.
However, supporting several types is otherwise very tedious. There are
many cases where this situation arises -- for instance one may want
to accept an arbitrary number of integer and expect them in an array,
but allow a bare integer too; one may want to accept something that
will be used as an array key (which can be either and int or a string);
one may want to accept integer and double numbers. A search for IS_LONG
reveals many situations where this need arises.
The usual solution is to fetch the argument with 'z'/'Z', check its
type, and then convert the argument, e.g. with convert_to_long_ex().
As explain in the last commit, this has different behavior and
generates inconsistency.
Another -- even more flawed strategy --, is to try zpp with a specific
format, forcing it quiet, and if it fails retrying with another form.
But because zpp changes the arguments directly in the stack (for
instance, using "l" converts the zval in the stack to IS_LONG), the
arguments may look different after the first zpp, leaving subtle bugs.
This commit also allows more complex scenarios, for instance where the
expected type of one parameter depends on other parameters.
2012-07-18 23:30:03 +02:00
Gustavo André dos Santos Lopes
980dc7111b
zend_parse_parameters: allow ! for non pointers
...
This commit allows getting information about whether a certain value
was a NULL value by using the ! modifier together with the l/L, d and
b.
Example:
long l;
zend_bool is_null;
zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l!", &l, &is_null)
For the specifiers l/L, d and b, NULL values are reported as 0, 0., or
false. But sometimes one wants to distinguish NULL from those other
values -- for instance, to give NULL the same effect as the argument
not having been passed.
The usual way this problem is handled is by fetching the parameter
with 'z' or 'Z', check if it is NULL and if not use
convert_to_long_ex()/convert_to_double_ex(), etc. Unfortunately, this
is not equivalent. convert_to_long_ex() does a cast, while zpp() is
stricter. For instance, zpp will not accept 'foo' for a long argument,
and it will emit a notice when encountering '5foo'.
In fact, the only way to otherwise zpp semantics (without duplicating
its logic) is to fetch the raw zval from the stack and check whether
it's NULL (with zpp itself or its relatives) and then run zpp again.
That is not an elegant solution.
2012-07-18 23:30:03 +02:00
Johannes Schlüter
82c05eeda9
Copy default properties of internal classes for different threads
2012-04-11 19:21:41 -07:00
Derick Rethans
ecf8986a9a
Add the ZEND_DONT_UNLOAD_MODULES environment variable for debugging to 5.3 as
...
well.
2012-03-06 18:25:55 +00:00
Dmitry Stogov
e182aeec10
Fixed module numbering
2012-03-05 12:47:25 +00:00
Dmitry Stogov
56a3f7eca8
Fixed module numbering
2012-03-05 12:47:25 +00:00
Xinchen Hui
0e4d46a3a7
MFH: Fix bug #61165 (Segfault - strip_tags())
2012-03-02 02:51:57 +00:00
Xinchen Hui
5f4ae28459
Improve fix for #61165 , the previous one cause #43450 test failed
2012-02-26 14:56:26 +00:00
Xinchen Hui
1ee93c83ff
Fixed bug #61165 (Segfault - strip_tags())
2012-02-25 04:36:08 +00:00
Felipe Pena
e4ca0ed09f
- Year++
2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Stefan Marr
2e5d5e5ac6
Fixed Bug #60173 (Wrong error message on reflective trait instantiation)
2011-10-31 22:59:00 +00:00
Dmitry Stogov
4a25a7740d
Fixed ZE specific compile warnings (Bug #55629 )
2011-09-13 13:29:35 +00:00
Hannes Magnusson
e5553b210a
Revert r316345 which fixes all the tests again
2011-09-07 13:50:18 +00:00
Pierre Joye
59614b05c4
- reject paths with trainling spaces using the very good new zend arg
2011-09-07 12:33:22 +00:00
Hannes Magnusson
550980cfe5
Callable typehint following the rules of is_callable($arg, false);
2011-08-16 10:44:47 +00:00
Felipe Pena
619cfeef46
- Revert r314387
...
(property_info.name has the mangled name)
2011-08-07 13:04:02 +00:00
Rasmus Lerdorf
e2315d295a
Use property_info.name here instead since *name might be free'ed at this point
...
@dmitry please review
2011-08-07 00:01:17 +00:00
Felipe Pena
13eb47a8bc
- Added missing PHP_FE_END/ZEND_FE_END
2011-08-06 01:22:27 +00:00
Felipe Pena
783b05326a
- Added missing PHP_FE_END/ZEND_FE_END
2011-08-06 01:22:27 +00:00
Rasmus Lerdorf
2b6a290d55
Another potential missing va_end() found by Coverity
2011-08-05 22:26:16 +00:00
Rasmus Lerdorf
c1c2e18cb5
Another potential missing va_end() found by Coverity
2011-08-05 22:26:16 +00:00
Derick Rethans
4e5960ed88
- Added a check for an enviroment variable (ZEND_DONT_UNLOAD_MODULES) that, if
...
set, prevents PHP from dl_closing() modules on shutdown.
- This makes it possible to spot memory leaks with valgrind in shared modules.
2011-07-14 12:21:15 +00:00
Felipe Pena
9aa25d0938
- Minor optimization taking the computed hash of interned strings
2011-07-10 12:37:42 +00:00
Felipe Pena
ce211cf5e6
- Minor optimization, use the computed hash when available
2011-07-10 02:00:00 +00:00
Felipe Pena
0a0443f07c
- Missing fixes for grammar fix 's/valid path/a valid path/'
2011-06-09 00:23:43 +00:00
Felipe Pena
ddaddf6c2a
s/valid path/a valid path/
2011-06-08 00:53:55 +00:00
Felipe Pena
32b5f8a1a3
- Added new parameter parsing option (p - for valid path (string without null byte in the middle))
...
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00
Stanislav Malyshev
e18618905c
scalar types cleanup
2011-06-03 01:09:32 +00:00
Dmitry Stogov
eaeb4537ec
MFH: Fixed bug #54910 (Crash when calling call_user_func with unknown function name)
2011-05-31 11:36:57 +00:00
Dmitry Stogov
c989a36927
Fixed bug #54910 (Crash when calling call_user_func with unknown function name)
2011-05-31 09:20:51 +00:00
Pierre Joye
6aed81764e
- fix bug #54423 , fix build in trunk, introduce by previous related commit
2011-03-31 23:58:06 +00:00
Antony Dovgal
dd5781bcdf
fix bug #54423 (classes from dl()'ed extensions are not destroyed)
2011-03-31 11:59:34 +00:00
Antony Dovgal
6e7a3015e5
fix bug #54423 (classes from dl()'ed extensions are not destroyed)
2011-03-31 11:59:34 +00:00
Felipe Pena
64bbdd76c3
- Fixed bug #53717 (checking the number of arguments is wrong in zend_parse_method_parameters_ex())
...
patch by: klaus at triendl dot eu
2011-01-12 22:17:10 +00:00
Felipe Pena
c6544fad1a
- Fixed bug #53717 (checking the number of arguments is wrong in zend_parse_method_parameters_ex())
...
patch by: klaus at triendl dot eu
2011-01-12 22:17:10 +00:00
Felipe Pena
927bf09c29
- Year++
2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Dmitry Stogov
3690ce39d9
zend_collect_module_handlers() has to be called after zend_extensions startup, because they can register additional 'hidden' extensions
2010-10-15 07:30:24 +00:00
Hartmut Holzgraefe
aaa2f1c30b
marked char pointer arguments as const in lots of
...
places where strings pointed to are not modified
to prevent compiler warnings about discarded qualifiers ...
2010-10-14 21:33:10 +00:00
Dmitry Stogov
f2df6a4a3e
- Improved memory usage
...
. zend_function.pass_rest_by_reference is replaced by
ZEND_ACC_PASS_REST_BY_REFERENCE in zend_function.fn_flags
. zend_function.return_reference is replaced by ZEND_ACC_RETURN_REFERENCE
in zend_function.fn_flags
. zend_arg_info.required_num_args removed. it was needed only for internal
functions. Now the first arg_info for internal function (which has special
meaning) is represented by zend_internal_function_info structure.
. zend_op_array.size, size_var, size_literal, current_brk_cont,
backpatch_count moved into CG(context), because they are used only during
compilation.
. zend_op_array.start_op is moved into EG(start_op), because it's used
only for 'interactive' execution of single top-level op-array.
. zend_op_array.done_pass_two is replaced by ZEND_ACC_DONE_PASS_TWO in
zend_op_array.fn_flags.
. op_array.vars array is trimmed (reallocated) during pass_two.
. zend_class_entry.constants_updated is replaced by
ZEND_ACC_CONSTANTS_UPDATED in zend_class_entry.ce_flags
. the size of zend_class_entry is reduced by sharing the same memory space
by different information for internal and user classes.
See zend_class_inttry.info union.
2010-09-15 07:38:52 +00:00
Sascha Schumann
50a0ea7b8c
separate properties of internal classes in ZTS mode fully,
...
otherwise multiple threads will modify the zvals' contents
without any synchronisation.
2010-08-12 07:58:14 +00:00
Dmitry Stogov
7566ff38a1
Fixed support for static properties of internal classes
2010-08-11 08:34:54 +00:00
Felipe Pena
3ea3bbaca3
- Fix ZTS build
2010-07-06 15:52:39 +00:00
Dmitry Stogov
1a1178a685
eliminated unnecessary iterations during request startup/shutdown
2010-07-06 11:40:17 +00:00
Dmitry Stogov
578d3159c6
Conditional compilation is replaced by macro
2010-05-26 15:42:59 +00:00
Antony Dovgal
435aa876fc
fix zend_std_get_static_property() in ZTS mode
2010-05-25 20:16:14 +00:00
Dmitry Stogov
f7ce69585c
- Interned string related callbacks moved turned from compiler_globals into real globals
...
- Updated API version number
2010-05-25 09:00:20 +00:00
Ilia Alshanetsky
33fae4caa0
Added support for numeric & scalar type hint as defined within
...
http://wiki.php.net/rfc/typecheckingstrictandweak RFC
2010-05-24 18:32:59 +00:00
Dmitry Stogov
f23e857676
Fixed ZTS build
2010-05-24 17:07:52 +00:00
Dmitry Stogov
c5237d82bf
Added caches to eliminate repeatable run-time bindings of functions, classes, constants, methods and properties
2010-05-24 14:11:39 +00:00
Derick Rethans
1bc9247651
- Added scalar typehinting.
2010-05-20 19:18:35 +00:00
Felipe Pena
f5f4a35927
- Fixed bug #51827 (Bad warning when register_shutdown_function called with wrong num of parameters)
2010-05-14 23:48:03 +00:00
Felipe Pena
c9fc939be0
- Fixed bug #51827 (Bad warning when register_shutdown_function called with wrong num of parameters)
2010-05-14 23:48:03 +00:00