Re: build system type changed

2014-03-25 Thread Александр Гурьянов
I found that it is because emcc does not pass sanity checks. Because latest version is used fastcomp. When i compiled llvm-fastcom this error is disappeared. But for now i have this message on emcc -v: ./emcc -v emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) 1.13.2 clang version

Re: Branch updates and Emterpreter landing

2014-10-22 Thread Александр Гурьянов
I think it is will be useful feature. Usually native code has not important functions that cannot be easily ported, for example playing videos between game levels or video/sound effects such as fadeout and fadein usually implemented as uninterrupted loop. For simplicity i just disable this

Re: Regal GL

2017-01-27 Thread Александр Гурьянов
Finally, I integrate regal gl into emscripten. You should call RegalMakeCurrent((RegalSystemContext)1); to associate emscripten gl context with regal gl context. Like this: glutInit(, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowPosition(0, 0);

Re: Progressive performance loss while execution of script

2016-11-09 Thread Александр Гурьянов
No, this bug affects only Safari browser (IOS 10). Where I can learn more about JS VM deopts? As I understand in emscripten we use typed array as HEAP, so we allocate this array on start and then use it (without grow/shrink). Why GC is relevant in this case? 2016-11-10 1:47 GMT+03:00 Alon Zakai

Re: Wine in Emscripten

2016-11-10 Thread Александр Гурьянов
Man, you're my hero! 2016-11-10 5:39 GMT+03:00 Danoon : > I ported Dosbox to Java, so most of my knowledge of the emulation comes > from the Dosbox project. > > After I got Dos games to work in Java, my goal became to get Win95/98 era > games to run in a browser using Java.

Re: Progressive performance loss while execution of script

2016-11-18 Thread Александр Гурьянов
We checked that completely disabling rendering does not helps, so I think that problem is not FULL_ES emulation. Is there are other way to profile js code, without builtin browser profiler. 2016-11-17 22:01 GMT+03:00 Alon Zakai : > I'm not a GL expert so I'm not sure. @juj

Re: Progressive performance loss while execution of script

2016-11-18 Thread Александр Гурьянов
perfomance is near 30-40fps, but after some moment it increased to 50-60fps without any "magic". 2016-11-19 0:17 GMT+03:00 Александр Гурьянов <caiiiy...@gmail.com>: > We checked that completely disabling rendering does not helps, so I think > that problem is not FULL_ES e

Re: PGO alternatives for fastcomp

2016-11-01 Thread Александр Гурьянов
I use normalizeAsm and denormalizeAsm and all works, but only on O1 mode, but not in O2 and O3. My impl: function pgo(ast) { var PATCHED_FUNCS = set(); traverseGeneratedFunctions(ast, function(func) { var sig = func[1]; if (sig in PATCHED_FUNCS) return null; var asmData =

Re: Canvas is freezing but no additional information shown

2017-03-23 Thread Александр Гурьянов
Yes I mean optimizations. "-O3" Like "-O2", but with additional JavaScript optimizations that can take a significant amount of compilation time and/or are relatively new. Note: This differs from "-O2" only during the bitcode to JavaScript (final link and JavaScript generation)

Re: Memory leak in generated code

2017-03-23 Thread Александр Гурьянов
I compile with -O0 -s SAFE_HEAP=1 -s STB_IMAGE=1 and does not have any error in logs 2017-03-23 16:07 GMT+07:00 caiiiycuk : > Hi! I've porting another game on cocos2d with emscripten, and for js > version game hangs after two levels with out of memory error. > memoryprofiler

Re: Canvas is freezing but no additional information shown

2017-03-23 Thread Александр Гурьянов
Hi, what os do you use? I have same problem on Safari 10 in MacOs. In my case switching from O3 to O2 helps. 2017-03-23 15:25 GMT+07:00 Alon Faraj : > Im using emscripten and chrome 57. > My application is workign as expected but when I try to use a > specific feature that

Re: cocos2d: function pointer casts

2017-04-05 Thread Александр Гурьянов
For example I have class hierarchy: Object <- MyObject Object <- MenuItem class MyObject: public Object { void handler(MenuItem* item); } Is it safe to cast void(MyObject::*)(MenuItem*) to void(Object::*)(Object*)? Or I should use MULATE_FUNCTION_POINTER_CASTS=1 in this case too? I thinking

Re: emterpreter clarification

2017-04-21 Thread Александр Гурьянов
Works! Thank you :) 2017-04-20 23:21 GMT+07:00 Alon Zakai : > I think you're missing a call to emscripten_sleep() in that loop, > > https://github.com/kripken/emscripten/wiki/Emterpreter# > emterpreter-async-run-synchronous-code > > We don't automatically pause and resume

Re: PRECISE_F32=1 for part of code

2017-08-01 Thread Александр Гурьянов
TypeError: asm.js type error: fixnum is not a subtype of double? or floatish 2017-08-01 15:25 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Hmm, after that manipultaions code can't be compiled in asm.js mode ( > > 2017-08-01 14:06 GMT+07:00 caiiiycuk <caiiiy...@gmail.

Re: PRECISE_F32=1 for part of code

2017-08-01 Thread Александр Гурьянов
Hmm, after that manipultaions code can't be compiled in asm.js mode ( 2017-08-01 14:06 GMT+07:00 caiiiycuk : > I think I found another way, I wrote uglifyjs script that remove Math_fround > from everywhere except list of functions. This script just find calls to > Math_fround

Re: asm.js very slow compile time

2017-08-09 Thread Александр Гурьянов
with flag -Wl,--unresolved-symbols=ignore-all and it works fine, asm.js also works. 2017-08-09 19:36 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > The source is not public, but I think I can share result js if it's useful. > > I will try to build WebAssembly and check. > > 20

Re: asm.js very slow compile time

2017-08-13 Thread Александр Гурьянов
> You could try adding a single .cpp file to the build with that symbol >> defined, or add a __EMSCRIPTEN__ specific path somewhere that defines it, or >> hook into Wasm instantiation in the html file and add that entry in the >> import object. >> >> torstai 10. elo

Re: asm.js very slow compile time

2017-08-10 Thread Александр Гурьянов
s that a singleton > pointer? > > 2017-08-10 6:55 GMT+03:00 Александр Гурьянов <caiiiy...@gmail.com>: >> Update on compile time: >> -O2 - ~60 sec >> -O3 - ~7 sec >> >> Also I try to build project with WASM=1, and it built successfully, >> but I can't

Re: asm.js very slow compile time

2017-08-10 Thread Александр Гурьянов
at http://localhost/bin.js?timestamp=1502360564253:5664:4 at If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information. 2017-08-10 17:32 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > emcc (Emscripten gcc/clang-like replacement) 1

Re: --llvm-opts 2 optimization bug. (incoming)

2017-07-11 Thread Александр Гурьянов
I've checked, INLINING_LIMIT=1 wan't helps. May be I can see something in intermediate object file (bc)? 2017-07-11 20:04 GMT+07:00 Jukka Jylänki : > There have been reports about -llvm-opts being buggy in the past, > especially in combination with inlining. You could try to

Re: --llvm-opts 2 optimization bug. (incoming)

2017-07-13 Thread Александр Гурьянов
Just to be sure, I use emscripten-fastcomp/bin/clang, and emscripten-fastcomp/bin/clang++ to compile my sources 2017-07-13 13:13 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > *compiled > > 2017-07-13 13:12 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: >>

Re: --llvm-opts 2 optimization bug. (incoming)

2017-07-13 Thread Александр Гурьянов
*compiled 2017-07-13 13:12 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Wow, great :) I don't know that I can compile native builds with > fastcomp compiler. > > Btw, I've compilted my sources with same emscripten-fastcomp compiler, > with -O3 flag and game just r

Re: --llvm-opts 2 optimization bug. (incoming)

2017-07-13 Thread Александр Гурьянов
tively with the exact same > compiler (i.e., use clang/clang++ from emscripten's fastcomp) and see if the > problem occurs there. A pure LLVM issue would show up there, and you can > then see if it's a known LLVM issue. > > On Wed, Jul 12, 2017 at 10:37 AM, Александр Гурьянов <caiiiy.

Re: --llvm-opts 2 optimization bug. (incoming)

2017-07-12 Thread Александр Гурьянов
with ll files, and my source file. https://drive.google.com/file/d/0B28AXjYMDNZsRi01Z2trUy1aU0U/view?usp=sharing 2017-07-12 12:16 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > I've checked, INLINING_LIMIT=1 wan't helps. May be I can see > something in intermediate object file (bc

Re: Minify explanation

2017-07-24 Thread Александр Гурьянов
Wow, great! Sorry for my inattention. Btw, I've checked that profiling-funcs emits to mach code. I used O2 --emit-symbol-map, and then restore names with uglifyjs, there are results: -O2 --emit-symbol-map: 9.3Mb -O2 --emit-symbol-map + uglifyjs: 9.8Mb -O2 --profiling-funcs: 14.5Mb 2017-07-24

Re: PRECISE_F32=1 for part of code

2017-07-27 Thread Александр Гурьянов
I tried this, unfortunately when I replace all floats with double even native version does not work, physics is broken. Maybe I made mistake somewhere, I will try again. 2017-07-27 22:53 GMT+07:00 Alon Zakai : > There isn't an option for that currently. But in your specific

Re: asm.js very slow compile time

2017-08-09 Thread Александр Гурьянов
The source is not public, but I think I can share result js if it's useful. I will try to build WebAssembly and check. 2017-08-09 19:04 GMT+07:00 Jukka Jylänki : > This looks like a performance bug in the browser. It may be possible > to reduce the compilation time, but without

Re: PRECISE_F32=1 for part of code

2017-08-01 Thread Александр Гурьянов
Sorry, this is uglifyjs bug 2017-08-01 15:26 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > TypeError: asm.js type error: fixnum is not a subtype of double? or floatish > > > 2017-08-01 15:25 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: >> Hmm, after

Re: Similar Function Elimination

2017-08-22 Thread Александр Гурьянов
subtype of intish >> >> 2017-08-22 11:33 GMT+07:00 Александр Гурьянов <caii...@gmail.com>: >> > Roll a ball project: >> > https://www.assetstore.unity3d.com/en/#!/content/77198 >> > >> > 2017-08-22 11:32 GMT+07:00 Александр Гурьянов <caii...@gm

Re: Similar Function Elimination

2017-08-22 Thread Александр Гурьянов
> >> As I see using SFE breaks asm.js validity? On my another project sfe >> >> produce js less on 500Kb (from 6.5Mb), but FF says: >> >> TypeError: asm.js type error: double is not a subtype of intish >> >> >> >> 2017-08-22 11:33 GMT+07:00 Александ

Re: Similar Function Elimination

2017-08-22 Thread Александр Гурьянов
at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:442:10) 2017-08-23 0:16 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > While trying to reproduce a

Re: Similar Function Elimination

2017-08-23 Thread Александр Гурьянов
Sorry, missed error line from prev message: TypeError: asm.js type error: double is not a subtype of intish 2017-08-23 13:42 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Without -g2 I have this error: > g[a+4>>2]=-$|0; > > In function: > function Bg(a,b,$){a=a

Re: Similar Function Elimination

2017-08-23 Thread Александр Гурьянов
TypeError: asm.js type error: double is not a subtype of intish 2017-08-23 13:42 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Sorry, missed error line from prev message: > TypeError: asm.js type error: double is not a subtype of intish > > 2017-08-23 13:42 GMT+07:00

Re: Similar Function Elimination

2017-08-23 Thread Александр Гурьянов
>> >>> >> Great. I will try to reproduce asm.js bug. Btw, if you build >>> >> roll-a-ball project in Unity, then output will be in Unity format >>> >> (also js, but with Unity loader, Unity staff). You can find emscripten >>> >> output in P

Re: No SDL2_mixer port? What do people use for sound+music?

2017-08-29 Thread Александр Гурьянов
I prefer to use SDL_mixer_1.2 it works fast. Also it supports ogg, mp3 panning and dinstance. 2017-08-29 21:55 GMT+07:00 Goran Milovanovic : > I would like to compile a project that's built on top of SDL2 libraries. One > of those libraries is SDL2_mixer, which seems to

Re: Similar Function Elimination

2017-08-23 Thread Александр Гурьянов
s, >> Arnab >> >> On Tuesday, August 22, 2017 at 11:43:09 PM UTC-7, caiiiycuk wrote: >>> >>> TypeError: asm.js type error: double is not a subtype of intish >>> >>> 2017-08-23 13:42 GMT+07:00 Александр Гурьянов <caii...@gmail.com>: >&g

Re: Similar Function Elimination

2017-08-21 Thread Александр Гурьянов
Roll a ball project: https://www.assetstore.unity3d.com/en/#!/content/77198 2017-08-22 11:32 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Hi. I tried to use SFE on Roll-a-ball demo project, and get same > results. Unity uses --separate-asm flag to build asm.js. Resulting js

Re: Similar Function Elimination

2017-08-21 Thread Александр Гурьянов
cuk/sdk/Similar-Function-Elimination/src/similar_function_eliminator.js:35:20) Maybe I doing something wrong. Can you try? Resulting js is here (build.asm.js): https://drive.google.com/file/d/0B28AXjYMDNZscDFlZTdWMGMzQkU/view?usp=sharing Thank you! 2017-08-22 1:35 GMT+07:00 Александр Г

Re: Similar Function Elimination

2017-08-21 Thread Александр Гурьянов
) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:442:10) 2017-08-20 12:44 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.

Re: Similar Function Elimination

2017-08-22 Thread Александр Гурьянов
As I see using SFE breaks asm.js validity? On my another project sfe produce js less on 500Kb (from 6.5Mb), but FF says: TypeError: asm.js type error: double is not a subtype of intish 2017-08-22 11:33 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Roll a ball proje

Re: Similar Function Elimination

2017-08-21 Thread Александр Гурьянов
I think that error can be reporudced on any Unity project, I will check and back) Btw, thanks for nice stuff! 2017-08-22 1:27 GMT+07:00 arnab choudhury : > Thanks Alon :). > > Caiiycuk, is the codebase you are trying to run SFE on available publicly? > Can you post the

Re: Similar Function Elimination

2017-08-19 Thread Александр Гурьянов
Hi guys! Sorry, I don't understand from now SFE step is builtin into emscripten, or I should use it as post step after compilation? I want to try it on my projects. 2017-08-19 22:12 GMT+07:00 Charles Vaughn : > The biggest difference is SFE uses helper functions, since we need

Re: asm.js size overhead

2017-10-23 Thread Александр Гурьянов
Also, you defenitely should add this https://github.com/achoudhury85/Similar-Function-Elimination to your article. For big codebase it's work really cool, usually it reduce code by 20% (in my case 2-3Mb). 2017-10-24 0:49 GMT+07:00 Floh : > I don't know why the .mem files have

Re: asm.js size overhead

2017-10-23 Thread Александр Гурьянов
Thank you :) I see that asm.js do not produce much overhead. Floh, thank you for great article, btw why mem file have mem extension, not mem.js? For my projects I rename this file to mem.js (and replace all occurrences in js) to get auto gzip features, etc. 2017-10-19 0:03 GMT+07:00 Charles

Re: Changes for JS Shrinking

2017-11-29 Thread Александр Гурьянов
Hi. This discussion is very interesting, but what do you think about solving this problem from other side. I talk about solution like proguard for java, is it possible to create such tool that drop unused functions from generated js? Maybe it's very hard to collect what functions from emscripten

Re: Changes for JS Shrinking

2017-11-29 Thread Александр Гурьянов
But if there is no functions to delete, how generated js can be shrinked, I don't understand. BTW for unity project, I write custom tool for collecting functions that used in runtime, and near 70% of function is never called. I can reduce size of unity project from 26Mb to 12Mb, without having in

Re: Sockets

2017-12-04 Thread Александр Гурьянов
I've use linux sockets with emscripten. They work as in native code except one thing - they should be async. So if you app use async socket then it should work out the box. Ofcourse you should wrap server socket with websockify it's work like a charm. 5 дек. 2017 г. 8:21 ДП пользователь "Mark

Re: Remove ASYNCIFY?

2017-11-21 Thread Александр Гурьянов
Hmm, I have an project (Dune 2) that uses emterpreter. The Dune 2 project, contains a lot of cycles like: while (true) { // do some animation stuff // usually: shift pallete + render } or while (true) { // do read input // for example: save game dialog (enter file name) } With

Re: Low FPS on mobile browser until suspend resume

2017-11-07 Thread Александр Гурьянов
I can confirm that I also have same issue with some games on safari browser. Game runs slow until you minimize/maximize browser or attach debugger. I made a lot of profiling, but does not have success, profiler shows that overall performance changes after "magic" not single function. My theory is

Re: Low FPS on mobile browser until suspend resume

2017-11-08 Thread Александр Гурьянов
(or did when I last tried). Could you please check if chrome is an > issue also on your devices? > > 2017-11-08 6:59 GMT+02:00 Александр Гурьянов <caiiiy...@gmail.com>: >> >> I can confirm that I also have same issue with some games on safari >> browser. Game

Re: Sockets

2017-12-05 Thread Александр Гурьянов
return false; } } return; } abort(); 2017-12-06 12:21 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > I've use common internet address like '192.168.0.104:7014' and connect > to socket in this way: > > int flags; > if ((flags = fcntl(socketId, F_GETFL, 0)

Re: Sockets

2017-12-05 Thread Александр Гурьянов
I've use common internet address like '192.168.0.104:7014' and connect to socket in this way: int flags; if ((flags = fcntl(socketId, F_GETFL, 0)) < 0) { abort(); } if (fcntl(socketId, F_SETFL, flags | O_NONBLOCK) < 0) { abort(); } if (socketId >= 0) { if (connect(socketId,

Re: Advice for keyboard input in mobile WebGL games wanted

2018-01-10 Thread Александр Гурьянов
Hi. I have experience with android development, and can answer from android side. - is it possible to control the mobile onscreen keyboard (show, hide and get key events) without an HTML input element? Unfortunately no. It can be made only in custom webview, if you create android app with webview

Re: getCurrentTimeMs

2018-02-20 Thread Александр Гурьянов
t; >> I'm not sure offhand if there's a way to get a long long result from EM_ASM >> but double will work there. >> >> -- brion >> >> On Tue, Feb 20, 2018 at 1:16 AM Александр Гурьянов <caiiiy...@gmail.com> >> wrote: >>> >>> Hi,

getCurrentTimeMs

2018-02-20 Thread Александр Гурьянов
Hi, I found that simplest function getCurrentTimeMs() work different in browser environment (tested on origin/incoming). Code is simple: #include #include int main(int, char**) { static struct timeval tp; gettimeofday(, 0); printf("%ld %ld %ld\n", tp.tv_sec, tp.tv_usec, tp.tv_sec *

Re: UTF32/UTF8 in std::string

2018-02-18 Thread Александр Гурьянов
Sorry, this is my fault. Native & browser output is identical. 2018-02-16 18:34 GMT+07:00 Александр Гурьянов <caiiiy...@gmail.com>: > Hi, I am working on project that uses custom String class, this string > class have methods: > > std::string String::getStdString() cons

EXTRA_EXPORTED_RUNTIME_METHODS and file packager

2017-12-26 Thread Александр Гурьянов
Hi. I have recently switched to new version of emcc, and faced with the problem that I should add functions to -s EXTRA_EXPORTED_RUNTIME_METHODS to use them through Module['function_name'] Most of errors that I have came from file_packager.py, I mean I used file_packager.py to create preloadable

Re: EXTRA_EXPORTED_RUNTIME_METHODS and file packager

2017-12-26 Thread Александр Гурьянов
the file packager is run standalone. (We already had > this in the docs and at runtime in -O0 and ASSERTIONS builds, but even > better to print it from the tool itself, where it is most likely to be > seen.) > > On Tue, Dec 26, 2017 at 1:17 AM, Александр Гурьянов <caiiiy...@g

Re: Startup still seems slow, even with WASM

2018-04-07 Thread Александр Гурьянов
What browser do you use? For me Chrome is dramatically slow while compiling wasm, asm.js is faster at least 3 times. 2018-04-08 1:19 GMT+07:00 Goran Milovanovic : > After all the files are downloaded, it takes ~5 seconds for my program to > actually start. Since my cpu

Re: Why no AUDIO_F32 support in the SDL Audio wrapper

2018-04-05 Thread Александр Гурьянов
Wow, is it mean that if changes will be made, then we can have a little performance boost if use float32 samples? 2018-04-05 10:36 GMT+07:00 Alon Zakai : > Yeah, looks like the current code just supports U8 and S16. Probably because > the first things ported with it used

Re: Running custom optimizations over emmited bc

2018-03-26 Thread Александр Гурьянов
Hmm, looks link time optimizations id broken --llvm-lto 2 produce not worked js, but game stuck forever on loading. If I found little test case then I post it. Anyway, is it correct that I can run my "SAFE" optimization on step (2) and as result get correct js with no performance lost against

Re: Running custom optimizations over emmited bc

2018-03-27 Thread Александр Гурьянов
O3 is used to determine how > much to optimize in other things than LLVM (asm.js/wasm optimizations). > > > On Mon, Mar 26, 2018 at 6:44 PM, Александр Гурьянов <caiiiy...@gmail.com> > wrote: >> >> Hmm, looks link time optimizations id broken --llvm-lto

Re: Are people using our Crunch support?

2018-04-03 Thread Александр Гурьянов
+1, I've also use some hacks to compress FS better then DXT. 2018-04-04 0:46 GMT+07:00 Floh : > Huh, didn't know this exists :) In my case it wouldn't make sense to use > though because I'm not using the emscripten filesystem but instead load data > directly. > > -Floh. > > > On

Re: How To Use Freetype?

2018-11-11 Thread Александр Гурьянов
I used freetype (USE_FREETYPE=1) many times. It works fine. But if you start your project from scratch I suggest to use browser capabilities to render font it will be much much lighter. Anyway it is hard to tell why your code did not work, please share your code. Did you try FULL_ES=2? As I

Re: Stability of llvm-lto

2018-10-09 Thread Александр Гурьянов
Hi. I tried it couple of times. Problem is in undefined behaviour my code works correctly most of time, but sometimes unpredictable erros are happen. I decide to not use them, because it is impossible to prove that output is working correctly. ср, 10 окт. 2018 г. в 0:09, Corey Lucier : > > We

Re: mvp-features

2019-01-14 Thread Александр Гурьянов
2. I'm not sure about your second > problem, but perhaps it is related. > > On Mon, Jan 14, 2019 at 2:32 AM Александр Гурьянов > wrote: >> >> For bigger project, in EMCC_DEBUG=1 mode (only in debug mode) I had this >> error: >> ``` >> emscripte

Re: GitHub org?

2018-12-21 Thread Александр Гурьянов
Hi guys. Sorry for offtopic but maybe its good time to improve. Can you add some localisation mechanism for docs. I want to translate it to Russian. пт, 21 дек. 2018 г., 19:30 Alon Zakai alonza...@gmail.com: > > > On Fri, Dec 21, 2018 at 2:35 AM Beuc wrote: > >> The GitHub->GitLab migration

Re: Hard to debug large JS files

2018-11-29 Thread Александр Гурьянов
+1 чт, 29 нояб. 2018 г. в 08:40, 越闽魏 : > > > Interesting! > > Could you share your script that split up the large js file? @Arnab > > Thank you! > > On Tuesday, December 29, 2015 at 4:48:48 AM UTC+8, Arnab Choudhury wrote: >> >> FYI - In order to work around the problem, I went ahead and wrote a

Re: Port of Doom 3 video game (idTech 4 engine) to WebAssembly

2019-01-03 Thread Александр Гурьянов
Amazing job! Congrats! пт, 4 янв. 2019 г., 1:40 'Thomas Lively' via emscripten-discuss emscripten-discuss@googlegroups.com: > This is super cool! 10/10 will play more when I can. It's really great > seeing the WebAssembly work paying off with such a low barrier to start > playing such a polished

Re: mvp-features

2019-01-14 Thread Александр Гурьянов
ngine, source_map, extra_info, just_split, just_concat)) File "/home/caiiiycuk/emscripten/sdk/emscripten/tools/js_optimizer.py", line 470, in run_on_js filenames = pool.map(run_on_chunk, commands, chunksize=1) TypeError: map() got an unexpected keyword argument 'chunksize' ninja: build

mvp-features

2019-01-14 Thread Александр Гурьянов
Hi! What is '--mvp-features'? After updating to latest version (1.38.23/incoming, and binaryen/master:5b5789495a97602869f18d552b2a9e1814edefae) I can't compile anything: main.cpp: int main() { return 0; } -- ~/emscripten/sdk/emscripten/emcc -Oz main.cpp -o main.html Unknown option

Emscripten codebase languages

2019-04-04 Thread Александр Гурьянов
Hi guys. I'm really curious about why emscripten is written both on python and javascript. Tests are written in python but main sources in javascript (not only libraries, but also some optimizers). Why you do in that way? This choice is due to some environment limitions or just because it's easier

Re: Debugging WASM with C++ source

2019-04-04 Thread Александр Гурьянов
Agree, I never debug emscripten output. Source map never works for big code bases. So all bug fixing done by playing with C++ native build, in hope that it will be ported 1:1, actually it's almost true. пт, 5 апр. 2019 г. в 03:28, Brian Gavin : > > My experience with source maps is similar to

Re: failed to asynchronously prepare wasm: Error: Out of executable memory

2019-03-11 Thread Александр Гурьянов
eve, that this is our problem: >> https://bugs.webkit.org/show_bug.cgi?id=181723 >> >> пн, 11 мар. 2019 г. в 22:31, Александр Гурьянов : >> > >> > Nothing special. Just switch to -Oz flag, and drop some 3rd party >> > libraries. Tools like bloaty is very use

Re: failed to asynchronously prepare wasm: Error: Out of executable memory

2019-03-11 Thread Александр Гурьянов
I think to add ios into blacklist for wasm, because this bug is >>>> completely random. Test from Brion >>>> (https://github.com/brion/min-wasm-fail/blob/master/min-wasm-fail.js) >>>> always succeed. >>>> вт, 31 июл. 2018 г. в 3:57, Alon Z

Re: failed to asynchronously prepare wasm: Error: Out of executable memory

2019-03-11 Thread Александр Гурьянов
s, how did you find a way to reduce your wasm size? We're bringing > games to the web, and any way we can optimize the file sizes would make all > the difference. > > On Mon, Mar 11, 2019 at 12:56 AM Александр Гурьянов > wrote: >> >> No, I found way to reduce wasm size,

Re: failed to asynchronously prepare wasm: Error: Out of executable memory

2019-03-11 Thread Александр Гурьянов
I believe, that this is our problem: https://bugs.webkit.org/show_bug.cgi?id=181723 пн, 11 мар. 2019 г. в 22:31, Александр Гурьянов : > > Nothing special. Just switch to -Oz flag, and drop some 3rd party > libraries. Tools like bloaty is very usefull. In my case I need too > decre

Re: failed to asynchronously prepare wasm: Error: Out of executable memory

2019-03-07 Thread Александр Гурьянов
m-fail.js) >> always succeed. >> вт, 31 июл. 2018 г. в 3:57, Alon Zakai : >> > >> > How big is TOTAL_MEMORY in this project? It could be either the binary >> size itself, or the memory size, that it doesn't have enough memory for. >> > >>

Re: Is there a tool that shows size implications of using a given C function?

2019-02-06 Thread Александр Гурьянов
Hi. I think that best way to do it is to use wasm-opt from binaryen (thanks to Alon, hi told me how to do this): bin/wasm-opt --func-metrics test/hello_world.wast == global [funcs]: 1 func: add [binary-bytes] : 7 [total]: 3 binary : 1 local.get : 2 export: add

Binaryen IR: understanding call expression

2019-02-06 Thread Александр Гурьянов
HI guys! I trying to implemnent wasm2wasm pass that remove specific function from wasm. Inspired by ExtractFunction pass I wrote this code: for (auto& func : module->functions) { if (names.find(func->name) != names.end()) { // wipe out all the

Re: Emscripten Mobile Chrome/Safari

2019-01-31 Thread Александр Гурьянов
Maybe another option is to use optimized build with -Oz (to minimize startup time). пт, 1 февр. 2019 г. в 06:51, Floh : > > As long as you're on fairly recent Android/iOS versions where the browsers > have WASM support, it should "just work". > > If WASM is not an option you'd need to fallback

Re: binaryen, wabt, webassemblyjs

2019-02-04 Thread Александр Гурьянов
subset of the wasm text > format, the s-expression part). > > Overall, binaryen focuses on the wasm binary format and optimizing and > analyzing it, while wabt focuses on reading and writing of the full wasm > standard, both binary and text. > > On Mon, Feb 4, 2019 at 9:31 AM

binaryen, wabt, webassemblyjs

2019-02-04 Thread Александр Гурьянов
Hi guys! I want to write some tool to analyze wasm files. My first target is to create tool like bloaty to analyze size of contribution of each function in resulting size. But bloatly is universal tool, I want to concentrate on wasm format and maybe create something like "code explorer" tool (like

Re: Debugging WASM with C++ source

2019-04-11 Thread Александр Гурьянов
the bigger missing pieces here. This >> will hopefully improve soon in toolchains and browsers, there is ongoing >> work on it. Meanwhile debugging a parallel native build is often best, as >> mentioned. >> >> On Thu, Apr 4, 2019 at 8:56 PM Александр Гурьянов wrote: >&g

emscripten + opengl on MacOs

2019-06-06 Thread Александр Гурьянов
Hi guys. I am not familar with MacOs, so maybe my question is really simple. I have a lot of projects based on OpenGL variations (GL1, ES, ES2). Emscripten have brilliant support for it. My main OS is linux that also provide fantastic capabilities to building OpenGL projects. Because of that

Re: Snapshotting runtime

2019-05-14 Thread Александр Гурьянов
Thanks for feedback. Now I am saving and restoring all wasm mutable globals. But seems it does not help, I still have unstable behaviour. I forgot to say that I use emterpeter too, can it produce additional problem for save/restore wasm state? вс, 12 мая 2019 г. в 22:31, Liam Wilson : > > A

Re: undefined symbol: PATH_FS after updating to latest incoming

2019-05-10 Thread Александр Гурьянов
ug > somehow. If you build with -s VERBOSE=1 it should print the decisions it > makes when adding symbols, and then it should say which ends up requiring > PATH_FS. Then hopefully we can figure it out from there. (Or, if you can > provide a testcase I can look at that directly.) > &g

Snapshotting runtime

2019-05-10 Thread Александр Гурьянов
Hi is it possible to make snapshot of runtime, serelize it to file and then restore runtime on other client. I understand that snapshotting have a lot of pitfalls. But for now I want to implement simpliest case. My target is wasm, main loop is executed by requestAnimation frame. So stack always

undefined symbol: PATH_FS after updating to latest incoming

2019-05-07 Thread Александр Гурьянов
Hi guys! Just updated to latest incoming (39158e5e344460d5c0a5da8913f87e4cb0db6e4a) and now have this error that does not exists on previous version: error: undefined symbol: PATH_FS warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` Have no idea what is

Re: undefined symbol: PATH_FS after updating to latest incoming

2019-05-08 Thread Александр Гурьянов
Hmm, will try to bisect, my code definitely uses filesystem. ср, 8 мая 2019 г. в 21:19, Floh : > > I just checked with my code, and everything still works, *but* I'm using > NO_FILESYSTEM everywhere (there was a similar problem a few weeks ago too > though:

Re: USE_ASM flag and help compiling 3 year-old project

2019-07-04 Thread Александр Гурьянов
Hi. You can replace it with -s WASM=0. That means to produce asm.js as output, if you set -s WASM=1 then output will be wasm. пт, 5 июл. 2019 г. в 08:57, juef : > > Greetings, > > I am trying to compile an old project from GitHub which uses emscripten, and > the makefile calls emcc with a -s

Re: Snapshotting runtime

2019-06-27 Thread Александр Гурьянов
ring an async event though. >> > >> > To debug this kind of thing, the DETERMINISTIC option may be useful. It >> > makes all timing and random numbers deterministic, which for many programs >> > (without user input, and single-threaded) means it is determini

Memory is not large enough for static data

2019-07-02 Thread Александр Гурьянов
Hi. I am trying to set TOTAL_MEMORY to 32mb, but compiler told me: shared:ERROR: Memory is not large enough for static data (30099056) plus the stack (5242880), please increase TOTAL_MEMORY (33554432) to at least 35342960 Is there any way to find what and where this data located? Thanks --

Oz and symbols

2019-07-30 Thread Александр Гурьянов
HI. I used wasm-opt manually to optimize wasm binary. On last step I used Oz to finalize optimizations. My problem is that after Oz function indexes is changed and I can't get symbols map to restore function names. How I can map new function indexes to old one (from symbols file). In other words:

Re: -s ASYNCIFY, dosbox

2019-07-22 Thread Александр Гурьянов
wdosbox.wasm.js - is wasm binary wdosbox.js.symbols - symbols вт, 23 июл. 2019 г. в 12:03, Александр Гурьянов : > > I am sorry guys, my estimation of sizes/preformance was wrong. > > Ubuntu 19.04 / Chrome 72.0.3626.121 > > O3: > DEFAULT 2.0Mb 60 FPS /

Re: -s ASYNCIFY, dosbox

2019-07-22 Thread Александр Гурьянов
ere пн, 22 июл. 2019 г. в 18:15, Александр Гурьянов : > > Even digger works very poor here http://js-dos.com/ (in chrome). I > just changed emscripten_sleep_with_yield with emscripten_sleep and > that's all. Don't know why Chrome goes crazy. > > пн, 22 июл. 2019 г. в 18:0

-s ASYNCIFY, dosbox

2019-07-18 Thread Александр Гурьянов
Hi. Trying to compile dosbox with new latest-upstream. It's compiles without error, but when I run it, I have this error missing function: emscripten_sleep_with_yield I just replaced all emterpreter related flags with -s ASYNCIFY -- You received this message because you are subscribed to the

Re: -s ASYNCIFY, dosbox

2019-07-18 Thread Александр Гурьянов
июл. 2019 г. в 14:47, Александр Гурьянов : > > Hi. Trying to compile dosbox with new latest-upstream. It's compiles > without error, but when I run it, I have this error > > missing function: emscripten_sleep_with_yield > > I just replaced all emterpreter related flags with &g

Re: -s ASYNCIFY, dosbox

2019-07-19 Thread Александр Гурьянов
h_yield). Module.setAsync is an internal API of old Asyncify - if you > have custom JS code using it, you need to update it to the new Asyncify's API > (see notes on handleSleep in the blogpost: > https://kripken.github.io/blog/wasm/2019/07/16/asyncify.html ). > > On Thu, Jul 18, 20

Re: -s ASYNCIFY, dosbox

2019-07-23 Thread Александр Гурьянов
Perhaps the main interpreter > loop? It's hard to see more optimization opportunities there. I think that > means we need a whitelist like in emterpreter. Btw, did you use the whitelist > or blacklist there - which would be better? > > - Alon > > > On Mon, Jul 22, 2019 at

  1   2   >