Reviewers: rossberg,
Message:
PTAL
Description:
Remove one more unneccessary conversion to double.
R=rossb...@chromium.org
Please review this at https://codereview.chromium.org/15204002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/runtime.cc
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index
434ad8fbd583ffefc8560f4ff2f0142f9a817790..849ddbf9910a388d2610cc7b9e45ac189a21e0dd
100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -676,7 +676,7 @@ bool Runtime::SetupArrayBuffer(Isolate* isolate,
array_buffer->set_backing_store(data);
Handle<Object> byte_length =
- isolate->factory()->NewNumber(static_cast<double>(allocated_length));
+ isolate->factory()->NewNumberFromSize(allocated_length);
CHECK(byte_length->IsSmi() || byte_length->IsHeapNumber());
array_buffer->set_byte_length(*byte_length);
return true;
--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.