Commit Graph

1254 Commits

Author SHA1 Message Date
Dmitry Stogov
35f9b90bb8 ZPP changed to lazely check for "strict/weak" only if it's really necessary.
Cleanup.
2015-03-20 23:18:52 +03:00
Dmitry Stogov
66f16c6cfb Fixed comments 2015-03-20 17:26:38 +03:00
Dmitry Stogov
5935612666 Improved type hinting:
EX_PREV_USES_STRICT_TYPES() and family changed/renamed to fit with other macros
Optimized zend_verify_internal_arg_type() and family (they don't need "strict" argument anymore)
Standerd ZPP is called from VM only for weak type check or strict exception (int -> double)
Fixed ZEND_RECV_VARIADIC
Fixed ZEND_STRLEN

TODO: should we accept IS_NULL for non-nullable arguments?
2015-03-20 16:04:04 +03:00
Dmitry Stogov
44669e8f41 Fixed white spaces 2015-03-20 11:10:29 +03:00
Dmitry Stogov
aee2985f35 Merge branch 'scalar_type_hints_v5' of github.com:ircmaxell/php-src into scalar_type_hints_v5
* 'scalar_type_hints_v5' of github.com:ircmaxell/php-src: (54 commits)
  Add check for maintaining reference all the way through both type and return values
  Reduce the number of times that the zval needs to be separated in return type checking to those that are necessary
  Add test to ensure namespaced code can't use scalar types as class names
  Disallow relative namespace type declarations
  Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse
  Refactor as to not use call info, but add the flag to the op_array.
  Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come
  Fix C89 compatibility by moving a misplaced if statement
  Refactor gotos into more elaborate ifs to eliminate goto failure
  Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases
  Add error case with invalid type declaration default value
  Add tests for using constants as defaults with scalar type declarations
  Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work
  Revert gd and mysqli to former calls for arg count errors. Fix first identified issues with zend_compile.c from nikic. Add tests for generator returns prior to first yield
  Style cleanup, as well as fixing bug with missing argument for WRONG_PARAM_COUNT_WITH_RETVAL
  Clean up API renames for zend_wrong_param_count to maintain BC, introducing a zend_wrong_param_count_ex() function when you know strict value
  Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages
  Fix more tests, improve error messages in failure output for thrown exception
  Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function
  Refactor declare placement detection, allow encoding declares before type declares
  ...
2015-03-20 10:51:41 +03:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Anthony Ferrara
62fc556764 Add support and tests for null constant default values. Refactor complex conditionals into an extracted function for clarity and code-reuse 2015-03-19 13:51:24 -04:00
Anthony Ferrara
d8ef608f3d Refactor gotos into more elaborate ifs to eliminate goto failure 2015-03-18 18:24:00 -04:00
Anthony Ferrara
427ecdc5eb Fix return type separation with references. It now includes a check in the opcode handler and properly separates the value in both cases 2015-03-18 18:10:08 -04:00
Anthony Ferrara
724f7118f1 Refactor error messages to only append defined in the event of rendering as a fatal error. Fix relative typehints to not work 2015-03-18 16:38:51 -04:00
Anthony Ferrara
0529eeb4a6 Fix executor issue with ignoring strict types, which cleans up a bunch of errors. Additionally fix the expected error of 2 unrelated tests that was caused by a change to the core error messages 2015-03-18 15:22:21 -04:00
Anthony Ferrara
dd9f4f9585 Fix more tests, improve error messages in failure output for thrown exception 2015-03-18 12:42:09 -04:00
Anthony Ferrara
7feebead1b Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function 2015-03-18 12:23:09 -04:00
Anthony Ferrara
d22bfb8aa6 Merge in master, fix merge conflicts and update patch to support exceptions everywhere 2015-03-18 10:50:11 -04:00
Dmitry Stogov
a01b5f2953 Enabled global register variables for PPC 2015-03-18 16:15:00 +03:00
Dmitry Stogov
d6bb5c2cd4 GCC prior 4.8.0 may generates wrong code 2015-03-18 02:15:49 +03:00
Dmitry Stogov
4d4a5336f1 Embed "fast" operator functions (add, sub, increment, etc) into executor with additional optimizations 2015-03-17 18:53:19 +03:00
Dmitry Stogov
fb4b706984 Enable GCC global register variables if available 2015-03-17 13:51:02 +03:00
Dmitry Stogov
5c68836b0b improved timeout handling on windows 2015-03-16 17:49:43 +01:00
Anatol Belski
e78971cd7b fix syntax for the Visual studio compat 2015-03-13 20:25:10 +01:00
Dmitry Stogov
db10b72523 Use fastcall calling convention for most critical ZE subsystems. 2015-03-13 21:10:09 +03:00
Dmitry Stogov
249c2323f4 Allow CALL executor to keep few very often used vaiables in CPU registers.
This is disabled by default yet, but may be enabled compiling zend_execute.c with -DHAVE_GCC_GLOBAL_REGS.
Only tested on Linux x86 and x86_64 with GCC 4.9.2.
2015-03-13 03:28:21 +03:00
Dmitry Stogov
6289f7e52f Executor cleanup: fix GOTO and SWITCH VMs, remove aility to build additional PHP-5.0 compatible VM, hide executor implementation details. 2015-03-12 20:39:04 +03:00
Dmitry Stogov
a30d328671 Errors converted to exceptions are not "recoverable" anymore. 2015-03-10 10:31:55 +03:00
Dmitry Stogov
1c94ff0595 Implement engine exceptions
RFC: https://wiki.php.net/rfc/engine_exceptions_for_php7

Pending changes regarding naming of BaseException and whether it
should be an interface.
2015-03-09 14:01:32 +01:00
Bob Weinand
afad979c60 Reduced initial VM_STACK page size of Generators to 4 KB (256 slots)
Generators all have their own vm_stack, but usually don't go really deep.
In most cases even most of the 4 KB will remain unused (in my tests average is rather 1 KB), but this was tested a straightforward implementation without a lot of abstraction layers.
That way I'm using a more conservative 4 KB stack size which really should be enough for, I think, at least 90% of the cases.
This was necessary to not immediately run out of memory with 95%+ usused vm_stack space: If you have a few thousands of Generators active, your application quickly hits memory_limit with a stack page size of 256 KB...
In addition, it's also a bit faster (70% less instructions for zend_vm_stack_new_page) due to emalloc() not having to allocate a whole new segment (segment size 256 KB). Also no mmap()/malloc() necessary.
2015-03-07 13:25:21 +01:00
Bob Weinand
b4a142ab97 Added yield from operator 2015-03-07 00:28:12 +01:00
Dmitry Stogov
fa2450c5f8 Don't inline helpers for ArrayAccess objects 2015-03-03 03:28:31 +03:00
Nikita Popov
fcdb6e0811 WIP 2015-02-28 21:20:37 +01:00
Dmitry Stogov
ff86267632 Fixed compilation warnings 2015-02-25 23:20:47 +03:00
Dmitry Stogov
c2c78dc963 Added specialized versions of DO_FCALL handler:
DO_ICALL - for internal functions
  DO_UCALL - for user functions
  DO_FCALL_BY_NAME - plain, most probably user, funcstions (not methods)
2015-02-25 10:37:21 +03:00
Dmitry Stogov
5f278e4d3a Use cache_slot offsets instead of indexes (simplify run-time instructions) 2015-02-25 01:52:35 +03:00
Dmitry Stogov
e97ae4fee8 Make zend_array_destroy() to free the corresponding zend_array 2015-02-24 18:34:37 +03:00
Anthony Ferrara
dc35868a77 Merge branch 'master' into scalar_type_hints_v5 2015-02-20 13:33:35 -05:00
Dmitry Stogov
d85113702c Lazy duplication of op_array->static_variables 2015-02-20 13:28:26 +03:00
Anthony Ferrara
9109e48749 Merge in master 2015-02-18 10:35:39 -05: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
97fe15db43 Fix "forech" statemt behaviour according to https://wiki.php.net/rfc/php7_foreach
Squashed commit of the following:

commit 1e41295097
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Sat Jan 31 07:28:58 2015 +0300

    Generalize HashTableIterator API to allows its usage without involvement of HashTable.nInternalPonter

commit 5406f21b11
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:43 2015 +0300

    Reduced alghorithms complexity

commit b37f1d58d2
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:30 2015 +0300

    Fixed test name

commit fb2d079645
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 18:08:05 2015 +0300

    API cleanup

commit 08302c0d6d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 14:20:46 2015 +0300

    Make array_splice() to preserve foreach hash position

commit cc4b7be41e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 12:24:31 2015 +0300

    Make internal function, operation on array passed by reference, to preserve foreach hash position

commit 5aa9712b0a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 09:49:35 2015 +0300

    Implement consistent behavior for foreach by value over plain object

commit 4c5b385ff5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jan 30 07:56:37 2015 +0300

    More careful iterators update.

commit 721fc9e80d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:43:28 2015 +0300

    Added new test

commit 15a23b1218
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:05:02 2015 +0300

    Reimplement iteration magic with HashTableIterators (see https://wiki.php.net/rfc/php7_foreach#implementation_details)

commit 10a3260b1f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jan 29 21:04:44 2015 +0300

    New test

commit eef80c5837
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 16:52:21 2015 +0300

    Fixed foreach by reference iteration over constant array

commit 61e7391873
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 14:59:54 2015 +0300

    Fixed temporary variable re-allocation pass

commit 92e90c09f0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 12:44:57 2015 +0300

    Fixed operand destruction in case of exceptions in iterator

commit dd2a36a207
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 10:02:34 2015 +0300

    Use GET_OP1_ZVAL_PTR_DEREF() (IS_TMP_VAR and IS_CONST can't be IS_REFERENCE)

commit 4638f7b914
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jan 28 07:43:28 2015 +0300

    Change "foreach" statement behavior (this is just a PoC yet)

    - "foreach by value" don't relay on internal array/object pointer and doesnt perform array duplication. It just locks it incrementing reference counter. If the original array is modified by some code, the copy on write is performed and "foreach" still work with the old copy.

    - it makes no difference if array given to "foreach by value" is reference itself

    - "foreach by reference" still use internal array/object pointer and should work similar to PHP-5. (This id not completely implemented)
2015-02-12 13:57:12 +03:00
Dmitry Stogov
d6bea5bb1e Fixed use after free on the following code
sapi/cli/php -r 'function hello(string $world) : string { var_dump(bin2hex($world)); return $world; } echo "foo" . hello(6) . "\n";'
2015-02-10 15:51:16 +00:00
Andrea Faulds
5a7ac0fade Implement per-file strictness for scalar return types 2015-02-10 15:48:09 +00:00
Andrea Faulds
6b6b2b4b7c Implement scalar return types (strict only for now) 2015-02-10 15:48:09 +00:00
Andrea Faulds
fe663cc404 Partial ZPP strictness implementation 2015-02-10 15:48:06 +00:00
Andrea Faulds
cc01e37e54 It Begins 2015-02-10 15:48:06 +00:00
Andrea Faulds
a13d13429a Refactor scalar type hints implementation per Dmitry's patch 2015-02-10 15:48:05 +00:00
Andrea Faulds
d4dd2a9baf Use new names of arg parsing functions 2015-02-10 15:48:05 +00:00
Andrea Faulds
c3c0f531a2 Scalar type hints with ZPP casting rules 2015-02-10 15:48:04 +00:00
Dmitry Stogov
f5a9cfc33a Merge branch 'internal-function-return-types' of github.com:reeze/php-src into test
* 'internal-function-return-types' of github.com:reeze/php-src:
  Add load time return type checking to match user land logic
  Add test function arguments
  Implemented internal function return types
2015-02-05 11:01:07 +03:00
Reeze Xia
bff4c47fa7 Implemented internal function return types 2015-02-05 01:04:54 +08:00
Dmitry Stogov
8b46d45a9d Simplify code and add comments 2015-02-04 17:56:14 +03: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
Dmitry Stogov
371dc9b6a6 Fixed bug #68896 (Changing ArrayObject value cause Segment Fault) 2015-01-26 11:25:05 +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
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Dmitry Stogov
ab0b15b8ff Optimized destruction of extra arguments passed to user functions.
If no refcounted arguments are passed, then destruction code is not triggered at all.
(Full rebuild required)
2014-12-26 22:34:44 +03:00
Dmitry Stogov
fd4844e079 Removed useless checks 2014-12-22 19:04:29 +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
Dmitry Stogov
68cfeed70f Removed unnecessary checks 2014-12-12 21:57:12 +03: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
Anatol Belski
da78550006 fix TS build and C89 compat 2014-12-10 12:23:46 +01:00
Dmitry Stogov
5b3a69c29f Improved ASSIGN_<OP>, ASSIGN_DIM and UNSET_DIM 2014-12-09 15:15:24 +03:00
Dmitry Stogov
98e81e13cf simplified code 2014-12-09 12:17:55 +03:00
Dmitry Stogov
f70545678b Pass znode_op structure by value (it fits into one word) instead of pointer to structure. 2014-12-09 03:03:38 +03:00
Dmitry Stogov
11f7854e75 Move checks for references into slow paths. 2014-12-09 01:09:44 +03:00
Dmitry Stogov
b6c6e7960a Improved ASSIGN_DIM and ASSIGN_OBJ 2014-12-09 00:10:23 +03:00
Dmitry Stogov
db4271d332 Move checks for references into slow paths of handlers or helpers. Remove duplicate opcode handlers. 2014-12-08 18:11:14 +03:00
Dmitry Stogov
a417ebfc48 Get rid of duplicare FETCH_DIM_* handlers 2014-12-05 13:45:03 +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
Dmitry Stogov
1da14c9f81 Pack EX(frame_info) into EX(This).u1.v.reserved. Rename "frame"kind" into "call_kind" and VM_FRAME_... into ZEND_CALL_... 2014-11-28 10:33:03 +03:00
Dmitry Stogov
11384ba77b Pack EX(num_args) into EX(This).u2.num_args 2014-11-28 10:28:49 +03:00
Dmitry Stogov
9a36cb1a07 Get rid of EX(scope). In most cases we use EG(scope) anyway. EX(scope) was used to switch EG(scope) back after call, but it's possibleto use EX(func)->common.scope instead. 2014-11-28 10:21:18 +03:00
Dmitry Stogov
109baa0394 Fixed compilation warnings 2014-11-27 12:52:31 +03:00
Dmitry Stogov
216ef32173 Changed "finally" handling. Removed EX(fast_ret) and EX(delayed_exception). Allocate and use additional IS_TMP_VAR slot on VM stack instead. 2014-11-27 09:56:43 +03:00
Dmitry Stogov
303d73ecd2 Reimplemented silence operator (@) handling on exceptions. Now each silence region is stored in op_array->brk_cont_array. On exception ZEND_HANDLE_EXCEPTION handler traverse this array and restore original EG(error_reporting) if exception occured inside a "silence" region. 2014-11-26 22:44:58 +03:00
Anatol Belski
d36bf0e8ee fix TS build 2014-11-25 17:58:20 +01:00
Dmitry Stogov
1c569b41d5 Merge branch 'PHP-5.6'
* PHP-5.6:
  Better fix for bug #68446
2014-11-25 18:12:30 +03:00
Dmitry Stogov
e116595e63 Better fix for bug #68446 2014-11-25 18:09:08 +03:00
Dmitry Stogov
83ce1d9a78 Revert "Merge remote-tracking branch 'origin/PHP-5.6'"
This reverts commit 38229d13d1, reversing
changes made to 77f172725a.
2014-11-25 15:40:08 +03:00
Bob Weinand
aba95c2399 Revert "Fix bug #68446 (bug with constant defaults and type hints)"
This reverts commit 5ef138b0c7.
2014-11-25 12:24:29 +01:00
Dmitry Stogov
3727e26456 Improved zend_hash_clean() and added new optimized zend_symtable_clean() 2014-11-25 14:17:21 +03:00
Dmitry Stogov
85d04a48d9 Improved assignment to object property 2014-11-24 23:19:24 +03:00
Dmitry Stogov
42d33a9fc6 Reuse zend_assign_to_variable() in zend_std_write_property() 2014-11-24 20:33:27 +03:00
Bob Weinand
38229d13d1 Merge remote-tracking branch 'origin/PHP-5.6'
Conflicts:
	Zend/zend_compile.c
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-11-23 23:50:47 +01:00
Bob Weinand
5ef138b0c7 Fix bug #68446 (bug with constant defaults and type hints) 2014-11-23 21:10:41 +01:00
Dmitry Stogov
c746dcd7fd Get rid of zend_free_op structure (use zval* instead).
Get rid of useless TSRMLS arguments.
2014-11-18 09:05:48 +03:00
Dmitry Stogov
54fa424751 Micro optimization 2014-11-17 08:36:14 +03:00
Dmitry Stogov
75041379a6 Improved object property access. 2014-11-06 14:50:03 +03:00
Dmitry Stogov
8dedd863bc Get rid of ZEND_FETCH_MAKE_REF 2014-10-22 21:45:02 +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
Dmitry Stogov
fe8577efb1 Optimized ASSIGN_DIM and related opcodes 2014-10-21 19:30:43 +04:00
Anatol Belski
66e47446e4 fix signed/unsigned mismatch warning 2014-10-13 18:43:13 +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
0390cde428 Improved VM stack primitives for fast paths. Slow paths are not inlined anymore. 2014-10-09 20:29:02 +04:00
Dmitry Stogov
7fd3375fb5 Exposed zend_clean_and_cache_symbol_table() and fixed incorrect efree() 2014-10-08 16:08:26 +04:00
Dmitry Stogov
fe501914f0 Micro optimization 2014-10-07 23:48:55 +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
Nikita Popov
58f389772f Fix $this CV init for include/eval
Fixes bug #68148
2014-10-05 23:38:59 +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
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
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
e15be6c8cd Use more readable inline functions 2014-09-29 19:41:00 +04: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
Dmitry Stogov
0c0d43bd4e Avoid useless reference counting 2014-09-22 17:52:38 +04:00
Dmitry Stogov
9c0fa4106c Make error paths to be UNEXPECTED 2014-09-22 13:18:49 +04: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
Dmitry Stogov
3bc8a958c5 Fixed useless or duplicated IS_INTERNED() checks 2014-09-19 15:41:01 +04:00
Dmitry Stogov
e3b3e68127 Optimized enterance into functions 2014-09-17 16:17:58 +04:00
Anatol Belski
71cc3991bf cast the other way round, the sign check is already done before 2014-09-16 09:33:02 +02:00
Dmitry Stogov
d17487f827 We don't have to check for undefined CV if we fetch it for isset() operation 2014-09-16 09:15:47 +04:00
Anatol Belski
836fd73cce fix signed/unsigned mismatch 2014-09-15 12:58:45 +02:00
Dmitry Stogov
b8c36e199e Simplify ASSIGN code 2014-09-11 17:00:06 +04:00
Dmitry Stogov
c07a0dbcb9 Don't miss warning messages 2014-09-10 13:02:01 +04:00
Dmitry Stogov
e85545eca5 Removed IS_STR_OFFSET type and corresponding macros. Optimized string offset handling in ASSIGN_DIM opcode. 2014-09-08 15:46:45 +04:00
Anatol Belski
acad6f4700 fix 64 bit string index usage 2014-09-07 00:55:36 +02:00
Nikita Popov
6cceb54c09 Fix a number of format issues 2014-09-03 15:57:28 +02:00
Nikita Popov
9e75353184 Use zval_ptr_dtor_nogc to destroy literals
Also move the definition of zval_ptr_dtor_nogc to zend_variables.h
(from zend_execute.h/.c) as it's used in a few places.
2014-09-03 15:18:06 +02:00
Anatol Belski
d3fb1859f0 restore the old behavior for the assignment to string offset 2014-08-29 17:28:53 +02:00
Anatol Belski
898e1570a2 fixed trim() and strtok() to work with big strings 2014-08-28 21:59:00 +02:00
Dmitry Stogov
f2b0370193 Use 'const' qualifier for pointrs to code used at run-time (the code must not be changed) 2014-08-28 02:44:06 +04:00
Dmitry Stogov
ee552b628c Reorder fields for better nenory consumtion and data locality on 64-bit systems 2014-08-27 22:45:27 +04:00
Dmitry Stogov
8ec40397cd Cleanup IS_VAR handling 2014-08-27 19:10:29 +04:00
Nikita Popov
59848e3fbb Remove ZEND_ACC_INTERACTIVE and CG(interactive)
As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.
2014-08-25 23:46:43 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
c586133d07 rename zval_get_long and fixes to some string functions 2014-08-18 08:39:39 +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
25bda5ae3c Fixed assignment of reference to itself 2014-08-14 12:01:28 +04:00
Dmitry Stogov
4a3e501fb3 cleanup 2014-08-08 13:47:34 +04:00
Dmitry Stogov
7301994c28 Merge branch 'master' into phpng
* master: (46 commits)
  PHP_INT_MIN and _MAX tests
  NEWS and UPGRADING
  Added PHP_INT_MIN
  Fix wrong lenght size
  Bug #51096 - Remove unnecessary ? for first/last day of
  Moved streams related functions to xp_ssl.c
  Remove duplicate NEWS
  Update NEWS
  Update NEWS
  Update NEWS
  BFN
  BFN
  Fixed bug #67715 (php-milter does not build and crashes randomly).
  We need to turn off any strict mode here for this warning to show up
  Disable restrictions regarding arrays in constants at run-time. For the discussion around it, see the thread on the mailing list: http://www.mail-archive.com/internals@lists.php.net/msg68245.html
  Revert "Fix bug #67064 in a BC safe way"
  Updated NEWS for #67693
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
  add missing entry to NEWS
  ...

Conflicts:
	Zend/tests/errmsg_040.phpt
	Zend/tests/ns_059.phpt
	Zend/zend_language_parser.y
	Zend/zend_vm_def.h
	ext/openssl/openssl.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_directory.c
	ext/spl/spl_iterators.c
	ext/sqlite3/sqlite3.c
	ext/standard/array.c
2014-08-04 13:56:27 +04:00
Dmitry Stogov
cad6408a3f Fixed Zend/tests/bug54265.phpt 2014-07-29 14:34:43 +04:00
Dmitry Stogov
de306e7088 Implement call_user_func() and call_user_func_array() using special opcodes.
In some rare cases it leads to insignificant changes in error messages.
2014-07-11 00:32:18 +04:00
Dmitry Stogov
19729aa7fe Use data stored in current call frame instead of EG() if possible 2014-07-09 17:07:41 +04:00
Dmitry Stogov
d87140d8d8 Added missed warning (ext/spl/tests/iterator_035.phpt) 2014-07-09 13:30:47 +04:00
Xinchen Hui
549c5a5c1b Mismatched folder marks 2014-07-08 17:53:13 +08:00
Dmitry Stogov
73679bf6db Another fix for uninitialized execute_data->symbol_table 2014-07-08 12:17:52 +04:00
Dmitry Stogov
d9585f019f Skip useless ZEND_RECV opcodes 2014-07-07 22:18:48 +04:00
Dmitry Stogov
7d0b21d3bc Function can't be "interactive" 2014-07-07 21:33:09 +04:00
Dmitry Stogov
2ed8a17045 Refactored run_time_cache usage in object handlers 2014-07-07 20:54:31 +04:00
Dmitry Stogov
5aa91be509 Simplify call-frame handling 2014-07-07 15:50:44 +04:00
Dmitry Stogov
6bf24f4dd0 Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data) 2014-07-04 18:03:45 +04:00
Dmitry Stogov
d2890963e4 Use values from current_execute_data instead of globals where possible 2014-07-04 17:03:44 +04:00
Dmitry Stogov
c4d99ec982 Removed EG(called_scope) and use corresponding value from EG(current_execute_data) 2014-07-03 02:34:43 +04:00
Dmitry Stogov
63c057e331 Removed EG(opline_ptr) and use corresponding value from EG(current_execute_data) 2014-07-02 23:29:53 +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