Also --harmony-regexp. In that case a global variable is defined from C++ On Thu, Dec 11, 2014 at 9:38 AM, <[email protected]> wrote: > > On 2014/12/11 14:31:47, rossberg wrote: > >> I'm sorry about that. There seem to be some assumptions about builtins >> being >> immutable somewhere in V8, although I couldn't figure out where exactly. >> Here >> > is > >> an easy alternative that works for me: >> > > diff --git a/src/runtime.js b/src/runtime.js >> index 4bc377c..f4beadb 100644 >> --- a/src/runtime.js >> +++ b/src/runtime.js >> @@ -567,7 +567,10 @@ function ToInteger(x) { >> > > > // ES6, draft 08-24-14, section 7.1.15 >> +// TODO(rossberg): Remove use of flag once --harmony-arrays is gone. >> +ToLength.harmony = false; >> function ToLength(arg) { >> + if (!ToLength.harmony) return TO_UINT32(x); >> arg = ToInteger(arg); >> if (arg < 0) return 0; >> return arg < $Number.MAX_SAFE_INTEGER ? arg : >> $Number.MAX_SAFE_INTEGER; >> diff --git a/src/harmony-array.js b/src/harmony-array.js >> index 06fada7..7121856 100644 >> --- a/src/harmony-array.js >> +++ b/src/harmony-array.js >> @@ -145,6 +145,9 @@ function ArrayOf() { >> function HarmonyArrayExtendArrayPrototype() { >> %CheckIsBootstrapping(); >> > > + // Upgrade index conversion semantics to ES6. >> + ToLength.harmony = true; >> + >> // Set up non-enumerable functions on the Array object. >> InstallFunctions($Array, DONT_ENUM, $Array( >> "of", ArrayOf >> > > --harmony-tostring has some of the behaviour that I suggested before --- > so it's > definitely working there. would have to look and see why it's broken here. > > > https://codereview.chromium.org/553623004/ > > -- > -- > 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. >
-- erik -- -- 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.
