Some replies.
https://codereview.chromium.org/15943002/diff/17001/src/objects-inl.h
File src/objects-inl.h (right):
https://codereview.chromium.org/15943002/diff/17001/src/objects-inl.h#newcode5335
src/objects-inl.h:5335: size_t byte_length =
static_cast<size_t>(this->byte_length()->Number());
On 2013/06/03 13:48:12, ben2 wrote:
On 2013/06/03 13:09:04, Dmitry Lomov (chromium) wrote:
> Use NumberToSize
I copied that from ArrayBuffer actually, to keep friction as low as
possible.
:-)
Want me to update that as well?
Use NumberToSize here, do not update usages in code you have not touched
(to minimize churn)
https://codereview.chromium.org/15943002/diff/17001/src/utils.h
File src/utils.h (right):
https://codereview.chromium.org/15943002/diff/17001/src/utils.h#newcode267
src/utils.h:267: inline enum Endianness GetEndianness() {
On 2013/06/03 13:48:12, ben2 wrote:
On 2013/06/03 13:09:04, Dmitry Lomov (chromium) wrote:
> This belongs to cpu.h. Should be a #define with possibly
STATIC_ASSERT, not a
> runtime function
I'll move it but is turning it into a macro necessary? It's
effectively a
compile-time constant and it avoids a lot of compiler-specific
#ifdefs.
Explicitly define expected endianness using V8_TARGET_ARCH_ macros (see
global.h for definitions) and use STATIC_ASSERT and this set of
functions to assert that you have defined it correctly for all
architectures.
https://codereview.chromium.org/15943002/diff/17001/test/mjsunit/harmony/dataview.js
File test/mjsunit/harmony/dataview.js (right):
https://codereview.chromium.org/15943002/diff/17001/test/mjsunit/harmony/dataview.js#newcode30
test/mjsunit/harmony/dataview.js:30: assertThrows("DataView()",
TypeError);
This is stylistic. Friends do not allow friends use eval.
On 2013/06/03 13:48:12, ben2 wrote:
On 2013/06/03 13:09:04, Dmitry Lomov (chromium) wrote:
> Please do not use string version of assertThrows, use the version
that takes a
a
> function:
>
> assertThrows(function() { DataView(); }, TypeError);
Will do. Out of curiosity, is it a style thing or are there tangible
benefits?
https://codereview.chromium.org/15943002/
--
--
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.