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

Function _sqlite3OpenTempDatabase

js/sql-debug.js:219323–219375  ·  view source on GitHub ↗
($0)

Source from the content-addressed store, hash-verified

219321 return ($62|0);
219322}
219323function _sqlite3OpenTempDatabase($0) {
219324 $0 = $0|0;
219325 var $$1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0;
219326 var $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0;
219327 sp = STACKTOP;
219328 STACKTOP = STACKTOP + 16|0;
219329 $vararg_buffer = sp;
219330 $1 = sp + 4|0;
219331 $2 = HEAP32[$0>>2]|0;
219332 $3 = ((($2)) + 16|0);
219333 $4 = HEAP32[$3>>2]|0;
219334 $5 = ((($4)) + 20|0);
219335 $6 = HEAP32[$5>>2]|0;
219336 $7 = ($6|0)==(0|0);
219337 if (!($7)) {
219338 $$1 = 0;
219339 STACKTOP = sp;return ($$1|0);
219340 }
219341 $8 = ((($0)) + 399|0);
219342 $9 = HEAP8[$8>>0]|0;
219343 $10 = ($9<<24>>24)==(0);
219344 if (!($10)) {
219345 $$1 = 0;
219346 STACKTOP = sp;return ($$1|0);
219347 }
219348 $11 = HEAP32[$2>>2]|0;
219349 $12 = (_sqlite3BtreeOpen($11,0,$2,$1,0,542)|0);
219350 $13 = ($12|0)==(0);
219351 if (!($13)) {
219352 _sqlite3ErrorMsg($0,21111,$vararg_buffer);
219353 $14 = ((($0)) + 12|0);
219354 HEAP32[$14>>2] = $12;
219355 $$1 = 1;
219356 STACKTOP = sp;return ($$1|0);
219357 }
219358 $15 = HEAP32[$1>>2]|0;
219359 $16 = HEAP32[$3>>2]|0;
219360 $17 = ((($16)) + 20|0);
219361 HEAP32[$17>>2] = $15;
219362 $18 = ((($2)) + 84|0);
219363 $19 = HEAP32[$18>>2]|0;
219364 $20 = (_sqlite3BtreeSetPageSize($15,$19,-1,0)|0);
219365 $21 = ($20|0)==(7);
219366 if ($21) {
219367 _sqlite3OomFault($2);
219368 $$1 = 1;
219369 STACKTOP = sp;return ($$1|0);
219370 } else {
219371 $$1 = 0;
219372 STACKTOP = sp;return ($$1|0);
219373 }
219374 return (0)|0;
219375}
219376function _sqlite3BtreeSetPageSize($0,$1,$2,$3) {
219377 $0 = $0|0;
219378 $1 = $1|0;

Callers 2

_reindexTableFunction · 0.85
_sqlite3CodeVerifySchemaFunction · 0.85

Calls 4

_sqlite3BtreeOpenFunction · 0.85
_sqlite3ErrorMsgFunction · 0.85
_sqlite3BtreeSetPageSizeFunction · 0.85
_sqlite3OomFaultFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…