Commit Graph

698 Commits

Author SHA1 Message Date
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
9a8fbdf2f4 Use CV variable offset instead of CV variable number 2014-03-27 16:00:25 +04:00
Dmitry Stogov
c6cba55454 Use ZVAL_DEREF() macro 2014-03-27 13:39:09 +04:00
Dmitry Stogov
f53c31265f Fixed symbol table detaching 2014-03-27 00:04:50 +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
ef6919e6f2 Fixed static data cleanup 2014-03-21 13:51:18 +04:00
Dmitry Stogov
6123deb30f Fixed refcounting (proper fix) 2014-03-21 01:08:26 +04:00
Dmitry Stogov
cce7d5a1ec Fixed refcounting 2014-03-21 00:34:26 +04:00
Dmitry Stogov
36cd92a7d3 Fixed passing argument by refefence from internal functions 2014-03-20 17:03:32 +04:00
Dmitry Stogov
da9a2872b0 Fixed cleanup on request shutdown 2014-03-18 14:52:54 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +04:00
Dmitry Stogov
d708d3c596 Fixed passing arguments by reference from internal functions 2014-03-11 22:33:28 +04:00
Xinchen Hui
53e312c663 Review ended
Revert "An demo(for review) to show how to fix the problem(symbol table resize)"

This reverts commit 60c354510b.
2014-03-11 14:23:14 +08:00
Xinchen Hui
60c354510b An demo(for review) to show how to fix the problem(symbol table resize) 2014-03-10 16:25:05 +08:00
Xinchen Hui
80625f20e5 Revert "An demo(for review) to show how to fix the problem we meet"
This reverts commit 4aeae15706.
2014-03-10 16:24:35 +08:00
Xinchen Hui
4aeae15706 An demo(for review) to show how to fix the problem we meet 2014-03-10 11:29:28 +08:00
Xinchen Hui
4b40e40ad0 Fixed memleak while sending IS_REFERENCE 2014-03-09 11:48:09 +08:00
Dmitry Stogov
6b303a6bd6 Fixed refcounting 2014-03-07 01:33:33 +04:00
Dmitry Stogov
8d2fb9d479 Internal functions may return (e.g. on wrong arguments) keeping the original return_value. So we have to initialize return_value as IS_NULL. 2014-03-06 13:32:43 +04:00
Dmitry Stogov
f3b4b16883 Fixed passing reference by value in call_user_func() 2014-03-06 01:04:28 +04:00
Dmitry Stogov
018be97c0d Fixed support for undefined constants in RECV_INIT 2014-03-06 00:15:56 +04:00
Dmitry Stogov
84c092f6d6 Fixed by reference parameter passing from internal functions 2014-03-05 16:17:00 +04:00
Dmitry Stogov
3733737328 Handle interned strings as non-refcounted scalars 2014-03-05 13:55:56 +04:00
Dmitry Stogov
19670c2bbc Fixied calling object closures from internal functions 2014-03-05 01:54:21 +04:00
Dmitry Stogov
3810b4ab4a Fixed constant expressions in array indeces handling 2014-02-27 16:41:41 +04:00
Dmitry Stogov
3696e038e5 Various fixes related to read_property(), read_dimension() and iterators refactoring 2014-02-27 16:07:36 +04:00
Dmitry Stogov
78fc6b3570 Fixed refcounting 2014-02-26 01:09:34 +04:00
Dmitry Stogov
77abd35b78 Fixed memory leak 2014-02-25 16:20:42 +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
499b553c18 Fixed NULL pointer dereference 2014-02-25 18:14:22 +08:00
Dmitry Stogov
789eb6dfc3 Fixed create_function() 2014-02-24 16:35:55 +04:00
Dmitry Stogov
595fc4d901 More constant related fixes 2014-02-24 15:49:15 +04:00
Dmitry Stogov
abb57cc1c2 Merge branch 'refactoring2' of github.com:zend-dev/php into refactoring2 2014-02-24 15:25:43 +04:00
Dmitry Stogov
f4c2810ab4 fixed support for constant expressions 2014-02-24 15:25:24 +04:00
Xinchen Hui
479b82c0d4 Fixed invalid write in vsprintf tests 2014-02-24 17:26:09 +08:00
Dmitry Stogov
23c9d3eb01 Fixed zend_rebuild_symbol_table() using IS_INDIRECT 2014-02-24 11:31:46 +04:00
Dmitry Stogov
008a42e7c8 Fixed error messages 2014-02-21 20:53:09 +04:00
Dmitry Stogov
52bd62eca8 Fixed assertions 2014-02-21 20:35:40 +04:00
Xinchen Hui
76c28f878a Fixed missed REFCOUNTED checking 2014-02-21 22:39:27 +08: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
9e6c0c6a89 Use better data structures (incomplete) 2014-02-18 17:31:27 +04:00
Dmitry Stogov
5de7115679 Use better data structures (incomplete; able to run bench.php) 2014-02-18 16:27:38 +04: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
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
4e66abad54 Use better data structures (incomplete) - refactored return_value handling 2014-02-12 14:29:51 +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
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Kalle Sommer Nielsen
d14670ccdb Eliminate another TSRMLS_FETCH() in i_zend_is_true()
# Affected extensions have all been updated, ext/opcache and ext/zip
# both have macros for cross version compatibility
2013-12-18 07:25:05 +01:00
Dmitry Stogov
5a87b7ff39 Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class). 2013-12-10 14:19:17 +04:00
Dmitry Stogov
2cb0e1e4c1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added validation of class names in the autoload process

Conflicts:
	NEWS
2013-11-29 12:55:11 +04:00
Dmitry Stogov
967abd6153 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added validation of class names in the autoload process
2013-11-29 12:54:22 +04:00
Dmitry Stogov
2d31eadbbf Added validation of class names in the autoload process 2013-11-29 12:53:02 +04:00
Dmitry Stogov
9647c61dc1 Constant expressions refactoring 2013-11-06 22:21:07 +04:00
Bob Weinand
b45043a1b7 converted several switches to ifs and made more opcache friendly 2013-11-01 16:16:58 +01:00
Bob Weinand
b56c1ca95e Fatal error about self referencing constants fixed 2013-10-31 19:05:29 +01:00
Bob Weinand
466c5dd1fe Fixed mem leaks, added tests and ternary operator 2013-10-31 18:21:37 +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
bdfa03d79d Save a TSRMLS_FETCH() for zval_ptr_dtor in executor
This gives me about 9% improvement on Zend/bench.php for a zts build.
2013-09-14 23:02:26 +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
Nikita Popov
0856714576 Always pass return_value_ptr to internal functions
Previous some places passed return_value_ptr only if the function
returned by reference. Now return_value_ptr is always set, even
for functions returning by-value.

This allows you to return zvals without copying their contents. For
this purpose two new macros RETVAL_ZVAL_FAST and RETURN_ZVAL_FAST
are added:

    RETVAL_ZVAL_FAST(zv); /* Analog to RETVAL_ZVAL(zv, 1, 0) */
    RETURN_ZVAL_FAST(zv); /* Analog to RETURN_ZVAL(zv, 1, 0) */

These macros behave similarly to the non-FAST versions with
copy=1 and dtor=0, with the difference that the FAST versions
will try return the zval without copying by utilizing return_value_ptr.
2013-08-31 13:16:41 +02:00
Stanislav Malyshev
c793a65690 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  non living code related typo fixes

Conflicts:
	Zend/zend_compile.c
2013-08-04 16:06:24 -07:00
Veres Lajos
8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
Xinchen Hui
e89537f2a3 Merge branch 'PHP-5.4' into PHP-5.5 2013-06-05 17:30:09 +08:00
Xinchen Hui
f597f5561e Merge branch 'PHP-5.3' into PHP-5.4 2013-06-05 17:26:10 +08:00
Xinchen Hui
3c87945c95 Fixed bug #64960 (Segfault in gc_zval_possible_root) 2013-06-05 17:25:00 +08:00
Dmitry Stogov
6e8aa09696 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64529 (Ran out of opcode space)

Conflicts:
	NEWS
	Zend/zend_execute_API.c
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2013-03-28 00:08:11 +04:00
Dmitry Stogov
85e5e60777 Fixed bug #64529 (Ran out of opcode space) 2013-03-28 00:03:40 +04: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
831fbcf385 Happy New Year 2013-01-01 16:23:31 +08:00
Dmitry Stogov
438cd86378 Removed unnecessary checks 2012-12-13 17:29:30 +04:00
Dmitry Stogov
ff1e1d7a8e Removed redundand checks from release build 2012-12-13 14:46:44 +04:00
Dmitry Stogov
7651d64556 Optimized access to temporary and compiled VM variables 2012-12-04 10:14:39 +04:00
Dmitry Stogov
70f83f35d0 . The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more.
. Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster.
2012-11-30 13:39:23 +04:00
Stanislav Malyshev
531e2533dd Use zend_execute_internal always to call internal functions 2012-10-05 08:14:20 +02:00
Stanislav Malyshev
bda93f5405 use zend_execute_internal 2012-10-04 22:43:13 -07:00
Nikita Popov
526db7db14 Replace code with zend_clean_and_cache_symbol_table() call
I replaced other instances of this code with the function call, but missed
this one.
2012-09-16 21:54:48 +02:00
Nikita Popov
c9709bfbd7 Remove asterix modifier (*) for generators
Generators are now automatically detected by the presence of a `yield`
expression in their body.

This removes the ZEND_SUSPEND_AND_RETURN_GENERATOR opcode. Instead
additional checks for ZEND_ACC_GENERATOR are added to the fcall_common
helper and zend_call_function.

This also adds a new function zend_generator_create_zval, which handles
the actual creation of the generator zval from an op array.

I feel like I should deglobalize the zend_create_execute_data_from_op_array
code a bit. It currently changes EG(current_execute_data) and
EG(opline_ptr) which is somewhat confusing (given the name).
2012-07-20 16:09:06 +02:00
Xinchen Hui
eac33b454c Typo when merging from trunk 2012-03-11 15:31:19 +00:00
Xinchen Hui
a38ffd5705 Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) 2012-03-11 15:28:31 +00:00
Xinchen Hui
b7ae5e0d86 Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) 2012-03-11 15:28:31 +00:00
Xinchen Hui
7536bf963d Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) 2012-03-11 15:28:31 +00:00
Xinchen Hui
5f99d789b5 MFH: Fixed bug #60978 (exit code incorrect) 2012-03-02 03:25:41 +00:00
Xinchen Hui
27df8b6ff0 Revert -r319102 and -r322922 in 5.4 branch since they introduce #60978
Fixed #60978 in trunk without reverting previous fix
#see http://news.php.net/php.internals/57789
2012-02-08 03:03:05 +00:00
Xinchen Hui
ff63c09e6f Revert -r319102 and -r322922 in 5.4 branch since they introduce #60978
Fixed #60978 in trunk without reverting previous fix
#see http://news.php.net/php.internals/57789
2012-02-08 03:03:05 +00:00
Derick Rethans
33863b2cf8 - Reinstated correct return values after David's fix for #60218. 2012-01-29 15:25:40 +00:00
Derick Rethans
2c1285a573 - Reinstated correct return values after David's fix for #60218. 2012-01-29 15:25:40 +00:00
Dmitry Stogov
b515bfbdfb Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00
Dmitry Stogov
032d140fd6 Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
8775a37559 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Dmitry Stogov
f7278c161f Fixed bug #60138 (GC crash with referenced array in RecursiveArrayIterator) 2011-11-18 12:43:53 +00:00
David Soria Parra
ce06b4397c Fix #60218 (instantiating unknown class leads to memory leak in cli) 2011-11-12 17:05:08 +00:00
David Soria Parra
c4d5231a36 Fix #60218 (instantiating unknown class leads to memory leak in cli) 2011-11-12 17:05:08 +00:00
Arnaud Le Blanc
ea5a61e39b Improved ternary operator performance when returning arrays 2011-10-18 19:42:42 +00:00
Arnaud Le Blanc
07b7ba8b40 Improved ternary operator performance when returning arrays 2011-10-18 19:42:42 +00:00
Dmitry Stogov
4a25a7740d Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Dmitry Stogov
e43ff1359e Fixed ZE specific compile warnings (Bug #55629) 2011-09-13 13:29:35 +00:00
Pierre Joye
d566f0c88e - fix build when no zend signal support 2011-09-08 09:17:21 +00:00
Pierre Joye
f20e705760 - fix build when no zend signal support 2011-09-08 09:17:21 +00:00
Rasmus Lerdorf
ca2234d18c Make timeouts work again for shutdown functions.
Fixes the faling lang/045 test
2011-09-07 18:48:17 +00:00
Rasmus Lerdorf
2af36bd041 Make timeouts work again for shutdown functions.
Fixes the faling lang/045 test
2011-09-07 18:48:17 +00:00
Rasmus Lerdorf
80931fee0c Since we have fci_cache = &fci_cache_local inside that block
and fci_cache is then later used outside the block, fci_cache_local
can't be block-scoped here
2011-08-07 00:50:46 +00:00
Rasmus Lerdorf
c44c0490d5 Since we have fci_cache = &fci_cache_local inside that block
and fci_cache is then later used outside the block, fci_cache_local
can't be block-scoped here
2011-08-07 00:50:46 +00:00
Ilia Alshanetsky
34d93f0c06 Zend Signal Handling 2011-06-22 14:23:21 +00:00
Ilia Alshanetsky
939875133a Zend Signal Handling (see RFC: https://wiki.php.net/rfc/zendsignals)
This needs to go into 5.4 as well, but will wait for Pierre to review win32 situation

# Patch by Lucas Nealan, Arnaud Le Blanc, Brian Shire & Ilia Alshanetsky
2011-06-02 21:16:50 +00:00
Dmitry Stogov
5dcdf5c467 Fixed bug #54367 (Use of closure causes problem in ArrayAccess) 2011-05-11 06:58:33 +00:00
Dmitry Stogov
92e5b10c41 Fixed bug #54268 (Double free when destroy_zend_class fails) 2011-04-15 12:43:20 +00:00
Dmitry Stogov
50ce16deff Fixed bug #54268 (Double free when destroy_zend_class fails) 2011-04-15 12:43:20 +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
b88f7753a1 Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF) 2010-10-13 08:51:39 +00:00
Dmitry Stogov
f4173a8ece Fixed bug #52939 (zend_call_function does not respect ZEND_SEND_PREFER_REF) 2010-10-13 08:51:39 +00:00
Dmitry Stogov
d3b6fbe39b Fixed bug #52940 (call_user_func_array still allows call-time pass-by-reference). (cataphract@php.net) 2010-10-01 11:53:04 +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
Dmitry Stogov
f0c8366a9e - use interned strings for auto globals
- $GLOBALS became a JIT autoglobal, so it's initialized only if used (this may affect opcode caches)
2010-07-08 14:05:11 +00:00
Dmitry Stogov
1a1178a685 eliminated unnecessary iterations during request startup/shutdown 2010-07-06 11:40:17 +00:00
Felipe Pena
c4be9c3890 - Fixed bug #51905 (ReflectionParameter fails if default value is an array with an access to self::) 2010-05-26 00:00:58 +00:00
Felipe Pena
79d2aaf0f1 - Fixed bug #51905 (ReflectionParameter fails if default value is an array with an access to self::) 2010-05-26 00:00:58 +00:00
Dmitry Stogov
3c179430ec Fixed crash in Zend/tests/unset_cv09.phpt 2010-04-26 13:51:46 +00:00
Antony Dovgal
a9a55f77c0 fix WS 2010-04-23 09:11:44 +00:00
Dmitry Stogov
f06d839e59 Use fast class fetch function 2010-04-23 08:56:03 +00:00
Stefan Marr
cd6415f1a9 Implemented Traits for PHP as proposed in the RFC [TRAITS]
# RFC http://wiki.php.net/rfc/horizontalreuse#traits_-_reuse_of_behavior
# Ok, here we go, I guess that will result in more discussion, which is fine
# by me. But now, the patch is here, and properly archived.
# 
# See below a list of notes to the patch, it also includes a list of
# points which should be fixed
# 
# Internals of the Traits Patch
# -----------------------------
# 
# Open TODOs
# """"""""""
# 
# - Reflection API
# - support for traits for internal classes
#   - currently destroy_zend_class does not handle that case 
# 
# Introduced Structures
# """""""""""""""""""""
# 
# Data structures to encode the composition information specified in the
# source:
#  - zend_trait_method_reference
#  - zend_trait_precedence
#  - zend_trait_alias
# 
# Changes
# """""""
# 
# zend_class_entry
#  - uses NULL terminated lists of pointers for
#    - trait_aliases
#    - trait_precedences
#    - do you prefer an explicit counter?
#    - the information is only necessary during class composition
#      but might be interesting for reflection
#    - did not want to blow up class further with not really necessary length counters
# 
# added keywords
#   - trait
#   - insteadof
# 
# Added opcodes
#  ZEND_ADD_TRAIT
#    - similar to ZEND_ADD_INTERFACE
#    - adds the trait to the list of traits of a class, no actual composition done
#  ZEND_BIND_TRAITS
#    - emitted in zend_do_end_class_declaration
#    - concludes the class definition and will initiate the trait composition
#      when the class definition is encountered during runtime
# 
# Added Flags
#   ZEND_ACC_TRAIT = 0x120
#   ZEND_ACC_IMPLEMENT_TRAITS = 0x400000
#   ZEND_FETCH_CLASS_TRAIT = 14
# 
# zend_vm_execute.h
#  - not sure whether the handler initialization (ZEND_ADD_TRAIT_SPEC_HANDLER,
#    ZEND_BIND_TRAITS_SPEC_HANDLER) is correct, maybe it should be more selective
# 
# zend_compile.c
#  - refactored do_inherit_method_check
#    split into do_inherit_method_check and do_inheritance_check_on_method
#  - added helper functions use a '_' as prefix and are not mentioned in the
#    headers
#  - _copy_functions
#    prepare hash-maps of functions which should be merged into a class
#    here the aliases are handled
#  - _merge_functions
#    builds a hash-table of the methods which need to be added to a class
#    does the conflict detection
#  - reused php_runkit_function_copy_ctor
#    - it is not identical with the original code anymore, needed to update it
#      think I fixed some bugs, not sure whether all have been reported back to runkit
#    - has to be renamed, left the name for the moment, to make its origin obvious
#    - here might be optimization potential
#    - not sure whether everything needs to be copied
#      - copying the literals might be broken
#        - added it since the literals array is freed by efree and gave problems
#          with doubled frees
#      - all immutable parts of the zend_op array should not be copied
#        - am not sure which parts are immutable
#        - and not sure how to avoid doubled frees on the same arrays on shutdown
#  - _merge_functions_to_class
#    does the final merging with the target class to handle inherited
#    and overridden methods
#  - small helper for NULL terminated lists
#    zend_init_list, zend_add_to_list
# 
# zend_language_parser.y
#  - reused class definition for traits
#    - there should be something with regard to properties
#      - if they get explicitly defined, it might be worthwhile to
#        check that there are no collisions with other traits in a composition
#        (however, I would not introduce elaborate language features to control that
#         but a notice for such conflicts might be nice to the developers)
2010-04-22 22:05:56 +00:00
Dmitry Stogov
453b49ed20 Added a number of small performance tweaks and optimizations
. ZEND_RECV now always has IS_CV as its result
  . ZEND_CATCH now has to be used only with constant class names
  . ZEND_FETCH_DIM_? may fetch array and dimension operans in a different order
2010-04-20 11:16:39 +00:00
Dmitry Stogov
dd5c478be6 Added concept of interned strings. All strings constants known at compile time are allocated in a single copy and never changed. 2010-04-20 11:05:54 +00:00
Dmitry Stogov
94dd83722b Changed the structure of op_array.opcodes. The constant values are moved from opcode operands into a separate literal table 2010-04-20 10:57:45 +00:00
Stanislav Malyshev
cf4ea31bff fix #51394 - try harder to find script lineno when exception happens 2010-04-01 19:36:56 +00:00
Stanislav Malyshev
a3857fd963 fix #51394 - try harder to find script lineno when exception happens 2010-04-01 19:36:56 +00:00
Felipe Pena
c302509726 - Fixed bug #50731 (Inconsistent namespaces sent to functions registered with spl_autoload_register) 2010-03-03 00:15:34 +00:00
Pierre Joye
5eb4db5e8f - Ensure that stderr output are not buffered, portability for tests 2010-01-25 14:47:19 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Stanislav Malyshev
fc1e17ee76 fix regression bug #50394: Reference argument converted to value in __call 2009-12-18 19:12:11 +00:00
Dmitry Stogov
10b30b51bc Fixed unnecessary invokation of setitimer when timeouts have been disabled (Arvind Srinivasan) 2009-11-05 09:33:19 +00:00
Moriyoshi Koizumi
b91e3db105 - WS fix (spaces to tabs) 2009-09-15 00:09:13 +00:00
Stanislav Malyshev
d6ba6c69fb fix crash when unexpectedly passed by-ref parameter is modified 2009-08-18 20:51:49 +00:00
Stanislav Malyshev
9fd8469e94 fix for bug #49000 2009-07-30 05:01:53 +00:00
Matt Wilmas
d55300298e MFH: Added zend_eval_stringl and made create_function(), etc. binary-safe 2009-06-05 18:50:32 +00:00
Matt Wilmas
b907aa4331 MFH:
Restored double->long conversion behavior to that of PHP 5.2 (on most platforms) and prior:
 * Out-of-range numbers overflow/preserve least significant bits (no LONG_MAX/MIN limit)
 * See bug #42868 (presumably-rare platform with different results in 5.2)
 * On 32-bit platforms with 64-bit long type, a zend_long64 cast has been added,
    otherwise it's the same as 5.2
 * Use this conversion method everywhere instead of some plain (long) casts

Added 'L' parameter parsing specifier to ensure a LONG_MAX/MIN limit:
 * Essentially what 5.3's new conversion was doing in most cases
 * Functions with "limit" or "length" type params could be updated to use this,
    and prevent confusing overflow behavior with huge numbers (*also* in 5.2)
  - See bug #47854, for example; or even #42868 again

# Test updates coming
2009-06-04 18:20:45 +00:00
Dmitry Stogov
c8e5bc5988 Calculate hash value once 2009-04-08 13:17:58 +00:00
Matt Wilmas
021e5d168f MFH: Removed extra space from eval string 2009-03-19 18:34:16 +00:00
Dmitry Stogov
c6e55db534 Forgotten include 2009-03-18 10:41:39 +00:00