Commit Graph

367 Commits

Author SHA1 Message Date
Xinchen Hui
95b4aa5293 Fixed zend_hash_append result duplicated key
actually, maybe we should precalculate before calling zend_hash_appen
when we are not sure whether the hash is caclculated(prop_info->name).

but it looks a little ugly.. (also for zend_string_copy)
2015-03-08 00:21:02 +08:00
Dmitry Stogov
9f9ffdd0a0 Use fast zend_hash_append() API 2015-03-06 19:23:54 +03:00
Xinchen Hui
f25419f8e3 Only do this in debug build 2015-02-21 22:44:51 +08:00
Dmitry Stogov
e10e151e9b Merged zend_array and HashTable into the single data structure.
Now each HashTable is also zend_array, so it's refcounted and may be a subject for Copy on Write
zend_array_dup() was changed to allocate and return HashTable, instead of taking preallocated HashTable as argument.
2015-02-13 22:20:39 +03:00
Dmitry Stogov
35aea97e42 Fixed bug #69025 (Invalid read of size 4 when calling __callStatic) 2015-02-11 17:41:21 +03:00
Dmitry Stogov
9e70d7672d Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced. 2015-02-04 15:24:13 +03:00
Xinchen Hui
1a60175e25 Fixed Magic getter bug tickled by Moodle 2015-01-31 18:12:31 +08:00
Dmitry Stogov
b46894d104 Partially revert 3477135cd1 2015-01-16 02:21:27 +03:00
Dmitry Stogov
1c5e914616 Fixed build without alloca() 2015-01-15 21:43:17 +03:00
Dmitry Stogov
12cbb9c156 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  updated NEWS
  updated NEWS
  PDO_MySQL: Differentiate between linux and win32 when passing unix_socket
  bump year
  bump year
  Bump year
2015-01-15 21:09:20 +03:00
Dmitry Stogov
3477135cd1 Avoid usage of uninitialized data 2015-01-15 21:08:21 +03:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Dmitry Stogov
5a24ac8853 Improved access to object properties (cache property offset instead of pointer to property_info). 2015-01-13 11:33:00 +03:00
Dmitry Stogov
7e93de101f Handle run-time cache for static properties directly in executor.
Removed cache_slot argument in zend_std_get_static_property() and zend_std_unset_static_property().
2015-01-13 09:33:15 +03:00
Dmitry Stogov
dbe66fb2cf Improved access to static property. Now we cache pointers to zval instead of pointers to property_info. 2015-01-13 03:32:51 +03:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Dmitry Stogov
c42ac09518 Added new API function 'zend_string* zend_string_tolower(zend_string*)'.
It simplifies code and avoids unnecessary allocation and copying if string is already in lower case.
2014-12-24 15:04:51 +03:00
Xinchen Hui
c24125e2f9 Micro optimization 2014-12-21 23:16:25 -05:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Dmitry Stogov
42d33a9fc6 Reuse zend_assign_to_variable() in zend_std_write_property() 2014-11-24 20:33:27 +03:00
Veres Lajos
4b9535341a typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-19 20:23:00 +00:00
Dmitry Stogov
53a437d3c3 Use better function 2014-11-06 17:45:14 +03:00
Dmitry Stogov
75041379a6 Improved object property access. 2014-11-06 14:50:03 +03:00
Dmitry Stogov
8e1dc33db5 zend_get_property_info_quick() cleanup and optimization 2014-10-20 20:33:35 +04:00
Dmitry Stogov
7471c21781 Optimized property access handlers. Removed EG(std_property_info). 2014-10-17 19:10:05 +04: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
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
b3a779de68 Remove get_class_entry object handler 2014-10-09 14:08:10 +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
03c726d728 Fix bug #68163 2014-10-06 18:45:08 +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
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
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
eda5ba1f8f Fix use of stack variable outside its block 2014-09-14 16:18:08 +02:00
Nikita Popov
ebc6da5628 zend_get_property_info takes a zend_string* now 2014-09-14 16:18:08 +02:00
Dmitry Stogov
b1f53ca415 Use efree_size() instead of efree() where posible 2014-08-27 20:49:56 +04:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Dmitry Stogov
e7ffdb2654 Fixed support for references 2014-08-14 21:54:57 +04:00
Dmitry Stogov
05ca575bbb Fixed reference support (references to references are not allowed) 2014-08-14 17:00:01 +04:00
Dmitry Stogov
046db57049 Fixed incorrect destruction (it might lead to crash) 2014-07-29 12:13:47 +04:00
Dmitry Stogov
9b9d60a480 Specify HashTable size and optimize inserts that may not conflict 2014-07-08 13:46:03 +04:00
Dmitry Stogov
2ed8a17045 Refactored run_time_cache usage in object handlers 2014-07-07 20:54:31 +04:00
Dmitry Stogov
4b09dd69e6 Removed EG(active_op_array) and use corresponding value from EG(current_execute_data) 2014-07-02 22:03:21 +04:00
Dmitry Stogov
412ad4b254 Uinified call frame handling for user and internal functions.
Now EG(current_execute_data) always point to the call frame of the currently executed function.
2014-07-02 22:01:25 +04:00
Dmitry Stogov
43477bc7a2 Refactoring: use call_frames instead of call_slots 2014-06-24 02:17:16 +04:00