Kalle Sommer Nielsen
ce2cd89258
Replace references to PHP_WIN32 and TSRM_WIN32 with ZEND_WIN32 in Zend/, this also fixes 1 instance of where fflush(stderr) was misplaced (zend_extensions.c)
2015-07-04 18:55:22 +02: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
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
Bob Weinand
4a4529adb0
Fix rope memory leaks upon exception
2015-06-28 15:42:15 +02:00
Bob Weinand
25e1b49ea1
Fix warning in zend_execute.c by explicit cast
2015-06-26 20:39:56 +02:00
Bob Weinand
1335ebd068
Fix Closure leak in aborted INIT_DYNAMIC_FCALL
2015-06-26 05:10:58 +02:00
Dmitry Stogov
7a01c44ab2
Fixed bug #69905 (null ptr deref and segfault in ZEND_FETCH_DIM_RW_SPEC_VAR_UNUSED_HANDLER)
2015-06-23 16:26:40 +03:00
Bob Weinand
115e9288bb
Fix segfault with scalar passed to typehint with not loaded class
2015-06-21 01:35:22 +02:00
Nikita Popov
ddf41d3aeb
Fix generator memory leak
...
Make sure HANDLE_EXCEPTION and generator unwinds stay in sync in
the future by extracting a common function.
2015-06-20 18:37:28 +02:00
Bob Weinand
7adc0ae631
Fix potential writes into wrong memory, ensure vm_stack integrity
...
Fixes also a segfault on stack frames > 1 << 18 bytes
Stack frames, when reallocated, need to be marked as top frame of current stack page
2015-06-20 18:29:09 +02:00
Nikita Popov
9fa70dbd29
Fixed bug #69889
...
There is one case that requires further discussion:
$foo = "test";
var_dump($foo[0.0] ?? "default");
var_dump(isset($foo[0.0]) ? $foo[0.0] : "default");
Here the former will currently return "t", while the latter also
returns "t" and additionally throws a notice.
I think we need to revisit the behavior of invalid types for string
offset access in PHP 7, as currently there is some mismatch between
what isset() does and what the access itself supports.
2015-06-20 15:09:58 +02:00
Xinchen Hui
235c7edb8b
Revert "Fix bug #69871 (short-circuiting failure with smart_branch)"
...
This reverts commit fae6bedea5
.
2015-06-19 23:03:23 +08:00
Bob Weinand
fae6bedea5
Fix bug #69871 (short-circuiting failure with smart_branch)
2015-06-18 15:59:00 +02:00
Dmitry Stogov
a524a375d9
Improved class type hints checks, by caching resolved class entries in run-time cache.
2015-06-17 12:07:43 +03:00
Bob Weinand
7c2a0157c7
Cache the class_name typehint key in arg_info
...
This leads to up to 2% improvement on one tested real world application by not having to always recalculate the lowercased string and its hash
2015-06-12 17:26:53 +02:00
Márcio Almada
fdda34e0bc
fix bad formatted "undefined offset" notice when key is negative
2015-06-10 22:18:23 +02:00
Dmitry Stogov
7f39ee7159
Delay checks for undefined CV variables after checks for fast paths.
2015-06-05 01:53:32 +03:00
Dmitry Stogov
544fb5c7bc
Separate rare used increment/decrement/assign_op of overloaded properies into non inlined functions.
2015-06-03 18:44:25 +03:00
Dmitry Stogov
ce862a25d5
Reorder conditions to check for fast paths first.
2015-06-01 17:22:04 +03:00
Nikita Popov
d0e265392f
Drop FREE_ON_RETURN flag, check brk_cont->start instead
...
Start >= 0 already tells us whether or not the loop has a loop
variable, no need to add extra flags to opcodes.
Also added a test for a case where FREE_ON_RETURN is relevant,
we didn't seem to have any coverage for this.
2015-05-23 10:51:33 +02:00
Nikita Popov
4ea1d8a9c7
Show argument causing TypeException in trace
...
Not sure why that check was there, did I miss something?
2015-05-20 18:28:09 +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
0586702d32
Mark first call frames of stack segment with ZEND_CALL_ALLOCATED flag to simplify checks on stack deallocation.
2015-05-12 15:56:42 +03:00
Dmitry Stogov
ab4ccffc4c
Avoid unnecessary reference counter incrementation on $this when call methods
2015-05-07 16:28:23 +03:00
Dmitry Stogov
762a774c40
Fixed repeatable opcodes on CALL VM without global registers
2015-04-29 14:20:44 +03:00
Dmitry Stogov
690440771a
Paired instuctions frequientiy used together (e.g. comparisons + conditional jumps)
2015-04-29 04:17:59 +03:00
Dmitry Stogov
d271d2cf7b
Make ZEND_RECV_INIT and ZEND_BIND_GLOBALS opcodes to be "repeatabe" with inner-loop instead of main interpreter loop.
2015-04-29 00:40:43 +03:00
Dmitry Stogov
3057034608
Optimize opcodes for fast path
2015-04-28 23:57:21 +03:00
Dmitry Stogov
388c2cbdbc
Micro optimizations
2015-04-28 19:11:45 +03:00
Dmitry Stogov
15a5f61cf4
Use fast method to check if first arguments should be passed by reference (not tested onbig endian).
2015-04-22 21:46:13 +03:00
Xinchen Hui
8362aebdbf
Fixed mem leak in assign_to_obj with reference
2015-04-21 21:04:20 +08:00
Dmitry Stogov
b99174136c
Fixed reference counting
2015-04-20 18:49:17 +03:00
Dmitry Stogov
10d4fdb34a
Fixed memory-leak
2015-04-17 01:27:54 +03:00
Dmitry Stogov
5b0d86edcc
Safe destruction (variables and arguments may need to be cuptured by exception)
2015-04-16 21:45:40 +03:00
Dmitry Stogov
2ca2d0938b
Micro optimizations for the more frequently paths
2015-04-16 14:46:54 +03:00
Dmitry Stogov
6aee1ee4a1
Optimization of stack-frame construction
2015-04-15 17:02:21 +03:00
Dmitry Stogov
8144795133
Avoid double refcounting
2015-04-15 13:34:23 +03:00
Nikita Popov
108ae7961e
Fix leak when calling ->get() on tmp property
2015-04-14 22:16:18 +02:00
Bob Weinand
f3e124d58d
Merge branch 'coroutineDelegation' of https://github.com/bwoebi/php-src
2015-04-14 17:58:58 +02:00
Dmitry Stogov
851a219226
Fixed typo
2015-04-08 23:15:43 +03:00
Dmitry Stogov
adcf0c6052
Improved reference counting
2015-04-03 01:32:20 +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
0cad725886
Convert fatal errors into EngineExceptions
2015-04-01 15:54:03 +03:00
Dmitry Stogov
8c031a3f95
Handle incorrect break/continue statements at compile-time
2015-04-01 15:52:26 +03:00
Dmitry Stogov
4fd93a4da6
Converted fatal errors into EngineExceptions
2015-04-01 14:50:09 +03:00
Dmitry Stogov
acfc31c0f8
Use zend_error_noreturn() for fatal errors
2015-04-01 13:32:23 +03:00
Nikita Popov
8d00385871
Reclassify E_STRICT notices
...
Per RFC https://wiki.php.net/rfc/reclassify_e_strict
While reviewing this, found that there are still three E_STRICTs
left in libraries - need to discuss those.
2015-04-01 11:17:55 +02:00
Dmitry Stogov
35f9b90bb8
ZPP changed to lazely check for "strict/weak" only if it's really necessary.
...
Cleanup.
2015-03-20 23:18:52 +03:00