If you are running in Firefox with asm.js enabled (by using the fastcomp
backend, or in the old backend specifying -O1 or greater), the "too many
local variables" limit should not apply. If you still get that error in
Firefox with asm.js-enabled code, it's possible that the output did not
validate properly as asm.js. Try looking for "asm.js compilation succeeded"
message in the log, or if there was an error message of some sorts, that
caused the output to not validate, which then would subsequently hit the
too many local variables limitation.


2014-03-18 19:11 GMT-07:00 Alon Zakai <[email protected]>:

> A potentially confusing thing is that functions inside another function
> are counted as local variables. So a codebase with huge amounts of tiny
> functions can hit this limit.
>
> You can use tools/find_bigfuncs.py to see which is the largest function
> you have, and can grep for "function " and count those to see how many
> functions there are. that should give you an idea if which is the issue.
>
> - Alon
>
>
>
> On Tue, Mar 18, 2014 at 6:15 PM, Trevor Linton <[email protected]>wrote:
>
>> Hi All,
>>
>> I'm having a hard time finding any information on an error i'm getting
>> when running an emscripten generated code (~122MB debug mode), I get the
>> error "too many local variables" in Firefox.  I found both on chromium and
>> firefox that they're working to up the amount of local variables allowed,
>> but both the latest stable releases of Firefox/Chrome have this issue.
>>
>> Is there any known work around? I've tried ASM_JS=0 however it's had no
>> effect. I'm outlining with a limit of 120000.  Suggestions?  Here's the
>> final link command:
>>
>> /Users/tlinton/Library/Emscripten/emscripten/1.13.0/emcc  -s
>> EXPORTED_FUNCTIONS="['_main']" --embed-files 
>> ../src/assets/fontconfig/fonts@/usr/share/fonts
>> --embed-files 
>> ../src/assets/fontconfig/config/fonts.conf@/etc/fonts/fonts.conf
>> --embed-files ../src/assets/fontconfig/cache@/usr/local/var/cache/fontconfig
>> -s FULL_ES2=1 -s TOTAL_MEMORY=50331648 -s OUTLINING_LIMIT=120000 -O0 -s
>> NAMED_GLOBALS=0 -s ASM_JS=0 obj/src/webkit.WebKit.o libxml.bc
>> libjpeg_turbo.bc libpng.bc libfreetype2.bc libharfbuzz.bc libcairo.bc
>> libcurl.bc libzlib.bc libfontconfig.bc libwebcore_xml.bc libwebcore_wtf.bc
>> libwebcore_svg.bc libwebcore_loader.bc libwebcore_html.bc libwebcore_dom.bc
>> libwebcore_css.bc libwebcore_rendering.bc libwebcore_page.bc
>> libwebcore_style.bc libwebcore_derived.bc libwebcore_platform.bc
>> libwebcore_history.bc libwebcore_editing.bc libwebcore_angle.bc
>> libwebcore_support.bc  -o webkit.js
>> You can find the .gz debug version here:
>> https://github.com/trevorlinton/webkit.js/tree/master/bin
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to