Commit Graph

180 Commits

Author SHA1 Message Date
Xinchen Hui
f2c8b611cf Merge branch 'PHP-5.6' 2015-03-05 18:44:13 +08:00
Wei Dai
488688cfc7 Remove the unused vars 2015-03-05 15:55:30 +08:00
Dmitry Stogov
6dfff52f61 Improved method inhereitance code and cleanup 2015-03-05 02:10:38 +03:00
Dmitry Stogov
c9bd24de7a Improved ineritance code 2015-03-04 23:06:07 +03:00
Dmitry Stogov
8ec8648c91 Improved code for class property inheritance 2015-03-04 17:41:01 +03:00
Guilherme Blanco
4498d34aea Check interface/trait extension for internal classes
Removed possibility to have extensions to declare classes extending
interfaces or traits. It was checked in user classes, not extensions
or internal.
2015-02-13 15:31:48 +01:00
Guilherme Blanco
8c81d80e10 Made ZEND_ACC_TRAIT a saner value
CC_TRAIT valued as 0x120 is too magical to be comprehensible by others.
2015-02-12 23:20:19 +01: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
Joshua Rogers
26d5ad6c98 Add check for null pointer, as done in case 5 lines above. 2015-01-30 13:30:17 +11:00
Xinchen Hui
a1d9ceac7a Fixed annoying warnings 2015-01-29 11:59:37 +08:00
Levi Morrison
c8576c5a46 Implement return types
RFC is documented here: https://wiki.php.net/rfc/return_types
2015-01-27 11:49:56 -07: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
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
Dmitry Stogov
2646f7bcb9 Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code. 2014-12-22 16:44:39 +03:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Dmitry Stogov
3893c1fc3d Fixed compilation warnings 2014-12-12 21:57:34 +03:00
Guilherme Blanco
094d409b3d Removed ZEND_ACC_FINAL_CLASS which is unnecessary. This also fixed some currently defined classes as final which were just not being considered as such before. 2014-12-12 17:29:54 +01:00
Julien Pauli
ebe755f149 Merge branch 'PHP-5.6'
* PHP-5.6:
  Updated NEWS
  Updated NEWS
  Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor)

Conflicts:
	Zend/zend_compile.c
2014-12-12 16:14:24 +01:00
Dmitry Stogov
14e29f5146 Reduced size of zend_op on 64-bit systems.
the main idea - the smaller the zend_op structure, the lees memory traffic is required to load VM instructions during execution. The patch reduces the size of each opcode from 48 to 32 bytes (saves 16 bytes for each opcode, and applications use thousands of opoceds). This reduced the number of CPU cache misses by 12% and improved performance of real-life apps by 1-2%.

The patch affects how constants and jump targets are represented in VM during execution. Previously they were implemented as absolute 64-bit pointers. Now they are relative 32-bit offsets.

In run-time constant now should be accessed as:
  RT_CONSTANT(op_array, opine->op1) instead of opline->op1.zv
  EX_CONSTANT(opline->op1) instead of opline->op1.zv

Jump targets:
  OP_JMP_ADDR(opline, opline->op2) instead of opline->op2.jmp_addr

The patch doesn't change zend_op representation for 32-bit systems. They still use absolute addresses. The compile-time representation is also kept the same.
2014-12-12 10:19:41 +03:00
Dmitry Stogov
5dd427eac2 Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*. 2014-12-03 16:56:09 +03:00
Julien Pauli
af3a42022b Fix #68185 - Inconsistent insteadof definition 2014-11-21 16:05:31 +01:00
Veres Lajos
4b9535341a typo fixes - https://github.com/vlajos/misspell_fixer 2014-11-19 20:23:00 +00:00
Dmitry Stogov
75041379a6 Improved object property access. 2014-11-06 14:50:03 +03:00
Anatol Belski
8fdaeef8e8 fix datatype mismatches 2014-10-27 16:38:38 +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
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
e26a688871 Use smart_str in get_function_declaration
Instead of custom smart string implementation
2014-09-21 20:49:39 +02:00
Xinchen Hui
96ccf3ef98 Added missed mod str 2014-09-20 15:12:08 +08: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