MCPcopy
hub / github.com/sql-js/sql.js / _applyAffinity

Function _applyAffinity

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

Source from the content-addressed store, hash-verified

202791 }
202792}
202793function _applyAffinity($0,$1,$2) {
202794 $0 = $0|0;
202795 $1 = $1|0;
202796 $2 = $2|0;
202797 var $$pre = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0;
202798 var $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0;
202799 var $or$cond = 0, label = 0, sp = 0;
202800 sp = STACKTOP;
202801 $3 = ($1<<24>>24)>(66);
202802 if (!($3)) {
202803 $32 = ($1<<24>>24)==(66);
202804 if (!($32)) {
202805 return;
202806 }
202807 $33 = ((($0)) + 8|0);
202808 $34 = HEAP16[$33>>1]|0;
202809 $35 = $34&65535;
202810 $36 = $35 & 2;
202811 $37 = ($36|0)!=(0);
202812 $38 = $35 & 12;
202813 $39 = ($38|0)==(0);
202814 $or$cond = $37 | $39;
202815 if ($or$cond) {
202816 $41 = $34;
202817 } else {
202818 (_sqlite3VdbeMemStringify($0,$2,1)|0);
202819 $$pre = HEAP16[$33>>1]|0;
202820 $41 = $$pre;
202821 }
202822 $40 = $41 & -13;
202823 HEAP16[$33>>1] = $40;
202824 return;
202825 }
202826 $4 = ((($0)) + 8|0);
202827 $5 = HEAP16[$4>>1]|0;
202828 $6 = $5&65535;
202829 $7 = $6 & 4;
202830 $8 = ($7|0)==(0);
202831 if (!($8)) {
202832 return;
202833 }
202834 $9 = $6 & 8;
202835 $10 = ($9|0)==(0);
202836 if ($10) {
202837 $11 = $6 & 2;
202838 $12 = ($11|0)==(0);
202839 if ($12) {
202840 return;
202841 }
202842 _applyNumericAffinity($0,1);
202843 return;
202844 } else {
202845 $13 = +HEAPF64[$0>>3];
202846 $14 = (_doubleToInt64($13)|0);
202847 $15 = tempRet0;
202848 $16 = (+($14>>>0)) + (4294967296.0*(+($15|0)));
202849 $17 = $13 == $16;
202850 $18 = (_i64Add(($14|0),($15|0),1,-2147483648)|0);

Callers 2

_sqlite3VdbeExecFunction · 0.85
_valueFromExprFunction · 0.85

Calls 4

_sqlite3VdbeMemStringifyFunction · 0.85
_applyNumericAffinityFunction · 0.85
_doubleToInt64Function · 0.85
_i64AddFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…