Commit Graph

502 Commits

Author SHA1 Message Date
Dmitry Stogov
702a2dfb3e Merge branch 'PHP-5.6'
* PHP-5.6:
  We can't eliminate FETCH_CONSTANT opcodes for constants represented by AST.

Conflicts:
	ext/opcache/Optimizer/pass1_5.c
2014-10-13 14:10:44 +04:00
Dmitry Stogov
7acba332fe We can't eliminate FETCH_CONSTANT opcodes for constants represented by AST. 2014-10-13 14:07:37 +04:00
Anatol Belski
e1cd0e0a38 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
  int to size_t where the underlaying API supports it
  use php_socket_t instead of int
  fix signed/unsigned mismatch warning
  fix compilation warning
  Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
  Add notes about get_class_entry/get_class_name to UPGRADING
  Fix casts in GD
  Drop redundant casting code from ext/filter
  update NEWS
  update NEWS
  update NEWS
  update NEWS
  Added note to UPGRADING regarding 64-bit support in pack()/unpack()
  pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Add 64 bit formats to pack() and unpack()
  Help to CPU branch predictor
  Removed unused EG(orig_error_reporting)
  Update get_class_name semantics
  Remove Z_OBJ_CLASS_NAME_P
  Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
  ...
2014-10-10 22:51:13 +02:00
Dmitry Stogov
9b0b30272f Copy all the arena allocated data from SHM to process memory at once 2014-10-09 14:01:19 +04:00
Anatol Belski
a91d3580a7 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  properly export tsrm_strtok_r()
  Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed).
  Fix accidental edit in previous commit
  Fix arginfo
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  Moved checks and error reporting related to static methods from DO_FCALL inti INTI_FCALL* opcodes that may really deal with static methods. (In some rare cases it may lead to different order of warning messages).
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
2014-10-05 19:26:17 +02:00
Dmitry Stogov
7c7b9184b1 Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed). 2014-10-05 13:02:58 +04:00
Anatol Belski
d624b0d5eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (26 commits)
  Micro optimization
  Drop unused INIT_STRING opcode
  Drop unused RAISE_ABSTRACT_ERROR opcode
  CT substitute unqualified true/false/null in namespaces
  Fix a couple compile warnings
  fix test filename
  one more test to illustrate transfer of an arbitrary data amount throug pipes
  fix tests on linux
  better test cleanup
  Use more readable inline functions
  increase the polling period to not to break existing behaviours
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever
  Fixed segfault
  Set an LDAP error code when failing ldap_bind due to null bytes
  Fix segmentation fault in debug_backtrace()
  Drop support for GMP 4.1
  Make gmp_setbit and gmp_clrbit return values consistent
  removed *.dsw and *.dsp files
  Opcache compatibility for coalesce operator
  ...
2014-10-01 01:33:46 +02:00
Nikita Popov
67a11b61cd Drop unused INIT_STRING opcode
INIT_STRING has been implemented as an UNUSED op1 to ADD_* for
some time now.
2014-09-29 22:59:57 +02:00
Nikita Popov
5bd34be604 Opcache compatibility for coalesce operator 2014-09-28 12:31:52 +02:00
Anatol Belski
ed6f24b92e cleanup TSRMLS_FETCH in ext/opcache 2014-09-26 21:50:27 +02:00
Dmitry Stogov
bd76544e15 Fixed optimizer bug 2014-09-26 01:37:33 +04:00
Dmitry Stogov
58a41cf795 Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR. 2014-09-24 01:57:40 +04:00
Dmitry Stogov
06103d65b1 Use zval_ptr_dtor_nogc() to free IS_TMP_VAR operands.
Removed ZEND_SWITCH_FREE opcode (ZEND_FREE used instead).
2014-09-23 17:21:29 +04:00
Dmitry Stogov
7cef08c5d1 Allocate copies of internal functions inherited in user classes at CG(arena), instead of permanent heap (malloc). 2014-09-23 12:35:42 +04:00
Dmitry Stogov
1e831439a5 Make internal function names to be interned strings 2014-09-23 12:35:16 +04:00
Dmitry Stogov
d244d3bbf1 Fixed typo 2014-09-23 01:04:47 +04:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Dmitry Stogov
551ee4165b Use runtime-cache to avoid hash lookups in BIND_GLOBAL instruction 2014-09-17 00:52:45 +04:00
Dmitry Stogov
f469dc7429 Improve opcache.fast_shutdown 2014-09-16 15:28:46 +04:00
Reeze Xia
dc9cd2d05e Indention fix
indent with tab instead of spaces
2014-09-14 08:24:00 +08:00
Dmitry Stogov
82096dc151 Removed ZEND_QM_ASSIGN_VAR and ZEND_JMP_SET_VAR opcodes (in PHPNG they did exacly the same as ZEND_QM_ASSIGN and ZEND_JMP_SET) 2014-09-11 12:29:54 +04:00
Dmitry Stogov
1981dd9c73 Revert "Removing ext/ereg and dependencies"
This reverts commit 86de7963fe.
2014-09-11 11:06:57 +04:00
Tjerk Meesters
86de7963fe Removing ext/ereg and dependencies
Affected extensions:
- opcache (use pcre)
- mbstring (removed ereg functions overloading)
- pgsql (use pcre)
- reflection (test cases using 'ereg')

SAPI:
- apache (header only)
- apache_hooks (header only)
2014-09-11 10:22:44 +08:00
Dmitry Stogov
a9d985263a We don't need to check for xlat entry twice 2014-09-09 00:40:14 +04:00
Dmitry Stogov
c59300ac86 Fixed GC problem (arrays may be recorded as possible root of garbage cycle. we have to clear this info before deleting array) 2014-09-09 00:12:36 +04:00
Dmitry Stogov
5c897aa7da Preallocate hash tables of required size 2014-09-03 18:21:36 +04:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Dmitry Stogov
3447d465af Use better hash functions 2014-08-28 17:47:40 +04:00
Dmitry Stogov
234af84c04 Refactored optimizer (compile different opimizer passes separately, instead of including *.c file) 2014-08-28 17:23:12 +04:00
Dmitry Stogov
f2b0370193 Use 'const' qualifier for pointrs to code used at run-time (the code must not be changed) 2014-08-28 02:44:06 +04:00
Anatol Belski
3234480827 first show to make 's' work with size_t 2014-08-27 20:49:31 +02:00
Dmitry Stogov
ee552b628c Reorder fields for better nenory consumtion and data locality on 64-bit systems 2014-08-27 22:45:27 +04:00
Dmitry Stogov
614bc31635 Fixed incorrect ZEND_INIT_FCALL_BY_NAME -> ZEND_INIT_FCALL conversion 2014-08-27 01:39:39 +04:00
Dmitry Stogov
9a05f2dad2 Fixed uint32_t overflow 2014-08-26 15:57:19 +04:00
Dmitry Stogov
055b632e7d Fixed return operand type (Use IS_TMP_VAR instead of IS_VAR in the same way as it was before AST patch) 2014-08-26 14:22:03 +04:00
Nikita Popov
59848e3fbb Remove ZEND_ACC_INTERACTIVE and CG(interactive)
As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.
2014-08-25 23:46:43 +02:00
Nikita Popov
899a1ed59a Merge branch 'ast'
Conflicts:
	Zend/zend_compile.c
2014-08-25 22:04:33 +02:00
Nikita Popov
6db293d5e0 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_globals.h
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_types.h
2014-08-25 21:52:18 +02:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
28b7a03318 master renamings phase 5 2014-08-25 21:20:44 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
fdbbe5fa30 fixed some incompatible types 2014-08-20 09:52:23 +02:00
Anatol Belski
476bdbf85b ported opcache 2014-08-20 00:23:37 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Nikita Popov
904a83a137 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	ext/opcache/Optimizer/optimize_func_calls.c
2014-08-16 22:31:13 +02:00
Nikita Popov
71675a4bf8 Merge remote-tracking branch 'php-src/phpng' into ast
Conflicts:
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_language_parser.y

Incomplete merge!
2014-08-16 21:55:08 +02:00
Nikita Popov
f72d6f97ec ZEND_INIT_FCALL_BY_NAME can have non-string literal 2014-08-15 22:55:15 +02:00
Nikita Popov
b511bf828c Fix typo 2014-08-15 22:13:38 +02:00
Nikita Popov
99878ced15 ZEND_STRLEN and ZEND_DEFINED have IS_VAR results for now
This avoids issues with calls being expected to have an IS_VAR
result
2014-08-15 22:07:46 +02:00
Nikita Popov
fbef2af2c3 Update opcache for new AST structures 2014-08-15 22:02:53 +02:00
Xinchen Hui
101c055396 Add copyright header 2014-08-15 16:47:54 +08:00
Xinchen Hui
e2522b4f1d Remove old version PHP supports 2014-08-15 16:40:07 +08:00
Dmitry Stogov
6463bc5b55 Fixed mode 2014-08-14 23:54:32 +04:00
Dmitry Stogov
c78a1734c2 Fixed compilation warnings 2014-08-14 23:53:27 +04:00
krakjoe
dc70139d85 update zend_make_printable_zval to take TSRM context 2014-08-11 06:09:46 +01: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
3700364ca5 Don't waste SHM for unused Buckets 2014-08-04 22:51:41 +04:00
Dmitry Stogov
415482ac0a Delete immutable arrays copied into SHM (related to bug #67725) 2014-08-04 20:20:12 +04:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Dmitry Stogov
8ad3445713 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed usage after free
2014-07-30 10:40:32 +04:00
Dmitry Stogov
43e956a9a1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed usage after free
2014-07-30 10:40:06 +04:00
Dmitry Stogov
aa3ddda8e5 Fixed usage after free 2014-07-30 10:39:25 +04:00
Dmitry Stogov
b4c2bd2277 Fixed compilation on Windows 2014-07-15 15:50:42 +04:00
Dmitry Stogov
af7cb16907 Implemented builtin instruction for strlen() 2014-07-14 15:43:11 +04:00
Dmitry Stogov
6c8db864e0 Implemented builtin instruction for strlen() 2014-07-11 18:52:27 +04:00
Dmitry Stogov
de306e7088 Implement call_user_func() and call_user_func_array() using special opcodes.
In some rare cases it leads to insignificant changes in error messages.
2014-07-11 00:32:18 +04: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
Dmitry Stogov
b36aaea6ed ZEND_SEND_VAR and ZEND_SEND_VAL specialization 2014-07-08 02:13:53 +04:00
Dmitry Stogov
bce6a36c8a Merge branch 'master' into test
* master: (48 commits)
  change locale - looks like not everybody has sl_SI
  Fix bug #66921 - Wrong argument type hint for function intltz_from_date_time_zone
  fix format
  Fix bug #67052 (NumberFormatter::parse() resets LC_NUMERIC setting)
  Make sure the generator script also creates a newline at the end of file
  Add newline at end of file to prevent compilation warning
  Fix handling of session user module custom handlers.
  Reference bug report instead of github issue in NEWS file
  add more exts for Travis
  Update NEWS
  Fix phpdbg.1 man page installation when build != src directory
  BFN for bug #67551 (php://input temp file will be located in sys_temp_dir instead of upload_tmp_dir)
  reorder
  restore API compatibility
  finish
  refactor php_stream_temp_create{,_ex} and use it for the php://input stream
  refactor _php_stream_fopen_{temporary_,tmp}file()
  fix length overflow of HTTP_RAW_POST_DATA
  Update NEWS
  Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen)
  ...

Conflicts:
	ext/opcache/zend_accelerator_util_funcs.c
	ext/session/mod_user.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/standard/file.c
	ext/standard/streamsfuncs.c
	ext/standard/string.c
	main/streams/memory.c
2014-07-07 19:21:23 +04:00
Dmitry Stogov
5aa91be509 Simplify call-frame handling 2014-07-07 15:50:44 +04:00
Xinchen Hui
a99e7eeab9 Merge branch 'PHP-5.6' 2014-07-03 14:59:24 +08:00
Xinchen Hui
4e16054b7a Merge branch 'PHP-5.5' into PHP-5.6 2014-07-03 14:58:53 +08:00
Xinchen Hui
2034ace052 Fixed bug #67215 (php-cgi work with opcache, may be segmentation fault happen) 2014-07-03 14:58:37 +08:00
Xinchen Hui
533b1df732 Add test for bug #67215
bjori> writing a testcase making sure you get a fatal error and does not
segfault after that... is difficult
2014-07-03 13:48:59 +08: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
63c057e331 Removed EG(opline_ptr) and use corresponding value from EG(current_execute_data) 2014-07-02 23:29:53 +04:00
Dmitry Stogov
4b09dd69e6 Removed EG(active_op_array) and use corresponding value from EG(current_execute_data) 2014-07-02 22:03:21 +04:00
Dmitry Stogov
43477bc7a2 Refactoring: use call_frames instead of call_slots 2014-06-24 02:17:16 +04:00
Dmitry Stogov
87b667221e Code cleanup 2014-06-20 19:40:03 +04:00
Dmitry Stogov
a4f38192ec Use arena allocator for optimizer temporary data structures 2014-06-18 17:09:37 +04:00
Dmitry Stogov
e1b18e59f7 Use arena allocator for zend_class_entry, zend_op_array and zend_property_info that live till the end of request 2014-06-18 02:47:01 +04:00
Dmitry Stogov
56731f68a7 Fixed HASH_FLAG_APPLY_PROTECTION flag usage 2014-06-17 13:53:23 +04:00
Dmitry Stogov
accaaf9d6e Don't include trailing zero into hash function 2014-06-17 02:59:00 +04:00
Dmitry Stogov
50cbd7f4ce Optimize out useles paths 2014-06-16 21:49:46 +04:00
Dmitry Stogov
14e6ee7f42 Use absolute addresses as branch targets for NEW, FE_RESET and FE_FETCH 2014-06-11 11:39:42 +04:00
Dmitry Stogov
15ba03fc80 Avoid repeatable zend_is_autogolobal() calls 2014-06-10 00:16:18 +04:00
Dmitry Stogov
9a9bb8877e Improved ZTS support 2014-06-09 21:29:20 +04:00
Dmitry Stogov
3f6f0d5a70 Simplified and optimized ZEND_HANDLE_NUMERIC() 2014-06-03 13:10:42 +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
0df38cdcb6 Merge branch 'master' into phpng 2014-05-26 17:32:53 +08:00
Xinchen Hui
cdacf4c90a Merge branch 'PHP-5.6' 2014-05-26 15:40:57 +08:00
Xinchen Hui
b0b0be176f Merge branch 'PHP-5.5' into PHP-5.6 2014-05-26 15:40:50 +08:00
Xinchen Hui
70699d7f68 Update NEWs and add a test 2014-05-26 15:40:26 +08:00
Dmitry Stogov
9dd66e4d53 Merge branch 'master' into phpng
* master:
  Fixed issue #183 (TMP_VAR is not only used once)
  Fix broken Junit output with --disable-cgi
  Added folder mark
  Further test fixes for the fdb2709 breakage.
  Fix broken test caused by fdb2709.
  Added tests for ZipArchive::addGlob() and ZipArchive::addPattern()
  Fix run-tests.php with Valgrind >= 3.10.0.
  Add microseconds to the serialised form of DateTime objects.
  Improved test for bug #62479
  fix typo in ODBC code
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  5.5.14 now
  Fix bug #67060: use default mode of 660

Conflicts:
	ext/date/php_date.c
2014-05-26 10:52:43 +04:00
Dmitry Stogov
347b430a03 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed issue #183 (TMP_VAR is not only used once)
2014-05-26 10:12:36 +04:00
Dmitry Stogov
24a86dbb6f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed issue #183 (TMP_VAR is not only used once)
2014-05-26 10:12:10 +04:00
Dmitry Stogov
19be8b676c Fixed issue #183 (TMP_VAR is not only used once) 2014-05-26 10:10:59 +04:00
Dmitry Stogov
b11a30f5ea Merge branch 'master' into phpng
* master:
  Support for __debugInfo (Joe Watkins)
  Optimize ZEND_POW (Rouven Weßling)
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  Prevent recursion in ZF2 Parameters class
  adding NEWS block for beta4
  5.4.30 next
  enable email notifications
  update NEWS
  update NEWS
  update NEWS
  - Updated to version 2014.3 (2014c)
  fix bug #67253: timelib_meridian_with_check out-of-bounds read
  Fix bug #67252: convert_uudecode out-of-bounds read
  Fix bug #67251 - date_parse_from_format out-of-bounds read
  Fix bug #67250 (iptcparse out-of-bounds read)

Conflicts:
	ext/opcache/zend_persist.c
	ext/spl/spl_array.c
2014-05-18 21:17:31 +04:00
Dmitry Stogov
91c475fc00 Merge branch 'PHP-5.6'
* PHP-5.6:
  Support for __debugInfo (Joe Watkins)
2014-05-18 20:56:34 +04:00
Dmitry Stogov
1d1fdfb51d Support for __debugInfo (Joe Watkins) 2014-05-18 20:55:40 +04:00
Dmitry Stogov
0019b512ff Merge branch 'PHP-5.6'
* PHP-5.6:
  Optimize ZEND_POW (Rouven Weßling)
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir

Conflicts:
	ext/opcache/ZendAccelerator.h
2014-05-18 20:51:37 +04:00
Dmitry Stogov
3fff53fc57 Optimize ZEND_POW (Rouven Weßling) 2014-05-18 20:48:16 +04:00
Xinchen Hui
eb5c613311 Fixed Zend Hash API usage (although it's in comments) 2014-05-18 12:05:36 +08:00
Dmitry Stogov
feeebc2e05 Fixed new hash API usage 2014-05-17 11:48:29 +04:00
Pierre Joye
a897591180 return ptr, not status 2014-05-15 20:14:29 +02:00
Dmitry Stogov
bc99c0debb Fixed hack. now we may store numbers not as pointers. 2014-05-15 14:00:49 +04:00
Dmitry Stogov
0c6a6f0fba Re-applyed Bob's patch with minor fixes 2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976 Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first). 2014-05-07 03:26:13 +04:00
Bob Weinand
f3c1881f1d Re-added fix for bug #66015 and adapted for phpng branch 2014-05-06 14:59:03 +02:00
Dmitry Stogov
0ea615fd10 Mark all strings stored in SHM as IS_INTERNED to avoid refcounting 2014-05-06 12:41:27 +04:00
Nikita Popov
b9438a1ec7 Fix use after free for doc_comment persist 2014-05-05 19:56:05 +02:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Dmitry Stogov
6a911e833f Optimized JMPZNZ to avoid multiplication at runtime (may be it makes sense to use relative addresses everywere it'll lead to Position Independent Code) 2014-04-30 11:23:19 +04: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
2c39cf670c Use appropriate macro 2014-04-25 11:29:35 +04:00
Dmitry Stogov
df7ca608ce Optimized constant lookup 2014-04-25 00:56:15 +04: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
Nikita Popov
20580a511c Fix ZTS build 2014-04-23 18:30:24 +02: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
afe66d89a1 Cleanup 2014-04-21 16:34:40 +04:00
Dmitry Stogov
3434d3fc98 Optimize CASE(TRUE, X) into BOOL(X) (this pattern affects wordpress) 2014-04-17 21:15:02 +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
Dmitry Stogov
c92dd8eedf Fixed ZEND_CAST related optimizations (now it returns IS_VAR instead of IS_TMP_VAR) 2014-04-17 11:12:47 +04:00
Dmitry Stogov
05817f1a93 Prevented unintended SHM modification 2014-04-16 21:01:11 +04:00
Dmitry Stogov
be60f90dd7 Set reference values of reference counters of not-interned strings when they are restored from SHM 2014-04-16 16:28:27 +04:00
Dmitry Stogov
a86eb10dae Fixed non-interned strings refcounting 2014-04-16 13:36:38 +04:00
Dmitry Stogov
f9b26bc39a Cleanup (2-nd round) 2014-04-15 21:56:30 +04:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00
Dmitry Stogov
cc50ebc487 Fixed memory leak 2014-04-14 23:53:25 +04:00
Dmitry Stogov
5dc52e4880 Fixed interface constants inheritance.
Now we use IS_REFERENCE for inhereted class constants.
I might miss some edje cases.
2014-04-14 13:24:43 +04:00
Bob Weinand
ccf863c8ce Merge branch 'PHP-5.6' 2014-04-11 19:35:11 +02:00
Bob Weinand
99d1a1bb3f Shut up, my lovely compiler; I do not like your warnings 2014-04-11 19:33:56 +02:00
Bob Weinand
9663193bbc Merge branch 'PHP-5.6' 2014-04-11 10:11:58 +02:00
Bob Weinand
f614fc6898 Fix bug #66015 by reverting "Removed operations on constant arrays." 2014-04-11 10:08:44 +02:00
Dmitry Stogov
479f520d14 Fixed store of "shared" zend_strings 2014-04-09 09:43:42 +04:00
Dmitry Stogov
7402af380b Fixed destruction of objects and iterators on unclean request shutdown and GC (few cases are still unfixed).
Now we destroy objects it two steps. At first - object properties of all objects and only then the objects their selves.
2014-04-09 01:50:15 +04:00
Dmitry Stogov
3167b49ce9 Allocate HashTable->arData and HashTable->arHash at once 2014-04-07 18:22:03 +04:00
Dmitry Stogov
66b3b907c2 Cleanup 2014-04-07 16:50:41 +04: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
3b25faa4aa Fixed 0 index handling 2014-04-02 12:09:05 +04:00
Dmitry Stogov
8dedaf8512 Use interned strings for one character strings 2014-04-01 18:06:50 +04:00
Dmitry Stogov
7eff369ba9 Store constant flags 2014-04-01 16:30:13 +04:00
Dmitry Stogov
0da12b9273 Fixed script size calculation 2014-04-01 13:04:33 +04:00
Dmitry Stogov
569bfbd00b Keep constnat flags 2014-04-01 12:20:16 +04:00
Dmitry Stogov
ceecd31cb6 Fixed support for arg_info and type hinfing (TODO: names should be interned) 2014-04-01 11:44:11 +04:00