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

Function _powerFunc

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

Source from the content-addressed store, hash-verified

7131 }
7132}
7133function _powerFunc($0,$1,$2) {
7134 $0 = $0|0;
7135 $1 = $1|0;
7136 $2 = $2|0;
7137 var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
7138 var $8 = 0, $9 = 0, label = 0, sp = 0;
7139 sp = STACKTOP;
7140 $3 = ($1|0)==(2);
7141 if (!($3)) {
7142 ___assert_fail((16208|0),(16157|0),546,(16777|0));
7143 // unreachable;
7144 }
7145 $4 = HEAP32[$2>>2]|0;
7146 $5 = (_sqlite3_value_type($4)|0);
7147 $6 = ($5|0)==(5);
7148 if (!($6)) {
7149 $7 = ((($2)) + 4|0);
7150 $8 = HEAP32[$7>>2]|0;
7151 $9 = (_sqlite3_value_type($8)|0);
7152 $10 = ($9|0)==(5);
7153 if (!($10)) {
7154 $11 = HEAP32[$2>>2]|0;
7155 $12 = (+_sqlite3_value_double($11));
7156 $13 = HEAP32[$7>>2]|0;
7157 $14 = (+_sqlite3_value_double($13));
7158 $15 = (___errno_location()|0);
7159 HEAP32[$15>>2] = 0;
7160 $16 = (___errno_location()|0);
7161 $17 = HEAP32[$16>>2]|0;
7162 $18 = ($17|0)==(0);
7163 if ($18) {
7164 $19 = (+Math_pow((+$12),(+$14)));
7165 _sqlite3_result_double($0,$19);
7166 return;
7167 } else {
7168 $20 = (___errno_location()|0);
7169 $21 = HEAP32[$20>>2]|0;
7170 $22 = (_strerror($21)|0);
7171 $23 = (___errno_location()|0);
7172 $24 = HEAP32[$23>>2]|0;
7173 _sqlite3_result_error($0,$22,$24);
7174 return;
7175 }
7176 }
7177 }
7178 _sqlite3_result_null($0);
7179 return;
7180}
7181function _signFunc($0,$1,$2) {
7182 $0 = $0|0;
7183 $1 = $1|0;

Callers

nothing calls this directly

Calls 8

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