Re: [v8-users] Destructors, a proposal of sorts

2012-07-11 Thread Sven Panne
I suggest reading Boehm's classic paper Destructors, Finalizers and Synchronization (http://www.hpl.hp.com/techreports/2002/HPL-2002-335.pdf, slides at http://www.hpl.hp.com/personal/Hans_Boehm/popl03/slides.pdf) before starting yet another finalizer thread (pun intended ;-). The problem is that

Re: [v8-users] Re: Does using delete keyword effect v8 optimizations of an object?

2012-06-05 Thread Sven Panne
Regarding object pooling: What you describe is exactly one of the use cases where one should *not* use object pooling. Incremental collectors are very good at disposing short-lived objects without any noticeable pauses, so unless you are doing heavy resource acquisition on object creation, don't

Re: [v8-users] Does using delete keyword effect v8 optimizations of an object?

2012-06-05 Thread Sven Panne
When you are using an object as a hash map, using delete is OK, because then the object is very probably already in dictionary (= hash map) mode. Playing GC by hand is not necessary and almost always the wrong thing, anyway. Is there a semantic reason for the structuring of the keys or do you

Re: [v8-users] Re: Does using delete keyword effect v8 optimizations of an object?

2012-06-04 Thread Sven Panne
First of all, I would strongly advise against object pooling in a language with GC. Most of the time it creates far more problems than it solves, and one of the few valid use cases is when object creation is extremely costly, like e.g. for data base connections, but it seems that this is not the

Re: [v8-users] Does using delete keyword effect v8 optimizations of an object?

2012-06-01 Thread Sven Panne
We only track property additions, because these are by far the most common case. Deleting a property results in going to slow mode, i.e. using a dictionary for the object's properties. So as a general rule of thumb, using 'delete' makes thing slower. What are you trying to achieve exactly?

Re: [v8-users] Re: Announcing SilkJS

2011-12-08 Thread Sven Panne
v8's JSON parser is written almost completely in C++, with no eval involved: http://code.google.com/p/v8/source/browse/branches/bleeding_edge/src/json.js There is some JavaScript glue around it (plus the code for stringify) here:

Re: [v8-users] Re: Announcing SilkJS

2011-12-08 Thread Sven Panne
Ooops, the first URL should have been http://code.google.com/p/v8/source/browse/branches/bleeding_edge/src/json-parser.h, sorry... On Thu, Dec 8, 2011 at 15:50, Sven Panne svenpa...@chromium.org wrote: v8's JSON parser is written almost completely in C++, with no eval involved: http

Re: [v8-users] Re: trouble build v8

2011-11-27 Thread Sven Panne
There were some breaking changes in the lexical syntax of Python (rarely a good idea IMHO), namely octal literals. Since 2.6.1, 0o is required as a prefix, previously it was simply 0. You seem to be using Python 2.5.1, which is too old for our build system. You could try hacking the relevant part

Re: [v8-users] Re: v8-3.2.6: compile failure, undefined references in preparser-process.cc

2011-06-21 Thread Sven Panne
This was probably http://code.google.com/p/v8/issues/detail?id=1487, fixed yesterday http://codereview.chromium.org/7210012/. On Mon, Jun 20, 2011 at 09:24, Paweł Hajdan, Jr. phajdan...@chromium.orgwrote: Tests are still failing with v8-3.4.3, the same way as before. What should I do to

Re: [v8-users] Re: Deleting native and js objects/variables

2011-06-10 Thread Sven Panne
Finalizers are more complicated than most people think, and they are *not* a replacement for destructors! Reading Boehm's classic paper Destructors, Finalizers, and Synchronization ( http://www.hpl.hp.com/techreports/2002/HPL-2002-335.html) can help understanding all issues involved before blaming

<    1   2