[v8-users] Re: Intent to Ship: Async Iteration / Async Generators

2017-09-18 Thread caitp
Thanks, I've updated the chromestatus entry. On Monday, September 18, 2017 at 8:47:12 PM UTC-4, Brian Birtles wrote: > > 2017年9月13日水曜日 1時48分54秒 UTC+9 Caitlin Potter: >> >> *Interoperability risk* >> >> * Firefox: In development >> > > This is already scheduled to ship in Firefox 57 (Intent to

Re: [v8-users] Re: View assembly code for built in functions

2017-09-18 Thread Jakob Kummerow
ArrayPush is implemented in C++, see src/builtins/builtins-array.cc. The code object you've disassembled is a small wrapper/trampoline stub, the first step in the C++ entry sequence. In general, there is no single way to inspect "built-in functions", because there are several ways to implement

[v8-users] When enabling gdbjit, chromium renderer gets stuck in an infinite loop

2017-09-18 Thread Thiago Arruda
I'm trying to debug an electron app that is getting stuck in C++ code being called by javascript, so I've decided to use v8 gdbjit integration to get javascript stack trace from gdb. I've set `v8_enable_gdbjit` gn build argument to `true` and also passed `--gdbjit` argument to v8, but the

Re: [v8-users] Storing a weak reference to a function, or otherwise avoiding a memory leak

2017-09-18 Thread Ben Noordhuis
On Mon, Sep 18, 2017 at 6:13 PM, Zach Bjornson wrote: >> `myObj.onevent()` invokes `onevent()` with `this === myObj`. Unless >> you want to deviate significantly from normal JS semantics, you would >> need to maintain a reference to `myObj` anyway. > > > (The spec I'm

Re: [v8-users] Storing a weak reference to a function, or otherwise avoiding a memory leak

2017-09-18 Thread Zach Bjornson
> > `myObj.onevent()` invokes `onevent()` with `this === myObj`. Unless > you want to deviate significantly from normal JS semantics, you would > need to maintain a reference to `myObj` anyway. > (The spec I'm emulating actually states that `onevent()` is invoked with the global context.)

[v8-users] Re: View assembly code for built in functions

2017-09-18 Thread Rong Jie
You need to build V8 with v8_enable_disassembler enabled (disabled by default in release build). See https://cs.chromium.org/chromium/src/v8/BUILD.gn?type=cs=v8_enable_disassembler On Monday, September 18, 2017 at 5:23:09 PM UTC+8, Marija wrote: > > Hi, > > Is it possible to see generated

[v8-users] View assembly code for built in functions

2017-09-18 Thread Marija
Hi, Is it possible to see generated assembly code for built-in functions? If I use just print_code with a simple program, like [].push(1), nothing is generated. Is --print_builtin_code flag the right thing to use? For array push the output looks like: kind = BUILTIN name = ArrayPush compiler

Re: [v8-users] Storing a weak reference to a function, or otherwise avoiding a memory leak

2017-09-18 Thread Ben Noordhuis
On Sat, Sep 16, 2017 at 3:17 AM, Zach Bjornson wrote: > Hello, > > I'm trying to implement this type of interface: > > var myObj = new MyObj(); > myObj.onevent = function () { > // might be a reference to myObj here > } > myObj.doSomethingAsync(); // causes `onevent` to