Nikita Popov
e26c6d663a
Implement constant expression folding as a separate pass
2014-06-23 21:59:14 +02:00
Nikita Popov
0644fbccf7
Implement CT eval of binary expressions
...
I totally hate this approach. It's ugly and I don't think I can
share code with the static scalar evaluation. Maybe I should use
the approach that static scalars use instead?
2014-06-22 15:57:44 +02:00
Nikita Popov
90d36554e2
Support string interpolation
2014-06-21 20:06:46 +02:00
Nikita Popov
b6789b1dd6
zend_ast_dynamic_ast returns new node
2014-06-21 19:31:08 +02:00
Nikita Popov
86db3942cf
Remove dead code
2014-06-21 18:54:30 +02:00
Nikita Popov
657762ee2b
AST stage 2.4
2014-06-21 18:54:13 +02:00
Nikita Popov
0c81b3eae2
Remove dead code
2014-06-19 13:48:49 +02:00
Nikita Popov
0ec49bba22
AST stage 1.9
...
Expressions (mostly) use the AST
2014-06-19 13:48:35 +02:00
Dmitry Stogov
b108267f2c
Merge branch 'master' into phpng
...
* master: (41 commits)
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
Update copyright year to 2014
NEWS
Fix Request #67453 Allow to unserialize empty data.
Update copyright year to 2014
Update copyright year for re2c generated files
Update copyright year to 2014
Update copyright year for re2c files as well
Fix patch for bug #67436
fix failed test
Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function.
Added tests for bug 67436
Fixed wrong XFAIL test - already fixed
Fix typo in Bug #67406 NEWS entry
Fix typo in Bug #67406 NEWS entry
...
Conflicts:
Zend/zend_compile.c
ext/session/session.c
ext/standard/array.c
ext/standard/http_fopen_wrapper.c
tests/classes/bug63462.phpt
2014-06-18 17:50:27 +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
a8e63d2b56
Fixed support for constants inherited from interfaces
2014-06-17 01:15:51 +04:00
Dmitry Stogov
909acec231
Avoid useles constants update
2014-06-16 23:32:58 +04:00
Dmitry Stogov
bd10db271c
Use new zend_hash iteration API
2014-06-16 21:11:52 +04:00
Bob Weinand
3c2b42ac41
Merge branch 'PHP-5.5' into PHP-5.6
...
Conflicts:
Zend/zend_compile.c
2014-06-16 11:18:45 +02:00
Bob Weinand
e93f8e74d4
Merge branch 'PHP-5.4' into PHP-5.5
2014-06-16 11:16:33 +02:00
Bob Weinand
0a3979e08b
Fix patch for bug #67436
2014-06-16 11:10:50 +02:00
Bob Weinand
f92143f740
Merge branch 'PHP-5.5' into PHP-5.6
...
Conflicts:
NEWS
Zend/zend_compile.c
2014-06-15 23:06:15 +02:00
Bob Weinand
f5f1c702cd
Merge branch 'PHP-5.4' into PHP-5.5
2014-06-15 22:24:44 +02:00
Bob Weinand
ca29063da5
Fix bug #67436
2014-06-15 22:18:25 +02:00
Nikita Popov
258a733ed2
AST-based compiler: Stage 1
2014-06-14 15:22:18 +02:00
Dmitry Stogov
592c8a0426
Improved conditions order
2014-06-11 02:46:50 +04:00
Nikita Popov
98918fe65b
Remove (&ast->u.child)[i] weirdness
2014-06-06 22:35:21 +02:00
Dmitry Stogov
e499c3d259
Introduced new BIND_GLOBAL instraction instead of FETCH_W+ASSIGN_REF pair that caused a lot of useles checks
2014-06-06 15:04:30 +04:00
Dmitry Stogov
c1965f58d4
Use reference counting instead of zval duplication
2014-06-05 16:04:11 +04:00
Dmitry Stogov
3f6f0d5a70
Simplified and optimized ZEND_HANDLE_NUMERIC()
2014-06-03 13:10:42 +04:00
Nikita Popov
5c2120b6cf
Forbid writing to temporary expressions
2014-05-31 19:41:39 +02:00
Nikita Popov
c53a7ea4e5
Property handle calls on [] and '' consts/tmps
2014-05-31 17:37:30 +02:00
Nikita Popov
8a65c3b234
Remove now unnecessary code in begin_method_call
2014-05-31 16:08:38 +02:00
Nikita Popov
fcf42d817d
Remove object_stack (mostly)
2014-05-31 15:59:54 +02:00
Nikita Popov
87f8e758c8
Cleanup old grammar rules
2014-05-30 23:51:54 +02:00
Nikita Popov
a8c1595012
LTR static member access
2014-05-30 22:33:03 +02:00
Nikita Popov
95a3a12657
Change precedence of $ operator
...
$$foo['bar'] is now interpreted as ${$foo}['bar'] rather than
${$foo['bar']}.
2014-05-30 16:31:10 +02:00
Xinchen Hui
9f70b2f6fa
typo
2014-05-30 14:56:50 +08: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
Dmitry Stogov
05d0df4706
Use new zend_hash API
2014-05-26 21:29:35 +04:00
Xinchen Hui
922285ec55
Don't use cast (compiler friendly)
2014-05-26 11:05:04 +08:00
Xinchen Hui
bc357eaf3f
Fixed apply_func_args_t
2014-05-25 20:04:35 +08:00
Xinchen Hui
0175d994c0
Fixed apply_func_arg_t, and it's better not using cast (compiler friendly)
2014-05-25 19:56:51 +08:00
Dmitry Stogov
9eb89dddb1
Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros.
2014-05-23 20:37:53 +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
Hannes Magnusson
0ebf0c02a0
Fix argument, cur_method_ref->class_name is a zend_string
2014-05-05 21:45:33 -07:00
Nikita Popov
e0247de147
zend_stack_top() now returns pointer directly
2014-05-01 09:08:30 +02:00
Nikita Popov
5a03efe279
Don't allocate zend_stack elements individually
...
Instead allocate a vector of elements. Size must now be specified
on initialization rather than on push.
2014-05-01 09:08:29 +02:00
Dmitry Stogov
17d027ed47
Split IS_BOOL into IS_FALSE and IS_TRUE
2014-04-30 18:32:42 +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
7e424f5a95
Use symbolic names instead of magic constants + optimization
2014-04-23 02:47:41 +04:00
Nikita Popov
9c70603f4a
Initialize hash as unpacked if it contains string keys
2014-04-22 21:33:49 +02:00
Nikita Popov
3d3a55cbcb
Pass expected array size hint in INIT_ARRAY
...
To avoid unnecessary rehashes
2014-04-22 18:57:03 +02:00