aboutsummaryrefslogtreecommitdiff
path: root/demos/python.js
diff options
context:
space:
mode:
Diffstat (limited to 'demos/python.js')
-rw-r--r--demos/python.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/demos/python.js b/demos/python.js
index 754cb511..85eff513 100644
--- a/demos/python.js
+++ b/demos/python.js
@@ -7,7 +7,9 @@ return!Runtime.g(c)&&c[0]=="%"},j:{i1:0,i8:0,i16:0,i32:0,i64:0},i:{"float":0,"do
e){c.c=0;var b=[],d=-1,f=-1;c.m=c.t.map(function(g){var h;if(Runtime.g(g)||Runtime.o(g)){h=Runtime.n(g,ca);f=Math.max(f,h)}else if(Runtime.p(g)){h=e[g].c;f=Math.max(f,4)}else{dprint("Unclear type in struct: "+g+", in "+c.u);ia(0)}g=Runtime.e(c.c,Math.min(4,h));c.c=g+h;d>=0&&b.push(g-d);return d=g});c.c=Runtime.e(c.c,f);if(b.length==0)c.f=c.c;else if(Runtime.l(b).length==1)c.f=b[0];c.v=c.f!=1;return c.m},r:0};var n=[],ja=[];
function ia(c,e){if(!c){e="Assertion failed: "+e;print(e+":\n"+Error().stack);ba("Assertion: "+e)}}var o=1,s=2;function u(c,e,b){e=e?e:0;ia(e===0);if(c===ka)return e;e=c.length;var d;for(d=0;d<e;d++)if(c[d]===undefined)ba("Invalid element in slab at "+Error().stack);b=[la,Runtime.q,Runtime.h][b?b:s](Math.max(e,1));for(d=0;d<e;d++){var f=c[d];if(typeof f==="function")f=Runtime.a(f);if(typeof f==="number"||typeof f==="boolean"){i[b+d]=f;j[b+d]=f}else ka[b+d]=f}return b}Module.Pointer_make=u;
function na(c){for(var e="",b=0,d;;){d=String.fromCharCode(i[c+b]);if(d=="\u0000")break;e+=d;b+=1}return e}var pa=4096,ka,i,j,qa,a,ra,ha,la,w,aaa=ea,sa=52428800;
-function baa(){Module._malloc=la=Module._malloc?Module._malloc:Runtime.h;Module._free=w=Module._free?Module._free:fa();ka=ta("(null)");if(aaa=this.Int32Array&&this.Float64Array){i=new Int32Array(sa);for(var c=0;c<ka.length;c++)i[c]=ka[c];ka=i;j=new Float64Array(sa)}else j=i=ka;Module.HEAP=ka;Module.IHEAP=i;Module.FHEAP=j;qa=a=Math.ceil(10/pa)*pa;this.TOTAL_STACK||(TOTAL_STACK=1048576);ra=qa+TOTAL_STACK;ha=Math.ceil(ra/pa)*pa}
+function baa(){Module._malloc=la=Module._malloc?Module._malloc:Runtime.h;Module._free=w=Module._free?Module._free:fa();ka=ta("(null)");if(aaa=this.Int32Array&&this.Float64Array){i=new Int32Array(sa);for(var c=0;c<ka.length;c++)i[c]=ka[c];ka=i;j=new Float64Array(sa)}else
+{j=i=ka; _llvm_memset_p0i8_i32(ka.length, 0, sa/32)} /* XXX manually added, hack to get Chrome to use HEAP as a flat array */
+;Module.HEAP=ka;Module.IHEAP=i;Module.FHEAP=j;qa=a=Math.ceil(10/pa)*pa;this.TOTAL_STACK||(TOTAL_STACK=1048576);ra=qa+TOTAL_STACK;ha=Math.ceil(ra/pa)*pa}
function caa(){for(;ja.length>0;){var c=ja.pop();if(typeof c==="number")c=n[c];c()}}
function ua(){function c(r){var q;if(e){q=(String.fromCharCode(r)in Runtime.d("f","e","g")?j:i)[d];d+=r==="l".charCodeAt(0)?8:4}else{q=f[d];d++}return q}var e=ea,b=arguments[0],d=1;if(b<0){e=ca;b=-b;slab=da;d=arguments[1]}else var f=arguments;for(var g=[],h=-1,k,l;h;){h=i[b];k=i[b+1];if(h=="%".charCodeAt(0)){var m=-1;if(k==".".charCodeAt(0)){b++;for(m=0;;){k=i[b+1];if(!(k>="0".charCodeAt(0)&&k<="9".charCodeAt(0)))break;m*=10;m+=k-"0".charCodeAt(0);b++}k=i[b+1]}if(k=="l".charCodeAt(0)){b++;k=i[b+1]}if(String.fromCharCode(k)in
Runtime.d("f","e","g"))k="f".charCodeAt(0);if(["d","i","u","p","f"].indexOf(String.fromCharCode(k))!=-1){var p;l=c(k);p=String(+l);p=k=="u".charCodeAt(0)?String(x(l,32)):k=="p".charCodeAt(0)?"0x"+l.toString(16):String(+l);if(m>=0){l=p.indexOf(".");if(l==-1&&k=="f".charCodeAt(0)){l=p.length;p+="."}p+="00000000000";p=p.substr(0,l+1+m)}p.split("").forEach(function(r){g.push(r.charCodeAt(0))})}else if(k=="s".charCodeAt(0))g=g.concat(va(c(k)));else if(k=="c".charCodeAt(0))g=g.concat(c(k));else g.push(k);