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

Function _sqlite3BtreeSetPageSize

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

Source from the content-addressed store, hash-verified

219374 return (0)|0;
219375}
219376function _sqlite3BtreeSetPageSize($0,$1,$2,$3) {
219377 $0 = $0|0;
219378 $1 = $1|0;
219379 $2 = $2|0;
219380 $3 = $3|0;
219381 var $$0 = 0, $$026 = 0, $$off = 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, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0;
219382 var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0;
219383 sp = STACKTOP;
219384 $4 = ((($0)) + 4|0);
219385 $5 = HEAP32[$4>>2]|0;
219386 $6 = HEAP32[$0>>2]|0;
219387 $7 = ((($5)) + 4|0);
219388 HEAP32[$7>>2] = $6;
219389 $8 = ((($5)) + 22|0);
219390 $9 = HEAP16[$8>>1]|0;
219391 $10 = $9 & 2;
219392 $11 = ($10<<16>>16)==(0);
219393 if (!($11)) {
219394 $$0 = 8;
219395 return ($$0|0);
219396 }
219397 $12 = ($2|0)<(0);
219398 if ($12) {
219399 $13 = ((($5)) + 32|0);
219400 $14 = HEAP32[$13>>2]|0;
219401 $15 = ((($5)) + 36|0);
219402 $16 = HEAP32[$15>>2]|0;
219403 $17 = (($14) - ($16))|0;
219404 $$026 = $17;
219405 } else {
219406 $$026 = $2;
219407 }
219408 $$off = (($1) + -512)|0;
219409 $18 = ($$off>>>0)<(65025);
219410 if ($18) {
219411 $19 = (($1) + -1)|0;
219412 $20 = $19 & $1;
219413 $21 = ($20|0)==(0);
219414 if ($21) {
219415 $22 = ((($5)) + 32|0);
219416 HEAP32[$22>>2] = $1;
219417 _freeTempSpace($5);
219418 }
219419 }
219420 $23 = HEAP32[$5>>2]|0;
219421 $24 = ((($5)) + 32|0);
219422 $25 = (_sqlite3PagerSetPagesize($23,$24,$$026)|0);
219423 $26 = HEAP32[$24>>2]|0;
219424 $27 = $$026 & 65535;
219425 $28 = (($26) - ($27))|0;
219426 $29 = ((($5)) + 36|0);
219427 HEAP32[$29>>2] = $28;
219428 $30 = ($3|0)==(0);
219429 if ($30) {
219430 $$0 = $25;
219431 return ($$0|0);
219432 }
219433 $31 = HEAP16[$8>>1]|0;

Callers 1

_sqlite3OpenTempDatabaseFunction · 0.85

Calls 2

_freeTempSpaceFunction · 0.85
_sqlite3PagerSetPagesizeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…