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

Function _log10Func

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

Source from the content-addressed store, hash-verified

7092 }
7093}
7094function _log10Func($0,$1,$2) {
7095 $0 = $0|0;
7096 $1 = $1|0;
7097 $2 = $2|0;
7098 var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $cond = 0, label = 0, sp = 0;
7099 sp = STACKTOP;
7100 $3 = ($1|0)==(1);
7101 if (!($3)) {
7102 ___assert_fail((16149|0),(16157|0),473,(16767|0));
7103 // unreachable;
7104 }
7105 $4 = HEAP32[$2>>2]|0;
7106 $5 = (_sqlite3_value_type($4)|0);
7107 $cond = ($5|0)==(5);
7108 if ($cond) {
7109 _sqlite3_result_null($0);
7110 return;
7111 }
7112 $6 = HEAP32[$2>>2]|0;
7113 $7 = (+_sqlite3_value_double($6));
7114 $8 = (___errno_location()|0);
7115 HEAP32[$8>>2] = 0;
7116 $9 = (___errno_location()|0);
7117 $10 = HEAP32[$9>>2]|0;
7118 $11 = ($10|0)==(0);
7119 if ($11) {
7120 $12 = (+_log10($7));
7121 _sqlite3_result_double($0,$12);
7122 return;
7123 } else {
7124 $13 = (___errno_location()|0);
7125 $14 = HEAP32[$13>>2]|0;
7126 $15 = (_strerror($14)|0);
7127 $16 = (___errno_location()|0);
7128 $17 = HEAP32[$16>>2]|0;
7129 _sqlite3_result_error($0,$15,$17);
7130 return;
7131 }
7132}
7133function _powerFunc($0,$1,$2) {
7134 $0 = $0|0;
7135 $1 = $1|0;

Callers

nothing calls this directly

Calls 9

_sqlite3_value_typeFunction · 0.85
_sqlite3_result_nullFunction · 0.85
_sqlite3_value_doubleFunction · 0.85
___errno_locationFunction · 0.85
_log10Function · 0.85
_sqlite3_result_doubleFunction · 0.85
_strerrorFunction · 0.85
_sqlite3_result_errorFunction · 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…