[v8-users] Re: FunctionTemplate data getting lost during instantiation?

2016-05-17 Thread Ryan Ingram
(Egg on face) Actually, re-reading the guide, it does go into pretty good detail. I think I just didn't have the context to understand it at that point on first reading. Now that I've had time to write a bunch of code and internalize the concepts, it's crystal clear. -- ryan On Tuesday, M

[v8-users] Re: FunctionTemplate data getting lost during instantiation?

2016-05-17 Thread Ryan Ingram
Actually it turns out it was my error, misusing HandleScope. It turns out the function that constructed the callback data had a HandleScope and the returned handle didn't survive the scope closure. I think the Embedder's Guide should go into more detail about the design of HandleScope as it se

[v8-users] Re: Compile V8 for Android

2016-05-17 Thread Yann Bonnetain
Hi Jakob and thanks for your help I have branched of V8 master which gyp Does not print anything sudo find / -name 'gyp' ~/depot_tools/v8/build/android/gyp ~/depot_tools/v8/tools/gyp ~/depot_tools/v8/tools/gyp/gyp ~/depot_tools/v8/tools/gyp/pylib/gyp which seems to show that no

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread Jakob Kummerow
I agree that silent nops are bad, and that's not what we have: The implementation is try { OptimizationStatusImpl = new Function( "fun", "sync", "return %GetOptimizationStatus(fun, sync);"); } catch (e) { throw new Error("natives syntax not allowed");

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread Michael Starzinger
On Tue, May 17, 2016 at 6:25 PM, Jakob Kummerow wrote: > On Tue, May 17, 2016 at 1:01 AM, Caitlin Potter > wrote: > >> As part of the async functions runtime implementation, I had implemented >> a function in d8.cc which would call isolate->RunMicrotasks() --- but was >> talked down from doing t

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread Caitlin Potter
Fair point, using eval/new Function could work around it. Still, it’s unclear why these problems are acceptable(?) in a runtime function, but not in a more general test utility > On May 17, 2016, at 12:25 PM, Jakob Kummerow wrote: > > On Tue, May 17, 2016 at 1:01 AM, Caitlin Potter

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread Jakob Kummerow
On Tue, May 17, 2016 at 1:01 AM, Caitlin Potter wrote: > As part of the async functions runtime implementation, I had implemented a > function in d8.cc which would call isolate->RunMicrotasks() --- but was > talked down from doing this because of a worry that it might interfere with > certain use

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread Caitlin Potter
It's not clear to me how this is any different from the %RunMicrotasks() runtime function (which has identical code). Can you elaborate on how the presence of the method in d8 (or, the presence of %RunMicrotasks() with --allow-natives-syntax) could break implementation code or user code? On Tu

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread 'Andreas Rossberg' via v8-users
The problem with runMicrotasks is that it violates the asynchronicity invariant and the handler ordering semantics of the language. Worse, it makes running the microtask queue reentrant all of a sudden. It's unclear to me what the implications of this are, and I can't immediately convince myself th

Re: [v8-users] Compile V8 for Android

2016-05-17 Thread Jakob Kummerow
Works for me. Which version of V8 do yo have checked out? What does "which gyp" say? If you have /usr/bin/gyp or something installed by your distro, that could interfere; make sure depot_tools is the first thing in your $PATH. (Also, has_valgrind.py should exist in gypfiles/, I assume "tools/" was

Re: [v8-users] FunctionTemplate data getting lost during instantiation?

2016-05-17 Thread Ben Noordhuis
On Tue, May 17, 2016 at 12:22 AM, Ryan Ingram wrote: > What am I doing wrong here? Does FunctionTemplate only support primitives > for callback data? (Its type should suggest that, if so...) > > I'm trying to register native functions to be called back in my embedder, > but my function callback