0
Upcoming SlideShare
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Standard text messaging rates apply

asm.js

659

Published on

asm.js에 대한 내용

asm.js에 대한 내용

Published in: Technology, News & Politics
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
659
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
6
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript

• 1. asm.js&#xC804;&#xC6A9;&#xC6B0;
• 2. asm.js&#xB780;?&#x2022; &#xC131;&#xB2A5;&#xC744; &#xB192;&#xC77C; &#xC218; &#xC788;&#xB294; &#xC790;&#xBC14;&#xC2A4;&#xD06C;&#xB9BD;&#xD2B8; &#xC11C;&#xBE0C;&#xC14B;JavaScriptasm.jsTypeScriptsupersetsubset
• 3. &#xC65C; asm.js&#xAC00; HOT&#xD55C;&#xAC00;?&#x2022; Mozilla&#xC640; Epic&#xC774; Unreal Engine3&#xC744; &#xD3EC;&#xD305;
• 4. Unreal Engine3&#xC758; &#xD3EC;&#xD305; processC++IR LinkJSWebGLEMScriptenLLVMClangasm.js
• 5. asm.js
• 6. function DiagModule(stdlib, foreign, heap) {"use asm";// Variable Declarationsvar sqrt = stdlib.Math.sqrt;// Function Declarationsfunction square(x) {x = +x;return +(x*x);}function diag(x, y) {x = +x; y = +y;return +sqrt(square(x) + square(y));}return { diag: diag };}Math WebGL heapvar diag = DiagModule({ Math: Math }).diag;alert(diag(10, 100));
• 7. asm.js&#xC758; &#xD2B9;&#xC9D5;&#x2022; &#xBAA8;&#xB4E0; &#xBE0C;&#xB77C;&#xC6B0;&#xC800;&#xC5D0;&#xC11C; &#xB3D9;&#xC791;&#x2022; &#xC81C;&#xD55C;&#xB41C; &#xD0C0;&#xC785;(&#xC22B;&#xC790;)&#xB9CC; &#xAC00;&#xB2A5; (&#xB9C1;&#xD06C;)&#x2022; &#xC9C1;&#xC811; heap&#xC744; &#xB9CC;&#xB4E4;&#xC5B4;&#xC11C; &#xBA54;&#xBAA8;&#xB9AC; &#xAD00;&#xB9AC; (&#xB9C1;&#xD06C;)
• 8. &#xC65C; &#xC131;&#xB2A5;&#xC774; &#xC88B;&#xC740;&#xAC00;?&#x2022; &#xACE0;&#xC815;&#xD0C0;&#xC785;&#x2013; e|0 (integer), +a(double)&#x2013; &#xC5D4;&#xC9C4;&#xC5D0;&#xC11C;&#xB294; &#x201C;use asm&#x201D;&#xC774;&#xB77C;&#xACE0; &#xB418;&#xC5B4; &#xC788;&#xC73C;&#xBA74;&#xD0C0;&#xC785;&#xC774; &#xC815;&#xC801;&#xC774;&#xB77C;&#xACE0; &#xD310;&#xB2E8;&#xD558;&#xC5EC; AOT&#xCEF4;&#xD30C;&#xC77C;(ahead-of-time compile)&#xD568;.&#x2022; &#xBA54;&#xBAA8;&#xB9AC;&#xB97C; &#xC9C1;&#xC811; &#xAD00;&#xB9AC;&#x2013; heap&#xC744; &#xAD6C;&#xD604;&#xD558;&#xC5EC; malloc&#xACFC; free&#xC640; &#xC720;&#xC0AC;&#xD558;&#xAC8C; &#xAD00;&#xB9AC;
• 9. &#xADF8;&#xB7FC;, &#xB9CC;&#xB4E4;&#xC5B4; &#xBCFC;&#xAE4C;&#xC694;?function asmTest(){"use asm";}
• 10. asm.js&#xB294; &#xC0AC;&#xB78C;&#xC774; &#xAC1C;&#xBC1C;&#xD558;&#xB294; &#xCF54;&#xB4DC;&#xAC00; &#xC544;&#xB2D8;
• 11. asm.js&#xB294; &#xC8FC;&#xB85C; &#xCEF4;&#xD30C;&#xC77C; &#xB41C; &#xCF54;&#xB4DC;emscriptenLLJSCoffeeScriptTypeScriptDartasm.jspyjamasGWTScript#
• 12. &#xD55C;&#xACC4;&#x2022; &#xC5EC;&#xC804;&#xD788; &#xB290;&#xB9B0; &#xC131;&#xB2A5;&#x2022; &#xC6F9; &#xAC1C;&#xBC1C;&#xD558;&#xACE0;&#xB294; &#xAC70;&#xC758; &#xC0C1;&#xAD00;&#xC5C6;&#xC74C;&#x2022; &#xAD49;&#xC7A5;&#xD788; static&#xD568;&#x2022; &#xAC1C;&#xBC1C;&#xACFC; &#xB514;&#xBC84;&#xAE45; &#xC5B8;&#xC5B4;&#xAC00; &#xB2E4;&#xB984;&#x2022; &#xACB0;&#xACFC;&#xAC00; JS&#xC77C;&#xBFD0; &#xBC14;&#xC774;&#xD2B8; &#xCF54;&#xB4DC;&#xC5D0; &#xAC00;&#xAE5D;&#xB2E4;&#x2022; &#xCC28;&#xB77C;&#xB9AC; JS&#xAC1C;&#xBC1C;&#xC758; &#xC131;&#xB2A5;&#xC744; &#xC62C;&#xB9AC;&#xB294; &#xAC8C; &#xC88B;&#xB2E4;
• 13. &#xCC28;&#xC138;&#xB300; &#xC6F9; &#xAC8C;&#xC784;&#xC758; &#xAC00;&#xB2A5;&#xC131;&#xC744; &#xBCF4;&#xC5EC;&#xC90C;
• 14. &#xAC10;&#xC0AC;&#xD569;&#xB2C8;&#xB2E4;
• 15. Resource&#x2022; http://ejohn.org/blog/asmjs-javascript-compile-target/&#x2022; http://kripken.github.io/mloc_emscripten_talk&#x2022; http://gigazine.net/news/20130322-firefox-asmjs/&#x2022; https://blog.mozilla.org/luke/2013/03/21/asm-js-in-firefox-nightly/&#x2022; http://kripken.github.io/ammo.js/examples/new/ammo.html&#x2022; http://jlongster.com/Compiling-LLJS-to-asm.js,-Now-Available-&#x2022; http://blog.izs.me/post/10213512387/javascript-is-not-web-assembly&#x2022; https://github.com/tonyg/js-nacl#readme&#x2022; http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html&#x2022; https://news.ycombinator.com/item?id=5456506&#x2022; https://news.ycombinator.com/item?id=5455045&#x2022; https://twitter.com/mraleph/status/317230108849098752&#x2022; http://mbebenita.github.io/LLJS/&#x2022; https://news.ycombinator.com/item?id=5486605&#x2022; https://blog.mozilla.org/javascript/2013/04/05/the-baseline-compiler-has-landed/&#x2022; http://kripken.github.io/mloc_emscripten_talk/gindex.html&#x2022; http://engineering.imvu.com/2013/04/05/multiplatform-c-on-the-web-with-emscripten/&#x2022; http://blog.brackets.io/2013/04/05/typeaware-javascript-code-intelligence/