https://codereview.chromium.org/54823002/diff/90001/src/objects.h
File src/objects.h (right):
https://codereview.chromium.org/54823002/diff/90001/src/objects.h#newcode5199
src/objects.h:5199: // Slightly ugly, used in ObjectSerializer only.
On 2013/11/04 13:03:19, Sven Panne wrote:
On 2013/11/04 12:41:14, Erik Corry wrote:
> Rather than insulting your own code it would be more helpful to
spend a few
> words explaining why it's needed.
Well, that would just be yet another general v8 comment: What we are
lacking
here again is a clear distinction between raw data structure
manipulation and
some semantics layered upon that. I just want the "raw stuff" here.
Furthermore, from a more conceptual POV this doesn't really belong
into the Code
class at all, it just lives here because we suffer from the common OOP
problem
of the "tyranny of the hierarchy". Duplicating READ_FIELD/WRITE_FIELD
in the
serializer would have been worse.
I am not sure how to put that into a non-insulting but enlightening
comment...
:-)
Let me suggest:
"The entire code object including its header is copied verbatim to the
snapshot so that it can be written in one, fast, memcpy during
deserialization. The deserializer will overwrite some pointers, rather
like a runtime linker, but the random allocation addresses used in the
mksnapshot process would still be present in the unlinked snapshot data,
which would make snapshot production non-reproducible. This method
wipes out the to-be-overwritten header data for reproducible snapshots."
https://codereview.chromium.org/54823002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.