diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-10-13 14:14:50 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-13 14:14:50 +0200 |
commit | 902d39a3a79c6efe93c8879575fdd5a759cf03de (patch) | |
tree | e6ec0af8ac4333de34f581c2c7b5a2eb93e635a1 /Zend | |
parent | 581f0141b6dd8d20e71612f90b01507ed0783db8 (diff) | |
download | php-git-902d39a3a79c6efe93c8879575fdd5a759cf03de.tar.gz |
Trim trailing whitespace in source code files
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/LICENSE | 24 | ||||
-rw-r--r-- | Zend/README.ZEND_VM | 16 | ||||
-rw-r--r-- | Zend/Zend.m4 | 44 | ||||
-rw-r--r-- | Zend/acinclude.m4 | 4 | ||||
-rw-r--r-- | Zend/bench.php | 10 | ||||
-rw-r--r-- | Zend/build.mk | 4 | ||||
-rw-r--r-- | Zend/micro_bench.php | 6 | ||||
-rw-r--r-- | Zend/tests/closures/closure_from_callable.inc | 26 | ||||
-rw-r--r-- | Zend/tests/list_keyed_evaluation_order.inc | 2 | ||||
-rw-r--r-- | Zend/zend.c | 2 | ||||
-rw-r--r-- | Zend/zend_API.c | 10 | ||||
-rw-r--r-- | Zend/zend_alloc.h | 6 | ||||
-rw-r--r-- | Zend/zend_builtin_functions.c | 6 | ||||
-rw-r--r-- | Zend/zend_compile.c | 24 | ||||
-rw-r--r-- | Zend/zend_execute.c | 16 | ||||
-rw-r--r-- | Zend/zend_execute_API.c | 2 | ||||
-rw-r--r-- | Zend/zend_generators.h | 2 | ||||
-rw-r--r-- | Zend/zend_hash.h | 10 | ||||
-rw-r--r-- | Zend/zend_ini_parser.y | 2 | ||||
-rw-r--r-- | Zend/zend_object_handlers.c | 4 | ||||
-rw-r--r-- | Zend/zend_opcode.c | 2 | ||||
-rw-r--r-- | Zend/zend_operators.c | 4 | ||||
-rw-r--r-- | Zend/zend_signal.c | 2 | ||||
-rw-r--r-- | Zend/zend_sort.c | 42 | ||||
-rw-r--r-- | Zend/zend_string.c | 2 | ||||
-rw-r--r-- | Zend/zend_strtod_int.h | 4 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 12 | ||||
-rw-r--r-- | Zend/zend_vm_gen.php | 14 |
28 files changed, 151 insertions, 151 deletions
diff --git a/Zend/LICENSE b/Zend/LICENSE index 8acb9af4f8..51f5cccde9 100644 --- a/Zend/LICENSE +++ b/Zend/LICENSE @@ -1,25 +1,25 @@ --------------------------------------------------------------------- +-------------------------------------------------------------------- The Zend Engine License, Version 2.00 Copyright (c) 1999-2006 Zend Technologies Ltd. All rights reserved. --------------------------------------------------------------------- +-------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, is permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - + 3. The names "Zend" and "Zend Engine" must not be used to endorse or promote products derived from this software without prior permission from Zend Technologies Ltd. For written permission, - please contact license@zend.com. - + please contact license@zend.com. + 4. Zend Technologies Ltd. may publish revised and/or new versions of the license from time to time. Each version will be given a distinguishing version number. @@ -40,9 +40,9 @@ are met: software must display the following acknowledgment: "The Zend Engine is freely available at http://www.zend.com" -THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND +THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT @@ -53,4 +53,4 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------- +-------------------------------------------------------------------- diff --git a/Zend/README.ZEND_VM b/Zend/README.ZEND_VM index de66110d64..bf5f57cffc 100644 --- a/Zend/README.ZEND_VM +++ b/Zend/README.ZEND_VM @@ -21,7 +21,7 @@ ZEND_VM_HANDLER(<OPCODE-NUMBER>, <OPCODE>, <OP1_TYPES>, <OP2_TYPES>) <OPCODE-NUMBER> is a opcode number (0, 1, ...) <OPCODE> is an opcode name (ZEN_NOP, ZEND_ADD, :) <OP1_TYPES> & <OP2_TYPES> are masks for allowed operand op_types. Specializer -will generate code only for defined combination of types. You can use any +will generate code only for defined combination of types. You can use any combination of the following op_types UNUSED, CONST, VAR, TMP and CV also you can use ANY mask to disable specialization according operand's op_type. <HANDLER'S CODE> is a handler's code itself. For most handlers it stills the @@ -34,9 +34,9 @@ EXECUTE_DATA execute_data ZEND_VM_DISPATCH_TO_HANDLER(<OP>) return <OP>_helper(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) -ZEND_VM_DISPATCH_TO_HELPER(<NAME>) +ZEND_VM_DISPATCH_TO_HELPER(<NAME>) return <NAME>(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) -ZEND_VM_DISPATCH_TO_HELPER_EX(<NAME>,<PARAM>,<VAL>) +ZEND_VM_DISPATCH_TO_HELPER_EX(<NAME>,<PARAM>,<VAL>) return <NAME>(<VAL>, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU) ZEND_VM_CONTINUE() return 0 @@ -72,7 +72,7 @@ FREE_OP<X>_VAR_PTR() FREE_VAR_PTR(free_op<X>) -Executor's helpers can be defined without parameters or with one parameter. +Executor's helpers can be defined without parameters or with one parameter. This is done with the following constructs: ZEND_VM_HELPER(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>) @@ -86,13 +86,13 @@ ZEND_VM_HELPER_EX(<HELPER-NAME>, <OP1_TYPES>, <OP2_TYPES>, <PARAM_SPEC>) } Executor's code is generated by PHP script zend_vm_gen.php it uses zend_vm_def.h -and zend_vm_execute.skl as input and produces zend_vm_opcodes.h and -zend_vm_execute.h. The first file is a list of opcode definitions. It is +and zend_vm_execute.skl as input and produces zend_vm_opcodes.h and +zend_vm_execute.h. The first file is a list of opcode definitions. It is included from zend_compile.h. The second one is an executor code itself. It is included from zend_execute.c. -zend_vm_gen.php can produce different kind of executors. You can select -different opcode threading model using --with-vm-kind=CALL|SWITCH|GOTO. You can +zend_vm_gen.php can produce different kind of executors. You can select +different opcode threading model using --with-vm-kind=CALL|SWITCH|GOTO. You can disable opcode specialization using --without-specializer. You can include or exclude old executor together with specialized one using --without-old-executor. At last you can debug executor using original zend_vm_def.h or generated file diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 7a01c0b036..cd55e600ab 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -7,10 +7,10 @@ dnl AC_DEFUN([LIBZEND_CHECK_INT_TYPE],[ AC_MSG_CHECKING(for $1) AC_TRY_COMPILE([ -#if HAVE_SYS_TYPES_H +#if HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#if HAVE_INTTYPES_H +#if HAVE_INTTYPES_H #include <inttypes.h> #elif HAVE_STDINT_H #include <stdint.h> @@ -137,7 +137,7 @@ int main() ], [ AC_MSG_RESULT(no) ]) - + ]) AC_DEFUN([LIBZEND_ENABLE_DEBUG],[ @@ -147,7 +147,7 @@ AC_ARG_ENABLE(debug, ZEND_DEBUG=$enableval ],[ ZEND_DEBUG=no -]) +]) ]) @@ -158,10 +158,10 @@ AC_ARG_ENABLE(maintainer-zts, ZEND_MAINTAINER_ZTS=$enableval ],[ ZEND_MAINTAINER_ZTS=no -]) +]) AC_ARG_ENABLE(inline-optimization, -[ --disable-inline-optimization +[ --disable-inline-optimization If building zend_execute.lo fails, try this switch],[ ZEND_INLINE_OPTIMIZATION=$enableval ],[ @@ -196,7 +196,7 @@ if test "$ZEND_MAINTAINER_ZTS" = "yes"; then AC_DEFINE(ZTS,1,[ ]) CFLAGS="$CFLAGS -DZTS" LIBZEND_CPLUSPLUS_CHECKS -fi +fi changequote({,}) if test -n "$GCC" && test "$ZEND_INLINE_OPTIMIZATION" != "yes"; then @@ -249,7 +249,7 @@ int main() } fp = fopen("conftest.zend", "w"); - fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros); + fprintf(fp, "%d %d\n", ZEND_MM_ALIGNMENT, zeros); fclose(fp); exit(0); @@ -258,7 +258,7 @@ int main() LIBZEND_MM_ALIGN=`cat conftest.zend | cut -d ' ' -f 1` LIBZEND_MM_ALIGN_LOG2=`cat conftest.zend | cut -d ' ' -f 2` AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT, $LIBZEND_MM_ALIGN, [ ]) - AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ]) + AC_DEFINE_UNQUOTED(ZEND_MM_ALIGNMENT_LOG2, $LIBZEND_MM_ALIGN_LOG2, [ ]) ], [], [ dnl cross-compile needs something here LIBZEND_MM_ALIGN=8 @@ -374,7 +374,7 @@ AC_ARG_ENABLE(zend-signals, ZEND_SIGNALS=$enableval ],[ ZEND_SIGNALS=yes -]) +]) AC_CHECK_FUNC(sigaction, [ AC_DEFINE(HAVE_SIGACTION, 1, [Whether sigaction() is available]) @@ -395,24 +395,24 @@ AC_DEFUN([LIBZEND_CPLUSPLUS_CHECKS],[ ]) -AC_MSG_CHECKING(whether /dev/urandom exists) -if test -r "/dev/urandom" && test -c "/dev/urandom"; then +AC_MSG_CHECKING(whether /dev/urandom exists) +if test -r "/dev/urandom" && test -c "/dev/urandom"; then AC_DEFINE([HAVE_DEV_URANDOM], 1, [Define if the target system has /dev/urandom device]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) fi -AC_MSG_CHECKING(whether /dev/arandom exists) -if test -r "/dev/arandom" && test -c "/dev/arandom"; then +AC_MSG_CHECKING(whether /dev/arandom exists) +if test -r "/dev/arandom" && test -c "/dev/arandom"; then AC_DEFINE([HAVE_DEV_ARANDOM], 1, [Define if the target system has /dev/arandom device]) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi AC_ARG_ENABLE(gcc-global-regs, -[ --disable-gcc-global-regs +[ --disable-gcc-global-regs whether to enable GCC global register variables],[ ZEND_GCC_GLOBAL_REGS=$enableval ],[ diff --git a/Zend/acinclude.m4 b/Zend/acinclude.m4 index 32a39891c1..a8a4828e5a 100644 --- a/Zend/acinclude.m4 +++ b/Zend/acinclude.m4 @@ -7,7 +7,7 @@ AC_DEFUN([LIBZEND_BISON_CHECK],[ # min: 2.4 (i.e. 204, major * 100 + minor for easier comparison) bison_version_min="204" # non-working versions, e.g. "3.0 3.2"; - # remove "none" when introducing the first incompatible bison version an + # remove "none" when introducing the first incompatible bison version an # separate any following additions by spaces bison_version_exclude="" @@ -139,7 +139,7 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[ else AC_MSG_RESULT(no) fi - + AC_MSG_CHECKING([for usable fpsetprec]) AC_TRY_LINK([ #include <machine/ieeefp.h> diff --git a/Zend/bench.php b/Zend/bench.php index 5f771803cc..c694361870 100644 --- a/Zend/bench.php +++ b/Zend/bench.php @@ -5,18 +5,18 @@ if (function_exists("date_default_timezone_set")) { function simple() { $a = 0; - for ($i = 0; $i < 1000000; $i++) + for ($i = 0; $i < 1000000; $i++) $a++; $thisisanotherlongname = 0; - for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++) + for ($thisisalongname = 0; $thisisalongname < 1000000; $thisisalongname++) $thisisanotherlongname++; } /****/ function simplecall() { - for ($i = 0; $i < 1000000; $i++) + for ($i = 0; $i < 1000000; $i++) strlen("hallo"); } @@ -26,14 +26,14 @@ function hallo($a) { } function simpleucall() { - for ($i = 0; $i < 1000000; $i++) + for ($i = 0; $i < 1000000; $i++) hallo("hallo"); } /****/ function simpleudcall() { - for ($i = 0; $i < 1000000; $i++) + for ($i = 0; $i < 1000000; $i++) hallo2("hallo"); } diff --git a/Zend/build.mk b/Zend/build.mk index 702cb647e9..b3313a2de9 100644 --- a/Zend/build.mk +++ b/Zend/build.mk @@ -5,7 +5,7 @@ # # Written by Sascha Schumann # -# $Id$ +# $Id$ LT_TARGETS = ltmain.sh ltconfig @@ -34,7 +34,7 @@ aclocal.m4: configure.ac acinclude.m4 aclocal $(config_h_in): configure.ac -# explicitly remove target since autoheader does not seem to work +# explicitly remove target since autoheader does not seem to work # correctly otherwise (timestamps are not updated) @rm -f $@ autoheader diff --git a/Zend/micro_bench.php b/Zend/micro_bench.php index 70525882eb..ef6dd4f7b2 100644 --- a/Zend/micro_bench.php +++ b/Zend/micro_bench.php @@ -4,12 +4,12 @@ function hallo() { } function simpleucall($n) { - for ($i = 0; $i < $n; $i++) + for ($i = 0; $i < $n; $i++) hallo(); } function simpleudcall($n) { - for ($i = 0; $i < $n; $i++) + for ($i = 0; $i < $n; $i++) hallo2(); } @@ -17,7 +17,7 @@ function hallo2() { } function simpleicall($n) { - for ($i = 0; $i < $n; $i++) + for ($i = 0; $i < $n; $i++) func_num_args(); } diff --git a/Zend/tests/closures/closure_from_callable.inc b/Zend/tests/closures/closure_from_callable.inc index 5f0f220974..22a1fa9930 100644 --- a/Zend/tests/closures/closure_from_callable.inc +++ b/Zend/tests/closures/closure_from_callable.inc @@ -26,7 +26,7 @@ class Foo { return $param1; } - + private static function privateStaticFunction($param1) { return $param1; @@ -41,18 +41,18 @@ class Foo { return $param1; } - + protected function protectedInstanceFunc($param1) { return $param1; } - - + + public function publicInstanceFunc($param1) { return $param1; } - + public function closePrivateValid() { return Closure::fromCallable([$this, 'privateInstanceFunc']); @@ -87,23 +87,23 @@ class Foo class SubFoo extends Foo { - + public function closePrivateStaticInvalid() { return Closure::fromCallable([__CLASS__, 'privateStaticFunction']); } - - + + public function closePrivateInvalid() { return Closure::fromCallable([$this, 'privateInstanceFunc']); } - + public function closeProtectedStaticMethod() { return Closure::fromCallable([__CLASS__, 'protectedStaticFunction']); } - + public function closeProtectedValid() { return Closure::fromCallable([$this, 'protectedInstanceFunc']); @@ -113,13 +113,13 @@ class SubFoo extends Foo { { return Closure::fromCallable('parent::publicInstanceFunc'); } - + public function getSelfColonParentPublicInstanceMethod() { return Closure::fromCallable('self::publicInstanceFunc'); } - - + + public function getSelfColonParentProtectedInstanceMethod() { return Closure::fromCallable('self::protectedInstanceFunc'); diff --git a/Zend/tests/list_keyed_evaluation_order.inc b/Zend/tests/list_keyed_evaluation_order.inc index 490a6d84fe..d4ee778b63 100644 --- a/Zend/tests/list_keyed_evaluation_order.inc +++ b/Zend/tests/list_keyed_evaluation_order.inc @@ -47,7 +47,7 @@ class IndexableRetrievable { private $label; private $indexable; - + public function __construct(string $label, Indexable $indexable) { $this->label = $label; $this->indexable = $indexable; diff --git a/Zend/zend.c b/Zend/zend.c index 6ee1a017b8..76f1b69447 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1356,7 +1356,7 @@ ZEND_API ZEND_COLD void zend_throw_error(zend_class_entry *exception_ce, const c { va_list va; char *message = NULL; - + if (exception_ce) { if (!instanceof_function(exception_ce, zend_ce_error)) { zend_error(E_NOTICE, "Error exceptions must be derived from Error"); diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 7c4ae7a615..600520552c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -239,7 +239,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(zend_boo zend_internal_argument_count_error( throw_ || ZEND_ARG_USES_STRICT_TYPES(), - "%s%s%s() expects %s %d parameter%s, %d given", + "%s%s%s() expects %s %d parameter%s, %d given", class_name, \ class_name[0] ? "::" : "", \ ZSTR_VAL(active_function->common.function_name), @@ -2293,7 +2293,7 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_functio } if (reg_function->common.arg_info && - (reg_function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) { + (reg_function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) { /* convert "const char*" class type names into "zend_string*" */ uint32_t i; uint32_t num_args = reg_function->common.num_args + 1; @@ -3134,7 +3134,7 @@ get_function_via_handler: (!fcc->function_handler->common.scope || !instanceof_function(ce_org, fcc->function_handler->common.scope))) { if (fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) { - if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && + if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && fcc->function_handler->common.function_name) { zend_string_release(fcc->function_handler->common.function_name); } @@ -3361,7 +3361,7 @@ again: ((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) || fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY || fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) { - if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && + if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && fcc->function_handler->common.function_name) { zend_string_release(fcc->function_handler->common.function_name); } @@ -3420,7 +3420,7 @@ again: ((fcc->function_handler->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) || fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION_TEMPORARY || fcc->function_handler->type == ZEND_OVERLOADED_FUNCTION)) { - if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && + if (fcc->function_handler->type != ZEND_OVERLOADED_FUNCTION && fcc->function_handler->common.function_name) { zend_string_release(fcc->function_handler->common.function_name); } diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 93ec2f834e..e3ab221e1f 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -64,7 +64,7 @@ typedef struct _zend_mm_debug_info { } zend_mm_debug_info; # define ZEND_MM_OVERHEAD ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info)) -#else +#else # define ZEND_MM_OVERHEAD 0 #endif @@ -383,7 +383,7 @@ static void apc_init_heap(void) // Preallocate properly aligned SHM chunks (64MB) tmp_data.mem = shm_memalign(ZEND_MM_CHUNK_SIZE, ZEND_MM_CHUNK_SIZE * 32); - + // Initialize temporary storage data tmp_data.free_pages = 0; @@ -396,7 +396,7 @@ static void apc_init_heap(void) zend_hash_init(apc_ht, 64, NULL, ZVAL_PTR_DTOR, 0); zend_mm_set_heap(old_heap); } - + */ END_EXTERN_C() diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c index 8cd0207e46..9c5902b1bc 100644 --- a/Zend/zend_builtin_functions.c +++ b/Zend/zend_builtin_functions.c @@ -484,7 +484,7 @@ ZEND_FUNCTION(func_get_args) q = p; if (EXPECTED(Z_TYPE_INFO_P(q) != IS_UNDEF)) { ZVAL_DEREF(q); - if (Z_OPT_REFCOUNTED_P(q)) { + if (Z_OPT_REFCOUNTED_P(q)) { Z_ADDREF_P(q); } } else { @@ -500,7 +500,7 @@ ZEND_FUNCTION(func_get_args) q = p; if (EXPECTED(Z_TYPE_INFO_P(q) != IS_UNDEF)) { ZVAL_DEREF(q); - if (Z_OPT_REFCOUNTED_P(q)) { + if (Z_OPT_REFCOUNTED_P(q)) { Z_ADDREF_P(q); } } else { @@ -1279,7 +1279,7 @@ ZEND_FUNCTION(method_exists) Z_PARAM_ZVAL(klass) Z_PARAM_STR(method_name) ZEND_PARSE_PARAMETERS_END(); - + if (Z_TYPE_P(klass) == IS_OBJECT) { ce = Z_OBJCE_P(klass); } else if (Z_TYPE_P(klass) == IS_STRING) { diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 95d93903de..f1dd49a223 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1278,7 +1278,7 @@ static void zend_mark_function_as_generator() /* {{{ */ if (ZEND_TYPE_CODE(return_info.type) != IS_ITERABLE) { const char *msg = "Generators may only declare a return type of Generator, Iterator, Traversable, or iterable, %s is not permitted"; - + if (!ZEND_TYPE_IS_CLASS(return_info.type)) { zend_error_noreturn(E_COMPILE_ERROR, msg, zend_get_type_by_const(ZEND_TYPE_CODE(return_info.type))); } @@ -1947,7 +1947,7 @@ ZEND_API size_t zend_dirname(char *path, size_t len) static void zend_adjust_for_fetch_type(zend_op *opline, uint32_t type) /* {{{ */ { zend_uchar factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3; - + if (opline->opcode == ZEND_FETCH_THIS) { return; } @@ -2185,7 +2185,7 @@ static void zend_emit_tick(void) /* {{{ */ if (CG(active_op_array)->last && CG(active_op_array)->opcodes[CG(active_op_array)->last - 1].opcode == ZEND_TICKS) { return; } - + opline = get_next_op(CG(active_op_array)); opline->opcode = ZEND_TICKS; @@ -2612,7 +2612,7 @@ static zend_op *zend_compile_simple_var_no_cv(znode *result, zend_ast *ast, uint opline = zend_emit_op(result, ZEND_FETCH_R, &name_node, NULL); } - if (name_node.op_type == IS_CONST && + if (name_node.op_type == IS_CONST && zend_is_auto_global(Z_STR(name_node.u.constant))) { opline->extended_value = ZEND_FETCH_GLOBAL; @@ -4968,7 +4968,7 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */ } else if (expr_node.op_type == IS_CONST && Z_TYPE(expr_node.u.constant) == IS_TRUE) { jmpnz_opnums[i] = zend_emit_cond_jump(ZEND_JMPNZ, &cond_node, 0); - } else { + } else { opline = zend_emit_op(NULL, ZEND_CASE, &expr_node, &cond_node); SET_NODE(opline->result, &case_node); if (opline->op1_type == IS_CONST) { @@ -4992,7 +4992,7 @@ void zend_compile_switch(zend_ast *ast) /* {{{ */ if (jumptable) { zval *cond_zv = zend_ast_get_zval(cond_ast); zval jmp_target; - ZVAL_LONG(&jmp_target, get_next_op_number(CG(active_op_array))); + ZVAL_LONG(&jmp_target, get_next_op_number(CG(active_op_array))); ZEND_ASSERT(Z_TYPE_P(cond_zv) == jumptable_type); if (Z_TYPE_P(cond_zv) == IS_LONG) { @@ -5166,7 +5166,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */ if (finally_ast) { zend_loop_var discard_exception; uint32_t opnum_jmp = get_next_op_number(CG(active_op_array)) + 1; - + /* Pop FAST_CALL from unwind stack */ zend_stack_del_top(&CG(loop_var_stack)); @@ -5417,7 +5417,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ uint32_t i; zend_op_array *op_array = CG(active_op_array); zend_arg_info *arg_infos; - + if (return_type_ast) { zend_bool allow_null = 0; @@ -5560,7 +5560,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ "with a float type can only be float, integer, or NULL"); } break; - + case IS_ITERABLE: if (Z_TYPE(default_node.u.constant) != IS_ARRAY) { zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters " @@ -5572,7 +5572,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters " "with an object type can only be NULL"); break; - + default: if (!ZEND_SAME_FAKE_TYPE(ZEND_TYPE_CODE(arg_info->type), Z_TYPE(default_node.u.constant))) { zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters " @@ -5605,7 +5605,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */ } else { opline->op2.num = -1; } - } + } } /* These are assigned at the end to avoid unitialized memory in case of an error */ @@ -7856,7 +7856,7 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */ i = ((j * sizeof(zend_string*)) + (sizeof(zval) - 1)) / sizeof(zval); while (i > 1) { get_temporary_variable(CG(active_op_array)); - i--; + i--; } zend_end_live_range(CG(active_op_array), range, opline - CG(active_op_array)->opcodes, diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 1101214e88..ad438f6dea 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -566,7 +566,7 @@ static inline zval *_get_zval_ptr_ptr(int op_type, znode_op node, zend_free_op * } static zend_always_inline zval *_get_obj_zval_ptr_unused(EXECUTE_DATA_D) -{ +{ return &EX(This); } @@ -944,7 +944,7 @@ static ZEND_COLD void zend_verify_return_error( zend_verify_type_error_common( zf, arg_info, ce, value, - &fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind); + &fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind); zend_type_error("Return value of %s%s%s() must %s%s%s, %s%s returned", fclass, fsep, fname, need_msg, need_kind, need_or_null, given_msg, given_kind); @@ -960,7 +960,7 @@ static ZEND_COLD void zend_verify_internal_return_error( zend_verify_type_error_common( zf, arg_info, ce, value, - &fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind); + &fname, &fsep, &fclass, &need_msg, &need_kind, &need_or_null, &given_msg, &given_kind); zend_error_noreturn(E_CORE_ERROR, "Return value of %s%s%s() must %s%s%s, %s%s returned", fclass, fsep, fname, need_msg, need_kind, need_or_null, given_msg, given_kind); @@ -1011,7 +1011,7 @@ static zend_always_inline void zend_verify_return_type(zend_function *zf, zval * { zend_arg_info *ret_info = zf->common.arg_info - 1; zend_class_entry *ce = NULL; - + if (UNEXPECTED(!zend_check_type(ret_info->type, ret, &ce, cache_slot, NULL, NULL, 1))) { zend_verify_return_error(zf, ce, ret); } @@ -1360,7 +1360,7 @@ static zend_never_inline void zend_pre_incdec_overloaded_property(zval *object, if (Z_OBJ_HT_P(object)->read_property && Z_OBJ_HT_P(object)->write_property) { zval *z, *zptr, obj; - + ZVAL_OBJ(&obj, Z_OBJ_P(object)); Z_ADDREF(obj); zptr = z = Z_OBJ_HT(obj)->read_property(&obj, property, BP_VAR_R, cache_slot, &rv); @@ -1570,7 +1570,7 @@ str_index: switch (Z_TYPE_P(dim)) { case IS_UNDEF: zval_undefined_cv(EX(opline)->op2.var EXECUTE_DATA_CC); - /* break missing intentionally */ + /* break missing intentionally */ case IS_NULL: offset_key = ZSTR_EMPTY_ALLOC(); goto str_index; @@ -1947,7 +1947,7 @@ use_read_property: ZVAL_INDIRECT(result, ptr); } } else if (EXPECTED(Z_OBJ_HT_P(container)->read_property)) { - goto use_read_property; + goto use_read_property; } else { zend_error(E_WARNING, "This object doesn't support property references"); ZVAL_ERROR(result); @@ -2353,7 +2353,7 @@ static void cleanup_unfinished_calls(zend_execute_data *execute_data, uint32_t o zend_op *opline = EX(func)->op_array.opcodes + op_num; int level; int do_exit; - + if (UNEXPECTED(opline->opcode == ZEND_INIT_FCALL || opline->opcode == ZEND_INIT_FCALL_BY_NAME || opline->opcode == ZEND_INIT_NS_FCALL_BY_NAME || diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 4ce3a57458..9f10843b6b 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -812,7 +812,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) / ZEND_ADD_CALL_FLAG(call, call_info); } - if (func->type == ZEND_USER_FUNCTION) { + if (func->type == ZEND_USER_FUNCTION) { int call_via_handler = (func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE) != 0; const zend_op *current_opline_before_exception = EG(opline_before_exception); diff --git a/Zend/zend_generators.h b/Zend/zend_generators.h index 2de3a1d947..98513c3a3d 100644 --- a/Zend/zend_generators.h +++ b/Zend/zend_generators.h @@ -30,7 +30,7 @@ extern ZEND_API zend_class_entry *zend_ce_ClosedGeneratorException; typedef struct _zend_generator_node zend_generator_node; typedef struct _zend_generator zend_generator; -/* The concept of `yield from` exposes problems when accessed at different levels of the chain of delegated generators. We need to be able to reference the currently executed Generator in all cases and still being able to access the return values of finished Generators. +/* The concept of `yield from` exposes problems when accessed at different levels of the chain of delegated generators. We need to be able to reference the currently executed Generator in all cases and still being able to access the return values of finished Generators. * The solution to this problem is a doubly-linked tree, which all Generators referenced in maintain a reference to. It should be impossible to avoid walking the tree in all cases. This way, we only need tree walks from leaf to root in case where some part of the `yield from` chain is passed to another `yield from`. (Update of leaf node pointer and list of multi-children nodes needed when leaf gets a child in direct path from leaf to root node.) But only in that case, which should be a fairly rare case (which is then possible, but not totally cheap). * The root of the tree is then the currently executed Generator. The subnodes of the tree (all except the root node) are all Generators which do `yield from`. Each node of the tree knows a pointer to one leaf descendant node. Each node with multiple children needs a list of all leaf descendant nodes paired with pointers to their respective child node. (The stack is determined by leaf node pointers) Nodes with only one child just don't need a list, there it is enough to just have a pointer to the child node. Further, leaf nodes store a pointer to the root node. * That way, when we advance any generator, we just need to look up a leaf node (which all have a reference to a root node). Then we can see at the root node whether current Generator is finished. If it isn't, all is fine and we can just continue. If the Generator finished, there will be two cases. Either it is a simple node with just one child, then go down to child node. Or it has multiple children and we now will remove the current leaf node from the list of nodes (unnecessary, is microoptimization) and go down to the child node whose reference was paired with current leaf node. Child node is then removed its parent reference and becomes new top node. Or the current node references the Generator we're currently executing, then we can continue from the YIELD_FROM opcode. When a node referenced as root node in a leaf node has a parent, then we go the way up until we find a root node without parent. diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 64f28ea221..386248d171 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -312,7 +312,7 @@ static zend_always_inline zval *zend_hash_find_ind(const HashTable *ht, zend_str zval *zv; zv = zend_hash_find(ht, key); - return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ? + return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ? ((Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF) ? Z_INDIRECT_P(zv) : NULL) : zv; } @@ -332,7 +332,7 @@ static zend_always_inline zval *zend_hash_str_find_ind(const HashTable *ht, cons zval *zv; zv = zend_hash_str_find(ht, str, len); - return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ? + return (zv && Z_TYPE_P(zv) == IS_INDIRECT) ? ((Z_TYPE_P(Z_INDIRECT_P(zv)) != IS_UNDEF) ? Z_INDIRECT_P(zv) : NULL) : zv; } @@ -1024,7 +1024,7 @@ static zend_always_inline zval *_zend_hash_append(HashTable *ht, zend_string *ke if (!ZSTR_IS_INTERNED(key)) { ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_addref(key); - zend_string_hash_val(key); + zend_string_hash_val(key); } p->key = key; p->h = ZSTR_H(key); @@ -1046,7 +1046,7 @@ static zend_always_inline zval *_zend_hash_append_ptr(HashTable *ht, zend_string if (!ZSTR_IS_INTERNED(key)) { ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_addref(key); - zend_string_hash_val(key); + zend_string_hash_val(key); } p->key = key; p->h = ZSTR_H(key); @@ -1068,7 +1068,7 @@ static zend_always_inline void _zend_hash_append_ind(HashTable *ht, zend_string if (!ZSTR_IS_INTERNED(key)) { ht->u.flags &= ~HASH_FLAG_STATIC_KEYS; zend_string_addref(key); - zend_string_hash_val(key); + zend_string_hash_val(key); } p->key = key; p->h = ZSTR_H(key); diff --git a/Zend/zend_ini_parser.y b/Zend/zend_ini_parser.y index b224994214..768486cba4 100644 --- a/Zend/zend_ini_parser.y +++ b/Zend/zend_ini_parser.y @@ -129,7 +129,7 @@ static void zend_ini_add_string(zval *result, zval *op1, zval *op2) } } op1_len = (int)Z_STRLEN_P(op1); - + if (Z_TYPE_P(op2) != IS_STRING) { convert_to_string(op2); } diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 86e75c3ffe..1d4ee75a64 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -89,7 +89,7 @@ ZEND_API void rebuild_object_properties(zend_object *zobj) /* {{{ */ zobj->properties->u.v.flags |= HASH_FLAG_HAS_EMPTY_IND; } - _zend_hash_append_ind(zobj->properties, prop_info->name, + _zend_hash_append_ind(zobj->properties, prop_info->name, OBJ_PROP(zobj, prop_info->offset)); } } ZEND_HASH_FOREACH_END(); @@ -616,7 +616,7 @@ zval *zend_std_read_property(zval *object, zval *member, int type, void **cache_ *guard |= IN_ISSET; zend_std_call_issetter(&tmp_object, member, &tmp_result); *guard &= ~IN_ISSET; - + if (!zend_is_true(&tmp_result)) { retval = &EG(uninitialized_zval); zval_ptr_dtor(&tmp_object); diff --git a/Zend/zend_opcode.c b/Zend/zend_opcode.c index ea8fa0917d..0972742dde 100644 --- a/Zend/zend_opcode.c +++ b/Zend/zend_opcode.c @@ -112,7 +112,7 @@ ZEND_API void destroy_zend_function(zend_function *function) zend_string_release(function->common.function_name); if (function->common.arg_info && - (function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) { + (function->common.fn_flags & (ZEND_ACC_HAS_RETURN_TYPE|ZEND_ACC_HAS_TYPE_HINTS))) { uint32_t i; uint32_t num_args = function->common.num_args + 1; zend_arg_info *arg_info = function->common.arg_info - 1; diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index d006b646d1..7f1e426e83 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -3001,7 +3001,7 @@ process_double: } /* }}} */ -/* +/* * String matching - Sunday algorithm * http://www.iti.fh-flensburg.de/lang/algorithmen/pattern/sundayen.htm */ @@ -3085,7 +3085,7 @@ ZEND_API const char* ZEND_FASTCALL zend_memnrstr_ex(const char *haystack, const if (i == needle_len) { return (const char *)p; } - + if (UNEXPECTED(p == haystack)) { return NULL; } diff --git a/Zend/zend_signal.c b/Zend/zend_signal.c index 646cc50f81..3f1f85561f 100644 --- a/Zend/zend_signal.c +++ b/Zend/zend_signal.c @@ -184,7 +184,7 @@ static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context) if (NULL == TSRMLS_CACHE || NULL == TSRMG_BULK_STATIC(zend_signal_globals_id, zend_signal_globals_t *)) { p_sig.flags = 0; p_sig.handler = SIG_DFL; - } else + } else #endif p_sig = SIGG(handlers)[signo-1]; diff --git a/Zend/zend_sort.c b/Zend/zend_sort.c index 16295febbd..f9932abecd 100644 --- a/Zend/zend_sort.c +++ b/Zend/zend_sort.c @@ -231,58 +231,58 @@ ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_fun } /* }}} */ -/* {{{ ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp) +/* {{{ ZEND_API void zend_sort(void *base, size_t nmemb, size_t siz, compare_func_t cmp, swap_func_t swp) * * Derived from LLVM's libc++ implementation of std::sort. * * =========================================================================== * libc++ License * =========================================================================== - * + * * The libc++ library is dual licensed under both the University of Illinois * "BSD-Like" license and the MIT license. As a user of this code you may * choose to use it under either license. As a contributor, you agree to allow * your code to be used under both. - * + * * Full text of the relevant licenses is included below. - * + * * =========================================================================== - * + * * University of Illinois/NCSA * Open Source License - * + * * Copyright (c) 2009-2012 by the contributors listed at * http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT - * + * * All rights reserved. - * + * * Developed by: - * + * * LLVM Team - * + * * University of Illinois at Urbana-Champaign - * + * * http://llvm.org - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal with the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimers. - * + * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimers in the * documentation and/or other materials provided with the distribution. - * + * * * Neither the names of the LLVM Team, University of Illinois at * Urbana-Champaign, nor the names of its contributors may be used to * endorse or promote products derived from this Software without * specific prior written permission. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -290,22 +290,22 @@ ZEND_API void zend_insert_sort(void *base, size_t nmemb, size_t siz, compare_fun * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * WITH THE SOFTWARE. - * + * * =========================================================================== - * + * * Copyright (c) 2009-2012 by the contributors listed at * http://llvm.org/svn/llvm-project/libcxx/trunk/CREDITS.TXT - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/Zend/zend_string.c b/Zend/zend_string.c index e4edc92e47..2fdc51dfa8 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -27,7 +27,7 @@ static zend_string *zend_new_interned_string_permanent(zend_string *str); static zend_string *zend_new_interned_string_request(zend_string *str); /* Any strings interned in the startup phase. Common to all the threads, - won't be free'd until process exit. If we want an ability to + won't be free'd until process exit. If we want an ability to add permanent strings even after startup, it would be still possible on costs of locking in the thread safe builds. */ static HashTable interned_strings_permanent; diff --git a/Zend/zend_strtod_int.h b/Zend/zend_strtod_int.h index ca4049ee33..f3fc6ea90a 100644 --- a/Zend/zend_strtod_int.h +++ b/Zend/zend_strtod_int.h @@ -34,7 +34,7 @@ #endif /* TODO check to undef this option, this might - make more perf. destroy_freelist() + make more perf. destroy_freelist() should be adapted then. */ #define Omit_Private_Memory 1 @@ -140,7 +140,7 @@ typedef unsigned long int uint32_t; } else if (1 == x) { \ tsrm_mutex_unlock(pow5mult_mutex); \ } - + #endif diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 4c104b8e61..d0d8df37be 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -988,7 +988,7 @@ ZEND_VM_INLINE_HELPER(zend_binary_assign_op_helper, VAR|UNUSED|THIS|CV, CONST|TM ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_dim_helper, binary_op, binary_op); } # endif - + ZEND_VM_DISPATCH_TO_HELPER(zend_binary_assign_op_obj_helper, binary_op, binary_op); #endif } @@ -1555,7 +1555,7 @@ ZEND_VM_HELPER(zend_fetch_static_prop_helper, CONST|TMPVAR|CV, UNUSED|CONST|VAR, varname = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); retval = zend_fetch_static_property_address(varname, OP1_TYPE, opline->op2, OP2_TYPE, type EXECUTE_DATA_CC); - + if (UNEXPECTED(retval == NULL)) { if (EG(exception)) { FREE_OP1(); @@ -2490,7 +2490,7 @@ ZEND_VM_HOT_HANDLER(43, ZEND_JMPZ, CONST|TMPVAR|CV, JMP_ADDR) zval *val; val = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); - + if (Z_TYPE_INFO_P(val) == IS_TRUE) { ZEND_VM_SET_NEXT_OPCODE(opline + 1); ZEND_VM_CONTINUE(); @@ -3213,7 +3213,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, UNUSED|CLASS_FETCH|CONST|VAR, if (OP1_TYPE == IS_UNUSED) { /* previous opcode is ZEND_FETCH_CLASS */ - if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT || + if ((opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT || (opline->op1.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF) { if (Z_TYPE(EX(This)) == IS_OBJECT) { ce = Z_OBJCE(EX(This)); @@ -3675,7 +3675,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL)) } else { zend_execute_internal(call, ret); } - + #if ZEND_DEBUG if (!EG(exception) && call->func) { ZEND_ASSERT(!(call->func->common.fn_flags & ZEND_ACC_HAS_RETURN_TYPE) || @@ -6322,7 +6322,7 @@ ZEND_VM_HANDLER(180, ZEND_ISSET_ISEMPTY_STATIC_PROP, CONST|TMPVAR|CV, UNUSED|CLA if (OP1_TYPE == IS_CONST && value) { CACHE_POLYMORPHIC_PTR(Z_CACHE_SLOT_P(EX_CONSTANT(opline->op1)), ce, value); - } + } if (OP1_TYPE != IS_CONST && Z_TYPE(tmp) != IS_UNDEF) { zend_string_release(Z_STR(tmp)); diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 995eafc856..d6dbf8393f 100644 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -1221,7 +1221,7 @@ function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array() $label++; return; } - + // Emit pointer to specialized handler $spec_name = $dsc["op"]."_SPEC".$prefix[$op1].$prefix[$op2].extra_spec_name($extra_spec); switch ($kind) { @@ -1884,7 +1884,7 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name) "# endif\n" . $m[1]."return;\n" . "#else\n" . - $m[1]."if (EXPECTED(ret > 0)) {\n" . + $m[1]."if (EXPECTED(ret > 0)) {\n" . $m[1]."\texecute_data = EG(current_execute_data);\n". $m[1]."\tZEND_VM_LOOP_INTERRUPT_CHECK();\n". $m[1]."} else {\n" . @@ -2291,7 +2291,7 @@ function gen_vm($def, $skel) { fputs($f, "ZEND_API const char *zend_get_opcode_name(zend_uchar opcode);\n"); fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode);\n\n"); fputs($f, "END_EXTERN_C()\n\n"); - + foreach ($opcodes as $code => $dsc) { $code = str_pad((string)$code,$code_len," ",STR_PAD_LEFT); $op = str_pad($dsc["op"],$max_opcode_len); @@ -2315,13 +2315,13 @@ function gen_vm($def, $skel) { out($f, HEADER_TEXT); fputs($f,"#include <stdio.h>\n"); fputs($f,"#include <zend.h>\n\n"); - + fputs($f,"static const char *zend_vm_opcodes_names[".($max_opcode + 1)."] = {\n"); for ($i = 0; $i <= $max_opcode; $i++) { fputs($f,"\t".(isset($opcodes[$i]["op"])?'"'.$opcodes[$i]["op"].'"':"NULL").",\n"); } fputs($f, "};\n\n"); - + fputs($f,"static uint32_t zend_vm_opcodes_flags[".($max_opcode + 1)."] = {\n"); for ($i = 0; $i <= $max_opcode; $i++) { fprintf($f, "\t0x%08x,\n", isset($opcodes[$i]["flags"]) ? $opcodes[$i]["flags"] : 0); @@ -2335,7 +2335,7 @@ function gen_vm($def, $skel) { fputs($f, "ZEND_API uint32_t zend_get_opcode_flags(zend_uchar opcode) {\n"); fputs($f, "\treturn zend_vm_opcodes_flags[opcode];\n"); fputs($f, "}\n"); - + fclose($f); echo "zend_vm_opcodes.c generated successfully.\n"; @@ -2366,7 +2366,7 @@ function gen_vm($def, $skel) { out($f, "# pragma warning(once : 6326)\n"); } out($f, "#endif\n"); - + // Support for ZEND_USER_OPCODE out($f, "static user_opcode_handler_t zend_user_opcode_handlers[256] = {\n"); for ($i = 0; $i < 255; ++$i) { |