Commit graph

154 commits

Author SHA1 Message Date
Dmitry Stogov
02e6c9c757 ZVAL_COPY_UNREF() micro-optimization 2017-06-02 00:38:09 +03:00
Dmitry Stogov
476866783c Keep Z_IMMUTABLE*() macros for compatibility 2017-05-02 10:00:54 +03:00
Dmitry Stogov
0631b9e9ba Merge branch 'PHP-7.1'
* PHP-7.1:
  typo
2017-02-01 17:38:12 +03:00
Dmitry Stogov
ddf41b505c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  typo
2017-02-01 17:37:40 +03:00
Dmitry Stogov
3f89b630b4 typo 2017-02-01 17:36:55 +03:00
Dmitry Stogov
8456351a4e Merge branch 'PHP-7.1'
* PHP-7.1:
  fixed macro
2017-02-01 16:06:17 +03:00
Dmitry Stogov
8f7f8d3f9b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fixed macro
2017-02-01 16:05:57 +03:00
Dmitry Stogov
15e9aa1706 fixed macro 2017-02-01 16:05:33 +03:00
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +03:00
Nikita Popov
fc89c5d7f8 Merge branch 'PHP-7.1' 2017-01-05 00:50:12 +01:00
Nikita Popov
49d90dcc4d Add Z_EXTRA macro
For use with u2 values which don't deserve a custom macro...
2017-01-05 00:49:19 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
3e9bb03a62 Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUED) 2016-11-28 22:59:57 +03:00
Dmitry Stogov
d6c332eb51 Turn IS_TYPE_COLLECTABLE zval flag into GC_COLLECTABLE zend_refcounted flag.
This simplifies checks and allows reset this flag for "acyclic" arrays and objects.
2016-10-21 17:47:30 +03:00
Dmitry Stogov
9ded1b4edb Introduced HT_IS_PACKED() and HT_IS_WITHOUT_HOLES() macros. (Benjamin Coutu) 2016-10-19 23:10:42 +03:00
Dmitry Stogov
023b812593 Fixed bug #72543 (Different references behavior comparing to PHP 5) 2016-07-06 20:46:43 +03:00
Aaron Piotrowski
72692e9a9c Add iterable pseudo-type 2016-06-03 17:42:04 -05:00
Dmitry Stogov
6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Dmitry Stogov
e88c71d356 Optimize property guards for the most usual case with only one acive guard. 2016-04-27 00:24:20 +03:00
Nikita Popov
64f91774f2 Remove IS_VAR_RET_REF flag
Instead decide whether a function returned by reference or by value
by checking whether the return value has REFERENCE type. This means
that functions returning by reference must always return a reference
and functions returning by value must not return a reference.
2016-04-15 15:32:20 +02:00
Dmitry Stogov
eaf489ac2b Optimize ASSIGN_DIM (separate common unspecializeble code into helper functions). 2016-04-12 19:36:24 +03:00
Dmitry Stogov
d510255879 Rename IS_ERROR into _IS_ERROR (to prevent redefinition on Windows). 2016-02-01 11:12:28 +03:00
Dmitry Stogov
86f54fcdf7 Use special type IS_ERROR instread of EG(error_zval). (we still need EG(error_zval) for SPL support). 2016-01-28 18:00:06 +03:00
Xinchen Hui
563659822d Merge branch 'PHP-7.0' 2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Nikita Popov
65e456f364 Introduce BIND_LEXICAL
This opcodes inserts a local CV into the closure static variable
table. This replaces the previous mechanism of having static
variables marked as LEXICAL, which perform a symtable lookup
during copying.

This means a) functions which contain closures no longer have to
rebuild their symtable (better performance) and b) we can now track
used variables in SSA.
2015-12-29 23:14:53 +01:00
Xinchen Hui
3ed5e54a19 Remove unused IS_TYPE_SYMBOLTABLE 2015-12-16 12:11:55 +08:00
Dmitry Stogov
a75c195000 Implemented the RFC Support Class Constant Visibility.
Squashed commit of the following:

commit f11ca0e7a5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Dec 8 12:38:42 2015 +0300

    Fixed test expectation

commit 211f873f54
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Dec 8 12:28:38 2015 +0300

    Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags

commit 51deab84b2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Dec 7 11:18:55 2015 +0300

    Fixed issues found by Nikita

commit 544dbd5b47
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Sat Dec 5 02:41:05 2015 +0300

    Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility
    @reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
2015-12-08 12:40:42 +03:00
Andrea Faulds
366ba41334 Add void return type 2015-11-18 17:30:49 +00:00
Dmitry Stogov
c49d3189b1 Cleanup: removed comments (zend_object.handle and zend_resource.handle are not going to be removed in PHP-7.0) 2015-09-22 15:56:52 +03:00
Dmitry Stogov
37f0c6b5cb Add myself into list of authors of the most refactored files. 2015-08-31 11:38:16 +03:00
Xinchen Hui
66866fb838 Simplify the macro (HT_DATA_SIZE/HT_HASH_SIZE is not used outside Zend) 2015-08-13 23:38:39 +08:00
Dmitry Stogov
715d5d2855 Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Xinchen Hui
a089ce0cc6 Fixed bug #70258 and #70253 2015-08-13 12:08:57 +08:00
Xinchen Hui
89940993f0 Fixed Bug #70173 (ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc) 2015-08-10 22:58:58 +08:00
Christoph M. Becker
79f64e5e67 Fix #70173: ZVAL_COPY_VALUE_EX broken for 32bit Solaris Sparc
On 32bit big endian architectures the high word of a zend_value is copied
twice, instead of copying both words. Let's fix it.
2015-08-09 15:01:37 +02:00
Anatol Belski
859507c9af add one more thread storage specifier to allow external link 2015-07-29 17:26:52 +02:00
Anatol Belski
5c98b9972f improve ZEND_TLS declaration even more and move it to the better place 2015-07-28 16:59:53 +02:00
Xinchen Hui
95ff2852ee Micro optimization 2015-07-10 16:39:21 +08:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Xinchen Hui
dc329cd5dc Make the tail slash algined 2015-06-16 11:33:44 +08:00
Dreamsxin
73031d92ce Fix invalid conversion about emalloc 2015-06-16 11:12:37 +08:00
Dmitry Stogov
8a089e7e71 Call zend_array_dup() instead of zval_copy_ctor(). 2015-06-02 12:03:34 +03:00
Dmitry Stogov
1654442ac3 Fixed integer overflow during HashTable size calculation 2015-06-01 10:51:06 +03:00
Nikita Popov
f3dde29394 Fixes for x32 ABI
I'm assuming that we want to have 64bit zend_longs on x32 here.

This fixes two typos in __x86_64__ macros and adds sign-extension
when assigning STREAM_COPY_ALL to zend_long.
2015-05-23 21:18:33 +02:00
Dmitry Stogov
d72a94468e Merged FE_FETCH_R[W] with the following ASSIGN[_REF] when assigne to CV. 2015-05-13 12:55:42 +03:00
Dmitry Stogov
6718b56e45 Change the GC approach to inner-loops handling. Switch to less efficient but more robust algorithm. Destructors handling is still not completely accurate. 2015-04-17 18:35:57 +03:00
Dmitry Stogov
276080ec3a Added GC checks and improvements 2015-04-17 03:55:37 +03:00