Dmitry Stogov
83aa742dde
Removed unused array
2018-01-09 23:17:10 +03:00
Dmitry Stogov
09b1bfecee
Allow commas in specializer conditions
2018-01-09 15:08:18 +03:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Dmitry Stogov
f860ae451a
fixed "unused function" compilation warning
2017-12-18 11:43:12 +03:00
Dmitry Stogov
b337b90bac
Fix warning in the proper place
2017-12-18 11:28:59 +03:00
Dmitry Stogov
588f1df7a2
Remove duplicate handlers for commutative operations
2017-12-15 13:42:54 +03:00
Dmitry Stogov
9e709e2fa0
Move constants into read-only data segment
2017-12-14 18:43:44 +03:00
Dmitry Stogov
91507ba6e8
Reduced VM code size.
...
Made FETCH_DIM/OBJ_FUNC_ARG to dispatch ro corresponding FETCH_DIM/OBJ_R/_W handlers.
Merged TMP and VAR specializations of ZEND_FETCH_OBJ_R.
Allowed dispatching to less specialized handelrs and helpers. (e.g. from OP_TMP_CONST to OP_TMPVAR_CONST).
2017-12-07 01:52:27 +03:00
Dmitry Stogov
d1d1aff4e5
Optimization of init_func_execute_data()
2017-12-06 02:53:30 +03:00
Nikita Popov
828d8e635b
Fix ZEND_VM_SPEC=0 build
2017-11-24 23:06:01 +01:00
Dmitry Stogov
33b094479b
TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.
...
This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))
2017-11-23 15:58:34 +03:00
Dmitry Stogov
e70618aff6
Changed the way VM accesses constant operands in 64-bit builds.
2017-10-04 16:53:01 +03:00
Dmitry Stogov
bfa154448d
VM refactoring, to avoid passing "execute_data" into helper functions that can access it using global register variable.
2017-06-16 01:42:49 +03:00
Dmitry Stogov
fc927dc263
Switch to HYBRID VM
2017-05-17 15:07:33 +03:00
Dmitry Stogov
7640e0a5f9
HYBRID VM cleanup
2017-05-16 09:24:23 +03:00
Dmitry Stogov
69b4f8ed79
Fixed USER_OPCODE handling in HYBRID VM.
2017-05-15 21:17:58 +03:00
Xinchen Hui
e1c32646b4
typo
2017-05-09 17:15:42 +08:00
Dmitry Stogov
2f9d72b309
Cleanup
2017-05-09 09:37:46 +03:00
Dmitry Stogov
71bfb430af
Fixed zend_vm_call_opcode_handler(). Make phpdbg work with HYBRID VM.
2017-05-04 18:56:28 +03:00
Dmitry Stogov
b5e857b905
Added missing ZEND_VM_HOT define
2017-05-04 17:57:49 +03:00
Dmitry Stogov
27e01cd918
Implemented HYBRID VM instruction dispatch method that takes advantages of both CALL and GOTO VMs.
2017-05-03 10:01:22 +03:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Sara Golemon
16758a3c66
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Remove extraneous parentheses in conditions
2016-12-25 22:18:27 -08:00
Sébastien Santoro
5d7c774bea
Remove extraneous parentheses in conditions
...
The zend_vm_gen.php generator now checks if the condition is already
enclosed by parentheses, and them only if needed.
This fixes nine clang/llvm parentheses-equality warnings.
2016-12-25 22:17:46 -08:00
Kalle Sommer Nielsen
cf24a61735
Disable C4101 warnings entirely on Windows
2016-12-08 03:50:31 +01:00
Bob Weinand
444d612b62
Use an inline handler instead of repeating logic for calling assign op helpers each time
2016-12-05 10:55:11 +01:00
Dmitry Stogov
22cebaf89a
Revert "Fix return value memory leaks upon exceptions in opcode operand freeing"
...
This reverts commit 9ad9d7ae37
.
2016-12-02 11:58:41 +03:00
Bob Weinand
9ad9d7ae37
Fix return value memory leaks upon exceptions in opcode operand freeing
2016-11-30 17:44:34 +01:00
Xinchen Hui
38f7d595c0
Remove redundant \t
2016-08-25 13:29:22 +08:00
Aaron Piotrowski
3f108f50f9
Merge branch 'pull-request/1929'
2016-07-05 02:29:53 -05:00
Dmitry Stogov
044e2718fe
Fixed executor without global register variales (gcc warnings or clang errors)
2016-06-27 10:36:41 +03:00
Dmitry Stogov
d0460d8f6b
Turn safe timeout handling into general interrupt handling ability.
2016-06-23 15:01:23 +03:00
Dmitry Stogov
a9512af810
Implemented RFC: Fix inconsistent behavior of $this variable
...
Squashed commit of the following:
commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jun 16 00:19:42 2016 +0300
Fixed GOTO VM
commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 21:01:57 2016 +0300
Removed unused variable
commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 19:06:16 2016 +0300
Protection from $this reassign through mb_parse_str()
commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:14:50 2016 +0300
Added type inference rule for FETCH_THIS opcode
commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jun 15 18:11:18 2016 +0300
Restored PHP-7 behavior of isset($this->foo).
It throws exception if not in object context.
Removed useless opcode handlers.
commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 31 12:25:47 2016 +0300
Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".
commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:02:43 2016 +0300
Throw exception on attempt to re-assign $this through extract() and parse_str().
commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 22:18:36 2016 +0300
Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Sammy Kaye Powers
6f10874bca
Remove a few references to $GLOBALS and clean up a bit
2016-06-01 01:57:33 -05:00
Dmitry Stogov
b111da96d9
Split ZEND_SEND_VAR_NO_REF into ZEND_SEND_VAR_NO_REF and ZEND_SEND_VAR_NO_REF_EX (similar to ZEND_SEND_VAL) and remove ZEND_ARG_* flags.
2016-05-31 04:06:00 +03:00
Dmitry Stogov
2ae21abdf7
Fixed bug #72213 (Finally leaks on nested exceptions).
...
Squashed commit of the following:
commit 8461b0407f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:34:42 2016 +0300
Rmoved zend_try_catch_element.parent and walk through op_array.try_catch_array backward from the current try_cacth_offset.
commit 0c71e24964
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:04:53 2016 +0300
Move SAVE_OPLINE() to its original place
commit 111432a4df
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed May 25 00:01:10 2016 +0300
Separate the common part of ZEND_HANDLE_EXCEPTION and FAST_RET into zend_dispatch_try_catch_finally_helper.
commit 4f21c06c2e
Author: Nikita Popov <nikic@php.net>
Date: Tue May 24 14:55:27 2016 +0200
Improve finally fix
commit da5c727499
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 10:36:08 2016 +0300
Fixed Zend/tests/try/bug70228_3.phpt and Zend/tests/try/bug70228_4.phpt
commit cfcedf2fb4
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 02:59:27 2016 +0300
Added test
commit 4c6aa93d43
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue May 24 00:38:20 2016 +0300
Added tests
commit 8a8f4704b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon May 23 23:27:34 2016 +0300
Fixed bug #72213 (Finally leaks on nested exceptions)
2016-05-25 01:25:12 +03:00
Dmitry Stogov
34a6c93b25
Specialize ZEND_ASSIGN_ADD and family according to value of opline->extended_value
2016-05-17 11:46:25 +03: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
Dmitry Stogov
f484801483
Reduced amount of code generated for interrupt handling.
...
Improved ZEND_VM_INTERRUPT_CHECK() placement (always perform checks after opcode handler completion, when instruction pointer value is alredy changed to the next opcode).
2016-04-20 11:06:52 +03:00
Dmitry Stogov
fc7cbdce61
Squashed commit of the following:
...
commit 98471821a8
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 21:56:04 2016 +0300
Fixed wrong constant usage
commit 8183b811e7
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 21:10:23 2016 +0300
Added ability to serialize and serialize opcode handlers for file-cache
commit 3516b261de
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 10:11:59 2016 +0300
Added missed file
commit f4475a2360
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Mar 17 10:00:45 2016 +0300
Transparently introduce type-specialized opcode handlers.
This affects only PHP VM, and doesn't change anything else.
2016-03-17 22:00:27 +03:00
Xinchen Hui
73e8c08788
Sorry for that... Merged by accident....
...
Revert "Transparently introduce type-specialized opcode handlers."
This reverts commit 59d00b8bcc
.
2016-03-17 11:59:15 +08:00
Dmitry Stogov
59d00b8bcc
Transparently introduce type-specialized opcode handlers.
...
This affects only PHP VM, and doesn't change anything else.
2016-03-16 03:36:58 +03:00
Dmitry Stogov
7f80514aa1
Added ability to avoid code generation for useless opcode handlers.
...
- SPEC(NO_CONST_CONST) may prevent codegeneration for handlers like ADD_SPEC_CONST_CONST. Compiler and optimizaer should care about constants folding.
- SPEC(COMMUTATIVE) generate only single handler instead of two eqivalents like ADD_SPEC_CONST_CV and ADD_SPEC_CV_CONST. Compiler and optimizer should care avout operands swapping.
2016-03-11 16:51:06 +03:00
Dmitry Stogov
afb80df631
Allow usage of "TMPVARCV" pattern for cases when there is no difference in handling for TMP, VAR and CV operands.
2016-03-11 13:38:53 +03:00
Dmitry Stogov
827a7a180b
Added possibility for extra specialization for SMART_BRANCH (e.g. IS_EQUAL+JMPZ superinstruction).
2016-03-11 12:17:03 +03:00
Xinchen Hui
c4ff3e7990
It's better to support 5.3 as well
2016-02-15 11:05:01 +08:00
Nikita Popov
5faedf5b3e
Remove EXT_TYPE_UNUSED in favor of IS_UNUSED
...
This means we no longer allocate an unused VAR for the retval of
instructions that support unused results.
Nearly all instructions already used the result variable only if
it was used. The only exception to this was the return value
variable for internal function call results. I've adjusted the code
to use a stack zval for the unused return case now. As we have
retval specialization now, we know that it doesn't matter.
2016-02-11 18:02:19 +01:00
Dmitry Stogov
2f5a119281
Use extra specialization to eliminate run-time checks for conditions known at compile time in SEND_VAL_EX and SEND_VAR_EX.
2016-02-05 15:07:58 +03:00
Bob Weinand
00a2c30c59
Add extra VM operand specialization
...
For now RETVAL and OP_DATA= are supported
2016-02-04 16:49:50 +01:00