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

Function _properFunc

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

Source from the content-addressed store, hash-verified

8400 return;
8401}
8402function _properFunc($0,$1,$2) {
8403 $0 = $0|0;
8404 $1 = $1|0;
8405 $2 = $2|0;
8406 var $$024 = 0, $$024$in = 0, $$026$lcssa = 0, $$02628 = 0, $$029 = 0, $$1 = 0, $$125 = 0, $$pn = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0;
8407 var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
8408 sp = STACKTOP;
8409 $3 = ($1|0)==(1);
8410 if (!($3)) {
8411 ___assert_fail((16149|0),(16157|0),724,(16919|0));
8412 // unreachable;
8413 }
8414 $4 = HEAP32[$2>>2]|0;
8415 $5 = (_sqlite3_value_type($4)|0);
8416 $6 = ($5|0)==(5);
8417 if ($6) {
8418 _sqlite3_result_null($0);
8419 return;
8420 }
8421 $7 = HEAP32[$2>>2]|0;
8422 $8 = (_sqlite3_value_text($7)|0);
8423 $9 = (_strlen($8)|0);
8424 $10 = (($9) + 1)|0;
8425 $11 = (_sqlite3_malloc($10)|0);
8426 $12 = (_strcpy($11,$8)|0);
8427 $13 = ($12|0)==(0|0);
8428 if ($13) {
8429 _sqlite3_result_error_nomem($0);
8430 return;
8431 }
8432 $14 = HEAP8[$8>>0]|0;
8433 $15 = ($14<<24>>24)==(0);
8434 if ($15) {
8435 $$026$lcssa = $11;
8436 } else {
8437 $16 = $14 << 24 >> 24;
8438 $$02628 = $11;$$029 = 1;$$pn = $8;$18 = $16;$28 = $14;
8439 while(1) {
8440 $17 = ((($$pn)) + 1|0);
8441 $19 = (_isblank($18)|0);
8442 $20 = ($19|0)==(0);
8443 if ($20) {
8444 $21 = ($$029|0)==(1);
8445 if ($21) {
8446 $22 = (_toupper($18)|0);
8447 $$024$in = $22;
8448 } else {
8449 $23 = (_tolower($18)|0);
8450 $$024$in = $23;
8451 }
8452 $$024 = $$024$in&255;
8453 $$1 = 0;$$125 = $$024;
8454 } else {
8455 $$1 = 1;$$125 = $28;
8456 }
8457 $24 = ((($$02628)) + 1|0);
8458 HEAP8[$$02628>>0] = $$125;
8459 $25 = HEAP8[$17>>0]|0;

Callers

nothing calls this directly

Calls 13

_sqlite3_value_typeFunction · 0.85
_sqlite3_result_nullFunction · 0.85
_sqlite3_value_textFunction · 0.85
_strlenFunction · 0.85
_sqlite3_mallocFunction · 0.85
_strcpyFunction · 0.85
_isblankFunction · 0.85
_toupperFunction · 0.85
_tolowerFunction · 0.85
_sqlite3_result_textFunction · 0.85
_sqlite3_freeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…