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

Function ___strdup

js/sql-debug.js:397001–397016  ·  view source on GitHub ↗
($0)

Source from the content-addressed store, hash-verified

396999 STACKTOP = sp;return ($$07|0);
397000}
397001function ___strdup($0) {
397002 $0 = $0|0;
397003 var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0;
397004 sp = STACKTOP;
397005 $1 = (_strlen($0)|0);
397006 $2 = (($1) + 1)|0;
397007 $3 = (_malloc($2)|0);
397008 $4 = ($3|0)==(0|0);
397009 if ($4) {
397010 $$0 = 0;
397011 } else {
397012 _memcpy(($3|0),($0|0),($2|0))|0;
397013 $$0 = $3;
397014 }
397015 return ($$0|0);
397016}
397017function _read($0,$1,$2) {
397018 $0 = $0|0;
397019 $1 = $1|0;

Callers 1

_getcwdFunction · 0.85

Calls 3

_strlenFunction · 0.85
_mallocFunction · 0.85
_memcpyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…