MCPcopy Create free account
hub / github.com/sql-js/sql.js / _fts3StrHash

Function _fts3StrHash

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

Source from the content-addressed store, hash-verified

329376 return 0;
329377}
329378function _fts3StrHash($0,$1) {
329379 $0 = $0|0;
329380 $1 = $1|0;
329381 var $$0$lcssa = 0, $$01013 = 0, $$01112 = 0, $$014 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp = 0, label = 0, sp = 0;
329382 sp = STACKTOP;
329383 $2 = ($1|0)<(1);
329384 if ($2) {
329385 $3 = (_strlen($0)|0);
329386 $4 = ($3|0)>(0);
329387 if ($4) {
329388 $$01013 = $0;$$01112 = $3;$$014 = 0;
329389 } else {
329390 $$0$lcssa = 0;
329391 return ($$0$lcssa|0);
329392 }
329393 } else {
329394 $$01013 = $0;$$01112 = $1;$$014 = 0;
329395 }
329396 while(1) {
329397 $5 = $$014 << 3;
329398 $6 = $5 ^ $$014;
329399 $7 = ((($$01013)) + 1|0);
329400 $8 = HEAP8[$$01013>>0]|0;
329401 $9 = $8 << 24 >> 24;
329402 $10 = $6 ^ $9;
329403 $11 = (($$01112) + -1)|0;
329404 $12 = ($$01112|0)>(1);
329405 if ($12) {
329406 $$01013 = $7;$$01112 = $11;$$014 = $10;
329407 } else {
329408 break;
329409 }
329410 }
329411 $phitmp = $10 & 2147483647;
329412 $$0$lcssa = $phitmp;
329413 return ($$0$lcssa|0);
329414}
329415function _fts3BinHash($0,$1) {
329416 $0 = $0|0;
329417 $1 = $1|0;

Callers

nothing calls this directly

Calls 1

_strlenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…