Commit Graph

108 Commits

Author SHA1 Message Date
Nikita Popov
ed06d130f7 Fixed bug #71922 2016-03-29 19:29:19 +02:00
Xinchen Hui
97a9470d97 bump year which is missed in rev 49493a2 2016-01-02 17:56:11 +08:00
Xinchen Hui
bb07905a4a Fixed bug #70528 (assert() with instanceof adds apostrophes around class name) 2015-09-19 19:49:36 -07:00
nikita2206
d8a6130660 Handle empty (NULL) stmt in ast_export 2015-07-16 22:31:36 +02:00
Aaron Piotrowski
5df893ce3c Use NULL where possible for exception class
Matches usage of zend_throw_exception()/zend_throw_exception_ex().
2015-07-07 12:10:55 -05:00
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
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Bob Weinand
69b54ba926 Also unreserve T_CLASS 2015-05-25 22:58:30 +02:00
krakjoe
49608e0608 Rebase Joe's anon classes implementation 2015-04-26 15:04:22 +02:00
Nikita Popov
38eb3cdf67 Drop ??? for AST_ZNODE in ast pretty printer 2015-04-14 21:35:38 +02:00
Nikita Popov
acd61be985 Add "yield from" support to ast pretty printer 2015-04-14 19:15:40 +02: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
acfc31c0f8 Use zend_error_noreturn() for fatal errors 2015-04-01 13:32:23 +03:00
Xinchen Hui
1c31ad4f0d Unused var 2015-02-21 10:58:23 +08:00
Dmitry Stogov
6b779596d7 Implemented AST pretty-printer 2015-02-19 11:11:17 +03: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
Sara Golemon
1010b0ea4f Provide compiler hook for altering the AST pre-compilation. 2015-01-19 10:43:57 -08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
b5b617674e Micro optimaztion (yeah, I know compiler supposed to do that) 2014-12-22 00:10:46 -05:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
c00424e427 bring back all the TSRMLS_FETCH() stuff
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
06d0230a0f cleanup TSRMLS_FETCH 2014-09-26 09:58:19 +02:00
Anatol Belski
4e09d782ef fix unsigned negation 2014-09-15 12:58:43 +02:00
Nikita Popov
9e75353184 Use zval_ptr_dtor_nogc to destroy literals
Also move the definition of zval_ptr_dtor_nogc to zend_variables.h
(from zend_execute.h/.c) as it's used in a few places.
2014-09-03 15:18:06 +02:00
Anatol Belski
d4a05d1990 fix C89 compat 2014-08-31 21:58:05 +02:00
Nikita Popov
545fd5168e Don't distinguish between ast/list in parser
This removes the need to use $<ast>{n} or $<list>$ casts in the
reduction actions.

Keeping the distinction in the parser doesn't really give us any
benefit and only makes changing the grammar harder.
2014-08-29 21:02:10 +02:00
Nikita Popov
6db293d5e0 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_globals.h
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner.l
	Zend/zend_types.h
2014-08-25 21:52:18 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Nikita Popov
69f0deb399 Fix ast size computation in case of zero children 2014-08-19 11:38:09 +02:00
Nikita Popov
1bab755a35 Fix GC when opcache is in use 2014-08-17 19:15:54 +02:00
Nikita Popov
38a173916c Fix merge 2014-08-16 22:08:02 +02:00
Nikita Popov
71675a4bf8 Merge remote-tracking branch 'php-src/phpng' into ast
Conflicts:
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_language_parser.y

Incomplete merge!
2014-08-16 21:55:08 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Dmitry Stogov
4a3e501fb3 cleanup 2014-08-08 13:47:34 +04:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Nikita Popov
ad5677e4cd Use ZVAL_COPY until proven wrong 2014-07-30 17:46:00 +02:00
Nikita Popov
cf7f0c412d zend_ast_create determined child count automatically 2014-07-28 18:18:47 +02:00
Nikita Popov
1d79fb308b Add zend_ast_list* variant to parser stack element 2014-07-28 15:10:58 +02:00
Nikita Popov
f29b84ab46 Minor cleanups in AST code 2014-07-28 14:51:08 +02:00
Nikita Popov
d3cb239305 Use separate node type for lists
This saves storing the children count for normal ast nodes.
2014-07-28 12:06:57 +02:00
Nikita Popov
21eb6807c9 Store lineno for zval ast nodes more efficiently 2014-07-27 13:25:32 +02:00
Nikita Popov
edd9fcab1e Fix leaks
Must find a good way to handle constant expressions...
2014-07-26 18:08:31 +02:00
Nikita Popov
d46f67a3a7 Use arena allocator (currently leaky!) 2014-07-26 17:45:45 +02:00
Dmitry Stogov
7c6477ce37 Merge branch 'master' into phpng
* master:
  Removed second zval_copy_ctor()
  Fixed crash on self-referencing constant expression (part of a constant AST)
  Fixed support for constant arrays in context of "const" statement (Zend/tests/constant_expressions_arrays.phpt failed when opcache.protect_memort was set)

Conflicts:
	Zend/zend_ast.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/reflection/php_reflection.c
2014-07-24 01:54:21 +04:00
Dmitry Stogov
39740a33e5 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed crash on self-referencing constant expression (part of a constant AST)
2014-07-24 00:59:42 +04:00
Dmitry Stogov
d909b6330e Fixed crash on self-referencing constant expression (part of a constant AST) 2014-07-24 00:37:15 +04:00