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

Function _cosFunc

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

Source from the content-addressed store, hash-verified

6700 }
6701}
6702function _cosFunc($0,$1,$2) {
6703 $0 = $0|0;
6704 $1 = $1|0;
6705 $2 = $2|0;
6706 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;
6707 sp = STACKTOP;
6708 $3 = ($1|0)==(1);
6709 if (!($3)) {
6710 ___assert_fail((16149|0),(16157|0),420,(16683|0));
6711 // unreachable;
6712 }
6713 $4 = HEAP32[$2>>2]|0;
6714 $5 = (_sqlite3_value_type($4)|0);
6715 $cond = ($5|0)==(5);
6716 if ($cond) {
6717 _sqlite3_result_null($0);
6718 return;
6719 }
6720 $6 = HEAP32[$2>>2]|0;
6721 $7 = (+_sqlite3_value_double($6));
6722 $8 = (___errno_location()|0);
6723 HEAP32[$8>>2] = 0;
6724 $9 = (___errno_location()|0);
6725 $10 = HEAP32[$9>>2]|0;
6726 $11 = ($10|0)==(0);
6727 if ($11) {
6728 $12 = (+Math_cos((+$7)));
6729 _sqlite3_result_double($0,$12);
6730 return;
6731 } else {
6732 $13 = (___errno_location()|0);
6733 $14 = HEAP32[$13>>2]|0;
6734 $15 = (_strerror($14)|0);
6735 $16 = (___errno_location()|0);
6736 $17 = HEAP32[$16>>2]|0;
6737 _sqlite3_result_error($0,$15,$17);
6738 return;
6739 }
6740}
6741function _sinFunc($0,$1,$2) {
6742 $0 = $0|0;
6743 $1 = $1|0;

Callers

nothing calls this directly

Calls 8

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