Commit Graph

86 Commits

Author SHA1 Message Date
Pierre Joye
eef2978afc Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  fix #66872, invalid argument crashes gmp_testbit
  fix #66872, invalid argument crashes gmp_testbit
  add vc12 (2013)

Conflicts:
	ext/gmp/gmp.c
2014-03-10 12:18:57 +01: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
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
krakjoe
2a1b60569f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  stop warnings from unused opcode map
  - BFN
  - Fixed bug #66311 (Stack smashing protection kills PDO/ODBC queries) patch by: michael at orlitzky dot com
  Included new .c file in build too
  Fixed little typo in zend_vm_gen.php
  Moved to new file, killing a lot of warnings
2013-12-22 13:11:20 +00:00
krakjoe
247ec0d81f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  stop warnings from unused opcode map
  - BFN
2013-12-22 13:07:41 +00: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
Sebastian Bergmann
8ca4288fd2 Leftover: Invoke re2c with --no-generation-date to prevent unintentional / unnecessary changes in generated files. 2012-12-06 09:43:27 +01: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
f99befadbd Fixed compiler reenterability 2012-11-14 17:47:27 +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
d939d2dee5 Add sceleton for yield* expression
This does not yet actually implement any delegation.
2012-06-19 00:37:31 +02:00
Nikita Popov
9b101ac8b3 Add T_YIELD "yield" keyword 2012-05-15 18:30:48 +02:00
Felipe Pena
1c2c620a58 - Regenerated files 2012-04-30 15:57:09 -03:00
Felipe Pena
4deb0f1a0a - Regenerated files 2012-04-30 15:57:00 -03:00
Felipe Pena
1622843162 - Regenerated files 2012-04-30 10:35:28 -03:00
Felipe Pena
ea23192910 - Regenerated files 2012-04-30 10:35:11 -03:00
Nikita Popov
b233de098d Fix bug #61681: Malformed grammar
Generate T_STRING_VARNAME only if it actually is one. This is only the case
for "${varname}" and "${varname[offset]}" so we can just add a check for
} or [ after the LABEL.
2012-04-09 18:26:38 +02:00
Nikita Popov
4cf90e06c9 Fix lexing of nested heredoc strings in token_get_all()
This fixes bug #60097.

Before two global variables CG(heredoc) and CG(heredoc_len) were used to
track the current heredoc label. In order to support nested heredoc
strings the *previous* heredoc label was assigned as the token value of
T_START_HEREDOC and the language_parser.y assigned that to CG(heredoc).

This created a dependency of the lexer on the parser. Thus the
token_get_all() function, which accesses the lexer directly without
also running the parser, was not able to tokenize nested heredoc strings
(and leaked memory). Same applies for the source-code highlighting
functions.

The new approach is to maintain a heredoc_label_stack in the lexer, which
contains all active heredoc labels.

As it is no longer required, T_START_HEREDOC and T_END_HEREDOC now don't
carry a token value anymore.

In order to make the work with zend_ptr_stack in this context more
convenient I added a new function zend_ptr_stack_top(), which retrieves the
top element of the stack (similar to zend_stack_top()).
2012-03-31 21:53:30 +02:00
Gustavo André dos Santos Lopes
68990224be Merge branch '5.3' into 5.4
Zend/zend_language_scanner.c and Zend/zend_language_scanner_defs.h had to be changed manually.
2012-03-28 08:57:19 +01:00
Gustavo André dos Santos Lopes
c6e15455a3 Revert "- fix bug #61504, fix build errors on windows and possibly other"
This reverts commit 74ee335e3a.
2012-03-28 08:41:18 +01:00
Pierre Joye
74ee335e3a - fix bug #61504, fix build errors on windows and possibly other 2012-03-28 01:59:41 +02:00
Etienne Kneuss
86fcb9659e Fix #61095 (Lexing 0x0*+<NUM> incorrectly) 2012-02-20 18:28:57 +00:00
Nuno Lopes
71843491d3 regen for r321655 2012-01-01 22:52:23 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Ilia Alshanetsky
3f5ad237e1 Fixed Bug #53629 (memory leak inside highlight_string()). 2011-01-03 14:39:48 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
4e606e3ceb - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-30 02:45:10 +00:00
Felipe Pena
96bb25e8e7 - Reverted fix for bug #48930 (due binary compatibility breakage) 2010-06-29 11:37:13 +00:00
Felipe Pena
9b07568c43 - Fixed bug #48930 (__COMPILER_HALT_OFFSET__ incorrect in PHP >= 5.3) 2010-06-27 21:46:16 +00:00
Pierre Joye
15a3c450b7 - those are in 5.3.2 now, merge to 5.3.2 section is coming 2010-02-11 21:17:13 +00:00
Sebastian Bergmann
d2281d1dff sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.php 2010-01-05 20:46:53 +00:00
Felipe Pena
5dd6b9ffa9 - Fixed bug #50145 (crash while running bug35634.phpt) 2009-11-17 11:18:40 +00:00
Jani Taskinen
0f1b93a1ca - Fix skips 2009-09-10 15:05:34 +00:00
Matt Wilmas
e7c5f3cfa4 Regenerate 2009-05-05 01:44:52 +00:00
Dmitry Stogov
7ef3db0e4e Fixed bug #47516 (nowdoc can not be embed in heredoc but can be embed in double quote) 2009-03-26 12:37:54 +00:00