Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread 'Ali Sheikh' via v8-users
I found the bailout reason message to be confusing too. What it really is trying to check is if there is a 'unsupport Phi use of a constant HOLE value' (Here's the bailout check: [1]). Changing the `let virtualName` to `var virtualName` in the for-in loop in your code would fix the problem with th

Re: [v8-users] Can v8::Isolate::GetCurrent() return null?

2016-02-29 Thread 'Yutaka Hirano' via v8-users
I see, thank you. On Mon, Feb 29, 2016 at 3:45 AM, Jochen Eisinger wrote: > Please don't use Isolate::GetCurrent() - it's deprecated. > > If you need to know whether the Isolate was disposed or not, why not > maintain a boolean flag on the worker thread that keeps track of the > isolate's state

Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread Scott Hulbert
In interest of providing extra information, my installation of Node 5.6.0 is using V8 version 4.6.85.31. I’ve also committed the `node_modules` directory for my sample project and replaced all the instances of `const` I could find via search with `var`: https://github.com/hulbert/bookshelf-sample-

Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread Ben Noordhuis
On Mon, Feb 29, 2016 at 1:23 PM, Jakob Kummerow wrote: > This is indeed surprising. > Crankshaft predates ES6, so this has nothing to do with ES6 const. That > said, I don't see why this function would bail out; and in a quick repro > attempt it doesn't. Do you have an example I can run that repro

Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread Scott Hulbert
Jakob, here is a reproducible example ( https://github.com/hulbert/bookshelf-sample-v8). I’m running this with node 5.6.0 on OS X (10.10.4). git clone g...@github.com:hulbert/bookshelf-sample-v8.git npm install node --trace-opt index.js | grep ‘getVirtuals' outputs: [marking 0x18

Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread Jakob Kummerow
This is indeed surprising. Crankshaft predates ES6, so this has nothing to do with ES6 const. That said, I don't see why this function would bail out; and in a quick repro attempt it doesn't. Do you have an example I can run that reproduces this behavior? Also, is this actually a performance probl

Re: [v8-users] Can v8::Isolate::GetCurrent() return null?

2016-02-29 Thread Jochen Eisinger
Please don't use Isolate::GetCurrent() - it's deprecated. If you need to know whether the Isolate was disposed or not, why not maintain a boolean flag on the worker thread that keeps track of the isolate's state? On Fri, Feb 26, 2016 at 7:16 PM Yutaka Hirano wrote: > Hi, > > I'm writing a unit

Re: [v8-users] Fatal error in , line 0 Failed to create ICU collator, are ICU data files missing?

2016-02-29 Thread Jochen Eisinger
I suspect that your binary can't find the icudt.dll file. InitializeICU() attempts to LoadLibraryA() that DLL. On Sat, Feb 27, 2016 at 8:30 PM Jane Chen wrote: > Embedding v8 4.6.88. > > On windows, I get a crash when I run the following: > > new Intl.Collator().compare('a','c') > > # > # Fatal

[v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread Scott Hulbert
I am seeing lines such as: [compiling method 0x39790c6f2379 using Crankshaft] [aborted optimizing 0x39790c6f2379 because: Unsupported phi use of const variable] In spite of this code not using `const` declarations (nor the method that invokes it). I even tried replacing `const` with `