Re: [PHP-DEV] Reference cycle collector patch

2007-10-08 Thread David Wang
On 10/8/07, Alexey Zakhlestin <[EMAIL PROTECTED]> wrote: > by the way, 33487 is not really a bug if it is stated this way. > the proper bug description for 33487 would be: > "there is no mechanism in zend_object_storage to free unused memory > during script execution" Yeah, it fixes the issue in t

[PHP-DEV] Reference cycle collector patch

2007-10-08 Thread David Wang
Hey all, Now that macros for manipulating refcount and is_ref have been implemented, I’m ready to submit patches for the GC. I know you all have been waiting for this for a long time ☺. I have made two sets of patches, one for HEAD and one for PHP_5_3 (note that I had to rearrange the order of

Re: [PHP-DEV] PHP taint support: first results

2007-10-02 Thread David Wang
On 10/2/07, Wietse Venema <[EMAIL PROTECTED]> wrote: > Low-level implementation > > > Taint support is implemented with some of the unused bits in the > zval data structure. The zval is the PHP equivalent of a memory > cell. Besides a type (string, number etc.) and value, e

Re: [PHP-DEV] PHP 5.3 Suggested Feature List (Summary)

2007-09-17 Thread David Wang
Hey all, On 9/17/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > So while I think making list and voting is great, I think we shouldn't > replace good old per-case consideration and discussion with arithmetics. > If we have clear winners and losers, it's fine, but in between we still > need to

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-11 Thread David Wang
> that's what worries me, I dont get why people wants to introduce yet > another switch to disable to garbage collector ( that will lead to > different/broken behaviuor) I think there is enough non-sense already > with the unicode.semantics switch thingy. This switch (currently) has nothing to do

Re: FW: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-10 Thread David Wang
It's been about 3 days since the last comment on the patch itself on this thread and nearly a week since the patch was submitted for comment. Until a patch is committed, I can't publish a patch for the GC, and until that's published, there's really nothing to debate about yet. :) I can't commit a

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-08 Thread David Wang
I'm not really sure what this big debate about. I'm sure that everyone agrees (not least of all me!) that the GC patch should be thoroughly tested for performance and stability before being released to the public. I mean, something that affects the life-cycle of every zval definitely has to be. Ho

[PHP-DEV] CVS Account Request: davidw

2007-09-07 Thread Yiduo (David) Wang
Implementing and maintaining the reference cycle garbage collector (GSoC '07) for the Zend engine. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-07 Thread David Wang
> As far as I'm concerned you can commit it with ZEND_GC. If you don't > have karma let me know and we'll commit it. I don't even have a CVS account yet so I can't commit this patch. I haven't needed it so I never requested it. However, I will soon in order to quickly respond to GC-related bugs th

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-07 Thread David Wang
Here's my analysis of what the options are: In my mind, the macros patch is actually unrelated to the GC patch. It is a Good Idea (tm) to use macros to manipulate refcounts no matter if the GC is enabled, disabled, present in the source, or not added at all. The only question is whether to break s

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-07 Thread David Wang
> ps: remember to change the Zend/PHP API number as well ;) Done. I personally think having a ZEND_GC switch sort of defeats the purpose of forcing everyone to start using the macros (whether or not we want the GC), which is something we want to do anyway. However, here are the two versions of th

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-06 Thread David Wang
On 9/7/07, Andi Gutmans <[EMAIL PROTECTED]> wrote: > The only thing which I'd like to change is to make sure the __gc naming > is in an #if ZEND_GC for now otherwise we'll be breaking lots of third > party libraries and PECL extensions. Here's an updated version: http://zoo.cs.yale.edu/~yw226/macr

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-05 Thread David Wang
> In my own code, I have a "__gc" on refcount and is_ref so I get thrown > an error if there's a place I failed to macroize. I removed that for > this patch, but that's a very good point. If there are no objections, > that or another prefix or suffix can be put back into the patch. I've posted ano

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-04 Thread David Wang
On 9/5/07, Marcus Boerger <[EMAIL PROTECTED]> wrote: > What is the problem with those objects? Basically there are at least three > seperated memory areas involved. First the zend_object container, the real > object and one or several zvals. The gc would simply have to decrease > refcount on zend_o

Re: Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-04 Thread David Wang
> currently you only have one statement in each of those functions.. > anyway it's not critical to have static inline functions. I will need to have them (multiple statements) for the cycle collection code, and I don't think there are many situations involving changing the way reference counting i

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-04 Thread David Wang
On 9/4/07, Nuno Lopes <[EMAIL PROTECTED]> wrote: > It can also have some use if we > decide to investigate the usage of an off-the-shelf (conservative) > garbage collector such as Boehm's (maybe in next year's SoC). > As an aside, I was also thinking about this throughout the course of the project

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-04 Thread David Wang
> About the patch, the zval_*_p() functions don't really need to exist.. > they can be macros as well. As I said, if those were macros, it would be very difficult to squeeze more than one statement into them. Consider the usage in Zend/zend_execute.c: if (!Z_DELREF_P(z)) {

Re: [PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-04 Thread David Wang
> Shouldn't that be > > +#define always_inline inline > > ? Yes, sorry, I just fixed that a moment ago (and the file the link is pointing to should be correct). -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Patch for macros for tracking refcount and is_ref

2007-09-04 Thread David Wang
Hi, This is another shot at a patch to manage refcount and is_ref of zvals with macros. The macros are implemented with inline functions that are forcibly inlined (so they will behave the same as macros). This will make it possible to put multiple statements in each macro later on for garbage coll

Re: [PHP-DEV] toString() and Object #ID

2007-07-31 Thread David Wang
> Do you think there's an easy and clean approaching to solve this kind > of problem? Or maybe the problem should be solved on array_diff() and > other functions to make them not try to cast the object as a string to > compare? If use array_udiff with a comparison function that compares the spl_ob

Re: [PHP-DEV] php5 as universal binary (Mac OS X)

2007-07-27 Thread David Wang
Isn't an universal binary just two binaries packaged together? One has to be compiled for Intel and the other for PowerPC. How exactly is this currently being done in a single run on Christian's machine? Is there a special build tool that runs the compilation twice or a special compiler that genera

Re: [PHP-DEV] multi-threaded run-tests.php

2007-07-24 Thread David Wang
Please. This would be a big help to me, since I'm running these tests many, many times a day as I develop the reference cycle collector. On 7/24/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Tue, July 24, 2007 5:24 pm, Nuno Lopes wrote: > Recently we have moved http://gcov.php.net to a new

Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)

2007-07-14 Thread David Wang
I have a patch adding the GC that's taken against the patch I submitted earlier (converting accesses to refcount and is_ref to macros). Patch: http://web.pdx.edu/~way/frommacros.diff.txt The two new files, zend_gc.c and zend_gc.h go in the Zend folder: http://web.pdx.edu/~way/zend_gc.c http://w

[PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros

2007-07-13 Thread David Wang
e-mail message. It is available at: http://web.pdx.edu/~way/macropatch.diff.txt Yiduo (David) Wang -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)

2007-07-11 Thread David Wang
Hello, everyone. My name is David Wang and I am one of the students participating in Google Summer of Code this year. As you may remember, my project is to implement a garbage collector for circular references in PHP. As the midterm for Summer of Code is coming up, my mentor, Derick Rethans