Re: [v8-users] Intent to Ship: Numeric separators

2018-03-15 Thread Adam Klein
There's a possible conflict between this feature and another proposal, Extended
Numeric Literals
. The issue,
https://github.com/tc39/proposal-extended-numeric-literals/issues/7, should
be addressed at next week's TC39 meeting, and I'd like to see it settled
before shipping this in V8.

On Thu, Mar 15, 2018 at 5:02 PM, Sathya Gunasekaran 
wrote:

> Note that this is a v8/JavaScript feature, so this post is just an FYI for
> blink-dev — no sign-off from Blink API owners is required.
>
> Contact Emails:
> gsat...@chromium.org
> b...@b6n.ch
>
> Spec:
> https://tc39.github.io/proposal-numeric-separator/
>
> Summary:
> This feature enables developers to make their numeric literals more
> readable by creating a visual separation between groups of digits. Using
> underscores (_, U+005F) as separators helps improve readability for numeric
> literals, for ex: 1_000_000_000.
>
> Interoperability and Compatibility Risk:
> This is a Stage3 feature in the TC39 process. Previously this was a
> SyntaxError so there is no compat risk.
>
> Safari and Edge have not implemented this feature. This is under
> development in Firefox.
>
> V8 tests as well as test262 tests pass.
>
> Tracking bug:
> https://bugs.chromium.org/p/v8/issues/detail?id=7317
>
> Chromestatus entry:
> https://www.chromestatus.com/feature/5829906369871872
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> 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 v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Re: ArrayBuffer::Allocator::Free() length differing from Allocate() length?

2018-03-15 Thread eholk
Are you using WebAssembly at all? What system are you running on?

WebAssembly has a mode on Linux x64 that uses signal handlers to do faster 
bounds checks. This requires V8 to reserve a much larger region of memory 
to use as guard regions, and sometimes we've made mistakes in accounting 
for this. If you're running into one of these issues, I'd be interested in 
debugging more. Note that the trap handler feature is off by default, so 
you probably aren't using this configuration unless you did something 
intentional to turn it on.

-Eric

On Wednesday, March 14, 2018 at 6:36:33 PM UTC-7, Kenton Varda wrote:
>
> Hi v8-users,
>
> We have an ArrayBufferAllocator implementation that counts how much memory 
> has been allocated. It basically looks like this:
>
> class AllocatorImpl final: public v8::ArrayBuffer::Allocator {
>
> public:
>
>   AllocatorImpl(): allocated(0) {}
>
>   ~AllocatorImpl();
>
>
>   inline size_t getMemoryUsage() const { return allocated; }
>
>
>   void* Allocate(size_t length) {
>
> allocated += length;
>
> return calloc(length, 1);
>
>   }
>
>   void* AllocateUninitialized(size_t length) {
>
> allocated += length;
>
> return malloc(length);
>
>   }
>
>   void Free(void* data, size_t length) {
>
> allocated -= length;
>
> free(data);
>
>   }
>
>
> private:
>
>   size_t allocated;
>
> };
>
>
> We're observing something strange: Sometimes (very rarely!), the 
> `allocated` value drops below zero and wraps around, apparently indicating 
> that V8 has Free()'d more than it Allocate()ed. However, there don't seem 
> to be any issues with double-frees or freeing an invalid pointer.
>
> Any idea what could lead to this? Is it possible for V8 to pass a 
> different `legth` value to Free() than it passed to Allocate()?
>
> Unfortunately I have no idea how to reproduce this reliably. It only 
> happens very occasionally in production. :/
>
> -Kenton
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Intent to Ship: Numeric separators

2018-03-15 Thread Sathya Gunasekaran
Note that this is a v8/JavaScript feature, so this post is just an FYI for
blink-dev — no sign-off from Blink API owners is required.

Contact Emails:
gsat...@chromium.org
b...@b6n.ch

Spec:
https://tc39.github.io/proposal-numeric-separator/

Summary:
This feature enables developers to make their numeric literals more
readable by creating a visual separation between groups of digits. Using
underscores (_, U+005F) as separators helps improve readability for numeric
literals, for ex: 1_000_000_000.

Interoperability and Compatibility Risk:
This is a Stage3 feature in the TC39 process. Previously this was a
SyntaxError so there is no compat risk.

Safari and Edge have not implemented this feature. This is under
development in Firefox.

V8 tests as well as test262 tests pass.

Tracking bug:
https://bugs.chromium.org/p/v8/issues/detail?id=7317

Chromestatus entry:
https://www.chromestatus.com/feature/5829906369871872

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] How do we build v8 using make/cmake?

2018-03-15 Thread nikhil ap
Thanks Ben. I integrated the v8 sources to my CMakefile. The project I am
working on has libcxx with the compile time option set to
LIBCPP_HAS_NO_THREADS  this results in build failure  because v8 includes
atomic.h and stops with the error message
*"atomic is not supported on this single threaded system" *

Is there a work-around for this issue? Will I be able to run v8 on a single
threaded system? Can I also run node on a single threaded system? (albeit
slower)


On Sat, Mar 10, 2018 at 2:16 PM, Ben Noordhuis  wrote:

> Hi, answers inline.
>
> On Wed, Mar 7, 2018 at 8:16 PM, nikhil ap  wrote:
> > I am planning to integrate v8 into my already existing project. Is there
> a
> > way to build v8 using Makefiles and not ninja. Is there a way to generate
> > Makefiles and just give make?
>
> Short answer: no.
>
> Longer answer: V8 until recently supported the GYP build tool.  GYP
> can generate Makefiles and CMakeList.txt files, although the cmake
> support is basic bordering on rudimentary.  Could be an option if you
> don't need the latest and greatest.
>
> Alternative longer answer: you could maintain your own build files.
> More work but you're not beholden to V8's build system.  Two examples:
>
> 1. https://github.com/bnoordhuis/io.js/tree/cmake/cmake/v8 (cmake-based)
> 2. https://github.com/bnoordhuis/v8.rs/commit/2a20ed0f5 (make-based)
>
> On Wed, Mar 7, 2018 at 8:23 PM, nikhil ap  wrote:
> > Also, I linking my application to v8 in an embedded environment. Does v8
> > depend on any external libraries other than glibc/musl ?
>
> The C++ runtime: libstdc++ or libc++.
>
> libdl and librt if you count those as separate libraries (they're part
> of glibc.)
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/v8-users/YML96MBnugA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,
Nikhil

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
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 v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.