Commit Graph

957 Commits

Author SHA1 Message Date
Dmitry Stogov
df7293b072 don't use memset() for array of zval initialization 2014-04-07 12:14:44 +04:00
Dmitry Stogov
a80e945835 Optimized ZEND_FETCH_DIM_* 2014-04-05 01:56:51 +04:00
Dmitry Stogov
c11dc75b4e Refactored IS_INDIRECT IS_VAR passing between opcodes to avoid reference counting 2014-04-04 19:01:53 +04:00
Dmitry Stogov
eaeb3c39b4 Optimized RECV_* opcodes 2014-04-04 14:36:34 +04:00
Dmitry Stogov
58f0f2503c Various VM optimizations 2014-04-04 02:52:53 +04:00
Dmitry Stogov
58871730c8 ASSIGN_REF optimization 2014-04-03 16:53:30 +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
8dedaf8512 Use interned strings for one character strings 2014-04-01 18:06:50 +04:00
Dmitry Stogov
a25a1ba0ef STR_DUP() doesn't duplicate interned strings anymore. In case new string is required STR_INIT() or STR_ALLOC() should be used. 2014-04-01 16:31:03 +04:00
Dmitry Stogov
ea85451b65 Refactored data structures to keep zend_object* instead of a whole zval in some places 2014-03-28 02:11:22 +04:00
Dmitry Stogov
9a8fbdf2f4 Use CV variable offset instead of CV variable number 2014-03-27 16:00:25 +04:00
Dmitry Stogov
d83d34ba6d Cleanup 2014-03-27 14:55:52 +04:00
Dmitry Stogov
c6cba55454 Use ZVAL_DEREF() macro 2014-03-27 13:39:09 +04:00
Dmitry Stogov
54d559d893 Replaced (Z_TYPE(x) == IS_REFERENCE) with (Z_ISREF(x)) 2014-03-27 11:50:45 +04:00
Dmitry Stogov
36f24c512e Inlined "slow" CV lookup code (now it's cheap)
Removed expectations for undefined CV acess for BP_VAR_W and BP_VAR_IS modes
2014-03-27 11:19:34 +04:00
Dmitry Stogov
887189ca31 Refactored IS_INDIRECT usage for CV and object properties to support HashTable resizing 2014-03-26 18:07:31 +04:00
Dmitry Stogov
130e48d375 Typo 2014-03-21 16:37:53 +04:00
Dmitry Stogov
37db857734 Fixed CV IS_INDIRECT support 2014-03-21 15:43:53 +04:00
Dmitry Stogov
2f4e8aa5d7 Fixed refcounting 2014-03-21 11:33:20 +04:00
Dmitry Stogov
e884d5d8e3 Fixed assignment reference to itself 2014-03-19 22:43:06 +04:00
Dmitry Stogov
b7938ab1bd Refactored GC (incomplete) 2014-03-19 17:00:28 +04:00
Dmitry Stogov
aa5f55306b Refactored EG(active_symbol_table) to be zend_array* instead of HashTable* 2014-03-17 23:15:22 +04:00
Dmitry Stogov
b8089696c4 Fixed support for references 2014-03-13 22:56:18 +04:00
Dmitry Stogov
918866da5f Fixed autoconversion from reference to ordinal value 2014-03-13 14:24:08 +04:00
Dmitry Stogov
e0dd8a4f4b Fixed IS_INDIRECT handling when assign array element by reference.
This might cause passing invalid pointer if the array could be resized before IS_INDIRECT usage.
Now we use IS_REFERENCE instead of IS_INDIRECT.
The following test crashed before:
<?php $a = array(0,1,2,3,4,5,6,7); $a[8] = &$a[7]; ?>
2014-03-13 00:30:53 +04:00
Xinchen Hui
53e312c663 Review ended
Revert "An demo(for review) to show how to fix the problem(symbol table resize)"

This reverts commit 60c354510b.
2014-03-11 14:23:14 +08:00
Xinchen Hui
60c354510b An demo(for review) to show how to fix the problem(symbol table resize) 2014-03-10 16:25:05 +08:00
Xinchen Hui
80625f20e5 Revert "An demo(for review) to show how to fix the problem we meet"
This reverts commit 4aeae15706.
2014-03-10 16:24:35 +08:00
Xinchen Hui
4aeae15706 An demo(for review) to show how to fix the problem we meet 2014-03-10 11:29:28 +08:00
Dmitry Stogov
7cd78822ab Fixed assignment to reference 2014-03-08 00:02:12 +04:00
Xinchen Hui
7003e76512 Fixed numeric string handling length 2014-03-07 14:35:14 +08:00
Dmitry Stogov
9ed631a4d0 Fixed ArrayAccess behavior 2014-03-06 17:59:17 +04:00
Dmitry Stogov
9727b47418 Fixed ArrayAccess handling 2014-03-06 13:11:23 +04:00
Dmitry Stogov
3733737328 Handle interned strings as non-refcounted scalars 2014-03-05 13:55:56 +04:00
Dmitry Stogov
38151a38ec Fixed dereferencing of value returned from function (foo()[1] = ...) 2014-03-04 17:23:23 +04:00
Dmitry Stogov
ba30f1e946 Fixed assign by reference 2014-03-04 17:04:46 +04:00
Dmitry Stogov
dbb6837627 EG(error_zval) must be passed as IS_INDIRECT 2014-03-04 16:32:40 +04:00
Dmitry Stogov
1be0df935f Fixed destruction of VM handler operands (FREE_OP1 and family) 2014-03-04 12:27:50 +04:00
Dmitry Stogov
53128644f3 Redesigned SRR_OFFSET handling 2014-02-28 17:39:08 +04:00
Dmitry Stogov
855a030b7b Fixed return value handling in ZEND_ASSIGN_OBJ 2014-02-28 10:41:28 +04:00
Dmitry Stogov
08da14adac Fixed support for IS_REFERENCE 2014-02-28 00:21:12 +04:00
Dmitry Stogov
5e4a97f365 Fixed ASSIGN_OBJ with IS_TMP and IS_CONST operand 2014-02-27 22:53:56 +04:00
Dmitry Stogov
0e44e0611d Fixed ASSIGN of IS_REFERENCE (it should be separated) 2014-02-27 22:16:15 +04:00
Dmitry Stogov
1c3ba95bb5 Refactored read_property() and read_dimension() handlers 2014-02-27 15:40:13 +04:00
Dmitry Stogov
d062fb3344 Generator related fixes 2014-02-26 13:58:59 +04:00
Dmitry Stogov
329a576f39 Fixed EG(error_zval) handling 2014-02-25 23:39:25 +04:00
Dmitry Stogov
068ea84a84 THIS MAY BE A REAL PROBLEM 2014-02-25 16:38:18 +04:00
Dmitry Stogov
fea971e1e4 Better IS_REFERENCE handling 2014-02-25 00:17:13 +04:00
Dmitry Stogov
55bca5868a Fixed $this handling 2014-02-24 17:07:44 +04:00