[v8-users] Re: Accessing block scoped variables via the V8 API

2017-04-03 Thread Zac Hansen
by the way, the same restriction exists for es6-style class definitions. On Monday, April 3, 2017 at 10:48:56 PM UTC-7, Zac Hansen wrote: > > I'm nearly certain you cannot -- and I don't even believe they're > guaranteed to actually ever exist. It would put pretty serious limitations > on

[v8-users] Re: Accessing block scoped variables via the V8 API

2017-04-03 Thread Zac Hansen
I'm nearly certain you cannot -- and I don't even believe they're guaranteed to actually ever exist. It would put pretty serious limitations on the optimizer if everything in a block had to exist as written. On Monday, April 3, 2017 at 8:02:28 PM UTC-7, Ian Bull wrote: > > In J2V8 (our Java

[v8-users] Accessing block scoped variables via the V8 API

2017-04-03 Thread Ian Bull
In J2V8 (our Java bindings for V8 [1]) we provide access to objects defined in the global scope. [1] https://github.com/eclipsesource/j2v8 In Java you can write: v8.executeScript("var foo = [1,2,3]"); V8Array array = (V8Array) v8.get("foo"); v8 in this case is the the isolate, and when we

[v8-users] Re: Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-03 Thread Zac Hansen
Got some info on IRC -- apparently there is now a "code stub assembler" that does a bunch of work on startup. I stopped the program a few times during startup and it was confirmed, looking at the stack traces, that that was in fact what was going on. Moral of this story: use snapshots. On

[v8-users] Re: Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-03 Thread Zac Hansen
I just rebuilt with snapshots and verified that it is still "fast" to startup on my code. So my question is, what changed to make the much more convenient and previously acceptable startup speed of the no-snapshot builds so much slower? like.. almost 10x slower. On Monday, April 3, 2017

[v8-users] Re: Interceptors running under "with"

2017-04-03 Thread Zac Hansen
Are you using the objecttemplate's setnamedpropertyhandler call? if so, are you implementing all the callbacks to say that your CONS object doesn't have a property a? On Monday, April 3, 2017 at 7:25:25 AM UTC-7, Danny Dorfman wrote: > > Hello there, > > Is there a way for my interceptor to

[v8-users] Interceptors running under "with"

2017-04-03 Thread Danny Dorfman
Hello there, Is there a way for my interceptor to know that it's running under "with", as in this example: var a = 10; with (new CONS()) { do_something(a); } The problem is, that 'a' is intercepted by the new object, and is rendered undefined. I would like it to use the external 'a' instead.

[v8-users] Re: (embedded) Is it possible to set a soft memory limit per Isolate?

2017-04-03 Thread Zac Hansen
This has been asked for numerous times and the responses that I've seen are: "run it in a separate process" and "we take patches as long as it doesn't slow down anything". On Saturday, April 1, 2017 at 10:36:07 PM UTC-7, Mark Tarrabain wrote: > > Is it possible to get the v8 engine when using

[v8-users] Have the no snapshot startup times gotten significantly longer in the last 6-12 months? 3s => 20s+

2017-04-03 Thread Zac Hansen
I just updated my v8 build and noticed a dramatic slowdown in startup times. I'd always used no snapshots for convenience because the startup penalty was insignificant (maybe around 3s?) but ever since I updated it's up around 20s now. Is this a known behavior or am I doing something else

[v8-users] How to deal with reconnecting to v8-inspector?

2017-04-03 Thread Zac Hansen
I've hooked in v8-inspector to websockets using websocketspp and have it working pretty well initially, but I can't figure out how to make it work if I hit refresh in chrome to have the debugger re-attach. Most of the messages are sent through, but the one that seems to be missing that seems