Commit Graph

1573 Commits

Author SHA1 Message Date
Dmitry Stogov
35f8467687 Reverted incorrect chunk 2014-09-19 17:05:03 +04:00
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Dmitry Stogov
551ee4165b Use runtime-cache to avoid hash lookups in BIND_GLOBAL instruction 2014-09-17 00:52:45 +04:00
krakjoe
6967f78cc9 Merge branch 'pull-request/808' 2014-09-16 15:40:31 +01:00
Nikita Popov
079409bbc2 Switch (un)mangle property name to size_t and zend_string
Also use the _ex variants where possible.
2014-09-16 00:31:27 +02:00
Nikita Popov
ee75848b78 Drop superfluous opline for non-cv variables 2014-09-13 22:31:27 +02:00
Nikita Popov
88e07324d9 Drop dead assignments 2014-09-13 22:31:21 +02:00
Dmitry Stogov
82096dc151 Removed ZEND_QM_ASSIGN_VAR and ZEND_JMP_SET_VAR opcodes (in PHPNG they did exacly the same as ZEND_QM_ASSIGN and ZEND_JMP_SET) 2014-09-11 12:29:54 +04:00
Levi Morrison
b476eca826 Error on multiple default blocks in a switch
Part of RFC: https://wiki.php.net/rfc/switch.default.multiple
2014-09-05 16:07:07 -06: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
Dmitry Stogov
c52511c307 Disabled usage of built-in functions in write context (e.g. strlen($s)[] = ...) 2014-09-03 16:30:48 +04:00
Dmitry Stogov
9a958a086d Simplify BEGIN_SILENCE/END_SILENCE to not modify ini entry value back and force 2014-09-03 15:17:50 +04:00
Nikita Popov
c59292570c Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_compile.c
2014-08-30 20:45:10 +02:00
Nikita Popov
d7368c2531 Fix bug #67938: Segfault when extending interface method with variadic
We only want to check extra optional args if the proto function is
variadic, not when we're adding extra variadic args.
2014-08-30 20:43:34 +02:00
Nikita Popov
b73bea9cc8 Combine foreach copy / switch cond stacks
Now one common stack to handle both, which stores znodes instead of
full oplines (foreach copy stack) or switch entries (switch cond
stack).

Also removed EG(start_op) while at it.
2014-08-29 21:53:09 +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
Xinchen Hui
0763d6b98d use zend_string_equals_ci 2014-08-29 13:19:14 +08:00
Xinchen Hui
49bd049b7e Keep folder mark style in this file 2014-08-29 13:05:58 +08:00
Johannes Schlüter
6592706340 Fix comparison in case of constant NULL as default value
Fixes "Fatal error: Default value for parameters with a class type hint
can only be NULL in ext/phar/phar.php on line 1120" whie creating phar.phar
2014-08-29 01:34:46 +02:00
Nikita Popov
ae7e663330 Fix bug #67922 2014-08-29 00:18:38 +02:00
Andrea Faulds
389d285973 Special-case aliases, add warning comments to implementations 2014-08-29 00:10:52 +02:00
Anatol Belski
d3bfbc079f remove duplicate condition already present a line upper 2014-08-28 17:03:39 +02:00
Dmitry Stogov
f2b0370193 Use 'const' qualifier for pointrs to code used at run-time (the code must not be changed) 2014-08-28 02:44:06 +04:00
Dmitry Stogov
ee552b628c Reorder fields for better nenory consumtion and data locality on 64-bit systems 2014-08-27 22:45:27 +04:00
Dmitry Stogov
b1f53ca415 Use efree_size() instead of efree() where posible 2014-08-27 20:49:56 +04:00
Nikita Popov
f3b629c982 Move =&new deprecation message into compiler 2014-08-26 23:36:53 +02:00
Nikita Popov
f8abb9a462 Handle remaining magic constants in parser as well
As far as I can see the !filename case cannot occur, so I dropped
it.
2014-08-26 23:36:52 +02:00
Nikita Popov
c71ab607ff Don't alloc empty jmp opnum list for single-branch if 2014-08-26 22:31:57 +02:00
Dmitry Stogov
d17790b35e Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  fixed several long vs zend_long casts
2014-08-26 14:23:01 +04:00
Dmitry Stogov
055b632e7d Fixed return operand type (Use IS_TMP_VAR instead of IS_VAR in the same way as it was before AST patch) 2014-08-26 14:22:03 +04:00
Anatol Belski
202e8db1dc fixed several long vs zend_long casts 2014-08-26 11:26:53 +02:00
Dmitry Stogov
7cbbb37127 Fixed compile-time constants substitution 2014-08-26 13:06:19 +04:00
Nikita Popov
59848e3fbb Remove ZEND_ACC_INTERACTIVE and CG(interactive)
As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.
2014-08-25 23:46:43 +02:00
Nikita Popov
4ea19a682e make bp type uint32_t everywhere 2014-08-25 23:17:36 +02:00
Nikita Popov
46b53e815c Add zend_string_equals and zend_string_equals_literal 2014-08-25 22:40:58 +02:00
Nikita Popov
899a1ed59a Merge branch 'ast'
Conflicts:
	Zend/zend_compile.c
2014-08-25 22:04:33 +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
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Nikita Popov
7813d85d3d Fix for C89 2014-08-25 19:46:21 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Nikita Popov
0a230fb4db Fix add_class_name_literal (thanks laruence) 2014-08-19 12:01:54 +02:00
Anatol Belski
97c5172ac7 Merge remote-tracking branch 'php/master'
Conflicts:
	ext/date/lib/parse_date.c
2014-08-19 08:27:43 +02:00
Dmitry Stogov
f3106998b0 Improved error message 2014-08-18 21:47:30 +04:00
Nikita Popov
458f67cd21 Fix encoding declaration handling
As the encoding declaration influences lexing it needs to be
immidiately handled in the parser.
2014-08-18 16:27:53 +02:00
Nikita Popov
2a26cbb70e Fix dtor in do_free as well
We should expose zval_ptr_dtor_nogc outside zend_execute
2014-08-17 21:47:23 +02:00
Nikita Popov
ee3d28ed33 Fix compile_args semantics 2014-08-16 22:29:15 +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
5bb25776a0 further fixes on core 2014-08-16 15:34:04 +02:00