Commit Graph

111 Commits

Author SHA1 Message Date
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
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
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
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
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