Dmitry Stogov
8217e20ddb
Fixed compilation warnings
2014-07-15 15:51:40 +04:00
Xinchen Hui
b7ff8f28b2
Temporary fixed the invalid read warning
2014-07-14 14:01:53 +08:00
Dmitry Stogov
9d6e45a0ee
Changed zend_make_printable_zval() to return "use_copy" instead of additional reference argument.
...
Improved branch prediction.
2014-07-09 16:05:55 +04:00
Xinchen Hui
7614fe810e
C++ doesn't allow implicitly convert void * to other pointer type
2014-06-28 11:19:38 +08:00
Xinchen Hui
f609d8c1c6
C++ compiler doesn't allow cast a void * to other pointer type
2014-06-27 12:35:34 +08:00
Nikita Popov
65f488ece3
Add STR_ALLOCA_* API, use in get_method and verify_arg
...
This avoid unnecessary allocations when using dynamic method
dispatch and class typehints.
Probably there are other places where this should be done as well,
those just stood out for my usage.
2014-05-03 10:43:45 +02:00
Nikita Popov
08ae88157b
Allocate zend_strings with correct size
...
For me (32bit) sizeof(zend_string) is 20, which means that the
char[1] array at the end is padded with three bytes. Thus allocating
based on sizeof(zend_string)-1 overallocates by those 3 padding bytes.
This commit fixes the allocation size, by using XtOffsetOf.
2014-04-23 19:34:51 +02:00
Dmitry Stogov
f9b26bc39a
Cleanup (2-nd round)
2014-04-15 21:56:30 +04:00
Nikita Popov
a6be32f59a
IS_INTERNED is not always 0 in ZTS
...
The current implementation chooses to intern "" in ZTS. Either that
should be removed or IS_INTERNED needs to actually check the flag.
2014-04-09 23:54:03 +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
b7938ab1bd
Refactored GC (incomplete)
2014-03-19 17:00:28 +04:00
Dmitry Stogov
51494f252f
Don't include trailing zero into hash caclculation
2014-03-14 15:35:57 +04:00
Dmitry Stogov
557994d50d
Use better data structures (incomplete)
2014-02-19 01:12:05 +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
e2ea9a7319
Use better data structures (incomplete)
2014-02-12 11:42:27 +04:00
Xinchen Hui
3f4c877bf7
Use better data structures (incomplete)
2014-02-11 19:33:18 +08:00
Dmitry Stogov
f4cfaf36e2
Use better data structures (incomplete)
2014-02-10 10:04:30 +04:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Nikita Popov
8748e146b9
Fix intl build
2013-09-14 01:37:09 +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
Xinchen Hui
a666285bc2
Happy New Year
2013-01-01 16:37:09 +08:00
Gustavo André dos Santos Lopes
594397993d
Fix bug #62651 : source level BC break
...
Break for C++ extensions that don't wrap the includes of PHP libraries
in extern "C" {.
2012-07-27 01:39:06 +02:00
Felipe Pena
8775a37559
- Year++
2012-01-01 13:15:04 +00:00
Dmitry Stogov
e43ff1359e
Fixed ZE specific compile warnings (Bug #55629 )
2011-09-13 13:29:35 +00:00
Dmitry Stogov
b32445d4f3
Reverted Gopal's patch that allowed plugable interned string check
...
1. It introduced a significant slowdown
2. It didn't fix the real problem in APC (I'm goint to commit the fix)
2011-07-28 12:01:42 +00:00
Gopal Vijayaraghavan
8089b31002
merge to trunk - Allow zend_is_interned_string to be pluggable
2011-07-28 03:03:06 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +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
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
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