Dmitry Stogov
524f5245c5
Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string.
2018-05-08 17:30:15 +03:00
Thomas Punt
4887357269
Implement flexible heredoc/nowdoc syntax
...
RFC: https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes
* The ending label no longer has to be followed by a semicolon or
newline. Any non-label character is fine.
* The ending label may be indented. The indentation will be stripped
from all lines in the heredoc/nowdoc string.
Lexing of heredoc strings performs a scan-ahead to determine the
indentation of the ending label, so that the correct amount of
indentation can be removed when calculting the semantic values for
use by the parser. This makes the implementation quite a bit more
complicated than we would like :/
2018-04-13 21:35:37 +02:00
Dmitry Stogov
4bbf200b4e
Optmized AST creation
2018-03-15 15:40:04 +03:00
Dmitry Stogov
bcacb7545c
PHP scanner optimization
2018-03-15 01:33:17 +03:00
Dmitry Stogov
53b474504d
PHP scanner optimization
2018-03-14 21:27:57 +03:00
Dmitry Stogov
8afb91cdad
PHP scanner optimization
2018-03-14 01:48:17 +03:00
Dmitry Stogov
d1585a9e3f
Revert "Handle scanner error in first place (don't hide them from ext/tokenizer) and cheaper whitespace handlig."
...
This reverts commit 0d6da03f5c
.
2018-03-14 01:08:03 +03:00
Dmitry Stogov
0d6da03f5c
Handle scanner error in first place (don't hide them from ext/tokenizer) and cheaper whitespace handlig.
2018-03-13 18:42:09 +03:00
Dmitry Stogov
20866891bd
Eliminate duplication
2018-01-17 15:52:52 +03:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Dmitry Stogov
6a9d2b2190
Cleanup type conversion
2017-12-07 19:24:55 +03:00
Xinchen Hui
463413db53
Merge branch 'PHP-7.1' into PHP-7.2
...
* PHP-7.1:
Update NEWS
Fixed bug #74947 (Segfault in scanner on INF number)
Conflicts:
Zend/zend_language_scanner.c
2017-07-21 12:02:54 +08:00
Xinchen Hui
84926a0d71
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #74947 (Segfault in scanner on INF number)
Conflicts:
Zend/zend_language_scanner.c
2017-07-21 11:58:07 +08:00
Xinchen Hui
95d2908814
Fixed bug #74947 (Segfault in scanner on INF number)
2017-07-21 11:56:49 +08:00
Nikita Popov
16861838a5
Merge branch 'PHP-7.1'
2017-03-23 22:50:21 +01:00
Nikita Popov
e3e3547627
Merge branch 'PHP-7.0' into PHP-7.1
2017-03-23 22:49:51 +01:00
Nikita Popov
d719b46222
Fix sequencing UB
2017-03-23 22:48:45 +01:00
Sara Golemon
819e66599a
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fix bug where `yield from` is captured too greedily
2017-03-23 13:40:09 -07:00
Sara Golemon
7835e2ebc5
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fix bug where `yield from` is captured too greedily
2017-03-23 13:38:58 -07:00
Sara Golemon
0fb640c717
Fix bug where yield from
is captured too greedily
...
In the following piece of code:
```php
function from1234($x) {
return $x;
}
function foo($x) {
yield from1234($x);
}
```
The statement inside foo is taken as `yield from` `1234($x)`
which is neither the intent, nor even legal syntax for an fcall.
Do a lookahead for breaking non-label characters after the
`yield from` and only accept it if they occur.
2017-03-23 13:31:06 -07:00
Nikita Popov
fec708f518
Simplify increment_lineno handling
2017-03-22 22:33:05 +01:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Christoph M. Becker
2cc3aeb4b9
Implement #72918 : negative offset inside a quoted string leads to parse error
...
We allow negative numeric offsets for the simple syntax inside
double-quoted and heredoc strings.
2016-10-14 14:14:08 +02:00
Nikita Popov
0e4c173349
Merge branch 'PHP-7.0' into PHP-7.1
...
(cherry picked from commit 26964ccea0
)
2016-10-14 01:52:17 +02:00
Nikita Popov
5b429fef42
Fix line number of implicit return in pseudo-main scope
2016-10-12 22:25:41 +02:00
Nikita Popov
07af6ba898
Make sure TOKEN_PARSE mode is thread safe
...
Introduce an on_event_context passed to the on_event hook. Use this
context to pass along the token array. Previously this was stored
in a non-tls global :/
2016-07-23 00:00:13 +02:00
Dmitry Stogov
ebb99a1a3a
Fixed compilation warnings
2016-06-21 16:55:17 +03:00
Sara Golemon
95af467d8d
Raise compiler warning on octal overflow
...
Addresses https://bugs.php.net/bug.php?id=71994
2016-05-14 00:20:32 +00:00
Dmitry Stogov
ccf18da450
Eliminated checks for (func->op_array.fn_flags & ZEND_ACC_GENERATOR) in fast path of DO_FCALL* handlers.
...
This slightly improves calls to regular function and method calls in cost of a bit slower generator initialization.
Separate call frame for generators, allocated on heap, now created by ZEND_GENERATOR_CREATE instruction.
2016-05-13 01:40:15 +03:00
Dmitry Stogov
c19cb70dac
Revert "Refactor zval cleanup into single function"
...
This reverts commit bac6fdb0c5
.
2016-05-06 10:47:58 +03:00
Bob Weinand
bac6fdb0c5
Refactor zval cleanup into single function
...
Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
2016-05-05 23:31:57 +02:00
Andrea Faulds
660e88c19d
Fix bug #71897
2016-05-04 19:26:24 +01:00
Nikita Popov
35b34d7235
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_language_scanner.c
2016-03-06 21:39:20 +01:00
Nikita Popov
860dc17ab7
Fixed bug #71724
2016-03-06 21:38:21 +01:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Dmitry Stogov
998204ef2d
Separate common part of compile_file() and compile_string() into zend_compile()
2015-11-12 16:59:44 +03:00
Nikita Popov
a49ce7bb91
Don't return T_ERROR from token_get_all()
...
This turned out to be rather inconvenient after all. Instead just
return the same output we did on PHP 5. If people want to have an
error, use TOKEN_PARSE.
2015-07-09 23:02:21 +02:00
Nikita Popov
d91aad5966
Fix bug #69430
...
Don't throw from token_get_all() unless TOKEN_PARSE is used. Errors
are reported as T_ERROR tokens.
2015-07-09 19:11:48 +02:00
Aaron Piotrowski
a1a83bf5f0
Switch code on thrown TypeError and ParseError to 0, update related tests
2015-07-07 16:54:39 -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
ed1b64877d
Switch position of ce in exception ce variable names
2015-07-03 09:45:03 -05:00
Aaron Piotrowski
f9e9d3a437
Cleanup exception ce API
...
Removed recently added functions to get Error ce's and marked the old functions
fetching default_exception_ce and error_exception_ce as deprecated.
2015-07-03 09:44:30 -05:00
Aaron Piotrowski
110e0a5a2c
Merge branch 'master' into throwable-interface
...
# Conflicts:
# Zend/zend_language_scanner.c
# Zend/zend_language_scanner.l
# ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05:00
Aaron Piotrowski
d042d08807
Remodel exceptions based on Throwable interface
...
Added Throwable interface that exceptions must
implement in order to be thrown. BaseException
was removed, EngineException renamed to
Error, and TypeException and ParseException
renamed to TypeError and ParseError. Exception
and Error no longer extend a common base
class, rather they both implement the Throwable
interface.
2015-05-16 15:30:59 -05:00
Márcio Almada
110759386e
ext tokenizer port + cleanup unused lexer states
...
we basically added a mechanism to store the token stream during parsing
and exposed the entire parser stack on the tokenizer extension through
an opt in flag: token_get_all($src, TOKEN_PARSE).
this change allows easy future language enhancements regarding context
aware parsing & scanning without further maintance on the tokenizer
extension while solves known inconsistencies "parseless" tokenizer
extension has when it handles `__halt_compiler()` presence.
2015-04-30 03:03:29 -03:00
Márcio Almada
a75decd452
implement context sensitive language with lexical feedback
...
The implementation has no regression risks, has an even smaller footprint
compared to the previous attempt involving a pure lexical approach, is higly
predictable and higly configurable.
To turn a word semi-reserved you only need to edit the "SEMI_RESERVED" parser rule,
it's an inclusive list of all the words that should be matched as T_STRING on specific contexts.
Example:
```
method_modifiers function returns_ref indentifier '(' parameter_list ')' ...
```
instead of:
```
method_modifiers function returns_ref T_STRING '(' parameter_list ')' ...
```
TODO: port ext tokenizer
2015-04-30 03:03:29 -03:00
Bob Weinand
a9a6799964
Add line_start/end info to main op_array
2015-04-25 19:10:58 +02:00
Nikita Popov
d2607a0110
Move more stuff to file_context
...
Introduce helper macro FC(x) for CG(file_context).x.
end_compilation() now handled by file_context_end().
While at it, dropped zval wrapper for ticcks.
2015-04-21 17:39:07 +02:00
Nikita Popov
0381c1b79e
Fixed bug #69388
...
Renamed compiler_context to oparray_context. Introduced per-file
file_context. Moved import tables into the file_context.
context_stack no longer exists, instead keeping backups of contexts
on C stack. Same for file contexts.
TODO: Move more things out of CG into file_context. There should be
a number of other things that we should not try to reuse in nested
compilations.
2015-04-20 18:18:52 +02:00
Bob Weinand
f3e124d58d
Merge branch 'coroutineDelegation' of https://github.com/bwoebi/php-src
2015-04-14 17:58:58 +02:00
Nikita Popov
a8bf1c5d8f
Throw ParseException from lexer
...
Primarily to avoid getting fatal errors from token_get_all().
Implemented using a magic E_ERROR token, which the lexer emits to
force a parser failure.
2015-04-02 16:31:17 +02:00
Dmitry Stogov
acfc31c0f8
Use zend_error_noreturn() for fatal errors
2015-04-01 13:32:23 +03:00
Dmitry Stogov
d146d15003
Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate()
2015-03-20 02:02:42 +03:00
Nikita Popov
f1a6c06f14
Support ParseException for require etc
2015-03-17 21:35:42 +01:00
Bob Weinand
b4a142ab97
Added yield from operator
2015-03-07 00:28:12 +01:00
Dmitry Stogov
2fa8d67a5c
Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse.
2015-03-04 02:05:28 +03:00
Andrea Faulds
797dee59cd
Blast off to space.
2015-01-29 17:56:09 +00:00
Dmitry Stogov
b494aa0ba0
Fixed compiler reenterability
2015-01-22 20:39:34 +03:00
Sara Golemon
1010b0ea4f
Provide compiler hook for altering the AST pre-compilation.
2015-01-19 10:43:57 -08:00
Xinchen Hui
218d83d217
Fixed annoying incompatible pointer type warning
2015-01-18 07:24:57 -05:00
Andrea Faulds
5f29b98051
Error on invalid octal (fixes PHPSadness #31 )
...
Further error checks
2015-01-17 18:50:28 +00:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Anatol Belski
68dd8e8bd7
fix invalid free mentioned in bug 68665
...
thanks honey at internot dot info
2014-12-28 16:36:07 +01:00
Anatol Belski
6b59b276fd
C89 compat
2014-12-19 07:17:30 +01:00
Andrea Faulds
bae46f307c
Unicode Codepoint Escape Syntax
2014-12-19 00:40:59 +00:00
Anatol Belski
bdeb220f48
first shot remove TSRMLS_* things
2014-12-13 23:06:14 +01:00
Anatol Belski
d9d16d2e68
fix datatype mismatch warnings
2014-10-29 15:29:59 +01:00
Nikita Popov
e756333bbb
Remove <% and <script language="php"> tags
...
As per https://wiki.php.net/rfc/remove_alternative_php_tags .
Removes:
* <% opening tag
* %> closing tag
* <%= short opening tag
* /<script\s+language\s*=\s*(php|"php"|'php')\s*>/i opening tag
* /</script>/i closing tag
* asp_tags ini directive
2014-10-05 21:57:05 +02:00
Nikita Popov
69e7c9d89c
Initial coalesce operator implementation
2014-09-16 19:14:46 +01:00
Nikita Popov
e2d4d700cf
Fix yy_limit computation after encoding switch
...
The three assignments above this line are still broken - they assume
that byte offsets in one encoding directly map to byte offsets in
another encoding.
I'm fixing the length here because it is the one causing out-of-bounds
reads and is easy to fix. For the others we'd have to actually compute
new offsets.
2014-09-11 14:52:59 +02:00
Nikita Popov
f017843df3
Remove self-contradictory zend multibyte assertion
...
Code that explicitly exists to handle an incompatible internal
encoding should not assert that the internal encoding is compatible.
2014-09-11 14:52:59 +02:00
Xinchen Hui
b625661248
Remove unnecessary branch/temp variable
2014-09-09 11:52:25 +08:00
Nikita Popov
af84d5737c
Fix parser stack destruction with dummy ENCAPSED_AND_WHITESPACE
...
T_ENCAPSED_AND_WHITESPACE is now specified to always hold a value,
so give it a NULL value in the dummy cases.
2014-09-08 13:57:28 +02:00
Dmitry Stogov
b1f53ca415
Use efree_size() instead of efree() where posible
2014-08-27 20:49:56 +04: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
b7876e734a
eval() with parse error uses clean shutdown now
2014-08-26 22:31:58 +02: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
d2a3bf9daf
Fix compiler warnings
2014-08-25 23:08:01 +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
28b7a03318
master renamings phase 5
2014-08-25 21:20:44 +02:00
Anatol Belski
4d997f63d9
master renames phase 3
2014-08-25 20:22:49 +02:00
Anatol Belski
c3e3c98ec6
master renames phase 1
2014-08-25 19:24:55 +02:00
Anatol Belski
5bb25776a0
further fixes on core
2014-08-16 15:34:04 +02:00
Anatol Belski
8ee2a4a9b5
first shot on merging the core fro the int64 branch
2014-08-16 11:16:11 +02:00
Nikita Popov
c07907121e
zend_do_return -> zend_emit_final_return
2014-07-26 21:32:48 +02:00
Nikita Popov
8c8839c2a1
Remove DUMMY_STRINGL
...
What is that for?
2014-07-26 19:03:36 +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
Nikita Popov
689891c2b2
Expose ast via CG(ast)
2014-07-24 20:51:01 +02:00
Nikita Popov
8a2ff6b53d
Partial NS port (semicolon, no errors)
2014-07-22 12:45:44 +02:00
Nikita Popov
18fd2a1897
Port __TRAIT__ and __CLASS__ to AST
2014-07-21 17:34:00 +02:00
Nikita Popov
64a7132185
Port __METHOD__
2014-07-16 23:23:25 +02:00
Nikita Popov
a75921dcb1
Port __FUNCTION__ to AST
2014-07-16 23:10:16 +02:00
Nikita Popov
31687ed5c7
Handle trait __CLASS__ in parser
2014-06-26 14:00:20 +02: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
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
f9b26bc39a
Cleanup (2-nd round)
2014-04-15 21:56:30 +04:00
Dmitry Stogov
a9599c9512
Fixed memory leak
2014-04-10 23:36:16 +04:00
Dmitry Stogov
8eb8d123e0
Fixed suppor for multibyte encoding
2014-04-10 18:47:47 +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
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
Xinchen Hui
506f6a4282
Refactor mbstring (incompleted)
2014-03-24 12:40:07 +08:00
Dmitry Stogov
85a5712955
Fixed __FILE__ and __METHOD__ constants
2014-03-07 01:34:03 +04:00
Dmitry Stogov
0b6af57256
Fixed memory leaks
2014-03-06 14:29:36 +04:00
Dmitry Stogov
3733737328
Handle interned strings as non-refcounted scalars
2014-03-05 13:55:56 +04:00
Xinchen Hui
257853cade
Fixed memory leak in ext/standard/tests/strings/005.php
2014-02-22 20:36:12 +08:00
Dmitry Stogov
b2e7b89041
Fix non-zero terminated strings
2014-02-21 18:14:47 +04:00
Dmitry Stogov
ca729cb4e3
Fixed __METHOD__ handling
2014-02-21 17:52:43 +04:00
Dmitry Stogov
557994d50d
Use better data structures (incomplete)
2014-02-19 01:12:05 +04:00
Dmitry Stogov
5de7115679
Use better data structures (incomplete; able to run bench.php)
2014-02-18 16:27:38 +04:00
Dmitry Stogov
a0fe8e5a91
Use better data structures (incomplete)
2014-02-18 01:41:23 +04:00
Dmitry Stogov
fc5e9bee29
It should be fixed later in some better way (added ??? marks)
2014-02-17 22:17:16 +04:00
Xinchen Hui
e7d173fc82
Fixed Memory leak
2014-02-17 23:01:25 +08:00
Dmitry Stogov
2b9b9afa7a
Use better data structures (incomplete)
2014-02-17 17:59:18 +04:00
Dmitry Stogov
f4cfaf36e2
Use better data structures (incomplete)
2014-02-10 10:04:30 +04:00
datibbaw
aff56f3c45
add T_POW (**) operator
...
Fixed recognition of the operator
Added opcode, still doing multiply instead of pow()
opcode now always returns int(42)
The right answer, but always a float
Yanked code from pow() implementation.
Should not handle negative long as exponent ourselves
Added test cases from pow()
Moved precedence higher than '~'
Added GMP operator overloading
Added ZEND_ASSIGN_POW (**=) operator.
Added pow() as a language construct.
Adjusted test cases for changed precedence.
Reduced pow() to shell function around ZEND_API pow_function()
Reduced test case to only contain edge cases
Added overloading test case
Moved unary minus above T_POW
Revert "Added pow() as a language construct."
Bad bad bad idea.
This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02.
Reverted unary minus behaviour due to previous revert.
Convert arrays to int(0)
Exponent with array as a base becomes int(0)
Rebase against master
Fixed tokenizer test case
2014-02-06 14:41:21 +01:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Anatol Belski
e30b2aae5a
initial move on renaming files and fixing includes
2013-10-17 09:43:52 +02:00
Nikita Popov
0d7a638866
Implement variadic function syntax
...
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02:00
Nikita Popov
96b1c2145c
Provide more macros for handling of interned strings
...
* str_erealloc behaves like erealloc for normal strings, but will
use emalloc+memcpy for interned strings.
* str_estrndup behaves like estrndup for normal strings, but will
not copy interned strings.
* str_strndup behaves like zend_strndup for normal strings, but
will not copy interned strings.
* str_efree_rel behaves like efree_rel for normal strings, but
will not free interned strings.
* str_hash will return INTERNED_HASH for interned strings and
compute it using zend_hash_func for normal strings.
2013-09-13 19:42:10 +02:00
Nikita Popov
d2950ac279
Make use of Z_*VAL and ZVAL_* in language scanner
2013-09-13 15:08:01 +02:00
Stanislav Malyshev
ac343d5c1f
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fix bug #64936 - clean doc comment state at the beginning and end of the scan
ws fix
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l
Zend/zend_language_scanner_defs.h
2013-06-16 15:29:25 -07:00
Stanislav Malyshev
2208447d42
Fix bug #64936 - clean doc comment state at the beginning and end of the scan
2013-06-16 15:22:23 -07:00
Stanislav Malyshev
ac0aa5737e
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
fix bug #64660 - yyparse can return 2, not only 1
Conflicts:
Zend/zend_language_scanner.c
2013-05-20 00:57:34 -07:00
Stanislav Malyshev
fb58e69a84
fix bug #64660 - yyparse can return 2, not only 1
2013-05-20 00:52:38 -07:00
Dmitry Stogov
6e8aa09696
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #64529 (Ran out of opcode space)
Conflicts:
NEWS
Zend/zend_execute_API.c
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
2013-03-28 00:08:11 +04:00
Dmitry Stogov
85e5e60777
Fixed bug #64529 (Ran out of opcode space)
2013-03-28 00:03:40 +04:00
Xinchen Hui
a666285bc2
Happy New Year
2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
Dmitry Stogov
ba8a06fd95
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed compiler reenterability
Fixed compiler reenterability
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
2012-11-14 18:03:38 +04:00
Dmitry Stogov
65585b3aa2
Fixed compiler reenterability
2012-11-14 17:45:10 +04:00
Nikita Popov
1823b16fa1
Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
...
Merging master to fix Windows build
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
Zend/zend_vm_def.h
2012-08-20 13:37:53 +02:00
Stanislav Malyshev
3336e1e78c
Merge branch 'pull-request/31'
...
* pull-request/31:
Fix lexing of nested heredoc strings in token_get_all()
2012-08-19 21:43:04 -07:00
Nikita Popov
f4ce364628
Merge remote-tracking branch 'php-src/master' into addGeneratorsSupport
...
This is just an intial merge. It does not yet make generators and finally
work together.
Conflicts:
Zend/zend_language_scanner.c
Zend/zend_language_scanner_defs.h
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
Zend/zend_vm_execute.skl
Zend/zend_vm_opcodes.h
2012-08-13 16:54:53 +02:00
Xinchen Hui
80d5ae3cea
Implemented 'finally' keywords for php
...
RFC: https://wiki.php.net/rfc/finally
FR: https://bugs.php.net/bug.php?id=32100
and I have got some improvment ideas(performance), will implemented
later. thanks
2012-08-13 21:48:39 +08:00
Nikita Popov
9b101ac8b3
Add T_YIELD "yield" keyword
2012-05-15 18:30:48 +02:00
Felipe Pena
45ef3c759e
Merge branch 'PHP-5.4'
...
* PHP-5.4:
- Fixed Windows build
2012-04-30 15:56:15 -03:00
Felipe Pena
79961dccab
- Fixed Windows build
2012-04-30 15:55:57 -03:00
Felipe Pena
73b6150992
Merge branch 'PHP-5.4'
...
* PHP-5.4:
- Changed last commit to use VK_ESCAPE on Windows
2012-04-30 10:31:59 -03:00
Felipe Pena
3120387617
- Changed last commit to use VK_ESCAPE on Windows
2012-04-30 10:31:49 -03:00
Felipe Pena
bbe9eec9a2
Merge branch 'PHP-5.4'
...
* PHP-5.4:
- Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net
2012-04-29 19:36:10 -03:00
Felipe Pena
cc5b995c78
- Fixed bug #61827 (incorrect \e processing on Windows) patch by: ab@php.net
2012-04-29 19:35:52 -03:00