http://codereview.chromium.org/914003/diff/12001/13006
File src/liveedit.cc (right):

http://codereview.chromium.org/914003/diff/12001/13006#newcode455
src/liveedit.cc:455: // Clear the buffer in debug mode. Use 'int3'
instructions to make
On 2010/03/15 20:56:10, Peter Rybin wrote:
On 2010/03/15 08:41:16, Søren Gjesse wrote:
> in3 and opcode 0xCC is not very platform independent.

I simply removed it.
Do we anything better, e.g. any API for platform-independent memory
filler?

No, there is not. The ia32 and x64 assemblers fills 0xCC in code buffers
they allocate themselves in debug mode. The ARM assembler does no such
thing.

http://codereview.chromium.org/914003/diff/12001/13006#newcode515
src/liveedit.cc:515: } else {
On 2010/03/15 20:56:10, Peter Rybin wrote:
On 2010/03/15 08:41:16, Søren Gjesse wrote:
> Please rephrase this comment.
>
> Regarding the TODO, then shorting the code object in-place probably
will not
> work, as I don't think it is possible to have non-code fillers in
the code
> space, but I am not sure. Shorting objects in-place can be done by
adjusting
> their size and writing fillers (one pointer filler map, two pointer
filler map
> or a byte array of the right size) in the freed-up space after the
shorter
> object. You can try it out, but otherwise I suggest that you add
some fillers
to
> the reloc info instead.

Done
Speaking about TODO I think I can safely drop it, because it would
make the code
too complicated for now real benefit.

Agree.

http://codereview.chromium.org/914003/diff/12001/13006#newcode580
src/liveedit.cc:580:
On 2010/03/15 20:56:10, Peter Rybin wrote:
On 2010/03/15 08:41:16, Søren Gjesse wrote:
> Please add some comments to what the different iterators takes care
of. Isn't
it
> possible that the same object will be visited twice?

Done.

I'm not sure. However, I need to iterate over all pointers. I thought
that there
are roots and there are pointers inside objects and that is roughly
all pointers
in the system and these 2 sets do not overlap.
Do you think it is also worth making into a comment?

As all objects are in the heap the heap iterator will visit all of them.
The strong roots are the set of objects which defines the initial set of
live objects when performing a GC. They include all "basic" objects,
objects reachable from the execution stack, objects reachable from the
various C++ structures used internally, etc. In this case I think you
could just use the HeapIterator. We have been talking about making a
HeapIterator which only visits live objects using the same marking
scheme as used by the GC, but have never taken the time. The
HeapIterator just visits everything.

http://codereview.chromium.org/914003

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to