Commit Graph

9762 Commits

Author SHA1 Message Date
Dmitry Stogov
75041379a6 Improved object property access. 2014-11-06 14:50:03 +03:00
Chris Tankersley
6b0eca060f Various fixes to allow support for new VS2014 features
- Added some typeof checks to handle JS errors introduced in VS2014
 - Added VS2014 to the list of compilers
 - Changed to use stdint.h if we are using VS2014 or higher
 - Skip defining timespec if we're using VS2014 or higher
 - Moved u_char typedef out to always be defined regardless of VS version
2014-11-05 18:00:09 -05:00
Anatol Belski
3b6cd5fe4c improved the ZEND_FASTCALL convention for vc12+ 2014-11-04 10:07:44 +01:00
Andrea Faulds
faa4c6155e Respect flags when fetching class by name 2014-11-04 00:15:26 +00:00
Andrea Faulds
71566b994f Merge branch 'master' into zppFailOnOverflow 2014-11-01 22:49:53 +00:00
Anatol Belski
073c5e0997 fix warning not all control paths return a value 2014-10-31 19:36:21 +01:00
Anatol Belski
cd574ca467 fix datatype mismatch warning 2014-10-31 19:36:19 +01:00
Adam Harvey
4bb836be20 Update the VM generation script, per Bob. 2014-10-31 10:10:49 -07:00
Adam Harvey
5b5f99ef18 Add BEGIN_EXTERN_C() and END_EXTERN_C() to .h files missing them. 2014-10-31 10:08:17 -07:00
Xinchen Hui
ccb09eb352 Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_API.c
2014-10-31 17:37:56 +08:00
Xinchen Hui
d9d181e5ad Fixed Bug #68104 (Segfault while pre-evaluating a disabled function) 2014-10-31 17:32:23 +08:00
Xinchen Hui
84783ecb7e Fixed outof memory (length == -1) 2014-10-31 12:25:40 +08:00
Xinchen Hui
fced6e6148 Save memory allocating 2014-10-30 16:55:40 +08:00
Xinchen Hui
af22cd665c Fixed memory leak in ZEND_JMPZ_EX (op1 and result may share same slot) 2014-10-30 16:00:08 +08:00
Anatol Belski
cf581178e7 fix "inconsistent dll linkage" warning caused by bison
stdlib.h might not be always using _STDLIB_H, that will move bison
to redeclare the malloc/free prototypes.
2014-10-29 15:30:00 +01:00
Anatol Belski
d9d16d2e68 fix datatype mismatch warnings 2014-10-29 15:29:59 +01:00
Bob Weinand
47fd168fed Move missing zend_hash_* macros from phpdbg.h to zend_hash.h 2014-10-28 23:07:36 +01:00
Anatol Belski
e4464a8e85 convert API for size_t where zend_string is used under the hood 2014-10-28 17:24:59 +01:00
Anatol Belski
36b64b44d5 fix signature, zend_string is used for function name 2014-10-28 17:24:58 +01:00
Xinchen Hui
5190d8fb56 Addtion fix for bug #68252 , forget static variable hanlding 2014-10-28 17:42:06 +08:00
Xinchen Hui
e6fe3127d0 Fixed bug #68252 (segfault in Zend/zend_hash.c in function _zend_hash_del_el)
Don't leave a UNDEF gap in function_table
2014-10-28 17:36:03 +08:00
Anatol Belski
ac964fbe30 fix datatype mismatches 2014-10-27 16:38:41 +01:00
Anatol Belski
b0d86d87d8 fix datatype mismatches 2014-10-27 16:38:40 +01:00
Anatol Belski
5b5e2d3d45 fix datatype mismatch warnings 2014-10-27 16:38:39 +01:00
Anatol Belski
8fdaeef8e8 fix datatype mismatches 2014-10-27 16:38:38 +01:00
Anatol Belski
c51a42076c Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (214 commits)
  fix datatype mismatch warnings
  fix datatype mismatches
  fix datatype mismatches
  fix datatype mismatches
  fix datatype mismatch warnings
  fix datatype mismatch warnings
  fix datatype mismatch warnings
  fix datatype mismatch warning
  fix datatype mismatches
  fix datatype mismatch warnings
  Re-add phpdbg to travis
  Added some NEWS
  Make xml valid (missing space between attrs)
  Fix info classes file name in xml
  Add note about <eval> tag for errors in xml.md
  Name the tag <eval> if the error id during ev cmd
  Do not print out xml as PHP print...
  Fix output to wrong function
  Fixed parameter order on %.*s
  Too much copypaste...
  ...
2014-10-24 22:28:32 +02:00
Anatol Belski
1b4fd5825a fix datatype mismatch warnings 2014-10-24 20:57:38 +02:00
Anatol Belski
89ed34e3e9 fix datatype mismatches 2014-10-24 20:50:09 +02:00
Anatol Belski
283947af74 fix datatype mismatches
and convert APIs to size_t where zend_string internally used
2014-10-24 20:50:08 +02:00
Anatol Belski
f7d3355e75 fix datatype mismatches
and convert len args to size_t where the underlaying API uses zend_string
2014-10-24 20:50:06 +02:00
Anatol Belski
35576ea0ac fix datatype mismatch warnings 2014-10-24 20:50:05 +02:00
Anatol Belski
ca46bd04b1 fix datatype mismatch warnings 2014-10-24 20:50:04 +02:00
Dmitry Stogov
6e396961c5 Fixed "instanceof" with undefined classes 2014-10-23 14:50:57 +04:00
Anatol Belski
88ca46d92b fix datatype mismatches 2014-10-23 11:45:44 +02:00
Anatol Belski
e70dce7d99 fix datatype mismatch 2014-10-23 10:29:57 +02:00
Anatol Belski
53797ec1c9 move the more common case up 2014-10-23 10:29:56 +02:00
Anatol Belski
f227922446 move key lengths to use size_t as zend_string is used internally anyway 2014-10-23 10:29:54 +02:00
Dmitry Stogov
4fd435abab Embed FETCH_CLASS <string> into the following NEW 2014-10-23 11:52:34 +04:00
Dmitry Stogov
8793aa407e Optimized HashTable size calculation 2014-10-23 00:26:32 +04:00
Dmitry Stogov
8dedd863bc Get rid of ZEND_FETCH_MAKE_REF 2014-10-22 21:45:02 +04:00
Anatol Belski
d5ccf4d276 eliminate one branch when computing the initial table size 2014-10-22 19:23:29 +02:00
Anatol Belski
a5e4f1f598 fix several datatype mismatches 2014-10-22 17:56:30 +02:00
Anatol Belski
f59daf2104 micro optimized initial hash size calculation
most of the calls are with a size <= 8, so don't even bother any
bitshifts. For the bigger sizes, use an intrinsic (should be extended
with gcc ones though).
2014-10-22 17:56:24 +02:00
Anatol Belski
5e24ae321d all the key_len use uint, fix the warning when using strlen on 64 bit 2014-10-22 17:56:22 +02:00
Anatol Belski
944d2c65e1 fix datatype mismatches 2014-10-22 17:56:19 +02:00
Anatol Belski
7959e3faf2 fix datatype mismatches for strings from userspace 2014-10-22 17:56:17 +02:00
Dmitry Stogov
534d854fb2 Embed FETCH_CLASS <string> into the following INSTANCEOF 2014-10-22 17:23:43 +04:00
Dmitry Stogov
779ca61e32 Don't use opline->extended_value for FETCH_CLASS flags where it's unnecessary 2014-10-22 17:22:21 +04:00
Dmitry Stogov
36fa572aaa ZEND_RECV didn't really use opline->extended_value for FETCH_CLASS flags 2014-10-22 15:22:30 +04:00
Xinchen Hui
c584798b05 Useless assignment 2014-10-22 17:30:19 +08:00
Dmitry Stogov
fe8577efb1 Optimized ASSIGN_DIM and related opcodes 2014-10-21 19:30:43 +04:00
Dmitry Stogov
33645f4f55 micro optimization 2014-10-21 16:18:06 +04:00
Dmitry Stogov
5d9792de9a Avoid "goto" 2014-10-21 11:43:13 +04:00
Dmitry Stogov
089f496799 Moved proxy object support in ASSIGN_ADD (and family) from VM to slow paths of corresponding operators 2014-10-21 03:24:20 +04:00
Dmitry Stogov
ae127faf5b Simplification 2014-10-21 00:56:48 +04:00
Dmitry Stogov
8e1dc33db5 zend_get_property_info_quick() cleanup and optimization 2014-10-20 20:33:35 +04:00
Dmitry Stogov
0e270661a4 Use ADDREF instead of DUP, it must be enough. 2014-10-20 13:55:55 +04:00
Dmitry Stogov
1480d26fb9 fixed compilation error 2014-10-20 12:51:02 +04:00
Nikita Popov
4b892439e6 Fix bug #68262: Broken reference across cloned objects 2014-10-19 13:22:44 +02:00
Anatol Belski
9cbdf3e66a Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fixed compilation
  Optimized property access handlers. Removed EG(std_property_info).
  Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads)
  News entry for new curl constants
2014-10-18 03:31:02 +02:00
Dmitry Stogov
7471c21781 Optimized property access handlers. Removed EG(std_property_info). 2014-10-17 19:10:05 +04:00
Anatol Belski
83b8e281db Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Don't make difference between undefined and unaccessible properies when call __get() and family
  Don't make useless CSE
  array_pop/array_shift optimization
2014-10-17 13:58:47 +02:00
Dmitry Stogov
f2fa7a41cf Don't make difference between undefined and unaccessible properies when call __get() and family 2014-10-17 15:01:54 +04:00
Dmitry Stogov
6b203aa262 Don't make useless CSE 2014-10-17 15:00:54 +04:00
Anatol Belski
2942a4aa45 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  check for zlib headers as well as lib for mysqlnd
  a realpath cache key can be int or float, catching this
  TLS 1.0, 1.1 and 1.2 Curl constants - bug #68247
  Micro optimizations for isset/empty
  Micro optimization for zend_hash_next_index_insert_new()
  Fix array_keys() on $GLOBALS
  Fix procedural finfo calls in methods

Conflicts:
	ext/mysqlnd/config.w32
2014-10-17 10:13:08 +02:00
Dmitry Stogov
176b8d7ca3 Micro optimizations for isset/empty 2014-10-17 00:17:13 +04:00
Dmitry Stogov
2a1250fa57 Micro optimization for zend_hash_next_index_insert_new() 2014-10-16 19:19:10 +04:00
Nikita Popov
cf5920e8aa Fix procedural finfo calls in methods
getThis() will return the $this of the calling method.
2014-10-16 14:24:23 +02:00
Anatol Belski
69fa6523e8 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix allocator for 64bit zend_long with 32bit long
  Use intptr_t for zend_intptr_t typedef
  Fix format strings in zend_alloc
  Drop zend_long64 in favor of int64_t
  Removed deprecated fields
  NEWS
  cleanup NEWS
  removing the NEWS entry as we had to revert this fix for now
  Revert "Merge branch 'PHP-5.5' into PHP-5.6"
  Revert "fix TS build"
  Revert "Merge branch 'PHP-5.4' into PHP-5.5"
  Revert "Bug #67965: Fix blocking behavior in non-blocking crypto streams"
  Revert "Bug #41631: Fix regression from first attempt (6569db8)"
  NEWS
  Fixed Bug #65171 imagescale() fails
  Fixed bug #68234
  Fixed bug #68215 (Behavior of foreach has changed)
  Revert "Bug #41631: Observe socket read timeouts in SSL streams"
  PHP-5.6.3 is next
  update NEWS, 5.6.2 will be a security-only release
2014-10-16 13:49:35 +02:00
Nikita Popov
53a8584123 Fix allocator for 64bit zend_long with 32bit long 2014-10-16 12:42:23 +02:00
Nikita Popov
876965d20a Use intptr_t for zend_intptr_t typedef
Current code doesn't work for 64bit zend_long with 32bit pointers.

If intptr_t isn't defined on some platform, we should add it to
our php_stdint.h header.
2014-10-16 12:42:23 +02:00
Nikita Popov
b65518faf3 Fix format strings in zend_alloc 2014-10-16 12:42:22 +02:00
Nikita Popov
2a9daf2e15 Drop zend_long64 in favor of int64_t
Also drop ZEND_HAVE_LONG64, because we already require the
presence of a int64_t type.
2014-10-16 12:42:22 +02:00
Dmitry Stogov
9527877930 Removed deprecated fields 2014-10-16 13:41:27 +04:00
Anatol Belski
8aeffdd74c moved most of the core to use static tsrm ls cache pointer
plus apache2handler, cli and cgi
2014-10-15 16:33:40 +02:00
Dmitry Stogov
ed18d67c5e Fixed bug #68215 (Behavior of foreach has changed) 2014-10-15 17:02:54 +04: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
382f95e612 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (25 commits)
  Fix return code (merges are hard :( )
  fix bad merge
  Fix bug #68113 (Heap corruption in exif_thumbnail())
  Fix bug #68089 - do not accept options with embedded \0
  Fixed bug #68044: Integer overflow in unserialize() (32-bits only)
  Fix bug #68027 - fix date parsing in XMLRPC lib
  Fix bug #68113 (Heap corruption in exif_thumbnail())
  Fix bug #68089 - do not accept options with embedded \0
  Fixed bug #68044: Integer overflow in unserialize() (32-bits only)
  Fix bug #68027 - fix date parsing in XMLRPC lib
  Fix bug #68113 (Heap corruption in exif_thumbnail())
  Fix bug #68089 - do not accept options with embedded \0
  Fixed bug #68044: Integer overflow in unserialize() (32-bits only)
  Fix bug #68027 - fix date parsing in XMLRPC lib
  Fixed bug #68128
  Added API function to retrive current custom heap handlers
  update NEWS and UPGRADING
  Allow to substitute storage layer in memory manager.
  Upated NEWS
  Address issues raised by @nikic
  ...
2014-10-15 08:32:54 +02:00
Dmitry Stogov
d2daa19701 Added API function to retrive current custom heap handlers 2014-10-14 14:20:25 +04:00
Dmitry Stogov
2842766d7f Allow to substitute storage layer in memory manager. 2014-10-14 09:41:16 +04:00
Anatol Belski
766eb0103f Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fix several datatype mismatch warnings
  fix signed/unsigned mismatch warning
  more signed/unsigned mismatch fix
  fix signed/unsigned mismatch warning
  fix signed/unsigned mismatch
  fix some signed/unsigned mismatch
  missing include for strlen proto
  More fixes for array/object casts with temporary variables
  Fix array/object cast of refcounted tmp var
  Deref right value for compound assign ops
2014-10-13 19:02:22 +02:00
Anatol Belski
66e47446e4 fix signed/unsigned mismatch warning 2014-10-13 18:43:13 +02:00
Anatol Belski
b2de68a81f more signed/unsigned mismatch fix 2014-10-13 18:43:12 +02:00
Anatol Belski
84477c7c39 fix some signed/unsigned mismatch 2014-10-13 18:43:09 +02:00
Nikita Popov
5d94ba6ec3 More fixes for array/object casts with temporary variables 2014-10-13 15:31:59 +02:00
Nikita Popov
e62edf2e58 Fix array/object cast of refcounted tmp var 2014-10-13 15:31:59 +02:00
Nikita Popov
2622cfc2fb Deref right value for compound assign ops
Currently we do not support IS_REFERENCE operands for most of our
*_function's (should we?), so we need to deref here.
2014-10-13 15:31:59 +02:00
Anatol Belski
19c41e1f53 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  We can't eliminate FETCH_CONSTANT opcodes for constants represented by AST.
  Ensure __LINE__ is always accurate
  Fix incdec of referenced properties
  Fix ::jsonSerialize() failure message
  Fix invalid zend_string_frees in reflection
  Remove retval member in spl_dllist
  DLL export several APIs needed for phpdbg
  More fixes for nodelist array access - testing for null property read - no zval copying if the type is already long - memory fix for master
2014-10-13 13:52:31 +02:00
Nikita Popov
0b09ba84b9 Ensure __LINE__ is always accurate 2014-10-12 20:55:52 +02:00
Nikita Popov
b7e139a59c Fix incdec of referenced properties
I thought these SEPARATE_ZVAL_IF_NOT_REF usages were safe at first,
because incdec op supports reference variables. However this
violates the constraint that IS_TMP_VAR variables may not be
references (which is an issue if you use the result of the incdec
op).

Still need to fix the cases where read_property/write_property is
used.
2014-10-12 20:55:52 +02:00
Anatol Belski
8a55159258 Merge branch 'PHP-5.6'
* PHP-5.6:
  DLL export several APIs needed for phpdbg
2014-10-12 19:22:40 +02:00
Anatol Belski
c96a6b4493 DLL export several APIs needed for phpdbg 2014-10-12 19:22:03 +02:00
Anatol Belski
e1cd0e0a38 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (40 commits)
  int to size_t where the underlaying API supports it
  use php_socket_t instead of int
  fix signed/unsigned mismatch warning
  fix compilation warning
  Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference.
  Add notes about get_class_entry/get_class_name to UPGRADING
  Fix casts in GD
  Drop redundant casting code from ext/filter
  update NEWS
  update NEWS
  update NEWS
  update NEWS
  Added note to UPGRADING regarding 64-bit support in pack()/unpack()
  pack(): Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Add 64 bit formats to pack() and unpack()
  Help to CPU branch predictor
  Removed unused EG(orig_error_reporting)
  Update get_class_name semantics
  Remove Z_OBJ_CLASS_NAME_P
  Improved VM stack primitives for fast paths. Slow paths are not inlined anymore.
  ...
2014-10-10 22:51:13 +02:00
Anatol Belski
e33e4b2d8c int to size_t where the underlaying API supports it 2014-10-10 19:00:20 +02:00
Dmitry Stogov
af3354dc43 Improved specialisation $this variable accessed through IS_UNUSED operand must be IS_OBJECT, so we don't have to check for its type or perform dereference. 2014-10-10 16:36:12 +04:00
Dmitry Stogov
2c434470a6 Help to CPU branch predictor 2014-10-09 23:58:41 +04:00
Dmitry Stogov
cbe4fa444f Removed unused EG(orig_error_reporting) 2014-10-09 23:38:39 +04:00
Nikita Popov
df79b9b27a Update get_class_name semantics
* get_class_name is now only used for displaying the class name
   in debugging functions like var_dump, print_r, etc. It is no
   longer used in get_class() etc.
 * As it is no longer used in get_parent_class() the parent
   argument is now gone. This also fixes incorrect parent classes
   being reported in COM.
 * get_class_name is now always required (previously some places
   made it optional and some required it) and is also required
   to return a non-NULL value.
 * Remove zend_get_object_classname. This also fixes a number of
   potential leaks due to incorrect usage of this function.
2014-10-09 20:48:27 +02:00
Nikita Popov
c061c82945 Remove Z_OBJ_CLASS_NAME_P
Doesn't make much sense anymore, now that get_class_entry is
gone.
2014-10-09 20:48:27 +02:00
Dmitry Stogov
0390cde428 Improved VM stack primitives for fast paths. Slow paths are not inlined anymore. 2014-10-09 20:29:02 +04:00
Nikita Popov
e5e9d8346f Remove zend_get_class_entry function 2014-10-09 14:17:30 +02:00
Nikita Popov
b3a779de68 Remove get_class_entry object handler 2014-10-09 14:08:10 +02:00
Nikita Popov
116c5ecda1 Remove proxy object implementation 2014-10-09 14:01:08 +02:00
Nikita Popov
ee5b30fa19 Remove support for classes without class entries
get_class_entry must be non-NULL and return non-NULL.
2014-10-09 13:58:14 +02:00
Nikita Popov
43f1c94dda Review a few more SEPARATE_ZVAL_IF_NOT_REF usages 2014-10-09 12:51:05 +02:00
Nikita Popov
e919caca86 Fix bug #68191: Broken reference across objects 2014-10-09 12:05:56 +02:00
Dmitry Stogov
7fd3375fb5 Exposed zend_clean_and_cache_symbol_table() and fixed incorrect efree() 2014-10-08 16:08:26 +04:00
Anatol Belski
9af9f874c7 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Add to NEWS
  Add to NEWS
  Fix for bug #68087 (ODBC not reading DATE columns correctly)
  Add to NEWS
  Add to NEWS
  Fix for bug #68114 (Build fails on OS X due to undefined symbols)
  Micro optimization
  Improved return by reference handling
2014-10-08 09:32:19 +02:00
Dmitry Stogov
fe501914f0 Micro optimization 2014-10-07 23:48:55 +04:00
Dmitry Stogov
2ea97c6f5a Improved return by reference handling 2014-10-07 22:38:37 +04:00
Anatol Belski
62598740aa Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Reorder fields for better alignment on both 32-bit and 64-bit systems
  Remove useless parts of EX(old_error_reporting)
  Merged EX(frame_kind) and EX(flags) into single word
2014-10-07 18:44:15 +02:00
Dmitry Stogov
75b5dc6369 Reorder fields for better alignment on both 32-bit and 64-bit systems 2014-10-07 18:12:09 +04:00
Dmitry Stogov
67be34ec95 Remove useless parts of EX(old_error_reporting) 2014-10-07 17:54:24 +04:00
Dmitry Stogov
33e137d409 Merged EX(frame_kind) and EX(flags) into single word 2014-10-07 17:12:12 +04:00
Anatol Belski
38a076682f Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix bug #68162: isset($$varname) always true
  Drop convert_to usage in zend_exceptions
  Fix isset/unset on by-ref names as well
  Fix bug #68163
2014-10-07 09:02:58 +02:00
Nikita Popov
e24c24c108 Fix bug #68162: isset($$varname) always true 2014-10-06 20:39:00 +02:00
Nikita Popov
2a0c4edfda Drop convert_to usage in zend_exceptions
To make everything work correctly with refs.

I'm unsure whether the GET_PROPERTY_SILENT distinction is really
necessary, because the choice seemed pretty random, but kept it
around.
2014-10-06 20:14:30 +02:00
Nikita Popov
390900cbcb Fix isset/unset on by-ref names as well 2014-10-06 18:56:23 +02:00
Nikita Popov
03c726d728 Fix bug #68163 2014-10-06 18:45:08 +02:00
Anatol Belski
bd9f17846d Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  bring back the correct php_version.h
  fix the empty_strings SAPI shutdown leak in TS build
  Use fastcall calling convention for heap functions
  fix leaking the empty_string in TS builds
  remove successive assignment
2014-10-06 18:36:26 +02:00
Anatol Belski
741bf0ee96 fix the empty_strings SAPI shutdown leak in TS build
still the NTS variant is somewhat different as it needs
zend_new_interned_string_int because the normal callbacks might
be not initialized, but at least no leaks anymore and some more
structure
2014-10-06 15:48:55 +02:00
Dmitry Stogov
cc7c14cb76 Use fastcall calling convention for heap functions 2014-10-06 16:32:15 +04:00
Anatol Belski
72b34e1372 fix leaking the empty_string in TS builds 2014-10-06 13:38:13 +02:00
Anatol Belski
60f0695a09 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (42 commits)
  Add tests verifying calls work inside echo, concatenation and array access
  Updated NEWS and UPGRADING
  Fix $this CV init for include/eval
  Fix dynamic calls to static methods with fci->object
  Fix $arr =& $arr[0]
  Add UPGRADING stubs for a number of recent changes
  Regenerate tokenizer data
  Fix unused variable warning
  Remove <% and <script language="php"> tags
  zend_uint -> uint32_t
  Fix nesting for *non*-compile-time-resolveable functions See a1a4ba9511 (commitcomment-7414223)
  Add tests for calls to nested, *non*-compile-time-resolveable functions See a1a4ba9511 (commitcomment-7414362)
  Make list of opcodes used for nesting calculation consistent   with `zend_do_convert_call_user_func()` in Zend/zend_compile.c
  Rewrite code to use ZEND_VM_JMP() instead of repeated ZEND_VM_INC_OPCODE() calls
  QA: Simplify code to find matching ZEND_DO_FCALL_BY_NAME CG(context).nested_calls is stored inside the initializer's result.num and inside the finalizer's op2.num, by comparing these we don't need to count manually, and are thus safer from future expansion with specialized opcodes e.g.
  Fix expected fatal error, now is catchable fatal
  Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master
  Check for memory leaks when not using return value
  Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master
  Add tests with arrays as parameters
  ...
2014-10-06 08:42:53 +02:00
Timm Friebe
43f3d250f4 Add tests verifying calls work inside echo, concatenation and array access 2014-10-06 06:08:02 +08:00
Tjerk Meesters
82523c0752 Merge branch 'pr/647'
* pr/647: (33 commits)
  zend_uint -> uint32_t
  Fix nesting for *non*-compile-time-resolveable functions See a1a4ba9511 (commitcomment-7414223)
  Add tests for calls to nested, *non*-compile-time-resolveable functions See a1a4ba9511 (commitcomment-7414362)
  Make list of opcodes used for nesting calculation consistent   with `zend_do_convert_call_user_func()` in Zend/zend_compile.c
  Rewrite code to use ZEND_VM_JMP() instead of repeated ZEND_VM_INC_OPCODE() calls
  QA: Simplify code to find matching ZEND_DO_FCALL_BY_NAME CG(context).nested_calls is stored inside the initializer's result.num and inside the finalizer's op2.num, by comparing these we don't need to count manually, and are thus safer from future expansion with specialized opcodes e.g.
  Fix expected fatal error, now is catchable fatal
  Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master
  Check for memory leaks when not using return value
  Adjust expected fatal error message Now also includes "on [TYPE]" after merge from master
  Add tests with arrays as parameters
  Handle ZEND_NEW nesting
  Also verify nesting with dynamically called static methods
  Handle ZEND_INIT_NS_FCALL_BY_NAME nesting
  QA: Refactor: Split tests a bit to make them more comprehendable
  Support nested static calls
  Handle ZEND_EXT_FCALL_END, skipping if necessary Verified with running tests with new "-e" run-tests arg: $ make test TESTS=Zend/tests/*-on-non-objects-*phpt TEST_PHP_ARGS=-e # Tests passed    :   11 (100.0%)
  Add support for PHP's 'extended information for debugger/profiler' mode
  Verify non-CV-operands also work See discussion https://github.com/php/php-src/pull/647#issuecomment-48050551
  Only allocate NULL return value if it's actually used
  ...

Conflicts:
	ext/date/tests/bug67118.phpt
2014-10-06 05:52:43 +08:00
Nikita Popov
58f389772f Fix $this CV init for include/eval
Fixes bug #68148
2014-10-05 23:38:59 +02:00
Nikita Popov
9bc14f9632 Fix dynamic calls to static methods with fci->object
func may already be freed at the time the static flag was checked.
2014-10-05 23:11:17 +02:00
Nikita Popov
fb34cd90f8 Fix $arr =& $arr[0]
value_ptr can be invalidated by the ptr_dtor, so backup the
zend_reference in an extra variable.
2014-10-05 22:58:40 +02:00
Nikita Popov
292421d3a1 Fix unused variable warning 2014-10-05 21:58:38 +02: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
Anatol Belski
a91d3580a7 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  properly export tsrm_strtok_r()
  Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed).
  Fix accidental edit in previous commit
  Fix arginfo
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  DateTimeZone::getOffset() now accepts a DateTimeInterface
  Moved checks and error reporting related to static methods from DO_FCALL inti INTI_FCALL* opcodes that may really deal with static methods. (In some rare cases it may lead to different order of warning messages).
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
2014-10-05 19:26:17 +02:00
Dmitry Stogov
7c7b9184b1 Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed). 2014-10-05 13:02:58 +04:00
Dmitry Stogov
2e1b8ba4b7 Moved checks and error reporting related to static methods from DO_FCALL inti INTI_FCALL* opcodes that may really deal with static methods. (In some rare cases it may lead to different order of warning messages). 2014-10-04 14:55:44 +04:00
Anatol Belski
11cf279196 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix test gc_029_zts.phpt
  Fixed a bug that causes crash when environment variable is access while parsing php.ini
  fix asinh delivering -0 when the arg is 0
  Mark test for full GC root buffer as XFAIL
  Fix two date tests
  Mark three foreach tests as XFAIL
  reveal some newer libcurl features in MINFO
  Fix bug number
  Fix bug #68188
  Fix bug #68133 and bug #68135
2014-10-04 11:14:01 +02:00
Nikita Popov
f1e21c4979 Fix test gc_029_zts.phpt
In ZTS the default properties are duplicated (instead of copied),
so the array has one lower RC than on NTS and as such gets destroyed
during GC, increasing the cycle count by 3. PHP 5.6 didn't always
copy default properties on ZTS, which is where the difference comes
from.
2014-10-04 00:37:15 +02:00
Nikita Popov
b68886f7b5 Mark test for full GC root buffer as XFAIL 2014-10-03 22:02:02 +02:00
Nikita Popov
443374675e Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_object_handlers.c
2014-10-03 21:30:06 +02:00
Nikita Popov
8617f2fa8d Merge branch 'PHP-5.5' into PHP-5.6 2014-10-03 21:27:07 +02:00
Nikita Popov
93288d0095 Fix bug #68188 2014-10-03 21:26:39 +02:00
Nikita Popov
e7623f470f Fix bug #68133 and bug #68135 2014-10-03 21:06:26 +02:00
Anatol Belski
ee4ae7fbc3 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  remove the remains of dsp files handling
  fix EX usage
  remove misprint parentheses
  remove misprint parentheses
  Replaced EG(This) and EX(object) with EX(This). Internal functions now recieves zend_execute_data as the first argument.
  And this one...
  It should be in extern c
  Remove useless condition
  NEWS entry for previous commit
  NEWS entry for previous commit
  add IPv6 support to php-fpm
  Micro optimization for the most frequency case
  Add hash to EXTENSIONS file
  Remove extensions which are long gone
  we also have xz release tarballs since 5.5
  Fix ZTS build
  improved file size computation in stat()
  Fixed incorrect compilation
  5.5.19 now
2014-10-03 20:30:49 +02:00
Anatol Belski
647ebe6bf2 remove misprint parentheses 2014-10-03 19:23:33 +02:00
Dmitry Stogov
bd9a234645 Replaced EG(This) and EX(object) with EX(This).
Internal functions now recieves zend_execute_data as the first argument.
2014-10-03 19:32:46 +04:00
Xinchen Hui
5e39d0c19c And this one... 2014-10-03 19:07:02 +08:00
Xinchen Hui
aa5f937958 It should be in extern c 2014-10-03 18:35:57 +08:00
Xinchen Hui
f54f5368e4 Merge branch 'master' of https://git.php.net/repository/php-src 2014-10-03 18:35:18 +08:00
Xinchen Hui
54bad8bf57 Remove useless condition 2014-10-03 18:35:05 +08:00
Dmitry Stogov
5c63a4f72b Micro optimization for the most frequency case 2014-10-03 12:18:15 +04:00
Nikita Popov
51c90e999f Fix ZTS build 2014-10-02 21:58:29 +02:00
Anatol Belski
c41fbcfb4c improved file size computation in stat()
On 32 bit it's still overwlowing, so nothing is changed there. But
the usage of LARGE_INTEGER instead of bit shifting is a better way
to go.
2014-10-02 12:18:02 +02:00
Dmitry Stogov
ccb24caa6d Fixed incorrect compilation 2014-10-02 13:37:44 +04:00
Anatol Belski
45e23645a4 linux compat for the static tsrm ls cache pointer 2014-10-02 08:45:53 +02:00
Anatol Belski
f5292fbe51 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Expose zend_throw_exception_internal()
  Use inline finction for OBJ_RELEASE() macro
  update NEWS about the release date of 5.6.1
  only no_NO.ISO-8859-1 have to be ignored
  remove bogus locale use from test
  use $PHP_LIBDIR instread of "lib" in skel example
  Removed zend_execute_data->prev_nested_call. Reuse prev_execute_data instead.
2014-10-01 22:05:51 +02:00
Anatol Belski
76081df168 using pointer to the tsrm ls cache instead of a function call
yet another approach
2014-10-01 22:04:21 +02:00
Anatol Belski
c161b95cdf increment Zend module API number 2014-10-01 17:14:53 +02:00
Dmitry Stogov
c4419e7a5b Expose zend_throw_exception_internal() 2014-10-01 16:37:21 +04:00
Dmitry Stogov
8857af8494 Use inline finction for OBJ_RELEASE() macro 2014-10-01 16:35:56 +04:00
Dmitry Stogov
9f7564b12b Removed zend_execute_data->prev_nested_call. Reuse prev_execute_data instead. 2014-10-01 10:46:13 +04:00
Anatol Belski
d624b0d5eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (26 commits)
  Micro optimization
  Drop unused INIT_STRING opcode
  Drop unused RAISE_ABSTRACT_ERROR opcode
  CT substitute unqualified true/false/null in namespaces
  Fix a couple compile warnings
  fix test filename
  one more test to illustrate transfer of an arbitrary data amount throug pipes
  fix tests on linux
  better test cleanup
  Use more readable inline functions
  increase the polling period to not to break existing behaviours
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever
  Fixed segfault
  Set an LDAP error code when failing ldap_bind due to null bytes
  Fix segmentation fault in debug_backtrace()
  Drop support for GMP 4.1
  Make gmp_setbit and gmp_clrbit return values consistent
  removed *.dsw and *.dsp files
  Opcache compatibility for coalesce operator
  ...
2014-10-01 01:33:46 +02:00
Anatol Belski
9f9b3585b9 revert the local speedup approach 2014-10-01 01:33:01 +02:00
Dmitry Stogov
63dc9bbc02 Micro optimization 2014-09-30 15:19:51 +04:00
Nikita Popov
67a11b61cd Drop unused INIT_STRING opcode
INIT_STRING has been implemented as an UNUSED op1 to ADD_* for
some time now.
2014-09-29 22:59:57 +02:00
Nikita Popov
290d71de75 Drop unused RAISE_ABSTRACT_ERROR opcode
Abstract methods are being prevented from being called in DO_FCALL
etc.
2014-09-29 22:50:56 +02:00
Nikita Popov
ab288b01d5 CT substitute unqualified true/false/null in namespaces
Substituation now always happens on the resolved name and
unqualified usages of true/false/null in namespaced code are
substituted as well.
2014-09-29 21:18:12 +02:00
Nikita Popov
142a01db92 Fix a couple compile warnings 2014-09-29 20:57:17 +02:00
Dmitry Stogov
e15be6c8cd Use more readable inline functions 2014-09-29 19:41:00 +04:00
Xinchen Hui
f248b17e07 Fixed segfault 2014-09-29 12:06:56 +08:00
Timm Friebe
e14b7f629b Fix segmentation fault in debug_backtrace() 2014-09-28 20:58:55 +02:00
Anatol Belski
4b3e198023 removed *.dsw and *.dsp files 2014-09-28 19:02:09 +02:00
Nikita Popov
877eb02fd6 Update operand types for coalesce operator 2014-09-28 12:20:04 +02:00
Andrea Faulds
2d069f640e Merge branch 'coalesce_operator'
* coalesce_operator:
  Extended coalesce operator test case for ordering/short-circuiting
  Ensure not evaluated twice
  Added test
  Initial coalesce operator implementation
2014-09-28 00:07:04 +01:00
vagrant
5c6ca24dc0 Merge branch 'master' into catchable-fatals/methods-on-non-objects 2014-09-27 17:49:54 +00:00
krakjoe
7d4f7c04b3 approach local pointers in performance sensitive areas 2014-09-27 17:11:56 +01:00
Anatol Belski
06d0230a0f cleanup TSRMLS_FETCH 2014-09-26 09:58:19 +02:00
Timm Friebe
0a9e207a77 zend_uint -> uint32_t 2014-09-25 21:42:19 +02:00
Anatol Belski
c1e92d9fed fix C89 compat 2014-09-25 20:28:34 +02:00
Timm Friebe
e83580c1f0 Merge branch 'master' into catchable-fatals/methods-on-non-objects 2014-09-25 19:45:05 +02:00
Anatol Belski
83fac1855f fix signature 2014-09-25 19:30:39 +02:00
Anatol Belski
d11734b4b0 reworked the patch, less new stuff but worky
TLS is already used in TSRM, the way exporting the tsrm cache through
a thread local variable is not portable. Additionally, the current
patch suffers from bugs which are hard to find, but prevent it to
be worky with apache. What is done here is mainly uses the idea
from the RFC patch, but

- __thread variable is removed
- offset math and declarations are removed
- extra macros and definitions are removed

What is done merely is

- use an inline function to access the tsrm cache. The function uses
  the portable tsrm_tls_get macro which is cheap
- all the TSRM_* macros are set to placebo. Thus this opens the way
  remove them later

Except that, the logic is old. TSRMLS_FETCH will have to be done once
per thread, then tsrm_get_ls_cache() can be used. Things seeming to be
worky are cli, cli server and apache. I also tried to enable bz2
shared and it has worked out of the box. The change is yet minimal
diffing to the current master bus is a worky start, IMHO. Though will
have to recheck the other previously done SAPIs - embed and cgi.

The offsets can be added to the tsrm_resource_type struct, then
it'll not be needed to declare them in the userspace. Even the
"done" member type can be changed to int16 or smaller, then adding
the offset as int16 will not change the struct size. As well on the
todo might be removing the hashed storage, thread_id != thread_id and
linked list logic in favour of the explicit TLS operations.
2014-09-25 18:48:27 +02:00
krakjoe
eabad90acb fix indentation 2014-09-25 16:31:39 +01:00
krakjoe
abdc8c3061 fix zts build 2014-09-25 16:15:02 +01:00
Dmitry Stogov
1833ab0230 Use macro 2014-09-25 17:00:17 +04:00
Dmitry Stogov
8b034ec69a Optimized (PRE|POST)_(INC|DEC) handlers. Moved proxy object handling into helper function. 2014-09-25 13:42:46 +04:00
Anatol Belski
a2dd606942 Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (31 commits)
  Fixed C++ incompatibility
  update the certificate used for the test, as it expired recently
  Fixed immutable arrays support
  Fix counting of "R:" references in serialize()
  Remove dead code
  Test use($this) being an error
  Move list() condition into assign_znode
  typo
  NEWS
  Fix bug #68074 Allow to use system cipher list instead of hardcoded value
  Avoid double checks
  the order of the blocks should be Core, then exts in alphabetical order
  add missing NEWS entry for the phpdbg compilation fix
  add NEWS entry for #68088
  Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR.
  Removed useless helper
  Drop unused result argument
  Fix ct binding for cuf/cufa functions
  Fix detection of write to built-in function for references
  Test use of string names with \ prefix
  ...
2014-09-24 21:39:49 +02:00
Anatol Belski
70077d84e9 check che right thing to prevent the crash in the timeout thread
Though this seems to be a dead end, the lines CG(timed_out) = 0; looks
like will never be executed in the TS build. Or at least it'll be executed
by luck when the scheduler has decided to let the master thread run for
longer. NTS should be fine with that however.
2014-09-24 20:44:37 +02:00
Dmitry Stogov
6a09bdff6a Fixed C++ incompatibility 2014-09-24 20:31:22 +04:00
Dmitry Stogov
8ea2409e44 Fixed immutable arrays support 2014-09-24 15:39:54 +04:00
Nikita Popov
c45924b954 Remove dead code 2014-09-24 12:06:19 +02:00
Nikita Popov
1664e70ade Test use($this) being an error 2014-09-24 12:06:19 +02:00
Nikita Popov
3e042e1f83 Move list() condition into assign_znode
The condition in compile_foreach was using ->attr instead of ->kind
and as such never passed. It only worked because assign_znode already
supported this case by indirecting via zend_compile_assign. Now it
implements it with a direct call.
2014-09-24 12:06:18 +02:00
Dmitry Stogov
73275a55f5 Avoid double checks 2014-09-24 12:20:46 +04:00
Dmitry Stogov
58a41cf795 Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR. 2014-09-24 01:57:40 +04:00
Dmitry Stogov
e8612b72ee Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Drop unused result argument
  Fix ct binding for cuf/cufa functions
  Fix detection of write to built-in function for references
  Test use of string names with \ prefix
  Add zend_add_literal_string
  Drop dead code
2014-09-23 23:27:20 +04:00
Dmitry Stogov
d429e87d18 Removed useless helper 2014-09-23 23:26:39 +04:00
Nikita Popov
4a221bd881 Drop unused result argument 2014-09-23 21:04:30 +02:00
Nikita Popov
67a5ca6697 Fix ct binding for cuf/cufa functions
It was checking against the wrong AST kind, so the binding was
never actually done.
2014-09-23 21:02:32 +02:00
Nikita Popov
9070eb38e9 Fix detection of write to built-in function for references 2014-09-23 20:42:22 +02:00
Nikita Popov
231dcc94e8 Test use of string names with \ prefix
And drop piece of dead code
2014-09-23 20:36:00 +02:00
Nikita Popov
182ddfeaf2 Add zend_add_literal_string
And simplify additional of special literals based on it.
2014-09-23 20:21:28 +02:00
Nikita Popov
4571271de1 Drop dead code 2014-09-23 19:32:02 +02:00
Dmitry Stogov
06103d65b1 Use zval_ptr_dtor_nogc() to free IS_TMP_VAR operands.
Removed ZEND_SWITCH_FREE opcode (ZEND_FREE used instead).
2014-09-23 17:21:29 +04:00
krakjoe
51901c9fb4 swap some standard module properties _ex for std mod properties 2014-09-23 12:44:46 +01:00
Dmitry Stogov
7cef08c5d1 Allocate copies of internal functions inherited in user classes at CG(arena), instead of permanent heap (malloc). 2014-09-23 12:35:42 +04:00
Xinchen Hui
e029042c36 It is not likely a string 2014-09-23 13:50:00 +08:00
Xinchen Hui
22fbfdfb8e Simply make_printable_zval
it's possible to remove make_printable_zval at all
but it will be a API break
2014-09-23 12:56:59 +08:00
Nikita Popov
75533c9b23 Test a few more error conditions in the compiler 2014-09-23 00:57:00 +02:00
Nikita Popov
51119054ff Test error conditions for ct class const refs
And fix a bug found while doing so...
2014-09-23 00:40:17 +02:00
Anatol Belski
7099736dfa Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  Fix tests/serialize/bug64146.phpt
  Remove zend_dynamic_array
  Remove static allocator
  Fixed typo
  Fix list() destructuring to special variables
  Remove php_varname_check
  Avoid useless reference counting
  Specialization (only IS_VAR ad IS_CV operands may be references)
  Optimized unset()
  Make error paths to be UNEXPECTED
  Replace IS_OP?_TMP_FREE() with more clear (OP?_TYPE == IS_TMP_VAR)
2014-09-23 00:32:48 +02:00
Nikita Popov
c0c431b702 Test some additional cases for constexpr evaluation 2014-09-23 00:31:38 +02:00
Nikita Popov
982f02afe6 Remove zend_dynamic_array
This was introduced back in 2000 to test a new hashtable
implementation and is no longer used.
2014-09-22 23:45:13 +02:00
Nikita Popov
02bb637bb8 Remove static allocator
We didn't even compile this file anymore
2014-09-22 23:45:13 +02:00
Anatol Belski
4db75dc853 basic windows fix 2014-09-22 20:58:45 +02:00
Nikita Popov
f30f28ec47 Fix list() destructuring to special variables 2014-09-22 18:34:40 +02:00
Andrea Faulds
bb55397bab Make zpp fail if NaN passed for int, or out-of-range float for non-capping int 2014-09-22 17:06:16 +01:00
Dmitry Stogov
0c0d43bd4e Avoid useless reference counting 2014-09-22 17:52:38 +04:00
Dmitry Stogov
826abe9d62 Specialization (only IS_VAR ad IS_CV operands may be references) 2014-09-22 16:17:35 +04:00
Dmitry Stogov
a057f060e8 Optimized unset() 2014-09-22 14:41:44 +04:00
Dmitry Stogov
9c0fa4106c Make error paths to be UNEXPECTED 2014-09-22 13:18:49 +04:00
Dmitry Stogov
2c8ac3a252 Replace IS_OP?_TMP_FREE() with more clear (OP?_TYPE == IS_TMP_VAR) 2014-09-22 12:47:10 +04:00
Anatol Belski
6bb530d1eb Merge remote-tracking branch 'origin/master' into native-tls
* origin/master: (24 commits)
  added a comment
  fix the REPARSE_DATA_BUFFER struct def
  simplify the condition
  Fix two memory errors by interning earlier
  Add smart_str_append for appending zend_strings
  Rename smart_str_append to smart_str_append_smart_str
  Use smart_str for exception stack traces
  Use smart_str in get_function_declaration
  Move smart_str implementation into Zend/
  UPGRADING for Integer Semantics
  Fixed bug #66242 (don't assume char is signed)
  Fixed bug #67633
  Fixed if/else if ordering
  Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG
  Use zend_ polyfilled nan/finite, check finite
  Updated 32-bit << test
  Updated << 64-bit tests
  Prevent bit shift count wrapping quirkiness on some CPUs for left shift
  Cast NaN and Infinity to zero
  Updated >> 64-bit tests
  ...
2014-09-22 10:26:17 +02:00
Anatol Belski
065edced71 added a comment 2014-09-22 09:41:56 +02:00
Anatol Belski
dc7a66a1c4 fix the REPARSE_DATA_BUFFER struct def 2014-09-22 09:41:54 +02:00
Nikita Popov
7d4c81d8d9 Fix two memory errors by interning earlier 2014-09-21 23:56:09 +02:00
Nikita Popov
a770d29df7 Add smart_str_append for appending zend_strings
Also replaces usages in Zend/ and ext/standard
2014-09-21 20:58:31 +02:00
Nikita Popov
2a7de9fdbb Rename smart_str_append to smart_str_append_smart_str
It's used only rarely and I'm running out of append names...
2014-09-21 20:49:39 +02:00
Nikita Popov
e0df8cc810 Use smart_str for exception stack traces 2014-09-21 20:49:39 +02:00
Nikita Popov
e26a688871 Use smart_str in get_function_declaration
Instead of custom smart string implementation
2014-09-21 20:49:39 +02:00
Nikita Popov
e33f3d3b7c Move smart_str implementation into Zend/
So we can use it there as well...

For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Andrea Faulds
12b15e5ca4 Merge branch 'master' into integer_semantics 2014-09-21 00:29:48 +01:00
krakjoe
8bbc2a56ca fix STANDARD_MODULE_PROPERTIES 2014-09-20 21:59:39 +01:00
Nikita Popov
6219a4e844 Merge branch 'PHP-5.6'
Conflicts:
	Zend/zend_compile.c
2014-09-20 21:58:06 +02:00
Nikita Popov
308c0a727e Merge branch 'PHP-5.5' into PHP-5.6 2014-09-20 21:47:59 +02:00
Nikita Popov
5e977e69e1 Fixed bug #67633 2014-09-20 21:46:25 +02:00
Anatol Belski
fb17d6516d Merge remote-tracking branch 'origin/master' into native-tls
* origin/master:
  fixed copying of the struct as it's not being modified
  avoid strlen usage in loop
  Removes accidentally added files.
  Reverts some unwanted changes
  Deletes patch leftovers
  Replaces php5 with php7, without whitespace changes.
2014-09-20 21:37:19 +02:00
krakjoe
b3aebda9ea native tls initial patch 2014-09-20 20:22:14 +01:00
Anatol Belski
2fc1a1dce5 fixed copying of the struct as it's not being modified
in the subsequent function call
2014-09-20 20:58:00 +02:00
Nikita Popov
98891ee118 Simplify foreach flags
* FE_RESET_VARIABLE and FE_RESET_REFERENCE were always set
   together.
 * In some places the code checked FE_FETCH_BYREF instead of
   FE_RESET_REFERENCE and relied on them having the same value.
 * Now the FE_RESET_* flags are dropped and everything uses
   FE_FETCH_BYREF
2014-09-20 12:56:05 +02:00
Nikita Popov
1027f0d978 Fix leak in foreach with by-ref iteration of ref array 2014-09-20 12:46:05 +02:00
Xinchen Hui
95836a3504 Avoid strlen usage 2014-09-20 15:27:36 +08:00
Xinchen Hui
7ecc7e6bc2 folder marks 2014-09-20 15:16:09 +08:00
Xinchen Hui
96ccf3ef98 Added missed mod str 2014-09-20 15:12:08 +08:00
Xinchen Hui
3e71f5ff7b Fixed built on OSX 2014-09-20 13:51:58 +08:00
Anatol Belski
ea6da30396 make the return value more logic
as if clz() were returning 32 on empty size
2014-09-20 02:14:35 +02:00
Anatol Belski
7b4e8c64e0 make use of intrinsics available with VS for bitset lookups 2014-09-20 01:43:06 +02:00
Nikita Popov
31e842472f Make number printing functions less generic
Now that zend_ulong is 64bit on 64bit platforms, it should be
sufficient to always use it, rather than supporting multiple
types.

API changes:
 * _zend_print_unsigned_to_buf and _zend_print_signed_to_buf
   no longer exist.
 * smart_str(ing)_print_long and smart_str(ing)_print_unsigned
   no longer exist.
 * Instead of all these, zend_print_ulong_to_buf and
   zend_print_long_to_buf should be used.
 * smart_str_append_generic_ex no longer exists.
 * smart_str(ing)_append_off_t(_ex) no longer exists, use
   smart_str(ing)_append_long(_ex) instead.
2014-09-19 23:39:07 +02:00
Nikita Popov
c7446bbd39 Remove superfluous Z_REFCOUNTED_P check
The string is never interned and IS_CONSTANT_EX is always refcounted.
2014-09-19 23:39:06 +02:00
Nikita Popov
c343ca4efb Split inheritance into separate file
This moves handling of inheritance and interface implementation
from zend_compile.c into a separate zend_inheritance.c file, as
this is not really related to compilation.
2014-09-19 19:54:37 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
d1131d4278 reverted some previous IS_ABSOLUTE_PATH related changes
It's fine with strlen usage now, only one call
2014-09-19 16:30:05 +02:00