Re: [PHP-DEV] RETURN micro optimization

2016-04-05 Thread Dmitry Stogov
, 2016 at 10:04 AM, Derick Rethans <der...@php.net <mailto:der...@php.net>> wrote: On Tue, 5 Apr 2016, Dmitry Stogov wrote: > I propose a micro optimization for RETURN statement. > > Currently "return $x" increments reference counter of $x, then

[PHP-DEV] Re: Object getter method optimization

2016-04-05 Thread Dmitry Stogov
inchen Hui Cc: Dmitry Stogov; internals; Nikita Popov Subject: Re: Object getter method optimization I submitted the new benchmark result here: Benchmark Result Getter Method Only https://gist.github.com/8cd230a5601cbe38439661adf3caca0d Without getter optimization (3 runs): 151.0169506073ms With

[PHP-DEV] RETURN micro optimization

2016-04-05 Thread Dmitry Stogov
Hi, I propose a micro optimization for RETURN statement. Currently "return $x" increments reference counter of $x, then in zend_leave_helper() we perform zval_ptr_dtor() on the same $x. The patch sets the original value of $x to null in first place, so zval_ptr_dtor() is not going to be

Re: [PHP-DEV] Object getter method optimization

2016-04-01 Thread Dmitry Stogov
other methods. I don't see any visible performance change on real-life apps. Thanks. Dmitry. From: Lin Yo-An <cornelius.h...@gmail.com> Sent: Friday, April 1, 2016 19:14 To: Dmitry Stogov Cc: internals; Xinchen Hui; Nikita Popov Subject: Re: [PHP-DEV] Object

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-31 Thread Dmitry Stogov
s precisely because it necessarily has a type. Why we should jump to the same conclusion, in a system where properties do not necessarily have types is not clear to me. Just not to confuse programmers with uncommon grouping behavior. Thanks. Dmitry. Cheers Joe On Thu, Mar 31, 2016 at

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-31 Thread Dmitry Stogov
On 03/31/2016 11:34 AM, Joe Watkins wrote: Morning, > Given that public is implied for all properties above there > is a value in having the same rule for type. public $bar, int $foo; What does this mean? If it's not an error, what does this mean ? This should be a error. I also think,

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Dmitry Stogov
On 03/30/2016 10:46 PM, Nikita Popov wrote: On Wed, Mar 30, 2016 at 6:18 PM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Great it's not used anymore I personally agree to remove this. Nikita, can you also investigate the need for do

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Dmitry Stogov
only for some SPL hack, and looks like a terrible design decision. Thanks. Dmitry. From: Alexander Lisachenko <lisachenko...@gmail.com> Sent: Wednesday, March 30, 2016 15:07 To: Nikita Popov Cc: Dmitry Stogov; Antony Dovgal; PHP internals Subject: Re: [P

Re: [PHP-DEV] Forbid binding methods to incompatible $this

2016-03-30 Thread Dmitry Stogov
I agree, this ability is a dirty and annoying hack, but I'm sure, some people use it. Tony, you don't use this in the new runkit replacement? :) Thanks. Dmitry. From: Nikita Popov Sent: Wednesday, March 30, 2016 01:21 To: PHP

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
class A { public int $b, string $c; // <- incompatible with HHVM } We don't have to be compatible with HHVM, but why to go against all the other languages. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
Few more related inconsistencies in current implementation. class A { public int $b; } $a = new A; var_dump($a); // <- prints A::b as NULL foreach ($a as $val) { var_dump($val); // <- prints NULL } All similar inconsistencies would be automatically solved with implicit default

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
for elements at all, and will able to narrow this type to native C array "long a[40];" This would safe 3/4 of memory required for array, and improve data locality. Actually, this is exactly the same for properties. Thanks. Dmitry. Cheers Joe On Wed, Mar 30, 2016 at 7:22 A

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
On 03/30/2016 08:13 AM, Joe Watkins wrote: Morning Dmitry, So, I quickly reviewed the RFC and patch. Static properties, and mixed declarations, are now explained in the RFC. Thanks. I'm not agree with decisions, but RFC is more complete now. It would be great to have "static"

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
On 03/30/2016 07:26 AM, Joe Watkins wrote: Morning Pieere, Dmitry, all ... Actually it's not so simple ... for object properties we have ASSIGN_OBJ opcode, but we don't have a special opcode for static properties, and ASSIGN doesn't have any information about where the var came from, and

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-30 Thread Dmitry Stogov
s ... will look at those ... 9) I always intended to leave that to you :) I'll spend some time trying to find a good solution. Thanks. Dmitry. Cheers Joe On Tue, Mar 29, 2016 at 11:59 PM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Hi, Reviewing

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-29 Thread Dmitry Stogov
oposal more consistent, but I assume you got some troubles implementing it and I don't know about them yet. Thanks. Dmitry. ____ From: Dmitry Stogov <dmi...@zend.com> Sent: Tuesday, March 29, 2016 19:24 To: Joe Watkins Cc: Phil Sturgeon; krak...@php.net; interna

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-29 Thread Dmitry Stogov
Thanks. I'll start tomorrow morning and will try to send you update by the evening, From: Joe Watkins <pthre...@pthreads.org> Sent: Tuesday, March 29, 2016 19:18 To: Dmitry Stogov Cc: Phil Sturgeon; krak...@php.net; internals@lists.php.net Subject: Re: [P

Re: [PHP-DEV] [RFC Discussion] Typed Properties

2016-03-29 Thread Dmitry Stogov
Hi Phil, hi Joe, Is your patch complete? I took just a brief review yet, and I would like to make a deep check once again (and may be optimization). I saw, the patch makes some slowdown, but less than I expected. If you are not going to modify the patch in next two days, I would start working

Re: [PHP-DEV] Add spaceship assignment operator

2016-03-25 Thread Dmitry Stogov
I hope this is a joke. Lets try not to reinvent Perl. Thanks. Dmitry. From: Nikita Popov Sent: Thursday, March 24, 2016 20:50 To: PHP internals Subject: [PHP-DEV] Add spaceship assignment operator Hi internals! For consistency, we

Re: [PHP-DEV] [VOTE] var deprecation

2016-03-25 Thread Dmitry Stogov
Java is going to add "var" (http://openjdk.java.net/jeps/286), we are going to remove... From: mtko...@gmail.com on behalf of Mutlu Kocak Sent: Thursday, March 24, 2016 22:15 To: Colin O'Dell Cc: PHP Internals

Re: [PHP-DEV] Object getter method optimization

2016-03-22 Thread Dmitry Stogov
From: Lin Yo-An <cornelius.h...@gmail.com> Sent: Saturday, March 19, 2016 10:08 To: Dmitry Stogov Cc: internals; Xinchen Hui Subject: Re: [PHP-DEV] Object getter method optimization Hi Dmitry, Thanks for your reply! You're correct. let me try to explain your points: If I have a

Re: [PHP-DEV] Object getter method optimization

2016-03-20 Thread Dmitry Stogov
Hi Yo-An Lin, Unfortunately, this approach won't work. At first, at compile time we don't know the body of called getter. At second, the called method might be changed even at run-time, because of polymorphism. Tricks like this might be implemented using JIT and polymorphic inline caches.

[PHP-DEV] Re: Type specialised opcode handlers

2016-03-19 Thread Dmitry Stogov
. From: Dmitry Stogov <dmi...@zend.com> Sent: Wednesday, March 16, 2016 04:04 To: Nikita Popov; Xinchen Hui; Bob Weinand; bogdan.and...@intel.com Cc: internals@lists.php.net Subject: [PHP-DEV] Re: Type specialised opcode handlers This is the final version:

[PHP-DEV] Re: Type specialised opcode handlers

2016-03-15 Thread Dmitry Stogov
This is the final version: https://github.com/php/php-src/pull/1824 Thanks. Dmitry. From: Dmitry Stogov Sent: Friday, March 11, 2016 17:31 To: Nikita Popov; Xinchen Hui; Bob Weinand Subject: Type specialised opcode handlers Hi, I like to inform you that I'm

[PHP-DEV] Re: Remove useless opcode handlers

2016-03-14 Thread Dmitry Stogov
On 03/14/2016 02:29 PM, Nikita Popov wrote: On Mon, Mar 14, 2016 at 11:56 AM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Please take a quick look and let me know if you see any problems. https://gist.github.com/dstogov/23cc318dd3e411904e10

[PHP-DEV] Remove useless opcode handlers

2016-03-14 Thread Dmitry Stogov
Please take a quick look and let me know if you see any problems. https://gist.github.com/dstogov/23cc318dd3e411904e10 I'm going to commit this tomorrow. Thanks. Dmitry.

Re: [PHP-DEV] Fw: unpack()

2016-03-02 Thread Dmitry Stogov
18:20 To: Dmitry Stogov Cc: Nikita Popov; internals@lists.php.net; Hynek Bartoš Subject: Re: [PHP-DEV] Fw: unpack() On 25 February 2016 at 13:02, Dmitry Stogov <dmi...@zend.com> wrote: > > I've just got to know about possible usage of "@" in unpack(), but it seems > doesn't wo

Re: [PHP-DEV] Fw: unpack()

2016-02-28 Thread Dmitry Stogov
ks. Dmitry. From: Leigh <lei...@gmail.com> Sent: Thursday, February 25, 2016 18:20 To: Dmitry Stogov Cc: Nikita Popov; internals@lists.php.net; Hynek Bartoš Subject: Re: [PHP-DEV] Fw: unpack() On 25 February 2016 at 13:02, Dmitry Stogov <dmi...@zend.com> wrote: > > I've jus

Re: [PHP-DEV] Change in internal call_user_function() API.

2016-02-28 Thread Dmitry Stogov
On 02/28/2016 05:01 AM, Xinchen Hui wrote: Hey: On Thu, Feb 25, 2016 at 11:16 PM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: Hi, PHP-7.0 internal call_user_function() API doesn't support function calls with preinitialised symbol tables.

[PHP-DEV] Change in internal call_user_function() API.

2016-02-25 Thread Dmitry Stogov
Hi, PHP-7.0 internal call_user_function() API doesn't support function calls with preinitialised symbol tables. This just can't work in general , because values of arguments might be already initialized in CV as well as in symbol table. I propose to remove the corresponding internal API in

Re: [PHP-DEV] Fw: unpack()

2016-02-25 Thread Dmitry Stogov
On 02/25/2016 03:05 PM, Nikita Popov wrote: On Thu, Feb 25, 2016 at 8:08 AM, Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>> wrote: ____ From: Dmitry Stogov Sent: Wednesday, February 24, 2016 13:35 To: Hynek

Re: [PHP-DEV] unpack()

2016-02-25 Thread Dmitry Stogov
unpack() already returned false in case of "incorrect" input string, Search for RETRUN_FALSE in its body. The test(s) should be added of course. From: Marco Pivetta <ocram...@gmail.com> Sent: Thursday, February 25, 2016 14:12 To: Dmitry St

Re: [PHP-DEV] unpack()

2016-02-25 Thread Dmitry Stogov
You are right about the error. Thanks for checking. From: Michael Wallner <mike.php@gmail.com> on behalf of Michael Wallner <m...@php.net> Sent: Thursday, February 25, 2016 13:53 To: Dmitry Stogov Cc: internals@lists.php.net; Hynek Bartoš Subje

Re: [PHP-DEV] Fw: unpack()

2016-02-25 Thread Dmitry Stogov
If RFC is required, could some volunteer take care about it. Thanks. Dmitry. From: Marco Pivetta <ocram...@gmail.com> Sent: Thursday, February 25, 2016 12:01 To: Dmitry Stogov Cc: PHP Internals List; Hynek Bartoš Subject: Re: [PHP-DEV] Fw: unpack() Hi

[PHP-DEV] Fw: unpack()

2016-02-24 Thread Dmitry Stogov
From: Dmitry Stogov Sent: Wednesday, February 24, 2016 13:35 To: Hynek Bartoš; php-...@lists.php.net; php-general-h...@lists.php.net Subject: Re: unpack() Hi, I think the requested feature may be really useful. And the implementation is really simple https

Re: [PHP-DEV] [RFC Proposal] var keyword deprecation/removal

2016-02-20 Thread Dmitry Stogov
-1 I would prefer not to break source compatibility without a real reason. Thanks. Dmitry. From: Colin O'Dell Sent: Thursday, February 18, 2016 22:10 To: internals@lists.php.net Subject: [PHP-DEV] [RFC Proposal] var keyword

[PHP-DEV] Re: Streams and I/O refactoring approach

2016-02-01 Thread Dmitry Stogov
Hi, At current state, I see this not as a whole stream layer refactoring, but as a low-level replacement of POSIX layer on Windows. I see only few "visible" changes: 1. The layer first checks, if file names are valid UTF-8 strings, and use UTF-8 names or fall back to system locale. 2. The

[PHP-DEV] Re: Reusing main VM stack for generators

2016-01-25 Thread Dmitry Stogov
On 01/22/2016 10:29 PM, Bob Weinand wrote: Am 22.01.2016 um 15:43 schrieb Dmitry Stogov <dmi...@zend.com <mailto:dmi...@zend.com>>: Hi, Could you please, take a look into the PoC. It's incomplete, but may be you get ideas how to fix this. https://gist.github

[PHP-DEV] Re: Mysterious crashes (WAS: Re: Pear fetch script problem on PHP 7.0)

2015-12-22 Thread Dmitry Stogov
Hi Matt, On Tue, Dec 22, 2015 at 8:36 PM, Matt Wilmas wrote: > Hi all, > > Lior, which compiler are you using? You can still reproduce the problem? > Can you run it through Valgrind? > > I'm getting random crashes I can't figure out on 64-bit Linux after just > making

[PHP-DEV] Removing weird error message

2015-12-22 Thread Dmitry Stogov
Hi, Please take a look into the patch (for master) https://gist.github.com/dstogov/44a3f2df71de31986d4c It removes weird error message and replaces it with silent handling after warning message. This makes engine behavior more consistent. Engine uses this "silent handling after warning" for

[PHP-DEV] Re: Removing weird error message

2015-12-22 Thread Dmitry Stogov
. Dmitry. On Tue, Dec 22, 2015 at 7:16 PM, Dmitry Stogov <dmi...@zend.com> wrote: > Hi, > > Please take a look into the patch (for master) > > https://gist.github.com/dstogov/44a3f2df71de31986d4c > > It removes weird error message and replaces it with silent handling after &g

Re: [PHP-DEV] CATCH in master (vs 7.0)

2015-12-21 Thread Dmitry Stogov
On Mon, Dec 21, 2015 at 2:27 PM, Bob Weinand wrote: > > Am 21.12.2015 um 06:24 schrieb Sebastian Bergmann : > > > > Am 20.12.2015 um 21:53 schrieb Nikita Popov: > >> For VLD you should hide the value if opline->result.num is set, similar > to > >> what

Re: [PHP-DEV] Re: CATCH in master (vs 7.0)

2015-12-21 Thread Dmitry Stogov
On Mon, Dec 21, 2015 at 8:24 AM, Sebastian Bergmann wrote: > Am 20.12.2015 um 21:53 schrieb Nikita Popov: > > For VLD you should hide the value if opline->result.num is set, similar > to > > what zend_dump does: > > Is zend_dump() callable from userland? > It's a part of

Re: [PHP-DEV] Re: [PHP-CVS] com php-src: Added e-SSA based DFA optimisation framework (incomplete): ext/opcache/Optimizer/block_pass.c ext/opcache/Optimizer/dfa_pass.c ext/opcache/Optimizer/zend_cfg.c

2015-12-15 Thread Dmitry Stogov
Hi Sebastian, On Sat, Dec 12, 2015 at 10:57 AM, Sebastian Bergmann <sebast...@php.net> wrote: > On 12/11/2015 03:24 PM, Dmitry Stogov wrote: > >> Commit:f243aaf9856fcbfdb08a59ff08f22cf48647cfc0 >> Author:Dmitry Stogov <dmi...@zend.com> Fri,

Re: [PHP-DEV] [RFC] [VOTE] Class Constant Visibility

2015-12-08 Thread Dmitry Stogov
Hi Sean, The PR has been merged into master. Please update the RFC accordingly. Thanks to Nikita and Xinchen for code review and suggestions. Thanks. Dmitry. On Mon, Dec 7, 2015 at 11:38 AM, Dmitry Stogov <dmi...@zend.com> wrote: > Hi Nikita, > > Thanks for code review. >

Re: [PHP-DEV] [RFC] [VOTE] Class Constant Visibility

2015-12-07 Thread Dmitry Stogov
Hi Nikita, Thanks for code review. All the reported issues should be fixed now. Thanks. Dmitry. On Sat, Dec 5, 2015 at 3:02 AM, Dmitry Stogov <dmi...@zend.com> wrote: > I've reworked your patch https://github.com/php/php-src/pull/1662 > Actually, you patch was really good. I just

Re: [PHP-DEV] [RFC] [VOTE] Class Constant Visibility

2015-12-04 Thread Dmitry Stogov
:) Thanks. Dmitry. On Thu, Dec 3, 2015 at 7:09 PM, Dmitry Stogov <dmi...@zend.com> wrote: > OK. thanks. I'll try to find time to do this on next week. > In any case I'll give a chance to review the future patch. > Somebody might get other good improvement ideas and we don't have to

Re: [PHP-DEV] [RFC] [VOTE] Class Constant Visibility

2015-12-03 Thread Dmitry Stogov
Hi Sean, Although the RFC is accepted, the patch has to be significantly reworked. Probably, it's going to be better and faster if I do it myself. Let me know, if you are agree (I'll do this when I have time, and show you PR before commit). Thanks. Dmitry. On Tue, Oct 20, 2015 at 8:36 PM, Sean

Re: [PHP-DEV] [RFC] [VOTE] Class Constant Visibility

2015-12-03 Thread Dmitry Stogov
be excited to see it merge :) > > On Thu, Dec 03, 2015 at 12:29:50PM +0300, Dmitry Stogov wrote: > > Hi Sean, > > > > Although the RFC is accepted, the patch has to be significantly reworked. > > Probably, it's going to be better and faster if I do it myself. > > Let me

Re: [PHP-DEV] HashDos protection

2015-12-01 Thread Dmitry Stogov
Hi Nikita, few notes: It looks like the patch messes the attempt of catching the problem (few lines related to zend_hash_find_bucket changes) with optimization to compensate collision check overhead (everything else). I think it's better to separate these parts. Introduction of

Re: [PHP-DEV] HashDos protection

2015-12-01 Thread Dmitry Stogov
On Tue, Dec 1, 2015 at 3:48 PM, Nikita Popov <nikita@gmail.com> wrote: > On Tue, Dec 1, 2015 at 10:50 AM, Dmitry Stogov <dmi...@zend.com> wrote: > >> Hi Nikita, >> >> few notes: >> >> It looks like the patch messes the attem

[PHP-DEV] Re: libtool builds CLI/CGI php from PIC object files

2015-11-25 Thread Dmitry Stogov
r with libtool hacking? May be we have some experts on @internals? Thanks. Dmitry. > > > Kind Regards, > > Bogdan > > > > *From:* Andone, Bogdan > *Sent:* Tuesday, November 24, 2015 1:29 PM > *To:* 'Dmitry Stogov' > *Cc:* jit-project > *Subject:* RE: libtoo

Re: [PHP-DEV] INDRECT in arrays causes count() to become unpredictable

2015-11-23 Thread Dmitry Stogov
On Sun, Nov 22, 2015 at 8:01 AM, Xinchen Hui wrote: > Hey: > > On Sun, Nov 22, 2015 at 6:47 AM, Anthony Ferrara > wrote: > > > All, > > > > It appears that in our efforts to optimize PHP 7 we've introduced an > > inconsistency into array handling. This is

Re: [PHP-DEV] Re: Windows (Visual Studio) compiler stuff

2015-11-23 Thread Dmitry Stogov
On Mon, Nov 23, 2015 at 8:08 AM, Matt Wilmas <php_li...@realplain.com> wrote: > Hi Dmitry, > > - Original Message - > From: "Dmitry Stogov" > Sent: Monday, November 16, 2015 > > Hi Matt, >> >> On Mon, Nov 16, 2015 at 1:30 AM, Matt Wilmas &l

[PHP-DEV] Re: Windows (Visual Studio) compiler stuff

2015-11-15 Thread Dmitry Stogov
Hi Matt, On Mon, Nov 16, 2015 at 1:30 AM, Matt Wilmas wrote: > Hi Dmitry, Anatol, Pierre (etc.), and all, > > I'm back now, I think, after a much longer (unintentional) break than I > expected. Be coming very soon with what I was doing in the summer (param > parsing

[PHP-DEV] Re: Safe Temporary Cleanup on Exception (Variable Liveness)

2015-11-11 Thread Dmitry Stogov
nalyse the patch and try to craft a script not covered by the patch. If nobody object and no problems found, I'll commit this on Friday. Thanks. Dmitry. On Tue, Nov 10, 2015 at 10:28 PM, Dmitry Stogov <dmi...@zend.com> wrote: > I've committed unrelated and obvious parts (without semanti

Re: [PHP-DEV] PHP 7 Segmentation fault

2015-11-11 Thread Dmitry Stogov
I suppose this is not PHP-7.0, but "master" branch. PHP-7.0 doesn't have zend_add_live_range(). Please, make "git pull" and then full rebuild, "make clean; make; make install" Thanks. Dmitry. On Wed, Nov 11, 2015 at 3:22 AM, Frank M. Kromann wrote: > Hello Everyone, > > I have a

Re: [PHP-DEV] PHP 7 Segmentation fault

2015-11-11 Thread Dmitry Stogov
ank M. Kromann [mailto:f...@webbypixel.com] > > Sent: Wednesday, November 11, 2015 8:51 PM > > To: Anatol Belski <anatol@belski.net>; 'Dmitry Stogov' < > dmi...@zend.com> > > Cc: 'PHP Internals' <internals@lists.php.net> > > Subject: Re

Re: [PHP-DEV] PHP 7 Segmentation fault

2015-11-11 Thread Dmitry Stogov
Kromann wrote: > > Hi Anatol, > > Here is what I have > > [frank@dev php-src-7]$ git show > commit d1077f7a897d9267a0cad3d64663fd952dd1c6b2 > Merge: e88e3f2 a2e59e7 > Author: Anatol Belski <a...@php.net> <a...@php.net> > Date: Wed Nov 11 16:35:07 2015 +

Re: [PHP-DEV] PHP 7 Segmentation fault

2015-11-11 Thread Dmitry Stogov
and it > does not cause any segfaults on scripts that don't use autoload of classes. > This is use-after-free. most probably, because of wrong reference counting. This may be caused by a bug in third party extension. Can you reproduce the failure without them? Thanks. Dmitry. > >

[PHP-DEV] Re: Safe Temporary Cleanup on Exception (Variable Liveness)

2015-11-10 Thread Dmitry Stogov
I've committed unrelated and obvious parts (without semantic changes). The updated and extended patch now is much more clean https://gist.github.com/dstogov/43eaa3f3b68583877322 Anyway, it's still incomplete. Thanks. Dmitry. On Tue, Nov 10, 2015 at 2:29 PM, Dmitry Stogov <dmi...@zend.com>

[PHP-DEV] Re: Safe Temporary Cleanup on Exception (Variable Liveness)

2015-11-10 Thread Dmitry Stogov
BTW: I think, part of this patch (without zend_check_live_ranges) may be good enough, as a first step. It should keep the current PHP-5/7.0 behavior with new data structures. Thanks. Dmitry. On Tue, Nov 10, 2015 at 12:53 PM, Dmitry Stogov <dmi...@zend.com> wrote: > Hi, > > Ple

[PHP-DEV] Safe Temporary Cleanup on Exception (Variable Liveness)

2015-11-10 Thread Dmitry Stogov
Hi, Please take a look into https://gist.github.com/dstogov/43eaa3f3b68583877322 This is variation on Bob's idea about variable liveness. The patch is incomplete. Liveness construction is still naive. However, all tests are passed. Ranges are represented by start/end/variable cartages. (I

[PHP-DEV] Re: Safe Temporary Cleanup on Exception (Variable Liveness)

2015-11-10 Thread Dmitry Stogov
On Tue, Nov 10, 2015 at 1:42 PM, Nikita Popov <nikita@gmail.com> wrote: > On Tue, Nov 10, 2015 at 10:53 AM, Dmitry Stogov <dmi...@zend.com> wrote: > >> Hi, >> >> Please take a look into >> https://gist.github.com/dstogov/43eaa3f3b68583877322 &

[PHP-DEV] Re: PHP 7 : Cannot use stream wrappers during MINIT

2015-11-08 Thread Dmitry Stogov
On Fri, Nov 6, 2015 at 3:08 AM, François Laupretre wrote: > Hi, > > First, I don't know if this must be considered as a bug, because a lot of > features are not available during MINIT but it seems quite inconsistent. I > precise I'm using the 7.x master branch (I don't know if

[PHP-DEV] Bug #70805 (Segmentation faults whilst running Drupal 8 test suite)

2015-11-03 Thread Dmitry Stogov
Hi, I think, I found the root problem of https://bugs.php.net/bug.php?id=70805 unset($a) or unser($GLOBAL["a"]) triggered GC and destructors calls that tried to release the same global variable $a once again. As result it's reference counter was decremented twice and this caused use-after-free,

[PHP-DEV] Re: API to retrieve opcode operand and extended_value meaning

2015-10-29 Thread Dmitry Stogov
I've fixed few issues reported by Bob. On Wed, Oct 28, 2015 at 11:35 PM, Dmitry Stogov <dmi...@zend.com> wrote: > Hi, > > Please review the PR (for master only). > It adds an API call to get information about opcode operand and > extended_value meaning. This API should

Re: [PHP-DEV] Re: Speed up fetching of class entries for self:: parent:: and static::(Bob's idea)

2015-10-28 Thread Dmitry Stogov
Hi Andrea, On Oct 28, 2015 9:06 PM, "Andrea Faulds" <a...@ajf.me> wrote: > > Hi Dmitry, > > > Dmitry Stogov wrote: >> >> Please take a look: https://github.com/php/php-src/pull/1604 >> The speed improvement on real-life is insignificant. &g

[PHP-DEV] API to retrieve opcode operand and extended_value meaning

2015-10-28 Thread Dmitry Stogov
Hi, Please review the PR (for master only). It adds an API call to get information about opcode operand and extended_value meaning. This API should be useful for phpdbg, xdebug and others. Once these extension switch to new API, they will support most new opcodes out of the box.

[PHP-DEV] Speed up fetching of class entries for self:: parent:: and static:: (Bob's idea)

2015-10-27 Thread Dmitry Stogov
Hi, Please take a look: https://github.com/php/php-src/pull/1604 The speed improvement on real-life is insignificant. VM size is increased by 10KB. I don't have a strong opinion, if this should go into master or not. Thanks. Dmitry.

[PHP-DEV] Re: Speed up fetching of class entries for self:: parent:: and static:: (Bob's idea)

2015-10-27 Thread Dmitry Stogov
What is the general impression from the patch? Should we commit it (with minor fixes and/or additional optimisations)? Bob, do you see performance improvement on your app? Thanks. Dmitry. On Oct 27, 2015 4:14 PM, "Dmitry Stogov" <dmi...@zend.com> wrote: > Hi, > >

Re: [PHP-DEV] Issues with exceptions and overloading opcodes

2015-10-26 Thread Dmitry Stogov
Hi, I'm going to re-fix the problem with the following patch: https://gist.github.com/dstogov/1eb77a9f2ff7dd807dd1 Thanks. Dmitry. On Thu, Oct 22, 2015 at 5:43 AM, Xinchen Hui wrote: > Hey: > > > > On Wed, Oct 21, 2015 at 10:38 PM, Derick Rethans wrote: >

Re: [PHP-DEV] few questions about op_array

2015-10-22 Thread Dmitry Stogov
On Oct 22, 2015 3:45 PM, "Lin Yo-An" wrote: > > Hi all, > > > I am looking into zend op_array structure, and few questions raised in my mind: > > 1. Why op_array->refcount uses *uint32 instead of uint32, is there a reason? if we can replace it with uint32, then we might

Re: [PHP-DEV] Scalar type hints and scalar type name aliases causeconfuson

2015-10-13 Thread Dmitry Stogov
On Tue, Oct 13, 2015 at 6:40 PM, Anthony Ferrara wrote: > All, > > On Tue, Oct 13, 2015 at 9:56 AM, Rowan Collins > wrote: > > Andrea Faulds wrote on 13/10/2015 12:00: > >> > >> Hi Michael, > >> > >> Michael Wallner wrote: > >>> > >>> On 12/10/15

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-12 Thread Dmitry Stogov
from SHM instead of files. But this is for 7.1. Thanks. Dmitry. On Fri, Oct 9, 2015 at 10:53 PM, Kalle Sommer Nielsen <ka...@php.net> wrote: > 2015-10-08 10:33 GMT+02:00 Dmitry Stogov <dmi...@zend.com>: > > few notes: > > - are you sure SysV IPC API is availabl

[PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Dmitry Stogov
Hi Nikita, I think the effect of the remaining patch is negligible. It disables things, that shouldn't work by design, didn't work in fact and leaded to crashes. It might work only in some cases and only because of luck. So, I think it's better to commit this before next RC. Anatol is going to

Re: [PHP-DEV] Re: Forbid rebinding scope of closures created by ReflectionFunctionAbstract::getClosure()

2015-10-12 Thread Dmitry Stogov
..@gmail.com] >> > Sent: Monday, October 12, 2015 8:57 PM >> > To: Dmitry Stogov <dmi...@zend.com> >> > Cc: PHP internals <internals@lists.php.net>; Andrea Faulds <a...@ajf.me>; >> Stas >> > Malyshev <smalys...@sugarcrm.com>; Bob We

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-09 Thread Dmitry Stogov
On Wed, Oct 7, 2015 at 2:39 PM, Anatol Belski <anatol@belski.net> wrote: > Hi Matt, > > > -Original Message- > > From: Matt Ficken [mailto:themattfic...@gmail.com] > > Sent: Wednesday, October 7, 2015 12:18 PM > > To: Anatol Belski <anatol

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-09 Thread Dmitry Stogov
9 AM, Anatol Belski <anatol@belski.net> > wrote: > >> Hi Matt, >> >> > -Original Message- >> > From: Matt Ficken [mailto:themattfic...@gmail.com] >> > Sent: Wednesday, October 7, 2015 12:18 PM >> > To: Anatol Bels

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-09 Thread Dmitry Stogov
te: > Hi Dmitry, > > > -Original Message- > > From: Dmitry Stogov [mailto:dmi...@zend.com] > > Sent: Tuesday, October 6, 2015 10:01 AM > > To: Anatol Belski <anatol@belski.net> > > Cc: Matt Ficken <themattfic...@gmail.com>; Pierre Joye > &

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-06 Thread Dmitry Stogov
ven after GA 7.0.0 release. Of course, we may make final decision only after complete implementation. Thanks. Dmitry. > > > > On Mon, Oct 5, 2015 at 11:49 AM, Eric Stenson <erics...@microsoft.com> > wrote: > >> >From: Dmitry Stogov [mailto:dmi...@zend.com] >> >

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-06 Thread Dmitry Stogov
Hi Eric, On Mon, Oct 5, 2015 at 9:49 PM, Eric Stenson <erics...@microsoft.com> wrote: > >From: Dmitry Stogov [mailto:dmi...@zend.com] > > > >> On Thu, Oct 1, 2015 at 11:54 AM, Matt Ficken <themattfic...@gmail.com> > >> wrote: > >> &

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-06 Thread Dmitry Stogov
On Mon, Oct 5, 2015 at 6:38 PM, Anatol Belski <anatol@belski.net> wrote: > > > > -Original Message- > > From: Dmitry Stogov [mailto:dmi...@zend.com] > > Sent: Monday, October 5, 2015 3:31 PM > > To: Anatol Belski <anatol@belski.net> &g

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-05 Thread Dmitry Stogov
On Mon, Oct 5, 2015 at 10:29 AM, Anatol Belski <anatol@belski.net> wrote: > Hi Dmitry, > > > -Original Message- > > From: Dmitry Stogov [mailto:dmi...@zend.com] > > Sent: Friday, October 2, 2015 9:34 AM > > To: Anatol Belski <anatol@bels

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-05 Thread Dmitry Stogov
On Mon, Oct 5, 2015 at 3:51 PM, Anatol Belski <anatol@belski.net> wrote: > > > > -Original Message- > > From: Dmitry Stogov [mailto:dmi...@zend.com] > > Sent: Monday, October 5, 2015 1:08 PM > > To: Anatol Belski <anatol@belski.net> &g

Re: [PHP-DEV] Re: Windows OpCache bug fix

2015-10-01 Thread Dmitry Stogov
On Thu, Oct 1, 2015 at 11:54 AM, Matt Ficken wrote: > >> And what wincache does. It is slower but the request is served. >> >> >> WinCache (file cache) if it can't reattach, creates a new shared mem file > for just that process: see >

[PHP-DEV] Re: Windows OpCache bug fix

2015-09-30 Thread Dmitry Stogov
rent sites, but this would require a new INI directive which is > too late to add for 7, and for machines that run different PHP builds. > > This patch passes my functional, stress and performance tests. > > I've added it to the PR 1536: > https://github.com/php/php-src/commit/7cbebc

Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x?

2015-09-29 Thread Dmitry Stogov
On Wed, Sep 30, 2015 at 1:16 AM, Sara Golemon <poll...@php.net> wrote: > On Tue, Sep 29, 2015 at 3:00 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > I think, we don't need to reserve words, until we decide to implement > this. > > The context sensitive scanner intro

Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x?

2015-09-29 Thread Dmitry Stogov
On Wed, Sep 30, 2015 at 1:22 AM, Johannes Schlüter wrote: > On Tue, 2015-09-29 at 11:29 -0700, Sara Golemon wrote: > > On Mon, Sep 28, 2015 at 10:30 PM, Pierre Joye > wrote: > > > This model totally failed for us in the past. And given that these >

Re: [PHP-DEV] async/await - is future reserved words in PHP 7.x?

2015-09-29 Thread Dmitry Stogov
I think, we don't need to reserve words, until we decide to implement this. The context sensitive scanner introduced in 7.0 makes the problem less serious. $ sapi/cli/php -r 'class foo { static function use() {echo "ok\n";}} foo::use();' ok Sara, related question... Is the semantic of

[PHP-DEV] Re: [PHP-CVS] com php-src: Allow an experimental VM with tail call dispatch technique (disabled by default). This VM may work only if all tail calls are optimized, otherwaise it will crach b

2015-09-29 Thread Dmitry Stogov
s, > Matt > > > - Original Message - > From: "Dmitry Stogov" > Sent: Friday, September 25, 2015 > > Commit:7e797f13026440c54e24f89cf29f46bb0b262a39 > Author:Dmitry Stogov <dmi...@zend.com> Fri, 25 Sep 2015 > 12:54:51 +0300 &

[PHP-DEV] Re: Windows OpCache bug fix

2015-09-24 Thread Dmitry Stogov
Ops, I forgot to revert the exit condition. http://git.php.net/?p=php-src.git;a=commitdiff;h=2d55e8c186ef1034c2af64478da8f23dbeb28be9 On Thu, Sep 24, 2015 at 11:00 AM, Dmitry Stogov <dmi...@zend.com> wrote: > hi Matt, > > Thanks. > I also moved the exit condition

[PHP-DEV] Re: Windows OpCache bug fix

2015-09-24 Thread Dmitry Stogov
ctors will still cause this > issue occasionally, but this fixes a majority of my occurrences. > > Regards > -M > > > On Wed, Sep 23, 2015 at 2:04 AM, Dmitry Stogov <dmi...@zend.com> wrote: > >> Hi Matt, >> >> It looks like with your patch, the same file may be

[PHP-DEV] Re: Windows OpCache bug fix

2015-09-24 Thread Dmitry Stogov
Ops, I forgot to revert the exit condition. http://git.php.net/?p=php-src.git;a=commitdiff;h=2d55e8c186ef1034c2af64478da8f23dbeb28be9 On Thu, Sep 24, 2015 at 11:00 AM, Dmitry Stogov <dmi...@zend.com> wrote: > hi Matt, > > Thanks. > I also moved the exit condition

[PHP-DEV] Re: Windows OpCache bug fix

2015-09-23 Thread Dmitry Stogov
Hi Matt, It looks like with your patch, the same file may be mapped to different virtual addresses of different processes and this won't work. I think usage of vista_mapping_base_set[] in your patch is wrong. Do I understand properly, that zend_shared_alloc_unlock/lock_win32() around Sleep() is

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 9:24 PM, Bob Weinand <bobw...@hotmail.com> wrote: > > Am 22.09.2015 um 20:05 schrieb Dmitry Stogov <dmi...@zend.com>: > > The current PHP version emits two warning on similar constructs, and this > is explainable because we explicitly &quo

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 9:20 PM, Anthony Ferrara <ircmax...@gmail.com> wrote: > Dmitry, > > On Tue, Sep 22, 2015 at 2:05 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > On Tue, Sep 22, 2015 at 7:01 PM, Bob Weinand <bobw...@hotmail.com> > wrote: > > > &g

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Tue, Sep 22, 2015 at 7:01 PM, Bob Weinand <bobw...@hotmail.com> wrote: > > > Am 22.09.2015 um 17:36 schrieb Dmitry Stogov <dmi...@zend.com>: > > > > On Tue, Sep 22, 2015 at 4:54 PM, Joe Watkins <pthre...@pthreads.org> > wrote: > > > >>

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
On Wed, Sep 23, 2015 at 12:00 AM, Anthony Ferrara <ircmax...@gmail.com> wrote: > Dmitry, > > On Tue, Sep 22, 2015 at 3:19 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > > > > > On Tue, Sep 22, 2015 at 9:20 PM, Anthony Ferrara <ircmax...@gmail.com>

Re: [PHP-DEV] [RFC] [VOTE] Short Closures

2015-09-22 Thread Dmitry Stogov
I'm against the magic - "automatically use () all of the (compiled) variables". I'm also against compound short closures with curly brackets. in my opinion they opens too many ambiguous questions. function foo() { (($x) ~> {$y = 3; return $y + $x;})(5); return $y; } also think about nested

<    1   2   3   4   5   6   7   8   9   10   >