MCPcopy
hub / github.com/sql-js/sql.js / _calloc

Function _calloc

js/sql-debug.js:392990–393025  ·  view source on GitHub ↗
($0,$1)

Source from the content-addressed store, hash-verified

392988 return;
392989}
392990function _calloc($0,$1) {
392991 $0 = $0|0;
392992 $1 = $1|0;
392993 var $$ = 0, $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
392994 sp = STACKTOP;
392995 $2 = ($0|0)==(0);
392996 if ($2) {
392997 $$0 = 0;
392998 } else {
392999 $3 = Math_imul($1, $0)|0;
393000 $4 = $1 | $0;
393001 $5 = ($4>>>0)>(65535);
393002 if ($5) {
393003 $6 = (($3>>>0) / ($0>>>0))&-1;
393004 $7 = ($6|0)==($1|0);
393005 $$ = $7 ? $3 : -1;
393006 $$0 = $$;
393007 } else {
393008 $$0 = $3;
393009 }
393010 }
393011 $8 = (_malloc($$0)|0);
393012 $9 = ($8|0)==(0|0);
393013 if ($9) {
393014 return ($8|0);
393015 }
393016 $10 = ((($8)) + -4|0);
393017 $11 = HEAP32[$10>>2]|0;
393018 $12 = $11 & 3;
393019 $13 = ($12|0)==(0);
393020 if ($13) {
393021 return ($8|0);
393022 }
393023 _memset(($8|0),0,($$0|0))|0;
393024 return ($8|0);
393025}
393026function _realloc($0,$1) {
393027 $0 = $0|0;
393028 $1 = $1|0;

Callers 1

_modeStepFunction · 0.85

Calls 2

_mallocFunction · 0.85
_memsetFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…