Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-23 Thread Geoffrey Garen
> A more general question could be : would Apple allow applications developers > to use the fantastic power of LLVM tools and libraries in a "safe" way ? That > would be an interesting line of work… That’s not a question for the webkit-dev list. Geoff

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-23 Thread Stéphane Letz
Hi again, I must say that this "Using JavaScriptCore in an audio context" idea came because directly using a Domain Special Language ==> LLVM IR ==> LLVM JIT ==> native code chain cannot be used on iOS, since iOS forbids executing of dynamically generated native code (we already do that on

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Filip Pizlo
> On Sep 22, 2015, at 11:20 AM, Stéphane Letz wrote: > > >> Doesn't matter what shape the code is. Parsing and compiling code requires >> memory allocation. JSC will parse and compile the code lazily, so we will >> continue to allocate memory after the code has already started

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Stéphane Letz
> Can you file a bug with exact repro steps? I played with these and did not > hear glitches. Maybe I used a different version of WebKit or different > hardware than you. Filing a bug with specifics can help make these things > clear. What version of WebKit/Safari are you using ? > >

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Stéphane Letz
>> > > It's true that in steady state, asm.js code probably won't allocate memory. > But I order to execute the code the engine will parse things, compile things, > and generate code - all of which requires memory allocation and may acquire > locks held by lower priority threads. So, using

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Jer Noble
> On Sep 22, 2015, at 11:45 AM, Stéphane Letz wrote: > >> Can you file a bug with exact repro steps? I played with these and did not >> hear glitches. Maybe I used a different version of WebKit or different >> hardware than you. Filing a bug with specifics can help make

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Stéphane Letz
Le 22 sept. 2015 à 17:47, Darin Adler a écrit : >> On Sep 22, 2015, at 8:32 AM, Stéphane Letz wrote: >> >> since the asm.js code does not allocate memory > > Unlike C and C++, JavaScript doesn’t directly expose a concept of “allocating > memory” so I’m not

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Filip Pizlo
> On Sep 22, 2015, at 8:32 AM, Stéphane Letz wrote: > > Hi, > > We have the following project of using JavaScriptCore framework on iOS in an > audio context : > > - we generate optimized asm.js code from a Domain Specific Language (actually > an asm.js module for the audio

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Filip Pizlo
On Sep 22, 2015, at 9:15 AM, Stéphane Letz wrote: >> >> It's true that in steady state, asm.js code probably won't allocate memory. >> But I order to execute the code the engine will parse things, compile >> things, and generate code - all of which requires memory allocation

[webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Stéphane Letz
Hi, We have the following project of using JavaScriptCore framework on iOS in an audio context : - we generate optimized asm.js code from a Domain Specific Language (actually an asm.js module for the audio code itself + some additional standard JS functions) - the asm.js module contains a

Re: [webkit-dev] Using JavaScriptCore in an audio context

2015-09-22 Thread Darin Adler
> On Sep 22, 2015, at 8:32 AM, Stéphane Letz wrote: > > since the asm.js code does not allocate memory Unlike C and C++, JavaScript doesn’t directly expose a concept of “allocating memory” so I’m not sure what it means to say that. Any JavaScript code, including “asm.js code”