Commit Graph

477 Commits

Author SHA1 Message Date
Stanislav Malyshev
dd15207dc5 Merge branch 'pull-request/945'
* pull-request/945:
  Update zend_accelerator_hash.c
  hashmap sizes
  Wasted Shared Memory aboce 2Gb fix
2015-01-31 23:10:37 -08:00
Xinchen Hui
a1d9ceac7a Fixed annoying warnings 2015-01-29 11:59:37 +08:00
Xinchen Hui
659395e3dd Merge branch 'master' of https://git.php.net/repository/php-src 2015-01-29 00:01:24 +08:00
Levi Morrison
c8576c5a46 Implement return types
RFC is documented here: https://wiki.php.net/rfc/return_types
2015-01-27 11:49:56 -07:00
Xinchen Hui
1828ec21e2 Fixed some annoying warnings 2015-01-27 23:28:31 +08:00
Xinchen Hui
201f660ae1 Merge branch 'PHP-5.6' 2015-01-22 16:39:22 +08:00
Xinchen Hui
d0928b7f97 Merge branch 'PHP-5.5' into PHP-5.6 2015-01-22 16:39:03 +08:00
Xinchen Hui
251745c012 Fixed segfault while running with moodle 2015-01-22 16:38:34 +08:00
Xinchen Hui
88e88426df Merge branch 'PHP-5.6' 2015-01-21 11:18:27 +08:00
Xinchen Hui
57ff5a4e6f Merge branch 'PHP-5.5' into PHP-5.6 2015-01-21 11:18:08 +08:00
Xinchen Hui
20e5911d82 Fixed test fails 2015-01-21 11:17:49 +08:00
Dmitry Stogov
22ac15e6c9 Improve optimization of CONCAT/ADD_STRING/ADD_CJAR sequences 2015-01-19 17:01:30 +03:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Dmitry Stogov
2387771daf Slight improvement in copying script from opcache SHM into process memory 2015-01-12 23:51:40 +03:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Xinchen Hui
aa5b3b0e4a Merge branch 'PHP-5.6' 2015-01-09 11:54:01 +08:00
Xinchen Hui
0547edb5c2 Fixed bug (try block removed while combined with xdebug) 2015-01-09 11:53:47 +08:00
Xinchen Hui
777c39f404 Fixed #68677 2015-01-08 16:32:20 +08:00
Dmitry Stogov
37466b0368 Use special flag (HASH_FLAG_INITIALIZED) instead of (nTableMask == 0) to indicate that HashTable is allocated.
Make nTableMask to be 0 for packed arrays.
Remove checks fo HASH_FLAG_PACKED in zend_hash_find/zend_hash_del and family (string keys are resolved through uninitialized_bucket).
Change HashTable layout for better locality.
2014-12-27 11:07:12 +03:00
Dmitry Stogov
814df43fb9 Reimplemented used stack size recalculation (replaced 3d4babdc2b) 2014-12-26 12:42:38 +03:00
Xinchen Hui
3d4babdc2b Adjust tempoary variable used in caller's side 2014-12-25 14:57:58 +08:00
Xinchen Hui
e0ca75a454 No need to do this check for master, ZEND_COMPILE_NO_BUILTIN_STRLEN already cover it 2014-12-24 20:42:17 +08:00
Dmitry Stogov
c42ac09518 Added new API function 'zend_string* zend_string_tolower(zend_string*)'.
It simplifies code and avoids unnecessary allocation and copying if string is already in lower case.
2014-12-24 15:04:51 +03:00
Xinchen Hui
d4f89fbda4 Merge branch 'PHP-5.6'
Conflicts:
	ext/opcache/Optimizer/pass1_5.c
2014-12-24 18:30:06 +08:00
Xinchen Hui
bba4a8aad5 Fixed bug #68644 (strlen incorrect : mbstring + func_overload=2 +UTF-8 + Opcache) 2014-12-24 17:55:58 +08:00
Dmitry Stogov
2646f7bcb9 Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code. 2014-12-22 16:44:39 +03:00
Xinchen Hui
b5b617674e Micro optimaztion (yeah, I know compiler supposed to do that) 2014-12-22 00:10:46 -05:00
Adrian
bdb2d49071 Update zend_accelerator_hash.c 2014-12-21 15:22:49 +01:00
Nikita Popov
c94f62d0d9 Merge branch 'PHP-5.6'
Conflicts:
	ext/opcache/Optimizer/pass2.c
2014-12-19 21:51:05 +01:00
Nikita Popov
87ccf50bad Merge branch 'PHP-5.5' into PHP-5.6 2014-12-19 21:46:38 +01:00
Nikita Popov
aa394e70ff Fix bug #67111
Loop variables need to be freed for both "break" and "continue".

I'm adding the test to Zend/ because it's good to have a test for
this even without opcache.
2014-12-19 21:42:42 +01:00
Nikita Popov
0f815642e0 Drop ZEND_PRINT opcode in favor of ZEND_ECHO
The return value long(1) is an IS_CONST operand now.
2014-12-18 14:39:40 +01:00
Anatol Belski
e8acb9ff26 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fix integral constant overflow warning
  Use HUGE PAGES for opcahce SHM, if available.
2014-12-17 17:46:48 +01:00
Dmitry Stogov
12ce17c47e Use HUGE PAGES for opcahce SHM, if available. 2014-12-17 14:59:08 +03:00
Anatol Belski
e112f6a04e second shot on removing TSRMLS_* 2014-12-14 14:07:59 +01:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
dfb18b1188 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  updated NEWS
  PowerPC64 support for add and sub with overflow check
  PowerPC64 support for operators with overflow check
  Fixed bug #68583 Crash in timeout thread
  Reduced size of zend_op on 64-bit systems.
  Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution.
  Removed unused variables
  Improved array_merge() and array_replace() (1-st array may be added using simple procedure).
  Replaced zendi_convert_to_long() with _zval_get_long_func()
  Moved zend_is_true() from zend_execute.h/zend_execute_API.c into zend_operators.h/zend_operators.c. Splited the most expensive part of inline i_zend_is_true() into a separate zend_object_is_true(). Replaced zendi_convert_to_long() with cals to zend_is_true().
  Revert "Save one xor instr"
  Save one xor instr

Conflicts:
	Zend/zend_execute_API.c
2014-12-12 14:25:59 +01:00
Dmitry Stogov
14e29f5146 Reduced size of zend_op on 64-bit systems.
the main idea - the smaller the zend_op structure, the lees memory traffic is required to load VM instructions during execution. The patch reduces the size of each opcode from 48 to 32 bytes (saves 16 bytes for each opcode, and applications use thousands of opoceds). This reduced the number of CPU cache misses by 12% and improved performance of real-life apps by 1-2%.

The patch affects how constants and jump targets are represented in VM during execution. Previously they were implemented as absolute 64-bit pointers. Now they are relative 32-bit offsets.

In run-time constant now should be accessed as:
  RT_CONSTANT(op_array, opine->op1) instead of opline->op1.zv
  EX_CONSTANT(opline->op1) instead of opline->op1.zv

Jump targets:
  OP_JMP_ADDR(opline, opline->op2) instead of opline->op2.jmp_addr

The patch doesn't change zend_op representation for 32-bit systems. They still use absolute addresses. The compile-time representation is also kept the same.
2014-12-12 10:19:41 +03:00
Dmitry Stogov
9ea35a37b9 Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution. 2014-12-12 09:01:42 +03:00
Adrian
3141922321 hashmap sizes 2014-12-08 13:54:12 +01:00
Adrian
9995452583 Wasted Shared Memory aboce 2Gb fix 2014-12-08 13:14:15 +01:00
Anatol Belski
88bb9fedc4 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (111 commits)
  Fix zend_fcall_info_arg*() to use ZVAL_COPY
  Fixed #65213 - cannot cast SplFileInfo to boolean
  add initial install
  switch to C travis project instead of PHP
  use the generic TRAVIS environment var to check for travis (see http://docs.travis-ci.com/user/ci-environment/)
  fix TS build
  add config option to target codegen architectures
  updated NEWS
  updated NEWS
  Fixed bug #55541 errors spawn MessageBox, which blocks test automation
  Get rid of duplicate handlers (ZEND_ADD_SPEC_TMP_TMP and ZEND_ADD_SPEC_VAR_VAR are absolutely the same).
  Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*.
  Fixed __debugInfo() support
  Update UPGRADING for the new variadic functions, and re-sort.
  Improved POST INC/DEC
  make sure that we don't truncate the stack trace and cause false test failures when the test is executed in a directory with long path
  Missed closed folder mark
  Revert "Unecessary assignment"
  Fixed improper memory release
  Unecessary assignment
  ...
2014-12-05 03:50:02 +01:00
Dmitry Stogov
5dd427eac2 Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*. 2014-12-03 16:56:09 +03:00
Dmitry Stogov
cd68c4b1d2 Fixed __debugInfo() support 2014-12-03 12:13:01 +03:00
Dmitry Stogov
dcfe58773e Rename EX_VAR_2() into ZEND_CALL_VAR() and EX_VAR_NUM_2() into ZEND_CALL_VAR_NUM(). 2014-11-28 11:11:33 +03:00
Anatol Belski
864cd82ace Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  updated NEWS
  refactored the mbstring config.w32
  Update NEWS
  Fixed compilation warnings
  Fixed bug #68504 --with-libmbfl configure option not present on Windows
  Changed "finally" handling. Removed EX(fast_ret) and EX(delayed_exception). Allocate and use additional IS_TMP_VAR slot on VM stack instead.
  the darwin specific test fails for me with the same output which is the expected for the original test I couldn't find anybody who managed to see this test passing, but I found a bunch of other reports on qa.php.net/reports and on google which do see this test failing on mac. if this change causes you to have this test failing on Mac, please drop me a mail so we can improve the current test so it passes for everybody.
  #68446 is fixed
  Reimplemented silence operator (@) handling on exceptions. Now each silence region is stored in op_array->brk_cont_array. On exception ZEND_HANDLE_EXCEPTION handler traverse this array and restore original EG(error_reporting) if exception occured inside a "silence" region.
  remove the NEWS entries for the reverted stuff
  typo fix
  go back with phpdbg to the state of 5.6.3, reverting the controversial commits(remote debugging/xml protocol)
  5.5.21 now
  New label length test
  Fix ext/filter/tests/033.phpt
  Fix filter_list test
  FILTER_VALIDATE_DOMAIN and RFC conformance for FILTER_VALIDATE_URL

Conflicts:
	ext/mbstring/config.w32
2014-11-27 15:59:43 +01:00
Dmitry Stogov
303d73ecd2 Reimplemented silence operator (@) handling on exceptions. Now each silence region is stored in op_array->brk_cont_array. On exception ZEND_HANDLE_EXCEPTION handler traverse this array and restore original EG(error_reporting) if exception occured inside a "silence" region. 2014-11-26 22:44:58 +03:00
Anatol Belski
3ca0ca1548 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (102 commits)
  fix dir separator in test
  fix TS build
  fix TS build
  Better fix for bug #68446
  Revert "Merge remote-tracking branch 'origin/PHP-5.6'"
  Revert NEWS and set test to XFAIL
  Revert "Fix bug #68446 (bug with constant defaults and type hints)"
  Improved zend_hash_clean() and added new optimized zend_symtable_clean()
  Use inline version of zval_ptr_dtor()
  Added new optimized zend_array_destroy() function
  Moved i_zval_ptr_dtor() from zend_execute.h to zend_variables.h
  fix REGISTER_NS_*_CONSTANT macros
  Removed useless assert. EG(uninitialized_zval) can't be refcounted.
  Use specialized destructors when types of zvals are known.
  move tests into proper place
  Improved assignment to object property
  Reuse zend_assign_to_variable() in zend_std_write_property()
  cleanup comments from svn/cvs era
  fix dir separator in test
  fork test for windows
  ...
2014-11-26 08:17:35 +01:00