https://codereview.chromium.org/225753004/diff/1/src/parser.cc
File src/parser.cc (right):
https://codereview.chromium.org/225753004/diff/1/src/parser.cc#newcode230
src/parser.cc:230: if (length % sizeof(unsigned) != 0) {
Why do we silently return here? Wouldn't an ASSERT be better?
https://codereview.chromium.org/225753004/diff/1/src/parser.cc#newcode234
src/parser.cc:234: // Copy the data to ensure it is properly aligned.
This comment doesn't really belong here.
https://codereview.chromium.org/225753004/diff/1/src/parser.cc#newcode237
src/parser.cc:237: if (reinterpret_cast<intptr_t>(data) %
sizeof(unsigned) == 0) {
I think restructuring this function makes things clearer, something
along the lines of:
owns_store_ = reinterpret_cast<intptr_t>(data) % sizeof(unsigned) !=
0;
if (owns_store_) {
<make an aligned copy and assign the start of it to data>
}
<wrap data/length into a vector>
https://codereview.chromium.org/225753004/diff/1/src/parser.h
File src/parser.h (right):
https://codereview.chromium.org/225753004/diff/1/src/parser.h#newcode85
src/parser.h:85: class ScriptDataImpl {
Rename this to simply ScriptData, or perhaps even something more
descriptive.
https://codereview.chromium.org/225753004/diff/1/src/parser.h#newcode100
src/parser.h:100: static ScriptDataImpl* New(const char* data, int
length);
I can't see the implementation of this function.
https://codereview.chromium.org/225753004/
--
--
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/d/optout.