[v8-users] Read the data value from a Function outside FunctionCallbackInfo?

2019-04-06 Thread Al Mo
I'm new here so first of all: Hi Everyone :D So, let's say I make a function this way: v8::Function::New(, , ); I can then get the when the Function is invoked with something like: FunctionCallbackInfo->GetData(). This is useful for many things. I'm looking for a way to be able to inspect t

[v8-users] Re: Read the data value from a Function outside FunctionCallbackInfo?

2019-04-12 Thread Al Mo
stion. Thanks. On Sunday, April 7, 2019 at 2:43:31 AM UTC+3, Al Mo wrote: > > I'm new here so first of all: Hi Everyone :D > > So, let's say I make a function this way: > > v8::Function::New(, , ); > > > I can then get the when the Function is invoked with >

[v8-users] Any reason that could prevent a v8::Function from being called more than once?

2019-04-12 Thread Al Mo
On some place in my code I get a reference to a local v8::Function like this: v8::Persistent& VALUE; v8::Local FUNCTION = v8::Local::Cast(VALUE); Then I call it like: FUNCTION->Call(v8::Undefined(this->isolate), 0, NULL); "0" and "NULL" since I don't need args at this moment. For some reaso

Re: [v8-users] Any reason that could prevent a v8::Function from being called more than once?

2019-04-12 Thread Al Mo
eproducible code and post it later. On Friday, April 12, 2019 at 5:57:37 PM UTC+3, Ben Noordhuis wrote: > > On Fri, Apr 12, 2019 at 4:56 PM Ben Noordhuis > wrote: > > > > On Fri, Apr 12, 2019 at 4:32 PM Al Mo > > wrote: > > > On some place in my cod

[v8-users] Re: Any reason that could prevent a v8::Function from being called more than once?

2019-04-13 Thread Al Mo
etimes". Sloppy code. Anyway, Ben, thanks for your attention to this. On Friday, April 12, 2019 at 5:32:45 PM UTC+3, Al Mo wrote: > > On some place in my code I get a reference to a local v8::Function like > this: > > v8::Persistent& VALUE; > > v8::Local FUNCTION = v8

[v8-users] Does 'eval' has the same performance as an explicit Script->Compile->Run pipeline?

2019-04-14 Thread Al Mo
Let's say I have some code and I want to execute it, you could: (a) create a v8::Script, compile it and then run it, OR, (b) send the string to an active v8::Context and call eval(code) from inside. I remember hearing that eval does not optimize code, but in my purely empirical tests both sce

[v8-users] Re: Does 'eval' has the same performance as an explicit Script->Compile->Run pipeline?

2019-04-14 Thread Al Mo
millions of linear algebra operations. Also compared that to similar C and performance is pretty close. If this means they could be even faster then wow :D On Monday, April 15, 2019 at 12:28:03 AM UTC+3, Al Mo wrote: > > Let's say I have some code and I want to execute it, you cou

[v8-users] Debugging v8 with Chrome Dev Tools

2019-04-17 Thread Al Mo
Hi all, I have my C++ application running v8 smoothly ;D, I also have some support for websockets (using libwebsockets), so I'm wondering ... How hard it is to setup debugging in a similar way to how node.js is doing it? This, so that I'm able to work with Chrome's Dev Tools. Any pointers on h

[v8-users] Re: Debugging v8 with Chrome Dev Tools

2019-04-27 Thread Al Mo
Thank you everyone, I'll dive into this and see if I can get it working :D On Wednesday, April 17, 2019 at 5:41:53 PM UTC+3, Al Mo wrote: > > Hi all, > > I have my C++ application running v8 smoothly ;D, I also have some support > for websockets (using libwebsocket

Re: [v8-users] Re: Read the data value from a Function outside FunctionCallbackInfo?

2020-06-04 Thread Al Mo
will submit a CL soon, I am reading the requirements :) Best, Alex. On Fri, Apr 12, 2019 at 9:27 AM Al Mo wrote: > I eventually solved it by binding a Private symbol with an external value > to the Function object. > > That solves it for the moment. I would love to contribute back

Re: [v8-users] Date.now & new Date performance

2020-06-05 Thread Al Mo
[Warning. mere speculation] Perhaps it has to do with having to make a system call to get the current time. Alex. On Fri, Jun 5, 2020 at 1:57 PM Paweł Badeński wrote: > Hi, > > Wondering if someone can help with a bit of context to satisfy mu > curiosity! :D > > We are using Date.now & new Dat