The string builder has nothing to do with this; V8 defines a maximum string
length of about 268 million characters (in class String in objects.h):

  // Maximal string length.
  static const int kMaxLength = (1 << 28) - 16;

This is not a bug and unrelated to numbers being 64-bit doubles; it's just
an implementation-defined limit.

I don't think there's anything you can do to get longer strings.


On Sun, Jun 14, 2015 at 1:13 PM, lycheeJS Engine <[email protected]> wrote:

> Hey guys,
>
> Judging from the code that is inside the IncrementelStringBuilder
> (string-builder.cc), you can't serialize Strings in v8 that have a length
> that is bigger than representable in 32bit.
> Relevant header file:
> https://github.com/v8/v8/blob/master/src/string-builder.h#L406
>
> As seen in the screenshot, we merge huge amount of data, but it is
> definitely representable in 64Bit.
>
>
> - Why is this the case?
>
> Is it a bug, I thought all Numbers in JS are IEEE754 double precision
> 64Bit?
>
> - What to do in order to avoid the issue?
>
> We have a custom JSON serializer in place, but this one also depends on a
> working String Builder implementation in the VM.
>
>
> Cheers from Germany, ~Chris
>
> --
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" 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.
>

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" 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.

Reply via email to