Dmitry Stogov
17d027ed47
Split IS_BOOL into IS_FALSE and IS_TRUE
2014-04-30 18:32:42 +04:00
Nikita Popov
5db9312ec8
Add dst parameter to convert_object_to_type macro
...
Avoids a ZVAL_DUP in the zval_get_* functions.
Also improve object-to-array cast a bit by initializing the array
with correct number of elements and not doing a alloc-init-free
cycle when convert_object_to_type succeeds.
2014-04-25 23:21:05 +02:00
Nikita Popov
778946b3b6
Use convert_scalar_to_array only for arrays
2014-04-25 23:21:05 +02:00
Nikita Popov
93f9518a58
Align zval_get_long/double with zval_get_string
2014-04-25 23:21:04 +02: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
Dmitry Stogov
fa588a5c82
Use shorter call chain
2014-04-22 02:34:34 +04:00
Dmitry Stogov
4ed452c1b5
Convert zval_get_string() into "fast path" macro and "slow path" function
2014-04-21 22:36:01 +04:00
Dmitry Stogov
8ad8254a16
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
2014-04-21 21:39:15 +04:00
Nikita Popov
0d43a277b8
Use zval_get_string in a few more places
2014-04-21 17:55:58 +02:00
Nikita Popov
5c8697184f
Bring zval_get_string implement in line with make_printable_zval
...
As make_printable_zval is the "main" string cast, match that one.
2014-04-21 17:55:58 +02:00
Dmitry Stogov
72c287bd23
Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word
2014-04-21 18:25:34 +04:00
Nikita Popov
7a1a6092f6
Add functions for extracting long/double/string from zval
...
These function get the long / double / string value of a zval with
usual cast semantics, but without actually modifying the zval.
Didn't go on a killing spree for convert_to_* yet...
2014-04-15 20:32:47 +02: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
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
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
a25a1ba0ef
STR_DUP() doesn't duplicate interned strings anymore. In case new string is required STR_INIT() or STR_ALLOC() should be used.
2014-04-01 16:31:03 +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
b7938ab1bd
Refactored GC (incomplete)
2014-03-19 17:00:28 +04:00
Dmitry Stogov
5f861768d6
Fixed reference conversion
2014-03-13 22:07:14 +04:00
Xinchen Hui
ecc0687398
Fixed IS_REFERENCE handling in sort()
2014-03-07 13:51:39 +08:00
Xinchen Hui
ef01b7937e
Fixed wrong hash value in ext/standard/tests/array/array_combine.php
2014-03-05 18:39:20 +08:00
Xinchen Hui
dc889b69ef
Fixed segfault (op2 maybe equal to result)
2014-03-05 15:43:57 +08:00
Dmitry Stogov
b965647e44
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
...
Conflicts:
Zend/zend_object_handlers.c
2014-02-25 15:23:06 +04:00
Xinchen Hui
f298ade89a
Fixed wrong hash_zval_identical_function
2014-02-25 18:20:35 +08:00
Dmitry Stogov
820184dd00
Fixed converting IS_REFERENCE to string
2014-02-25 13:21:03 +04:00
Xinchen Hui
d35a068aa6
Fixed array comparation
2014-02-25 12:31:35 +08:00
Dmitry Stogov
760fe72af6
Fixed comparison od references
2014-02-24 17:29:28 +04:00
Dmitry Stogov
1770ace249
Fixed object to string conversion
2014-02-24 13:49:53 +04:00
Dmitry Stogov
844887ed56
Fixed IS_RESOURCE handling
2014-02-24 13:12:53 +04:00
Xinchen Hui
91e2a91396
Missing handling of IS_REF in ext/standard/tests/strings/bug47842.php
2014-02-23 19:36:38 +08:00
Dmitry Stogov
6454684212
Use better data structures (incomplete)
2014-02-21 22:59:51 +04:00
Dmitry Stogov
52bd62eca8
Fixed assertions
2014-02-21 20:35:40 +04:00
Dmitry Stogov
8bae1daa0c
Use better data structures (incomplete)
2014-02-19 14:35:28 +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
Dmitry Stogov
2b9b9afa7a
Use better data structures (incomplete)
2014-02-17 17:59:18 +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
Bob Weinand
363ff60475
Fixed memory leak in pow operator
2014-02-06 21:31:40 +01:00
datibbaw
aff56f3c45
add T_POW (**) operator
...
Fixed recognition of the operator
Added opcode, still doing multiply instead of pow()
opcode now always returns int(42)
The right answer, but always a float
Yanked code from pow() implementation.
Should not handle negative long as exponent ourselves
Added test cases from pow()
Moved precedence higher than '~'
Added GMP operator overloading
Added ZEND_ASSIGN_POW (**=) operator.
Added pow() as a language construct.
Adjusted test cases for changed precedence.
Reduced pow() to shell function around ZEND_API pow_function()
Reduced test case to only contain edge cases
Added overloading test case
Moved unary minus above T_POW
Revert "Added pow() as a language construct."
Bad bad bad idea.
This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02.
Reverted unary minus behaviour due to previous revert.
Convert arrays to int(0)
Exponent with array as a base becomes int(0)
Rebase against master
Fixed tokenizer test case
2014-02-06 14:41:21 +01:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08: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
Xinchen Hui
72f80b2997
Merge branch 'PHP-5.5'
2013-08-27 15:45:27 +08:00
Xinchen Hui
0119bbba6b
Fixed compiler warnings
...
warning: 'local_dval' may be used uninitialized in this function
[-Wmaybe-uninitialized]
warning: 'dval2' may be used uninitialized in this function
[-Wmaybe-uninitialized]
2013-08-27 15:44:30 +08:00
Nikita Popov
3823321c5c
Implement internal operator overloading
...
As pre RFC https://wiki.php.net/rfc/operator_overloading_gmp
2013-06-17 17:48:13 +02:00
Stanislav Malyshev
02e4d7a290
Merge branch 'pull-request/341'
...
* pull-request/341: (23 commits)
typofixes
2013-06-10 14:30:59 -07:00
Adam Harvey
be1700d467
Fix compile failure introduced by the fix for bug #46408 .
2013-01-15 10:08:26 +08:00