MCPcopy Index your code
hub / github.com/sql-js/sql.js / _signFunc

Function _signFunc

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

Source from the content-addressed store, hash-verified

7179 return;
7180}
7181function _signFunc($0,$1,$2) {
7182 $0 = $0|0;
7183 $1 = $1|0;
7184 $2 = $2|0;
7185 var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0.0, $3 = 0, $4 = 0, $5 = 0;
7186 var $6 = 0, $7 = 0, $8 = 0, $9 = 0, $phitmp15 = 0.0, label = 0, sp = 0;
7187 sp = STACKTOP;
7188 $3 = ($1|0)==(1);
7189 if (!($3)) {
7190 ___assert_fail((16149|0),(16157|0),590,(16787|0));
7191 // unreachable;
7192 }
7193 $4 = HEAP32[$2>>2]|0;
7194 $5 = (_sqlite3_value_type($4)|0);
7195 switch ($5|0) {
7196 case 1: {
7197 $6 = HEAP32[$2>>2]|0;
7198 $7 = (_sqlite3_value_int64($6)|0);
7199 $8 = tempRet0;
7200 $9 = ($8|0)>(0);
7201 $10 = ($7>>>0)>(0);
7202 $11 = ($8|0)==(0);
7203 $12 = $11 & $10;
7204 $13 = $9 | $12;
7205 $14 = ($7|0)!=(0);
7206 $15 = ($8|0)!=(0);
7207 $16 = $14 | $15;
7208 $17 = $16 << 31 >> 31;
7209 $18 = ($17|0)<(0);
7210 $19 = $18 << 31 >> 31;
7211 $20 = $13 ? 1 : $17;
7212 $21 = $13 ? 0 : $19;
7213 _sqlite3_result_int64($0,$20,$21);
7214 return;
7215 break;
7216 }
7217 case 5: {
7218 _sqlite3_result_null($0);
7219 return;
7220 break;
7221 }
7222 default: {
7223 $22 = HEAP32[$2>>2]|0;
7224 $23 = (+_sqlite3_value_double($22));
7225 $24 = $23 > 0.0;
7226 $25 = $23 < 0.0;
7227 $phitmp15 = (+($25<<31>>31));
7228 $26 = $24 ? 1.0 : $phitmp15;
7229 _sqlite3_result_double($0,$26);
7230 return;
7231 }
7232 }
7233}
7234function _sqrtFunc($0,$1,$2) {
7235 $0 = $0|0;
7236 $1 = $1|0;

Callers

nothing calls this directly

Calls 7

_sqlite3_value_typeFunction · 0.85
_sqlite3_value_int64Function · 0.85
_sqlite3_result_int64Function · 0.85
_sqlite3_result_nullFunction · 0.85
_sqlite3_value_doubleFunction · 0.85
_sqlite3_result_doubleFunction · 0.85
___assert_failFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…