Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Dmitry Stogov
f25ecdacf8
shutdown_executor() refactoring (reuse opcache fast request shutdown code)
2017-06-22 01:45:28 +03:00
Nikita Popov
6ad0a6fb04
Merge branch 'PHP-7.1'
2017-03-15 19:50:26 +01:00
Nikita Popov
2bba4a0d7f
Fix bug #69676
2017-03-15 19:49:02 +01:00
Anatol Belski
c698299550
Interned strings unification for TS/NTS
...
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings
- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end
There is no runtime interning.
With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Dmitry Stogov
503c32e06e
Export zend_quick_get_constant()
2016-11-29 11:07:49 +03:00
Nikita Popov
ec6d70db77
Fix leak on self-referencing constants
2016-08-03 23:10:09 +02:00
Dmitry Stogov
c19cb70dac
Revert "Refactor zval cleanup into single function"
...
This reverts commit bac6fdb0c5
.
2016-05-06 10:47:58 +03:00
Bob Weinand
bac6fdb0c5
Refactor zval cleanup into single function
...
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Nikita Popov
0ce7189265
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_constants.c
2016-05-02 20:04:24 +02:00
Nikita Popov
ec7c3c22b6
Fix leak in zend_get_constant_ex
2016-05-02 19:59:43 +02: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
a186ac0e47
IS_CONST operands don't have to be separated. Use reference-counting instead of duplication.
...
- with opcache all IS_CONST operands are not refcounted (scalars, interned strings or immutable arrays)
- without opcache IS_CONST operands are not shared between processes or threads and may use common reference counters
2016-04-05 20:09:14 +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
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
Dmitry Stogov
e58682a2c4
Fixed incorrect type usage
2015-10-28 10:26:47 +03:00
Aaron Piotrowski
5df893ce3c
Use NULL where possible for exception class
...
Matches usage of zend_throw_exception()/zend_throw_exception_ex().
2015-07-07 12:10:55 -05:00
Aaron Piotrowski
22c38b2ef5
Remove need to pass error level
2015-07-03 17:53:41 -05:00
Aaron Piotrowski
5a99c07ecc
Enable throwing custom exceptions from errors
2015-07-03 17:53:40 -05:00
Dmitry Stogov
7aa7627172
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 13:59:27 +03:00
Dmitry Stogov
49cf7c5d12
Don't propogate "fake" EX(called_scope) and EX(This) into each internal function.
...
They need quite seldom and it's cheaper to get them from corresponfing upper stack frame.
2015-04-23 12:16:37 +03:00
Dmitry Stogov
ea09a9fa32
Convert fatal errors into EngineExceptions
...
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Dmitry Stogov
ec760d8fff
Convert fatal errors into EngineExceptions
2015-04-01 20:01:57 +03:00
Dmitry Stogov
acfc31c0f8
Use zend_error_noreturn() for fatal errors
2015-04-01 13:32:23 +03:00
Dmitry Stogov
4e11095438
Reimplemented special constant handling. Now __HALT_COMPILER_OFFSET__ is resolved at compile-time. __CLASS__ retrived using separate ZEND_FETCH_CLASS_NAME opcode.
2015-03-18 15:33:56 +03:00
Dmitry Stogov
65b7f4860e
Revert "Improved zend_get_special_constant"
...
This reverts commit 624eb49e78
.
2015-03-18 15:25:27 +03:00
Xinchen Hui
624eb49e78
Improved zend_get_special_constant
2015-03-18 12:22:07 +08:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48
first shot remove TSRMLS_* things
2014-12-13 23:06:14 +01:00
Anatol Belski
283947af74
fix datatype mismatches
...
and convert APIs to size_t where zend_string internally used
2014-10-24 20:50:08 +02:00
Dmitry Stogov
bccc653185
Avoid double IS_INTERNED() check
2014-09-19 17:32:50 +04:00
Anatol Belski
c3e3c98ec6
master renames phase 1
2014-08-25 19:24:55 +02:00
Anatol Belski
5bb25776a0
further fixes on core
2014-08-16 15:34:04 +02:00
Anatol Belski
8ee2a4a9b5
first shot on merging the core fro the int64 branch
2014-08-16 11:16:11 +02:00
Dmitry Stogov
ce1af1e47b
Fixed bug #67725 (now we create immutable arrays only in SHM)
2014-08-05 15:38:43 +04:00
Dmitry Stogov
466816d4ef
Fixed string destruction (class_name might be reused and stored somewhere in __autoload()).
2014-07-24 14:11:21 +04:00
Dmitry Stogov
c4d99ec982
Removed EG(called_scope) and use corresponding value from EG(current_execute_data)
2014-07-03 02:34:43 +04:00
Dmitry Stogov
0a77dcd4b9
Removed EG(in_execution). If EG(currentent_execute_data) is not NULL we are executing something.
2014-07-03 01:02:25 +04:00
Dmitry Stogov
b3b616cf7e
Introduced immutable arrays. They don't need to be copyed and may be used directly from SHM.
2014-05-29 18:21:56 +04:00
Xinchen Hui
922285ec55
Don't use cast (compiler friendly)
2014-05-26 11:05:04 +08: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
df7ca608ce
Optimized constant lookup
2014-04-25 00:56:15 +04:00
Dmitry Stogov
5864ce8a44
Fixed compilation warnings
2014-04-22 17:46:34 +04:00
Dmitry Stogov
72c287bd23
Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word
2014-04-21 18:25:34 +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