diff options
author | 2021-09-08 21:12:23 +0100 | |
---|---|---|
committer | 2021-09-08 21:12:23 +0100 | |
commit | 71a4f8667c63c2ffbe58eee7b5e963d3e09a42de (patch) | |
tree | d78cb33084b46cc0490b81a6422eee5207f608cc /vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go | |
parent | rework media processing a little bit (#191) (diff) | |
download | gotosocial-71a4f8667c63c2ffbe58eee7b5e963d3e09a42de.tar.xz |
update sqlite library -> v1.13.0
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
Diffstat (limited to 'vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go')
-rw-r--r-- | vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go | 6476 |
1 files changed, 3238 insertions, 3238 deletions
diff --git a/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go b/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go index 0216835c6..10c8cbd94 100644 --- a/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go +++ b/vendor/modernc.org/sqlite/lib/sqlite_windows_amd64.go @@ -29678,13 +29678,13 @@ var aMx = [6]U16{U16(12), U16(14), U16(24), U16(31), U16(59), U16(9999)} /* sqli // // A missing specifier is not considered an error. func parseTimezone(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22336:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var sgn int32 - // var nHr int32 at bp+24, 4 + // var nHr int32 at bp+16, 4 - // var nMn int32 at bp+28, 4 + // var nMn int32 at bp+20, 4 var c int32 sgn = 0 @@ -29725,14 +29725,14 @@ __6: __4: ; zDate++ - if !(getDigits(tls, zDate, ts+325 /* "20b:20e" */, libc.VaList(bp, bp+24 /* &nHr */, bp+28 /* &nMn */)) != 2) { + if !(getDigits(tls, zDate, ts+325 /* "20b:20e" */, libc.VaList(bp, bp+16 /* &nHr */, bp+20 /* &nMn */)) != 2) { goto __9 } return 1 __9: ; zDate += uintptr(5) - (*DateTime)(unsafe.Pointer(p)).Ftz = (sgn * (*(*int32)(unsafe.Pointer(bp + 28 /* nMn */)) + (*(*int32)(unsafe.Pointer(bp + 24 /* nHr */)) * 60))) + (*DateTime)(unsafe.Pointer(p)).Ftz = (sgn * (*(*int32)(unsafe.Pointer(bp + 20 /* nMn */)) + (*(*int32)(unsafe.Pointer(bp + 16 /* nHr */)) * 60))) zulu_time: __10: if !((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zDate)))]) & 0x01) != 0) { @@ -29752,23 +29752,23 @@ __11: // // Return 1 if there is a parsing error and 0 on success. func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22372:12: */ - bp := tls.Alloc(52) - defer tls.Free(52) + bp := tls.Alloc(36) + defer tls.Free(36) - // var h int32 at bp+40, 4 + // var h int32 at bp+24, 4 - // var m int32 at bp+44, 4 + // var m int32 at bp+28, 4 - // var s int32 at bp+48, 4 + // var s int32 at bp+32, 4 var ms float64 = 0.0 - if getDigits(tls, zDate, ts+333 /* "20c:20e" */, libc.VaList(bp, bp+40 /* &h */, bp+44 /* &m */)) != 2 { + if getDigits(tls, zDate, ts+333 /* "20c:20e" */, libc.VaList(bp, bp+24 /* &h */, bp+28 /* &m */)) != 2 { return 1 } zDate += uintptr(5) if int32(*(*int8)(unsafe.Pointer(zDate))) == ':' { zDate++ - if getDigits(tls, zDate, ts+341 /* "20e" */, libc.VaList(bp+24, bp+48 /* &s */)) != 1 { + if getDigits(tls, zDate, ts+341 /* "20e" */, libc.VaList(bp+16, bp+32 /* &s */)) != 1 { return 1 } zDate += uintptr(2) @@ -29783,14 +29783,14 @@ func parseHhMmSs(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:2 ms = ms / (rScale) } } else { - *(*int32)(unsafe.Pointer(bp + 48 /* s */)) = 0 + *(*int32)(unsafe.Pointer(bp + 32 /* s */)) = 0 } (*DateTime)(unsafe.Pointer(p)).FvalidJD = int8(0) (*DateTime)(unsafe.Pointer(p)).FrawS = int8(0) (*DateTime)(unsafe.Pointer(p)).FvalidHMS = int8(1) - (*DateTime)(unsafe.Pointer(p)).Fh = *(*int32)(unsafe.Pointer(bp + 40 /* h */)) - (*DateTime)(unsafe.Pointer(p)).Fm = *(*int32)(unsafe.Pointer(bp + 44 /* m */)) - (*DateTime)(unsafe.Pointer(p)).Fs = (float64(*(*int32)(unsafe.Pointer(bp + 48 /* s */))) + ms) + (*DateTime)(unsafe.Pointer(p)).Fh = *(*int32)(unsafe.Pointer(bp + 24 /* h */)) + (*DateTime)(unsafe.Pointer(p)).Fm = *(*int32)(unsafe.Pointer(bp + 28 /* m */)) + (*DateTime)(unsafe.Pointer(p)).Fs = (float64(*(*int32)(unsafe.Pointer(bp + 32 /* s */))) + ms) if parseTimezone(tls, zDate, p) != 0 { return 1 } @@ -29870,14 +29870,14 @@ func computeJD(tls *libc.TLS, p uintptr) { /* sqlite3.c:22423:13: */ // on success and 1 if the input string is not a well-formed // date. func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c:22473:12: */ - bp := tls.Alloc(44) - defer tls.Free(44) + bp := tls.Alloc(36) + defer tls.Free(36) - // var Y int32 at bp+32, 4 + // var Y int32 at bp+24, 4 - // var M int32 at bp+36, 4 + // var M int32 at bp+28, 4 - // var D int32 at bp+40, 4 + // var D int32 at bp+32, 4 var neg int32 @@ -29887,7 +29887,7 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c } else { neg = 0 } - if getDigits(tls, zDate, ts+345 /* "40f-21a-21d" */, libc.VaList(bp, bp+32 /* &Y */, bp+36 /* &M */, bp+40 /* &D */)) != 3 { + if getDigits(tls, zDate, ts+345 /* "40f-21a-21d" */, libc.VaList(bp, bp+24 /* &Y */, bp+28 /* &M */, bp+32 /* &D */)) != 3 { return 1 } zDate += uintptr(10) @@ -29905,12 +29905,12 @@ func parseYyyyMmDd(tls *libc.TLS, zDate uintptr, p uintptr) int32 { /* sqlite3.c (*DateTime)(unsafe.Pointer(p)).FvalidYMD = int8(1) (*DateTime)(unsafe.Pointer(p)).FY = func() int32 { if neg != 0 { - return -*(*int32)(unsafe.Pointer(bp + 32 /* Y */)) + return -*(*int32)(unsafe.Pointer(bp + 24 /* Y */)) } - return *(*int32)(unsafe.Pointer(bp + 32 /* Y */)) + return *(*int32)(unsafe.Pointer(bp + 24 /* Y */)) }() - (*DateTime)(unsafe.Pointer(p)).FM = *(*int32)(unsafe.Pointer(bp + 36 /* M */)) - (*DateTime)(unsafe.Pointer(p)).FD = *(*int32)(unsafe.Pointer(bp + 40 /* D */)) + (*DateTime)(unsafe.Pointer(p)).FM = *(*int32)(unsafe.Pointer(bp + 28 /* M */)) + (*DateTime)(unsafe.Pointer(p)).FD = *(*int32)(unsafe.Pointer(bp + 32 /* D */)) if (*DateTime)(unsafe.Pointer(p)).FvalidTZ != 0 { computeJD(tls, p) } @@ -30535,18 +30535,18 @@ func juliandayFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { / // // Return YYYY-MM-DD HH:MM:SS func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23106:13: */ - bp := tls.Alloc(204) - defer tls.Free(204) + bp := tls.Alloc(196) + defer tls.Free(196) - // var x DateTime at bp+56, 48 + // var x DateTime at bp+48, 48 - if isDate(tls, context, argc, argv, bp+56 /* &x */) == 0 { - // var zBuf [100]int8 at bp+104, 100 + if isDate(tls, context, argc, argv, bp+48 /* &x */) == 0 { + // var zBuf [100]int8 at bp+96, 100 - computeYMD_HMS(tls, bp+56 /* &x */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+104 /* &zBuf[0] */, ts+461, /* "%04d-%02d-%02d %..." */ - libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+56 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+56 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+56 /* &x */)).FD, (*DateTime)(unsafe.Pointer(bp+56 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+56 /* &x */)).Fm, int32((*DateTime)(unsafe.Pointer(bp+56 /* &x */)).Fs))) - Xsqlite3_result_text(tls, context, bp+104 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + computeYMD_HMS(tls, bp+48 /* &x */) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+96 /* &zBuf[0] */, ts+461, /* "%04d-%02d-%02d %..." */ + libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).FD, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fm, int32((*DateTime)(unsafe.Pointer(bp+48 /* &x */)).Fs))) + Xsqlite3_result_text(tls, context, bp+96 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } } @@ -30554,17 +30554,17 @@ func datetimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* // // Return HH:MM:SS func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23126:13: */ - bp := tls.Alloc(180) - defer tls.Free(180) + bp := tls.Alloc(172) + defer tls.Free(172) - // var x DateTime at bp+32, 48 + // var x DateTime at bp+24, 48 - if isDate(tls, context, argc, argv, bp+32 /* &x */) == 0 { - // var zBuf [100]int8 at bp+80, 100 + if isDate(tls, context, argc, argv, bp+24 /* &x */) == 0 { + // var zBuf [100]int8 at bp+72, 100 - computeHMS(tls, bp+32 /* &x */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+80 /* &zBuf[0] */, ts+491 /* "%02d:%02d:%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+32 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+32 /* &x */)).Fm, int32((*DateTime)(unsafe.Pointer(bp+32 /* &x */)).Fs))) - Xsqlite3_result_text(tls, context, bp+80 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + computeHMS(tls, bp+24 /* &x */) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+491 /* "%02d:%02d:%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fh, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fm, int32((*DateTime)(unsafe.Pointer(bp+24 /* &x */)).Fs))) + Xsqlite3_result_text(tls, context, bp+72 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } } @@ -30572,17 +30572,17 @@ func timeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // // Return YYYY-MM-DD func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23145:13: */ - bp := tls.Alloc(180) - defer tls.Free(180) + bp := tls.Alloc(172) + defer tls.Free(172) - // var x DateTime at bp+32, 48 + // var x DateTime at bp+24, 48 - if isDate(tls, context, argc, argv, bp+32 /* &x */) == 0 { - // var zBuf [100]int8 at bp+80, 100 + if isDate(tls, context, argc, argv, bp+24 /* &x */) == 0 { + // var zBuf [100]int8 at bp+72, 100 - computeYMD(tls, bp+32 /* &x */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+80 /* &zBuf[0] */, ts+506 /* "%04d-%02d-%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+32 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+32 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+32 /* &x */)).FD)) - Xsqlite3_result_text(tls, context, bp+80 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + computeYMD(tls, bp+24 /* &x */) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([100]int8{})), bp+72 /* &zBuf[0] */, ts+506 /* "%04d-%02d-%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FY, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FM, (*DateTime)(unsafe.Pointer(bp+24 /* &x */)).FD)) + Xsqlite3_result_text(tls, context, bp+72 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) } } @@ -30604,10 +30604,10 @@ func dateFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sql // %Y year 0000-9999 // %% % func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:23178:13: */ - bp := tls.Alloc(360) - defer tls.Free(360) + bp := tls.Alloc(280) + defer tls.Free(280) - // var x DateTime at bp+160, 48 + // var x DateTime at bp+80, 48 var n U64 var i Size_t @@ -30615,13 +30615,13 @@ func strftimeFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* var z uintptr var db uintptr var zFmt uintptr - // var zBuf [100]int8 at bp+208, 100 + // var zBuf [100]int8 at bp+128, 100 if argc == 0 { return } zFmt = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) - if (zFmt == uintptr(0)) || (isDate(tls, context, (argc-1), (argv+uintptr(1)*8), bp+160 /* &x */) != 0) { + if (zFmt == uintptr(0)) || (isDate(tls, context, (argc-1), (argv+uintptr(1)*8), bp+80 /* &x */) != 0) { return } db = Xsqlite3_context_db_handle(tls, context) @@ -30688,7 +30688,7 @@ __3: ; if n < U64(unsafe.Sizeof([100]int8{})) { - z = bp + 208 /* &zBuf[0] */ + z = bp + 128 /* &zBuf[0] */ } else if n > U64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */)))) { Xsqlite3_result_error_toobig(tls, context) return @@ -30699,8 +30699,8 @@ __3: return } } - computeJD(tls, bp+160 /* &x */) - computeYMD_HMS(tls, bp+160 /* &x */) + computeJD(tls, bp+80 /* &x */) + computeYMD_HMS(tls, bp+80 /* &x */) for i = libc.AssignUint64(&j, uint64(0)); *(*int8)(unsafe.Pointer(zFmt + uintptr(i))) != 0; i++ { if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) != '%' { *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = *(*int8)(unsafe.Pointer(zFmt + uintptr(i))) @@ -30708,24 +30708,24 @@ __3: i++ switch int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) { case 'd': - Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FD)) + Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FD)) j = j + (uint64(2)) break fallthrough case 'f': { - var s float64 = (*DateTime)(unsafe.Pointer(bp + 160 /* &x */)).Fs + var s float64 = (*DateTime)(unsafe.Pointer(bp + 80 /* &x */)).Fs if s > 59.999 { s = 59.999 } - Xsqlite3_snprintf(tls, 7, (z + uintptr(j)), ts+526 /* "%06.3f" */, libc.VaList(bp+16, s)) + Xsqlite3_snprintf(tls, 7, (z + uintptr(j)), ts+526 /* "%06.3f" */, libc.VaList(bp+8, s)) j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j))))) break } fallthrough case 'H': - Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+32, (*DateTime)(unsafe.Pointer(bp+160 /* &x */)).Fh)) + Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+16, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fh)) j = j + (uint64(2)) break fallthrough @@ -30734,19 +30734,19 @@ __3: case 'j': { var nDay int32 // Number of days since 1st day of year - *(*DateTime)(unsafe.Pointer(bp + 312 /* y */)) = *(*DateTime)(unsafe.Pointer(bp + 160 /* x */)) - (*DateTime)(unsafe.Pointer(bp + 312 /* &y */)).FvalidJD = int8(0) - (*DateTime)(unsafe.Pointer(bp + 312 /* &y */)).FM = 1 - (*DateTime)(unsafe.Pointer(bp + 312 /* &y */)).FD = 1 - computeJD(tls, bp+312 /* &y */) - nDay = (int32((((*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FiJD - (*DateTime)(unsafe.Pointer(bp+312 /* &y */)).FiJD) + int64(43200000)) / int64(86400000))) + *(*DateTime)(unsafe.Pointer(bp + 232 /* y */)) = *(*DateTime)(unsafe.Pointer(bp + 80 /* x */)) + (*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FvalidJD = int8(0) + (*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FM = 1 + (*DateTime)(unsafe.Pointer(bp + 232 /* &y */)).FD = 1 + computeJD(tls, bp+232 /* &y */) + nDay = (int32((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD - (*DateTime)(unsafe.Pointer(bp+232 /* &y */)).FiJD) + int64(43200000)) / int64(86400000))) if int32(*(*int8)(unsafe.Pointer(zFmt + uintptr(i)))) == 'W' { var wd int32 // 0=Monday, 1=Tuesday, ... 6=Sunday - wd = (int32((((*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FiJD + int64(43200000)) / int64(86400000)) % int64(7))) - Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+48, (((nDay+7)-wd)/7))) + wd = (int32((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD + int64(43200000)) / int64(86400000)) % int64(7))) + Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+24, (((nDay+7)-wd)/7))) j = j + (uint64(2)) } else { - Xsqlite3_snprintf(tls, 4, (z + uintptr(j)), ts+533 /* "%03d" */, libc.VaList(bp+64, (nDay+1))) + Xsqlite3_snprintf(tls, 4, (z + uintptr(j)), ts+533 /* "%03d" */, libc.VaList(bp+32, (nDay+1))) j = j + (uint64(3)) } break @@ -30755,25 +30755,25 @@ __3: fallthrough case 'J': { - Xsqlite3_snprintf(tls, 20, (z + uintptr(j)), ts+538 /* "%.16g" */, libc.VaList(bp+80, (float64((*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FiJD)/86400000.0))) + Xsqlite3_snprintf(tls, 20, (z + uintptr(j)), ts+538 /* "%.16g" */, libc.VaList(bp+40, (float64((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD)/86400000.0))) j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j))))) break } fallthrough case 'm': - Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+96, (*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FM)) + Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+48, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FM)) j = j + (uint64(2)) break fallthrough case 'M': - Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+112, (*DateTime)(unsafe.Pointer(bp+160 /* &x */)).Fm)) + Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+56, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fm)) j = j + (uint64(2)) break fallthrough case 's': { - var iS I64 = (((*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FiJD / int64(1000)) - (int64(21086676) * int64(10000))) + var iS I64 = (((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD / int64(1000)) - (int64(21086676) * int64(10000))) Xsqlite3Int64ToText(tls, iS, (z + uintptr(j))) j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j))))) break @@ -30781,20 +30781,20 @@ __3: } fallthrough case 'S': - Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+128, int32((*DateTime)(unsafe.Pointer(bp+160 /* &x */)).Fs))) + Xsqlite3_snprintf(tls, 3, (z + uintptr(j)), ts+521 /* "%02d" */, libc.VaList(bp+64, int32((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).Fs))) j = j + (uint64(2)) break fallthrough case 'w': { - *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = (int8(int32((int8((((*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FiJD + int64(129600000)) / int64(86400000)) % int64(7)))) + '0')) + *(*int8)(unsafe.Pointer(z + uintptr(libc.PostIncUint64(&j, 1)))) = (int8(int32((int8((((*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FiJD + int64(129600000)) / int64(86400000)) % int64(7)))) + '0')) break } fallthrough case 'Y': { - Xsqlite3_snprintf(tls, 5, (z + uintptr(j)), ts+544 /* "%04d" */, libc.VaList(bp+144, (*DateTime)(unsafe.Pointer(bp+160 /* &x */)).FY)) + Xsqlite3_snprintf(tls, 5, (z + uintptr(j)), ts+544 /* "%04d" */, libc.VaList(bp+72, (*DateTime)(unsafe.Pointer(bp+80 /* &x */)).FY)) j = j + (Size_t(Xsqlite3Strlen30(tls, (z + uintptr(j))))) break @@ -30809,7 +30809,7 @@ __3: *(*int8)(unsafe.Pointer(z + uintptr(j))) = int8(0) Xsqlite3_result_text(tls, context, z, -1, func() uintptr { - if z == bp+208 /* zBuf */ { + if z == bp+128 /* zBuf */ { return libc.UintptrFromInt32(-1) } return *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault})) @@ -31428,8 +31428,8 @@ func Xsqlite3EndBenignMalloc(tls *libc.TLS) { /* sqlite3.c:23948:21: */ // cases of nByte<=0 will be intercepted and dealt with by higher level // routines. func sqlite3MemMalloc(tls *libc.TLS, nByte int32) uintptr { /* sqlite3.c:24148:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var p uintptr @@ -31467,8 +31467,8 @@ func sqlite3MemSize(tls *libc.TLS, pPrior uintptr) int32 { /* sqlite3.c:24197:12 // cases where nByte<=0 will have been intercepted by higher-level // routines and redirected to xFree. func sqlite3MemRealloc(tls *libc.TLS, pPrior uintptr, nByte int32) uintptr { /* sqlite3.c:24220:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var p uintptr = libc.Xrealloc(tls, pPrior, uint64(nByte)) if p == uintptr(0) { @@ -31502,8 +31502,8 @@ func sqlite3MemShutdown(tls *libc.TLS, NotUsed uintptr) { /* sqlite3.c:24286:13: // Populate the low-level memory allocation function pointers in // sqlite3GlobalConfig.m with pointers to the routines in this file. func Xsqlite3MemSetDefault(tls *libc.TLS) { /* sqlite3.c:24297:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) Xsqlite3_config(tls, SQLITE_CONFIG_MALLOC, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultMethods)))) } @@ -63328,8 +63328,8 @@ func printfTempBuf(tls *libc.TLS, pAccum uintptr, n Sqlite3_int64) uintptr { /* // Render a string given by "fmt" into the StrAccum object. func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_list) { /* sqlite3.c:28828:17: */ - bp := tls.Alloc(116) - defer tls.Free(116) + bp := tls.Alloc(108) + defer tls.Free(108) var c int32 // Next character in the format string var bufpt uintptr // Pointer to the conversion buffer @@ -63349,7 +63349,7 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis var bArgList U8 // True for SQLITE_PRINTF_SQLFUNC var prefix int8 // Prefix character. "+" or "-" or " " or '\0'. var longvalue Sqlite_uint64 // Value for integer types - // var realvalue float64 at bp+104, 8 + // var realvalue float64 at bp+96, 8 // Value for real types var infop uintptr // Pointer to the appropriate info structure var zOut uintptr // Rendering buffer @@ -63357,13 +63357,13 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis var zExtra uintptr // Malloced memory used by some conversion var exp int32 var e2 int32 // exponent of real numbers - // var nsd int32 at bp+112, 4 + // var nsd int32 at bp+104, 4 // Number of significant digits returned var rounder float64 // Used for rounding floating point values var flag_dp EtByte // True if decimal point should be shown var flag_rtz EtByte // True if trailing zeros should be removed var pArgList uintptr // Arguments for SQLITE_PRINTF_SQLFUNC - // var buf [70]int8 at bp+16, 70 + // var buf [70]int8 at bp+8, 70 var wx uint32 var px uint32 @@ -63376,9 +63376,9 @@ func Xsqlite3_str_vappendf(tls *libc.TLS, pAccum uintptr, fmt uintptr, ap Va_lis var ix int32 // Add "0" or "0x" var pre uintptr var x1 int8 - // var rx float64 at bp+96, 8 + // var rx float64 at bp+88, 8 - // var u Sqlite3_uint64 at bp+88, 8 + // var u Sqlite3_uint64 at bp+80, 8 var ex int32 var scale float64 @@ -63846,7 +63846,7 @@ __94: goto __95 } nOut = SQLITE_PRINT_BUF_SIZE - zOut = bp + 16 /* &buf[0] */ + zOut = bp + 8 /* &buf[0] */ goto __96 __95: n = (U64(precision) + uint64(10)) @@ -63968,10 +63968,10 @@ __65: if !(bArgList != 0) { goto __116 } - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) = getDoubleArg(tls, pArgList) + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = getDoubleArg(tls, pArgList) goto __117 __116: - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) = float64(libc.VaFloat64(&ap)) + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = float64(libc.VaFloat64(&ap)) __117: ; if !(precision < 0) { @@ -63986,10 +63986,10 @@ __118: precision = SQLITE_FP_PRECISION_LIMIT __119: ; - if !(*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) < 0.0) { + if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) < 0.0) { goto __120 } - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) = -*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) = -*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) prefix = int8('-') goto __121 __120: @@ -64017,21 +64017,21 @@ __124: if !(int32(xtype) == EtFLOAT) { goto __125 } - *(*float64)(unsafe.Pointer(bp + 96 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) - libc.Xmemcpy(tls, bp+88 /* &u */, bp+96 /* &rx */, uint64(unsafe.Sizeof(Sqlite3_uint64(0)))) - ex = (-1023 + (int32((*(*Sqlite3_uint64)(unsafe.Pointer(bp + 88 /* u */)) >> 52) & uint64(0x7ff)))) + *(*float64)(unsafe.Pointer(bp + 88 /* rx */)) = *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) + libc.Xmemcpy(tls, bp+80 /* &u */, bp+88 /* &rx */, uint64(unsafe.Sizeof(Sqlite3_uint64(0)))) + ex = (-1023 + (int32((*(*Sqlite3_uint64)(unsafe.Pointer(bp + 80 /* u */)) >> 52) & uint64(0x7ff)))) if !((precision + (ex / 3)) < 15) { goto __126 } - rounder = rounder + (*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) * 3e-16) + rounder = rounder + (*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) * 3e-16) __126: ; - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) += rounder + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder __125: ; // Normalize realvalue to within 10.0 > realvalue >= 1.0 exp = 0 - if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */))) != 0) { + if !(Xsqlite3IsNaN(tls, *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */))) != 0) { goto __127 } bufpt = ts + 747 /* "NaN" */ @@ -64039,12 +64039,12 @@ __125: goto __58 __127: ; - if !(*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) > 0.0) { + if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) > 0.0) { goto __128 } scale = 1.0 __129: - if !((*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) >= (1e100 * scale)) && (exp <= 350)) { + if !((*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= (1e100 * scale)) && (exp <= 350)) { goto __130 } scale = scale * (1e100) @@ -64053,7 +64053,7 @@ __129: __130: ; __131: - if !((*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) >= (1e10 * scale)) && (exp <= 350)) { + if !((*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= (1e10 * scale)) && (exp <= 350)) { goto __132 } scale = scale * (1e10) @@ -64062,7 +64062,7 @@ __131: __132: ; __133: - if !((*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) >= (10.0 * scale)) && (exp <= 350)) { + if !((*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= (10.0 * scale)) && (exp <= 350)) { goto __134 } scale = scale * (10.0) @@ -64070,21 +64070,21 @@ __133: goto __133 __134: ; - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) /= scale + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) /= scale __135: - if !(*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) < 1e-8) { + if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) < 1e-8) { goto __136 } - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) *= 1e8 + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 1e8 exp = exp - (8) goto __135 __136: ; __137: - if !(*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) < 1.0) { + if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) < 1.0) { goto __138 } - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) *= 10.0 + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 10.0 exp-- goto __137 __138: @@ -64092,26 +64092,26 @@ __138: if !(exp > 350) { goto __139 } - bufpt = bp + 16 /* &buf[0] */ - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = prefix - libc.Xmemcpy(tls, (bp + 16 /* &buf[0] */ + uintptr((libc.Bool32(int32(prefix) != 0)))), ts+751 /* "Inf" */, uint64(4)) + bufpt = bp + 8 /* &buf[0] */ + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = prefix + libc.Xmemcpy(tls, (bp + 8 /* &buf[0] */ + uintptr((libc.Bool32(int32(prefix) != 0)))), ts+751 /* "Inf" */, uint64(4)) length = (3 + (libc.Bool32(int32(prefix) != 0))) goto __58 __139: ; __128: ; - bufpt = bp + 16 /* &buf[0] */ + bufpt = bp + 8 /* &buf[0] */ // If the field type is etGENERIC, then convert to either etEXP // or etFLOAT, as appropriate. if !(int32(xtype) != EtFLOAT) { goto __140 } - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) += rounder - if !(*(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) >= 10.0) { + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) += rounder + if !(*(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) >= 10.0) { goto __141 } - *(*float64)(unsafe.Pointer(bp + 104 /* realvalue */)) *= 0.1 + *(*float64)(unsafe.Pointer(bp + 96 /* realvalue */)) *= 0.1 exp++ __141: ; @@ -64166,7 +64166,7 @@ __148: ; zOut = bufpt - *(*int32)(unsafe.Pointer(bp + 112 /* nsd */)) = (16 + (int32(flag_altform2) * 10)) + *(*int32)(unsafe.Pointer(bp + 104 /* nsd */)) = (16 + (int32(flag_altform2) * 10)) flag_dp = (EtByte(((func() int32 { if precision > 0 { return 1 @@ -64192,7 +64192,7 @@ __153: if !(e2 >= 0) { goto __155 } - *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+104 /* &realvalue */, bp+112 /* &nsd */) + *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96 /* &realvalue */, bp+104 /* &nsd */) goto __154 __154: e2-- @@ -64231,7 +64231,7 @@ __160: if !((libc.PostDecInt32(&precision, 1)) > 0) { goto __161 } - *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+104 /* &realvalue */, bp+112 /* &nsd */) + *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) = et_getdigit(tls, bp+96 /* &realvalue */, bp+104 /* &nsd */) goto __160 __161: ; @@ -64340,8 +64340,8 @@ __178: length = libc.AssignInt32(&width, 0) goto __58 __67: - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = int8('%') - bufpt = bp + 16 /* &buf[0] */ + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8('%') + bufpt = bp + 8 /* &buf[0] */ length = 1 goto __58 __68: @@ -64353,7 +64353,7 @@ __68: if !(bufpt != 0) { goto __181 } - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = int8(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(libc.AssignInt32(&c, int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1)))))) if !((c & 0xc0) == 0xc0) { goto __183 } @@ -64361,7 +64361,7 @@ __184: if !((length < 4) && ((int32(*(*int8)(unsafe.Pointer(bufpt))) & 0xc0) == 0x80)) { goto __185 } - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + uintptr(libc.PostIncInt32(&length, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + uintptr(libc.PostIncInt32(&length, 1)))) = *(*int8)(unsafe.Pointer(libc.PostIncUintptr(&bufpt, 1))) goto __184 __185: ; @@ -64369,7 +64369,7 @@ __183: ; goto __182 __181: - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = int8(0) __182: ; goto __180 @@ -64378,31 +64378,31 @@ __179: if !(ch < uint32(0x00080)) { goto __186 } - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = (int8(ch & uint32(0xff))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (int8(ch & uint32(0xff))) length = 1 goto __187 __186: if !(ch < uint32(0x00800)) { goto __188 } - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = (int8(0xc0 + int32((U8((ch >> 6) & uint32(0x1f)))))) - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8(ch & uint32(0x3f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (int8(0xc0 + int32((U8((ch >> 6) & uint32(0x1f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8(ch & uint32(0x3f)))))) length = 2 goto __189 __188: if !(ch < uint32(0x10000)) { goto __190 } - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = (int8(0xe0 + int32((U8((ch >> 12) & uint32(0x0f)))))) - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8((ch >> 6) & uint32(0x3f)))))) - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + 2)) = (int8(0x80 + int32((U8(ch & uint32(0x3f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (int8(0xe0 + int32((U8((ch >> 12) & uint32(0x0f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8((ch >> 6) & uint32(0x3f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 2)) = (int8(0x80 + int32((U8(ch & uint32(0x3f)))))) length = 3 goto __191 __190: - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */)) = (int8(0xf0 + int32((U8((ch >> 18) & uint32(0x07)))))) - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8((ch >> 12) & uint32(0x3f)))))) - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + 2)) = (int8(0x80 + int32((U8((ch >> 6) & uint32(0x3f)))))) - *(*int8)(unsafe.Pointer(bp + 16 /* &buf[0] */ + 3)) = (int8(0x80 + int32((U8(ch & uint32(0x3f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */)) = (int8(0xf0 + int32((U8((ch >> 18) & uint32(0x07)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 1)) = (int8(0x80 + int32((U8((ch >> 12) & uint32(0x3f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 2)) = (int8(0x80 + int32((U8((ch >> 6) & uint32(0x3f)))))) + *(*int8)(unsafe.Pointer(bp + 8 /* &buf[0] */ + 3)) = (int8(0x80 + int32((U8(ch & uint32(0x3f)))))) length = 4 __191: ; @@ -64427,13 +64427,13 @@ __194: if !(libc.PostDecInt32(&precision, 1) > 1) { goto __195 } - Xsqlite3_str_append(tls, pAccum, bp+16 /* &buf[0] */, length) + Xsqlite3_str_append(tls, pAccum, bp+8 /* &buf[0] */, length) goto __194 __195: ; __192: ; - bufpt = bp + 16 /* &buf[0] */ + bufpt = bp + 8 /* &buf[0] */ flag_altform2 = EtByte(1) goto adjust_width_for_utf8 __69: @@ -64637,7 +64637,7 @@ __230: ; goto __229 __228: - bufpt = bp + 16 /* &buf[0] */ + bufpt = bp + 8 /* &buf[0] */ __229: ; j = 0 @@ -67581,8 +67581,8 @@ func Xsqlite3HexToBlob(tls *libc.TLS, db uintptr, z uintptr, n int32) uintptr { // not have been used. The "type" of connection pointer is given as the // argument. The zType is a word like "NULL" or "closed" or "invalid". func logBadConnection(tls *libc.TLS, zType uintptr) { /* sqlite3.c:33033:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) Xsqlite3_log(tls, SQLITE_MISUSE, ts+810, /* "API call with %s..." */ @@ -69254,8 +69254,8 @@ func Xsqlite3_win32_utf8_to_mbcs_v2(tls *libc.TLS, zText uintptr, useAnsi int32) // This function is the same as sqlite3_win32_set_directory (below); however, // it accepts a UTF-8 string. func Xsqlite3_win32_set_directory8(tls *libc.TLS, type1 uint32, zValue uintptr) int32 { /* sqlite3.c:44279:16: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var ppDirectory uintptr = uintptr(0) var rc int32 = Xsqlite3_initialize(tls) @@ -69314,8 +69314,8 @@ func Xsqlite3_win32_set_directory(tls *libc.TLS, type1 uint32, zValue uintptr) i // is zero if the error message fits in the buffer, or non-zero // otherwise (if the message was truncated). func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr) int32 { /* sqlite3.c:44350:12: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(40) + defer tls.Free(40) // FormatMessage returns 0 on failure. Otherwise it // returns the number of TCHARs written to the output @@ -69324,45 +69324,45 @@ func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr var zOut uintptr = uintptr(0) if (sqlite3_os_type == 2) || (Xsqlite3_win32_is_nt(tls) != 0) { - *(*LPWSTR)(unsafe.Pointer(bp + 40 /* zTempWide */)) = uintptr(0) + *(*LPWSTR)(unsafe.Pointer(bp + 24 /* zTempWide */)) = uintptr(0) dwLen = (*(*func(*libc.TLS, DWORD, LPCVOID, DWORD, DWORD, LPWSTR, DWORD, uintptr) DWORD)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 15*24 + 8 /* &.pCurrent */))))(tls, (uint32((FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM) | FORMAT_MESSAGE_IGNORE_INSERTS)), uintptr(0), lastErrno, uint32(0), - bp+40, /* &zTempWide */ + bp+24, /* &zTempWide */ uint32(0), uintptr(0)) if dwLen > DWORD(0) { // allocate a buffer and convert to UTF8 Xsqlite3BeginBenignMalloc(tls) - zOut = winUnicodeToUtf8(tls, *(*LPWSTR)(unsafe.Pointer(bp + 40 /* zTempWide */))) + zOut = winUnicodeToUtf8(tls, *(*LPWSTR)(unsafe.Pointer(bp + 24 /* zTempWide */))) Xsqlite3EndBenignMalloc(tls) // free the system buffer allocated by FormatMessage - (*(*func(*libc.TLS, HLOCAL) HLOCAL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 46*24 + 8 /* &.pCurrent */))))(tls, *(*LPWSTR)(unsafe.Pointer(bp + 40 /* zTempWide */))) + (*(*func(*libc.TLS, HLOCAL) HLOCAL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 46*24 + 8 /* &.pCurrent */))))(tls, *(*LPWSTR)(unsafe.Pointer(bp + 24 /* zTempWide */))) } } else { - *(*uintptr)(unsafe.Pointer(bp + 48 /* zTemp */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 32 /* zTemp */)) = uintptr(0) dwLen = (*(*func(*libc.TLS, DWORD, LPCVOID, DWORD, DWORD, LPSTR, DWORD, uintptr) DWORD)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 14*24 + 8 /* &.pCurrent */))))(tls, (uint32((FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM) | FORMAT_MESSAGE_IGNORE_INSERTS)), uintptr(0), lastErrno, uint32(0), - bp+48, /* &zTemp */ + bp+32, /* &zTemp */ uint32(0), uintptr(0)) if dwLen > DWORD(0) { // allocate a buffer and convert to UTF8 Xsqlite3BeginBenignMalloc(tls) - zOut = winMbcsToUtf8(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zTemp */)), (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 8 /* &.pCurrent */))))(tls)) + zOut = winMbcsToUtf8(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* zTemp */)), (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 8 /* &.pCurrent */))))(tls)) Xsqlite3EndBenignMalloc(tls) // free the system buffer allocated by FormatMessage - (*(*func(*libc.TLS, HLOCAL) HLOCAL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 46*24 + 8 /* &.pCurrent */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zTemp */))) + (*(*func(*libc.TLS, HLOCAL) HLOCAL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 46*24 + 8 /* &.pCurrent */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* zTemp */))) } } if DWORD(0) == dwLen { Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3633 /* "OsError 0x%lx (%..." */, libc.VaList(bp, lastErrno, lastErrno)) } else { // copy a maximum of nBuf chars to output buffer - Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3630 /* "%s" */, libc.VaList(bp+24, zOut)) + Xsqlite3_snprintf(tls, nBuf, zBuf, ts+3630 /* "%s" */, libc.VaList(bp+16, zOut)) // free the UTF8 buffer Xsqlite3_free(tls, zOut) } @@ -69383,25 +69383,25 @@ func winGetLastErrorMsg(tls *libc.TLS, lastErrno DWORD, nBuf int32, zBuf uintptr // The two subsequent arguments should be the name of the OS function that // failed and the associated file-system path, if any. func winLogErrorAtLine(tls *libc.TLS, errcode int32, lastErrno DWORD, zFunc uintptr, zPath uintptr, iLine int32) int32 { /* sqlite3.c:44441:12: */ - bp := tls.Alloc(548) - defer tls.Free(548) + bp := tls.Alloc(540) + defer tls.Free(540) - // var zMsg [500]int8 at bp+48, 500 + // var zMsg [500]int8 at bp+40, 500 // Human readable error text var i int32 // Loop counter - *(*int8)(unsafe.Pointer(bp + 48 /* &zMsg[0] */)) = int8(0) - winGetLastErrorMsg(tls, lastErrno, int32(unsafe.Sizeof([500]int8{})), bp+48 /* &zMsg[0] */) + *(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */)) = int8(0) + winGetLastErrorMsg(tls, lastErrno, int32(unsafe.Sizeof([500]int8{})), bp+40 /* &zMsg[0] */) if zPath == uintptr(0) { zPath = ts + 755 /* "" */ } - for i = 0; ((*(*int8)(unsafe.Pointer(bp + 48 /* &zMsg[0] */ + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(bp + 48 /* &zMsg[0] */ + uintptr(i)))) != '\r')) && (int32(*(*int8)(unsafe.Pointer(bp + 48 /* &zMsg[0] */ + uintptr(i)))) != '\n'); i++ { + for i = 0; ((*(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i))) != 0) && (int32(*(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i)))) != '\r')) && (int32(*(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i)))) != '\n'); i++ { } - *(*int8)(unsafe.Pointer(bp + 48 /* &zMsg[0] */ + uintptr(i))) = int8(0) + *(*int8)(unsafe.Pointer(bp + 40 /* &zMsg[0] */ + uintptr(i))) = int8(0) Xsqlite3_log(tls, errcode, ts+3653, /* "os_win.c:%d: (%l..." */ - libc.VaList(bp, iLine, lastErrno, zFunc, zPath, bp+48 /* &zMsg[0] */)) + libc.VaList(bp, iLine, lastErrno, zFunc, zPath, bp+40 /* &zMsg[0] */)) return errcode } @@ -69452,8 +69452,8 @@ func winRetryIoerr(tls *libc.TLS, pnRetry uintptr, pError uintptr) int32 { /* sq // Log a I/O error retry episode. func winLogIoerr(tls *libc.TLS, nRetry int32, lineno int32) { /* sqlite3.c:44540:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if nRetry != 0 { Xsqlite3_log(tls, SQLITE_NOTICE, @@ -70131,8 +70131,8 @@ func winModeBit(tls *libc.TLS, pFile uintptr, mask uint8, pArg uintptr) { /* sql // Control and query of the open file handle. func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:45874:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var pFile uintptr = id @@ -70161,12 +70161,12 @@ func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { / case SQLITE_FCNTL_SIZE_HINT: { if (*WinFile)(unsafe.Pointer(pFile)).FszChunk > 0 { - // var oldSz Sqlite3_int64 at bp+16, 8 + // var oldSz Sqlite3_int64 at bp+8, 8 - var rc int32 = winFileSize(tls, id, bp+16 /* &oldSz */) + var rc int32 = winFileSize(tls, id, bp+8 /* &oldSz */) if rc == SQLITE_OK { var newSz Sqlite3_int64 = *(*Sqlite3_int64)(unsafe.Pointer(pArg)) - if newSz > *(*Sqlite3_int64)(unsafe.Pointer(bp + 16 /* oldSz */)) { + if newSz > *(*Sqlite3_int64)(unsafe.Pointer(bp + 8 /* oldSz */)) { rc = winTruncate(tls, id, newSz) @@ -70227,10 +70227,10 @@ func winFileControl(tls *libc.TLS, id uintptr, op int32, pArg uintptr) int32 { / } case SQLITE_FCNTL_TEMPFILENAME: { - *(*uintptr)(unsafe.Pointer(bp + 24 /* zTFile */)) = uintptr(0) - var rc int32 = winGetTempname(tls, (*WinFile)(unsafe.Pointer(pFile)).FpVfs, bp+24 /* &zTFile */) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zTFile */)) = uintptr(0) + var rc int32 = winGetTempname(tls, (*WinFile)(unsafe.Pointer(pFile)).FpVfs, bp+16 /* &zTFile */) if rc == SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pArg)) = *(*uintptr)(unsafe.Pointer(bp + 24 /* zTFile */)) + *(*uintptr)(unsafe.Pointer(pArg)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* zTFile */)) } return rc @@ -70459,8 +70459,8 @@ func winLockSharedMemory(tls *libc.TLS, pShmNode uintptr) int32 { /* sqlite3.c:4 // file are currently open, in this process or in other processes, then // the file must be truncated to zero length or have its header cleared. func winOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:46277:12: */ - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(12) + defer tls.Free(12) var p uintptr // The connection to be opened var pShmNode uintptr // The underlying mmapped file @@ -70468,7 +70468,7 @@ func winOpenSharedMemory(tls *libc.TLS, pDbFd uintptr) int32 { /* sqlite3.c:4627 var pNew uintptr // Newly allocated winShmNode var nName int32 var inFlags int32 - // var outFlags int32 at bp+16, 4 + // var outFlags int32 at bp+8, 4 pShmNode = uintptr(0) rc = SQLITE_OK // Size of zName in bytes @@ -70525,7 +70525,7 @@ __5: goto __8 __7: inFlags = SQLITE_OPEN_WAL - *(*int32)(unsafe.Pointer(bp + 16 /* outFlags */)) = 0 + *(*int32)(unsafe.Pointer(bp + 8 /* outFlags */)) = 0 pShmNode = pNew pNew = uintptr(0) @@ -70558,7 +70558,7 @@ __12: ; rc = winOpen(tls, (*WinFile)(unsafe.Pointer(pDbFd)).FpVfs, (*WinShmNode)(unsafe.Pointer(pShmNode)).FzFilename, (pShmNode + 16 /* &.hFile */), - inFlags, bp+16 /* &outFlags */) + inFlags, bp+8 /* &outFlags */) if !(rc != SQLITE_OK) { goto __13 } @@ -70566,7 +70566,7 @@ __12: goto shm_open_err __13: ; - if !(*(*int32)(unsafe.Pointer(bp + 16 /* outFlags */)) == SQLITE_OPEN_READONLY) { + if !(*(*int32)(unsafe.Pointer(bp + 8 /* outFlags */)) == SQLITE_OPEN_READONLY) { goto __14 } (*WinShmNode)(unsafe.Pointer(pShmNode)).FisReadonly = U8(1) @@ -71223,8 +71223,8 @@ func winMakeEndInDirSep(tls *libc.TLS, nBuf int32, zBuf uintptr) int32 { /* sqli // Create a temporary file name and store the resulting pointer into pzBuf. // The pointer returned in pzBuf must be freed via sqlite3_free(). func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlite3.c:47083:12: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(24) + defer tls.Free(24) var i Size_t var j Size_t @@ -71283,7 +71283,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit } zMulti = winUnicodeToUtf8(tls, zWidePath) if zMulti != 0 { - Xsqlite3_snprintf(tls, nMax, zBuf, ts+3630 /* "%s" */, libc.VaList(bp+16, zMulti)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+3630 /* "%s" */, libc.VaList(bp+8, zMulti)) Xsqlite3_free(tls, zMulti) Xsqlite3_free(tls, zWidePath) } else { @@ -71307,7 +71307,7 @@ func winGetTempname(tls *libc.TLS, pVfs uintptr, pzBuf uintptr) int32 { /* sqlit } zUtf8 = winMbcsToUtf8(tls, zMbcsPath, (*(*func(*libc.TLS) WINBOOL)(unsafe.Pointer((uintptr(unsafe.Pointer(&aSyscall)) + 8 /* &.pCurrent */))))(tls)) if zUtf8 != 0 { - Xsqlite3_snprintf(tls, nMax, zBuf, ts+3630 /* "%s" */, libc.VaList(bp+32, zUtf8)) + Xsqlite3_snprintf(tls, nMax, zBuf, ts+3630 /* "%s" */, libc.VaList(bp+16, zUtf8)) Xsqlite3_free(tls, zUtf8) } else { Xsqlite3_free(tls, zBuf) @@ -71814,8 +71814,8 @@ func winIsVerbatimPathname(tls *libc.TLS, zPathname uintptr) WINBOOL { /* sqlite // pathname into zOut[]. zOut[] will be at least pVfs->mxPathname // bytes in size. func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32, zFull uintptr) int32 { /* sqlite3.c:47917:12: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) var nByte DWORD var zConverted uintptr @@ -71902,7 +71902,7 @@ func winFullPathname(tls *libc.TLS, pVfs uintptr, zRelative uintptr, nFull int32 return nFull } return (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FmxPathname - }(), zFull, ts+3630 /* "%s" */, libc.VaList(bp+32, zOut)) + }(), zFull, ts+3630 /* "%s" */, libc.VaList(bp+24, zOut)) Xsqlite3_free(tls, zOut) return SQLITE_OK } else { @@ -72528,8 +72528,8 @@ func memdbLock(tls *libc.TLS, pFile uintptr, eLock int32) int32 { /* sqlite3.c:4 // File control method. For custom operations on an memdb-file. func memdbFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:48940:12: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var p uintptr = (*MemFile)(unsafe.Pointer(pFile)).FpStore var rc int32 = SQLITE_NOTFOUND @@ -72674,8 +72674,8 @@ func memdbAccess(tls *libc.TLS, pVfs uintptr, zPath uintptr, flags int32, pResOu // to the pathname in zPath. zOut is guaranteed to point to a buffer // of at least (INST_MAX_PATHNAME+1) bytes. func memdbFullPathname(tls *libc.TLS, pVfs uintptr, zPath uintptr, nOut int32, zOut uintptr) int32 { /* sqlite3.c:49133:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) _ = pVfs Xsqlite3_snprintf(tls, nOut, zOut, ts+3630 /* "%s" */, libc.VaList(bp, zPath)) @@ -72750,15 +72750,15 @@ func memdbFromDbSchema(tls *libc.TLS, db uintptr, zSchema uintptr) uintptr { /* // Return the serialization of a database func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintptr, mFlags uint32) uintptr { /* sqlite3.c:49226:26: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var p uintptr var iDb int32 var pBt uintptr var sz Sqlite3_int64 var szPage int32 = 0 - *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) var pOut uintptr var zSql uintptr var rc int32 @@ -72797,7 +72797,7 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp szPage = Xsqlite3BtreeGetPageSize(tls, pBt) zSql = Xsqlite3_mprintf(tls, ts+4345 /* "PRAGMA \"%w\".page..." */, libc.VaList(bp, zSchema)) if zSql != 0 { - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pStmt */, uintptr(0)) } else { rc = SQLITE_NOMEM } @@ -72805,11 +72805,11 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp if rc != 0 { return uintptr(0) } - rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) if rc != SQLITE_ROW { pOut = uintptr(0) } else { - sz = (Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) * Sqlite_int64(szPage)) + sz = (Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) * Sqlite_int64(szPage)) if piSize != 0 { *(*Sqlite3_int64)(unsafe.Pointer(piSize)) = sz } @@ -72818,40 +72818,40 @@ func Xsqlite3_serialize(tls *libc.TLS, db uintptr, zSchema uintptr, piSize uintp } else { pOut = Xsqlite3_malloc64(tls, uint64(sz)) if pOut != 0 { - var nPage int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) + var nPage int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) var pPager uintptr = Xsqlite3BtreePager(tls, pBt) var pgno int32 for pgno = 1; pgno <= nPage; pgno++ { - *(*uintptr)(unsafe.Pointer(bp + 24 /* pPage */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */)) = uintptr(0) var pTo uintptr = (pOut + uintptr((Sqlite3_int64(szPage) * (Sqlite3_int64(pgno - 1))))) - rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+24 /* &pPage */, 0) + rc = Xsqlite3PagerGet(tls, pPager, uint32(pgno), bp+16 /* &pPage */, 0) if rc == SQLITE_OK { - libc.Xmemcpy(tls, pTo, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPage */))), uint64(szPage)) + libc.Xmemcpy(tls, pTo, Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))), uint64(szPage)) } else { libc.Xmemset(tls, pTo, 0, uint64(szPage)) } - Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPage */))) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pPage */))) } } } } - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) return pOut } // Convert zSchema to a MemDB and initialize its content. func Xsqlite3_deserialize(tls *libc.TLS, db uintptr, zSchema uintptr, pData uintptr, szDb Sqlite3_int64, szBuf Sqlite3_int64, mFlags uint32) int32 { /* sqlite3.c:49307:16: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var p uintptr var zSql uintptr - // var pStmt uintptr at bp+16, 8 + // var pStmt uintptr at bp+8, 8 var rc int32 var iDb int32 var pStore uintptr - *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) if !(zSchema == uintptr(0)) { @@ -72875,7 +72875,7 @@ __2: rc = SQLITE_NOMEM goto __4 __3: - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+8 /* &pStmt */, uintptr(0)) Xsqlite3_free(tls, zSql) __4: ; @@ -72887,7 +72887,7 @@ __5: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.FiDb = U8(iDb) libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.reopenMemdb */, uint32(1), 2, 0x4) - rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + rc = Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) libc.SetBitFieldPtr8Uint32(db+184 /* &.init */ +8 /* &.reopenMemdb */, uint32(0), 2, 0x4) if !(rc != SQLITE_DONE) { goto __6 @@ -72921,7 +72921,7 @@ __8: ; end_deserialize: - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) if !((pData != 0) && ((mFlags & uint32(SQLITE_DESERIALIZE_FREEONCLOSE)) != uint32(0))) { goto __10 } @@ -75062,8 +75062,8 @@ func pcache1Destroy(tls *libc.TLS, p uintptr) { /* sqlite3.c:51864:13: */ // install the default pluggable cache module, assuming the user has not // already provided an alternative. func Xsqlite3PCacheSetDefault(tls *libc.TLS) { /* sqlite3.c:51887:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) Xsqlite3_config(tls, SQLITE_CONFIG_PCACHE2, libc.VaList(bp, uintptr(unsafe.Pointer(&defaultMethods1)))) } @@ -78084,35 +78084,35 @@ func setSectorSize(tls *libc.TLS, pPager uintptr) { /* sqlite3.c:55315:13: */ // back any content. If the journal is merely persistent, no reset is // needed. func pager_playback(tls *libc.TLS, pPager uintptr, isHot int32) int32 { /* sqlite3.c:55388:12: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) var pVfs uintptr - // var szJ I64 at bp+24, 8 + // var szJ I64 at bp+16, 8 // Size of the journal file in bytes - // var nRec U32 at bp+36, 4 + // var nRec U32 at bp+28, 4 // Number of Records in the journal var u U32 // Unsigned loop counter - // var mxPg Pgno at bp+40, 4 + // var mxPg Pgno at bp+32, 4 // Size of the original file in pages var rc int32 // Result code of a subroutine - // var res int32 at bp+32, 4 + // var res int32 at bp+24, 4 // Value returned by sqlite3OsAccess() var zSuper uintptr // Name of super-journal file if any var needPagerReset int32 // True to reset page prior to first page rollback var nPlayback int32 // Total number of pages restored from journal - // var savedPageSize U32 at bp+44, 4 + // var savedPageSize U32 at bp+36, 4 pVfs = (*Pager)(unsafe.Pointer(pPager)).FpVfs - *(*Pgno)(unsafe.Pointer(bp + 40 /* mxPg */)) = Pgno(0) - *(*int32)(unsafe.Pointer(bp + 32 /* res */)) = 1 + *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) = Pgno(0) + *(*int32)(unsafe.Pointer(bp + 24 /* res */)) = 1 zSuper = uintptr(0) nPlayback = 0 - *(*U32)(unsafe.Pointer(bp + 44 /* savedPageSize */)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) + *(*U32)(unsafe.Pointer(bp + 36 /* savedPageSize */)) = U32((*Pager)(unsafe.Pointer(pPager)).FpageSize) // Figure out how many records are in the journal. Abort early if // the journal is empty. - rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+24 /* &szJ */) + rc = Xsqlite3OsFileSize(tls, (*Pager)(unsafe.Pointer(pPager)).Fjfd, bp+16 /* &szJ */) if !(rc != SQLITE_OK) { goto __1 } @@ -78135,11 +78135,11 @@ __1: if !((rc == SQLITE_OK) && (*(*int8)(unsafe.Pointer(zSuper)) != 0)) { goto __2 } - rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+32 /* &res */) + rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+24 /* &res */) __2: ; zSuper = uintptr(0) - if !((rc != SQLITE_OK) || !(*(*int32)(unsafe.Pointer(bp + 32 /* res */)) != 0)) { + if !((rc != SQLITE_OK) || !(*(*int32)(unsafe.Pointer(bp + 24 /* res */)) != 0)) { goto __3 } goto end_playback @@ -78159,7 +78159,7 @@ __4: // not enough bytes left in the journal file for a complete header, or // it is corrupted, then a process must have failed while writing it. // This indicates nothing more needs to be rolled back. - rc = readJournalHdr(tls, pPager, isHot, *(*I64)(unsafe.Pointer(bp + 24 /* szJ */)), bp+36 /* &nRec */, bp+40 /* &mxPg */) + rc = readJournalHdr(tls, pPager, isHot, *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)), bp+28 /* &nRec */, bp+32 /* &mxPg */) if !(rc != SQLITE_OK) { goto __6 } @@ -78177,11 +78177,11 @@ __6: // working in no-sync mode. This means that the rest of the journal // file consists of pages, there are no more journal headers. Compute // the value of nRec based on this assumption. - if !(*(*U32)(unsafe.Pointer(bp + 36 /* nRec */)) == 0xffffffff) { + if !(*(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) == 0xffffffff) { goto __8 } - *(*U32)(unsafe.Pointer(bp + 36 /* nRec */)) = U32((int32((*(*I64)(unsafe.Pointer(bp + 24 /* szJ */)) - (I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize))) / (I64(((*Pager)(unsafe.Pointer(pPager)).FpageSize) + 8))))) + *(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) = U32((int32((*(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - (I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize))) / (I64(((*Pager)(unsafe.Pointer(pPager)).FpageSize) + 8))))) __8: ; @@ -78198,10 +78198,10 @@ __8: // the journal, it means that the journal might contain additional // pages that need to be rolled back and that the number of pages // should be computed based on the journal file size. - if !(((*(*U32)(unsafe.Pointer(bp + 36 /* nRec */)) == U32(0)) && !(isHot != 0)) && (((*Pager)(unsafe.Pointer(pPager)).FjournalHdr + (I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize))) == (*Pager)(unsafe.Pointer(pPager)).FjournalOff)) { + if !(((*(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) == U32(0)) && !(isHot != 0)) && (((*Pager)(unsafe.Pointer(pPager)).FjournalHdr + (I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize))) == (*Pager)(unsafe.Pointer(pPager)).FjournalOff)) { goto __9 } - *(*U32)(unsafe.Pointer(bp + 36 /* nRec */)) = U32((int32((*(*I64)(unsafe.Pointer(bp + 24 /* szJ */)) - (*Pager)(unsafe.Pointer(pPager)).FjournalOff) / (I64(((*Pager)(unsafe.Pointer(pPager)).FpageSize) + 8))))) + *(*U32)(unsafe.Pointer(bp + 28 /* nRec */)) = U32((int32((*(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) - (*Pager)(unsafe.Pointer(pPager)).FjournalOff) / (I64(((*Pager)(unsafe.Pointer(pPager)).FpageSize) + 8))))) __9: ; @@ -78210,14 +78210,14 @@ __9: if !((*Pager)(unsafe.Pointer(pPager)).FjournalOff == (I64((*Pager)(unsafe.Pointer(pPager)).FsectorSize))) { goto __10 } - rc = pager_truncate(tls, pPager, *(*Pgno)(unsafe.Pointer(bp + 40 /* mxPg */))) + rc = pager_truncate(tls, pPager, *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */))) if !(rc != SQLITE_OK) { goto __11 } goto end_playback __11: ; - (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 40 /* mxPg */)) + (*Pager)(unsafe.Pointer(pPager)).FdbSize = *(*Pgno)(unsafe.Pointer(bp + 32 /* mxPg */)) __10: ; @@ -78225,7 +78225,7 @@ __10: // database file and/or page cache. u = U32(0) __12: - if !(u < *(*U32)(unsafe.Pointer(bp + 36 /* nRec */))) { + if !(u < *(*U32)(unsafe.Pointer(bp + 28 /* nRec */))) { goto __14 } if !(needPagerReset != 0) { @@ -78245,7 +78245,7 @@ __16: if !(rc == SQLITE_DONE) { goto __18 } - (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 24 /* szJ */)) + (*Pager)(unsafe.Pointer(pPager)).FjournalOff = *(*I64)(unsafe.Pointer(bp + 16 /* szJ */)) goto __14 goto __19 __18: @@ -78288,7 +78288,7 @@ end_playback: if !(rc == SQLITE_OK) { goto __22 } - rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+44 /* &savedPageSize */, -1) + rc = Xsqlite3PagerSetPagesize(tls, pPager, bp+36 /* &savedPageSize */, -1) __22: ; // Following a rollback, the database file should be back in its original @@ -78332,7 +78332,7 @@ __24: __25: ; - if !(((rc == SQLITE_OK) && (*(*int8)(unsafe.Pointer(zSuper)) != 0)) && (*(*int32)(unsafe.Pointer(bp + 32 /* res */)) != 0)) { + if !(((rc == SQLITE_OK) && (*(*int8)(unsafe.Pointer(zSuper)) != 0)) && (*(*int32)(unsafe.Pointer(bp + 24 /* res */)) != 0)) { goto __26 } // If there was a super-journal and this routine will return success, @@ -83768,28 +83768,28 @@ func walIndexAppend(tls *libc.TLS, pWal uintptr, iFrame U32, iPage U32) int32 { // that this thread is running recovery. If unable to establish // the necessary locks, this routine returns SQLITE_BUSY. func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61503:12: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(80) + defer tls.Free(80) var rc int32 // Return Code - // var nSize I64 at bp+24, 8 + // var nSize I64 at bp+16, 8 // Size of log file - // var aFrameCksum [2]U32 at bp+80, 8 + // var aFrameCksum [2]U32 at bp+72, 8 var iLock int32 var iOffset I64 - // var pgno U32 at bp+72, 4 + // var pgno U32 at bp+64, 4 // Database page number for frame - // var nTruncate U32 at bp+76, 4 + // var nTruncate U32 at bp+68, 4 - // var aShare uintptr at bp+64, 8 + // var aShare uintptr at bp+56, 8 var iFrame U32 // Index of last frame read var iLast U32 var iFirst U32 var nHdr U32 var nHdr32 U32 - // var aBuf [32]U8 at bp+32, 32 + // var aBuf [32]U8 at bp+24, 32 // Buffer to load WAL header into var aPrivate uintptr // Heap copy of *-shm hash being populated var aFrame uintptr // Malloc'd buffer to load entire frame @@ -83803,7 +83803,7 @@ func walIndexRecover(tls *libc.TLS, pWal uintptr) int32 { /* sqlite3.c:61503:12: var iLastFrame U32 var pInfo uintptr var i int32 - *(*[2]U32)(unsafe.Pointer(bp + 80 /* aFrameCksum */)) = [2]U32{U32(0), U32(0)} // Lock offset to lock for checkpoint + *(*[2]U32)(unsafe.Pointer(bp + 72 /* aFrameCksum */)) = [2]U32{U32(0), U32(0)} // Lock offset to lock for checkpoint // Obtain an exclusive lock on all byte in the locking range not already // locked by the caller. The caller is guaranteed to have locked the @@ -83822,7 +83822,7 @@ __1: libc.Xmemset(tls, (pWal + 72 /* &.hdr */), 0, uint64(unsafe.Sizeof(WalIndexHdr{}))) - rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+24 /* &nSize */) + rc = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16 /* &nSize */) if !(rc != SQLITE_OK) { goto __2 } @@ -83830,14 +83830,14 @@ __1: __2: ; - if !(*(*I64)(unsafe.Pointer(bp + 24 /* nSize */)) > int64(WAL_HDRSIZE)) { + if !(*(*I64)(unsafe.Pointer(bp + 16 /* nSize */)) > int64(WAL_HDRSIZE)) { goto __3 } // Buffer to load WAL header into aPrivate = uintptr(0) // Heap copy of *-shm hash being populated aFrame = uintptr(0) // Last frame in wal, based on nSize alone // Read in the WAL header. - rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+32 /* &aBuf[0] */, WAL_HDRSIZE, int64(0)) + rc = Xsqlite3OsRead(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+24 /* &aBuf[0] */, WAL_HDRSIZE, int64(0)) if !(rc != SQLITE_OK) { goto __4 } @@ -83849,8 +83849,8 @@ __4: // SQLITE_MAX_PAGE_SIZE, conclude that the WAL file contains no valid // data. Similarly, if the 'magic' value is invalid, ignore the whole // WAL file. - magic = Xsqlite3Get4byte(tls, (bp + 32 /* &aBuf */)) - szPage = int32(Xsqlite3Get4byte(tls, (bp + 32 /* &aBuf */ + 8))) + magic = Xsqlite3Get4byte(tls, (bp + 24 /* &aBuf */)) + szPage = int32(Xsqlite3Get4byte(tls, (bp + 24 /* &aBuf */ + 8))) if !(((((magic & 0xFFFFFFFE) != U32(WAL_MAGIC)) || ((szPage & (szPage - 1)) != 0)) || (szPage > SQLITE_MAX_PAGE_SIZE)) || @@ -83862,14 +83862,14 @@ __5: ; (*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum = (U8(magic & U32(0x00000001))) (*Wal)(unsafe.Pointer(pWal)).FszPage = U32(szPage) - (*Wal)(unsafe.Pointer(pWal)).FnCkpt = Xsqlite3Get4byte(tls, (bp + 32 /* &aBuf */ + 12)) - libc.Xmemcpy(tls, (pWal + 72 /* &.hdr */ + 32 /* &.aSalt */), (bp + 32 /* &aBuf */ + 16), uint64(8)) + (*Wal)(unsafe.Pointer(pWal)).FnCkpt = Xsqlite3Get4byte(tls, (bp + 24 /* &aBuf */ + 12)) + libc.Xmemcpy(tls, (pWal + 72 /* &.hdr */ + 32 /* &.aSalt */), (bp + 24 /* &aBuf */ + 16), uint64(8)) // Verify that the WAL header checksum is correct walChecksumBytes(tls, (libc.Bool32(int32((*Wal)(unsafe.Pointer(pWal)).Fhdr.FbigEndCksum) == SQLITE_BIGENDIAN)), - bp+32 /* &aBuf[0] */, (WAL_HDRSIZE - (2 * 4)), uintptr(0), pWal+72 /* &.hdr */ +24 /* &.aFrameCksum */) - if !((*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) != Xsqlite3Get4byte(tls, (bp+32 /* &aBuf */ +24))) || - (*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) != Xsqlite3Get4byte(tls, (bp+32 /* &aBuf */ +28)))) { + bp+24 /* &aBuf[0] */, (WAL_HDRSIZE - (2 * 4)), uintptr(0), pWal+72 /* &.hdr */ +24 /* &.aFrameCksum */) + if !((*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) != Xsqlite3Get4byte(tls, (bp+24 /* &aBuf */ +24))) || + (*(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) != Xsqlite3Get4byte(tls, (bp+24 /* &aBuf */ +28)))) { goto __6 } goto finished @@ -83878,7 +83878,7 @@ __6: // Verify that the version number on the WAL format is one that // are able to understand - version = Xsqlite3Get4byte(tls, (bp + 32 /* &aBuf */ + 4)) + version = Xsqlite3Get4byte(tls, (bp + 24 /* &aBuf */ + 4)) if !(version != U32(WAL_MAX_VERSION)) { goto __7 } @@ -83901,7 +83901,7 @@ __8: aPrivate = (aData + uintptr(szPage)) // Read all frames from the log file. - iLastFrame = (U32((*(*I64)(unsafe.Pointer(bp + 24 /* nSize */)) - int64(WAL_HDRSIZE)) / I64(szFrame))) + iLastFrame = (U32((*(*I64)(unsafe.Pointer(bp + 16 /* nSize */)) - int64(WAL_HDRSIZE)) / I64(szFrame))) iPg = U32(0) __9: if !(iPg <= U32(walFramePage(tls, iLastFrame))) { @@ -83919,7 +83919,7 @@ __9: } return ((uint64(HASHTABLE_NPAGE) - (((uint64(unsafe.Sizeof(WalIndexHdr{})) * uint64(2)) + uint64(unsafe.Sizeof(WalCkptInfo{}))) / uint64(unsafe.Sizeof(U32(0))))) + (uint64((iPg - U32(1)) * U32(HASHTABLE_NPAGE)))) }()))) - rc = walIndexPage(tls, pWal, int32(iPg), bp+64 /* &aShare */) + rc = walIndexPage(tls, pWal, int32(iPg), bp+56 /* &aShare */) if !(rc != 0) { goto __12 } @@ -83943,14 +83943,14 @@ __13: goto __15 __16: ; - isValid = walDecodeFrame(tls, pWal, bp+72 /* &pgno */, bp+76 /* &nTruncate */, aData, aFrame) + isValid = walDecodeFrame(tls, pWal, bp+64 /* &pgno */, bp+68 /* &nTruncate */, aData, aFrame) if !(!(isValid != 0)) { goto __17 } goto __15 __17: ; - rc = walIndexAppend(tls, pWal, iFrame, *(*U32)(unsafe.Pointer(bp + 72 /* pgno */))) + rc = walIndexAppend(tls, pWal, iFrame, *(*U32)(unsafe.Pointer(bp + 64 /* pgno */))) if !(rc != SQLITE_OK) { goto __18 } @@ -83959,15 +83959,15 @@ __18: ; // If nTruncate is non-zero, this is a commit record. - if !(*(*U32)(unsafe.Pointer(bp + 76 /* nTruncate */)) != 0) { + if !(*(*U32)(unsafe.Pointer(bp + 68 /* nTruncate */)) != 0) { goto __19 } (*Wal)(unsafe.Pointer(pWal)).Fhdr.FmxFrame = iFrame - (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = *(*U32)(unsafe.Pointer(bp + 76 /* nTruncate */)) + (*Wal)(unsafe.Pointer(pWal)).Fhdr.FnPage = *(*U32)(unsafe.Pointer(bp + 68 /* nTruncate */)) (*Wal)(unsafe.Pointer(pWal)).Fhdr.FszPage = (U16((szPage & 0xff00) | (szPage >> 16))) - *(*U32)(unsafe.Pointer(bp + 80 /* &aFrameCksum[0] */)) = *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) - *(*U32)(unsafe.Pointer(bp + 80 /* &aFrameCksum[0] */ + 1*4)) = *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) + *(*U32)(unsafe.Pointer(bp + 72 /* &aFrameCksum[0] */)) = *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) + *(*U32)(unsafe.Pointer(bp + 72 /* &aFrameCksum[0] */ + 1*4)) = *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) __19: ; goto __14 @@ -83977,7 +83977,7 @@ __14: goto __15 __15: ; - *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPg)*8)) = *(*uintptr)(unsafe.Pointer(bp + 64 /* aShare */)) + *(*uintptr)(unsafe.Pointer((*Wal)(unsafe.Pointer(pWal)).FapWiData + uintptr(iPg)*8)) = *(*uintptr)(unsafe.Pointer(bp + 56 /* aShare */)) nHdr = func() uint32 { if iPg == U32(0) { return (uint32((uint64(unsafe.Sizeof(WalIndexHdr{})) * uint64(2)) + uint64(unsafe.Sizeof(WalCkptInfo{})))) @@ -83992,7 +83992,7 @@ __15: // do that, according to the spec, but no memcpy() implementation that // we know of actually does that, which is why we say that memcpy() // is safe for this. Memcpy() is certainly a lot faster. - libc.Xmemcpy(tls, (*(*uintptr)(unsafe.Pointer(bp + 64 /* aShare */)) + uintptr(nHdr32)*4), (aPrivate + uintptr(nHdr32)*4), (((uint64(unsafe.Sizeof(Ht_slot(0))) * (uint64(HASHTABLE_NPAGE * 2))) + (uint64(HASHTABLE_NPAGE) * uint64(unsafe.Sizeof(U32(0))))) - uint64(nHdr))) + libc.Xmemcpy(tls, (*(*uintptr)(unsafe.Pointer(bp + 56 /* aShare */)) + uintptr(nHdr32)*4), (aPrivate + uintptr(nHdr32)*4), (((uint64(unsafe.Sizeof(Ht_slot(0))) * (uint64(HASHTABLE_NPAGE * 2))) + (uint64(HASHTABLE_NPAGE) * uint64(unsafe.Sizeof(U32(0))))) - uint64(nHdr))) if !(iFrame <= iLast) { goto __20 } @@ -84015,8 +84015,8 @@ finished: if !(rc == SQLITE_OK) { goto __21 } - *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) = *(*U32)(unsafe.Pointer(bp + 80 /* &aFrameCksum[0] */)) - *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) = *(*U32)(unsafe.Pointer(bp + 80 /* &aFrameCksum[0] */ + 1*4)) + *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */))) = *(*U32)(unsafe.Pointer(bp + 72 /* &aFrameCksum[0] */)) + *(*U32)(unsafe.Pointer((pWal + 72 /* &.hdr */ + 24 /* &.aFrameCksum */) + 1*4)) = *(*U32)(unsafe.Pointer(bp + 72 /* &aFrameCksum[0] */ + 1*4)) walIndexWriteHdr(tls, pWal) // Reset the checkpoint-header. This is safe because this thread is @@ -84803,15 +84803,15 @@ walcheckpoint_out: // If the WAL file is currently larger than nMax bytes in size, truncate // it to exactly nMax bytes. If an error occurs while doing so, ignore it. func walLimitSize(tls *libc.TLS, pWal uintptr, nMax I64) { /* sqlite3.c:62473:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) - // var sz I64 at bp+16, 8 + // var sz I64 at bp+8, 8 var rx int32 Xsqlite3BeginBenignMalloc(tls) - rx = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+16 /* &sz */) - if (rx == SQLITE_OK) && (*(*I64)(unsafe.Pointer(bp + 16 /* sz */)) > nMax) { + rx = Xsqlite3OsFileSize(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, bp+8 /* &sz */) + if (rx == SQLITE_OK) && (*(*I64)(unsafe.Pointer(bp + 8 /* sz */)) > nMax) { rx = Xsqlite3OsTruncate(tls, (*Wal)(unsafe.Pointer(pWal)).FpWalFd, nMax) } Xsqlite3EndBenignMalloc(tls) @@ -98014,8 +98014,8 @@ func Xsqlite3BtreePager(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:75273:2 // Append a message to the error message string. func checkAppendMsg(tls *libc.TLS, pCheck uintptr, zFormat uintptr, va uintptr) { /* sqlite3.c:75281:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var ap Va_list _ = ap @@ -98058,15 +98058,15 @@ func setPageReferenced(tls *libc.TLS, pCheck uintptr, iPg Pgno) { /* sqlite3.c:7 // // Also check that the page number is in bounds. func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:75333:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) if (iPage > (*IntegrityCk)(unsafe.Pointer(pCheck)).FnPage) || (iPage == Pgno(0)) { checkAppendMsg(tls, pCheck, ts+4535 /* "invalid page num..." */, libc.VaList(bp, iPage)) return 1 } if getPageReferenced(tls, pCheck, iPage) != 0 { - checkAppendMsg(tls, pCheck, ts+4558 /* "2nd reference to..." */, libc.VaList(bp+16, iPage)) + checkAppendMsg(tls, pCheck, ts+4558 /* "2nd reference to..." */, libc.VaList(bp+8, iPage)) return 1 } if libc.AtomicLoadNInt32(((*IntegrityCk)(unsafe.Pointer(pCheck)).Fdb+400 /* &.u1 */ /* &.isInterrupted */), 0) != 0 { @@ -98080,15 +98080,15 @@ func checkRef(tls *libc.TLS, pCheck uintptr, iPage Pgno) int32 { /* sqlite3.c:75 // page iParent, pointer type ptrType. If not, append an error message // to pCheck. func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent Pgno) { /* sqlite3.c:75353:13: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(56) + defer tls.Free(56) var rc int32 - // var ePtrmapType U8 at bp+64, 1 + // var ePtrmapType U8 at bp+48, 1 - // var iPtrmapParent Pgno at bp+68, 4 + // var iPtrmapParent Pgno at bp+52, 4 - rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+64 /* &ePtrmapType */, bp+68 /* &iPtrmapParent */) + rc = ptrmapGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt, iChild, bp+48 /* &ePtrmapType */, bp+52 /* &iPtrmapParent */) if rc != SQLITE_OK { if (rc == SQLITE_NOMEM) || (rc == (SQLITE_IOERR | (int32(12) << 8))) { (*IntegrityCk)(unsafe.Pointer(pCheck)).FbOomFault = 1 @@ -98097,35 +98097,35 @@ func checkPtrmap(tls *libc.TLS, pCheck uintptr, iChild Pgno, eType U8, iParent P return } - if (int32(*(*U8)(unsafe.Pointer(bp + 64 /* ePtrmapType */))) != int32(eType)) || (*(*Pgno)(unsafe.Pointer(bp + 68 /* iPtrmapParent */)) != iParent) { + if (int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))) != int32(eType)) || (*(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */)) != iParent) { checkAppendMsg(tls, pCheck, ts+4612, /* "Bad ptr map entr..." */ - libc.VaList(bp+16, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 64 /* ePtrmapType */))), *(*Pgno)(unsafe.Pointer(bp + 68 /* iPtrmapParent */)))) + libc.VaList(bp+8, iChild, int32(eType), iParent, int32(*(*U8)(unsafe.Pointer(bp + 48 /* ePtrmapType */))), *(*Pgno)(unsafe.Pointer(bp + 52 /* iPtrmapParent */)))) } } // Check the integrity of the freelist or of an overflow page list. // Verify that the number of pages on the list is N. func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U32) { /* sqlite3.c:75382:13: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(48) + defer tls.Free(48) var i int32 var expected U32 = N var nErrAtStart int32 = (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr for (iPage != Pgno(0)) && ((*IntegrityCk)(unsafe.Pointer(pCheck)).FmxErr != 0) { - // var pOvflPage uintptr at bp+64, 8 + // var pOvflPage uintptr at bp+40, 8 var pOvflData uintptr if checkRef(tls, pCheck, iPage) != 0 { break } N-- - if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+64 /* &pOvflPage */, 0) != 0 { + if Xsqlite3PagerGet(tls, (*IntegrityCk)(unsafe.Pointer(pCheck)).FpPager, iPage, bp+40 /* &pOvflPage */, 0) != 0 { checkAppendMsg(tls, pCheck, ts+4666 /* "failed to get pa..." */, libc.VaList(bp, iPage)) break } - pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pOvflPage */))) + pOvflData = Xsqlite3PagerGetData(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) if isFreeList != 0 { var n U32 = Xsqlite3Get4byte(tls, (pOvflData + 4)) if (*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FautoVacuum != 0 { @@ -98133,7 +98133,7 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } if n > (((*BtShared)(unsafe.Pointer((*IntegrityCk)(unsafe.Pointer(pCheck)).FpBt)).FusableSize / U32(4)) - U32(2)) { checkAppendMsg(tls, pCheck, - ts+4688 /* "freelist leaf co..." */, libc.VaList(bp+16, iPage)) + ts+4688 /* "freelist leaf co..." */, libc.VaList(bp+8, iPage)) N-- } else { for i = 0; i < int32(n); i++ { @@ -98155,12 +98155,12 @@ func checkList(tls *libc.TLS, pCheck uintptr, isFreeList int32, iPage Pgno, N U3 } } iPage = Xsqlite3Get4byte(tls, pOvflData) - Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pOvflPage */))) + Xsqlite3PagerUnref(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pOvflPage */))) } if (N != 0) && (nErrAtStart == (*IntegrityCk)(unsafe.Pointer(pCheck)).FnErr) { checkAppendMsg(tls, pCheck, ts+4727, /* "%s is %d but sho..." */ - libc.VaList(bp+32, func() uintptr { + libc.VaList(bp+16, func() uintptr { if isFreeList != 0 { return ts + 4753 /* "size" */ } @@ -98242,11 +98242,11 @@ func btreeHeapPull(tls *libc.TLS, aHeap uintptr, pOut uintptr) int32 { /* sqlite // 4. Recursively call checkTreePage on all children. // 5. Verify that the depth of all children is the same. func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, maxKey I64) int32 { /* sqlite3.c:75515:12: */ - bp := tls.Alloc(196) - defer tls.Free(196) - *(*I64)(unsafe.Pointer(bp + 160)) = maxKey + bp := tls.Alloc(140) + defer tls.Free(140) + *(*I64)(unsafe.Pointer(bp + 104)) = maxKey - // var pPage uintptr at bp+152, 8 + // var pPage uintptr at bp+96, 8 // The page being analyzed var i int32 // Loop counter var rc int32 // Result code from subroutine call @@ -98268,7 +98268,7 @@ func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, var usableSize U32 // Usable size of the page var contentOffset U32 // Offset to the start of the cell content area var heap uintptr // Min-heap used for checking cell coverage - // var x U32 at bp+192, 4 + // var x U32 at bp+136, 4 var prev U32 // Next and previous entry on the min-heap var saved_zPfx uintptr @@ -98277,12 +98277,12 @@ func checkTreePage(tls *libc.TLS, pCheck uintptr, iPage Pgno, piMinKey uintptr, var savedIsInit U8 var nPage U32 // Number of pages on the overflow chain var pgnoOvfl Pgno - // var info CellInfo at bp+168, 24 + // var info CellInfo at bp+112, 24 var size U32 var size1 int32 var j int32 - *(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) = uintptr(0) depth = -1 doCoverageCheck = 1 keyCanBeEqual = 1 @@ -98310,7 +98310,7 @@ __2: ; (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4779 /* "Page %u: " */ (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = iPage - if !((libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+152 /* &pPage */, 0))) != 0) { + if !((libc.AssignInt32(&rc, btreeGetPage(tls, pBt, iPage, bp+96 /* &pPage */, 0))) != 0) { goto __3 } checkAppendMsg(tls, pCheck, @@ -98321,27 +98321,27 @@ __3: // Clear MemPage.isInit to make sure the corruption detection code in // btreeInitPage() is executed. - savedIsInit = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).FisInit - (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).FisInit = U8(0) - if !((libc.AssignInt32(&rc, btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */))))) != 0) { + savedIsInit = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit = U8(0) + if !((libc.AssignInt32(&rc, btreeInitPage(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */))))) != 0) { goto __4 } // The only possible error from InitPage checkAppendMsg(tls, pCheck, - ts+4827 /* "btreeInitPage() ..." */, libc.VaList(bp+16, rc)) + ts+4827 /* "btreeInitPage() ..." */, libc.VaList(bp+8, rc)) goto end_of_check __4: ; - if !((libc.AssignInt32(&rc, btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */))))) != 0) { + if !((libc.AssignInt32(&rc, btreeComputeFreeSpace(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */))))) != 0) { goto __5 } - checkAppendMsg(tls, pCheck, ts+4865 /* "free space corru..." */, libc.VaList(bp+32, rc)) + checkAppendMsg(tls, pCheck, ts+4865 /* "free space corru..." */, libc.VaList(bp+16, rc)) goto end_of_check __5: ; - data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).FaData - hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).FhdrOffset) + data = (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FaData + hdr = int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FhdrOffset) // Set up for cell analysis (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = ts + 4887 /* "On tree page %u ..." */ @@ -98354,11 +98354,11 @@ __5: // EVIDENCE-OF: R-23882-45353 The cell pointer array of a b-tree page // immediately follows the b-tree page header. - cellStart = ((hdr + 12) - (4 * int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).Fleaf))) + cellStart = ((hdr + 12) - (4 * int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).Fleaf))) pCellIdx = (data + uintptr((cellStart + (2 * (nCell - 1))))) - if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).Fleaf) != 0)) { + if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).Fleaf) != 0)) { goto __6 } // Analyze the right-child page of internal pages @@ -98370,7 +98370,7 @@ __5: checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __8: ; - depth = checkTreePage(tls, pCheck, uint32(pgno), bp+160 /* &maxKey */, *(*I64)(unsafe.Pointer(bp + 160 /* maxKey */))) + depth = checkTreePage(tls, pCheck, uint32(pgno), bp+104 /* &maxKey */, *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */))) keyCanBeEqual = 0 goto __7 __6: @@ -98398,14 +98398,14 @@ __9: goto __12 } checkAppendMsg(tls, pCheck, ts+4941, /* "Offset %d out of..." */ - libc.VaList(bp+48, pc, contentOffset, (usableSize-U32(4)))) + libc.VaList(bp+24, pc, contentOffset, (usableSize-U32(4)))) doCoverageCheck = 0 goto __10 __12: ; pCell = (data + uintptr(pc)) - (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)) + 128 /* &.xParseCell */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)), pCell, bp+168 /* &info */) - if !((pc + U32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnSize)) > usableSize) { + (*(*func(*libc.TLS, uintptr, uintptr, uintptr))(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) + 128 /* &.xParseCell */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), pCell, bp+112 /* &info */) + if !((pc + U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnSize)) > usableSize) { goto __13 } checkAppendMsg(tls, pCheck, ts+4971 /* "Extends off end ..." */, 0) @@ -98415,32 +98415,32 @@ __13: ; // Check for integer primary key out of range - if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).FintKey != 0) { + if !((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FintKey != 0) { goto __14 } if !(func() int32 { if keyCanBeEqual != 0 { - return (libc.Bool32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnKey > *(*I64)(unsafe.Pointer(bp + 160 /* maxKey */)))) + return (libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey > *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)))) } - return (libc.Bool32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnKey >= *(*I64)(unsafe.Pointer(bp + 160 /* maxKey */)))) + return (libc.Bool32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey >= *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)))) }() != 0) { goto __15 } - checkAppendMsg(tls, pCheck, ts+4995 /* "Rowid %lld out o..." */, libc.VaList(bp+80, (*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnKey)) + checkAppendMsg(tls, pCheck, ts+4995 /* "Rowid %lld out o..." */, libc.VaList(bp+48, (*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnKey)) __15: ; - *(*I64)(unsafe.Pointer(bp + 160 /* maxKey */)) = (*CellInfo)(unsafe.Pointer(bp + 168 /* &info */)).FnKey + *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) = (*CellInfo)(unsafe.Pointer(bp + 112 /* &info */)).FnKey keyCanBeEqual = 0 // Only the first key on the page may ==maxKey __14: ; // Check the content overflow list - if !((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnPayload > U32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnLocal)) { + if !((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnPayload > U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnLocal)) { goto __16 } // First page of the overflow chain - nPage = (((((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnPayload - U32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnLocal)) + usableSize) - U32(5)) / (usableSize - U32(4))) - pgnoOvfl = Xsqlite3Get4byte(tls, (pCell + uintptr((int32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnSize) - 4)))) + nPage = (((((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnPayload - U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnLocal)) + usableSize) - U32(5)) / (usableSize - U32(4))) + pgnoOvfl = Xsqlite3Get4byte(tls, (pCell + uintptr((int32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnSize) - 4)))) if !((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) { goto __17 } @@ -98451,7 +98451,7 @@ __17: __16: ; - if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).Fleaf) != 0)) { + if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).Fleaf) != 0)) { goto __18 } // Check sanity of left child page for internal pages @@ -98462,7 +98462,7 @@ __16: checkPtrmap(tls, pCheck, uint32(pgno), uint8(PTRMAP_BTREE), iPage) __20: ; - d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+160 /* &maxKey */, *(*I64)(unsafe.Pointer(bp + 160 /* maxKey */))) + d2 = checkTreePage(tls, pCheck, uint32(pgno), bp+104 /* &maxKey */, *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */))) keyCanBeEqual = 0 if !(d2 != depth) { goto __21 @@ -98474,7 +98474,7 @@ __21: goto __19 __18: // Populate the coverage-checking heap for leaf pages - btreeHeapInsert(tls, heap, ((pc << 16) | ((pc + U32((*CellInfo)(unsafe.Pointer(bp+168 /* &info */)).FnSize)) - U32(1)))) + btreeHeapInsert(tls, heap, ((pc << 16) | ((pc + U32((*CellInfo)(unsafe.Pointer(bp+112 /* &info */)).FnSize)) - U32(1)))) __19: ; goto __10 @@ -98484,7 +98484,7 @@ __10: goto __11 __11: ; - *(*I64)(unsafe.Pointer(piMinKey)) = *(*I64)(unsafe.Pointer(bp + 160 /* maxKey */)) + *(*I64)(unsafe.Pointer(piMinKey)) = *(*I64)(unsafe.Pointer(bp + 104 /* maxKey */)) // Check for complete coverage of the page (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = uintptr(0) @@ -98494,7 +98494,7 @@ __11: // For leaf pages, the min-heap has already been initialized and the // cells have already been inserted. But for internal pages, that has // not yet been done, so do it now - if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).Fleaf) != 0)) { + if !(!(int32((*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).Fleaf) != 0)) { goto __23 } heap = (*IntegrityCk)(unsafe.Pointer(pCheck)).Fheap @@ -98505,7 +98505,7 @@ __24: goto __26 } pc = U32(libc.X__builtin_bswap16(tls, *(*U16)(unsafe.Pointer((data + uintptr((cellStart + (i * 2)))))))) - size = U32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)) + 120 /* &.xCellSize */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)), (data + uintptr(pc)))) + size = U32((*(*func(*libc.TLS, uintptr, uintptr) U16)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)) + 120 /* &.xCellSize */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)), (data + uintptr(pc)))) btreeHeapInsert(tls, heap, ((pc << 16) | ((pc + size) - U32(1)))) goto __25 __25: @@ -98558,19 +98558,19 @@ __28: nFrag = 0 prev = (contentOffset - U32(1)) // Implied first min-heap entry __29: - if !(btreeHeapPull(tls, heap, bp+192 /* &x */) != 0) { + if !(btreeHeapPull(tls, heap, bp+136 /* &x */) != 0) { goto __30 } - if !((prev & U32(0xffff)) >= (*(*U32)(unsafe.Pointer(bp + 192 /* x */)) >> 16)) { + if !((prev & U32(0xffff)) >= (*(*U32)(unsafe.Pointer(bp + 136 /* x */)) >> 16)) { goto __31 } checkAppendMsg(tls, pCheck, - ts+5044 /* "Multiple uses fo..." */, libc.VaList(bp+96, (*(*U32)(unsafe.Pointer(bp + 192 /* x */))>>16), iPage)) + ts+5044 /* "Multiple uses fo..." */, libc.VaList(bp+56, (*(*U32)(unsafe.Pointer(bp + 136 /* x */))>>16), iPage)) goto __30 goto __32 __31: - nFrag = int32(U32(nFrag) + (((*(*U32)(unsafe.Pointer(bp + 192 /* x */)) >> 16) - (prev & U32(0xffff))) - U32(1))) - prev = *(*U32)(unsafe.Pointer(bp + 192 /* x */)) + nFrag = int32(U32(nFrag) + (((*(*U32)(unsafe.Pointer(bp + 136 /* x */)) >> 16) - (prev & U32(0xffff))) - U32(1))) + prev = *(*U32)(unsafe.Pointer(bp + 136 /* x */)) __32: ; goto __29 @@ -98586,7 +98586,7 @@ __30: } checkAppendMsg(tls, pCheck, ts+5081, /* "Fragmentation of..." */ - libc.VaList(bp+120, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr((hdr + 7))))), iPage)) + libc.VaList(bp+72, nFrag, int32(*(*U8)(unsafe.Pointer(data + uintptr((hdr + 7))))), iPage)) __33: ; __22: @@ -98596,10 +98596,10 @@ end_of_check: if !(!(doCoverageCheck != 0)) { goto __34 } - (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */)))).FisInit = savedIsInit + (*MemPage)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */)))).FisInit = savedIsInit __34: ; - releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 152 /* pPage */))) + releasePage(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pPage */))) (*IntegrityCk)(unsafe.Pointer(pCheck)).FzPfx = saved_zPfx (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv1 = Pgno(saved_v1) (*IntegrityCk)(unsafe.Pointer(pCheck)).Fv2 = saved_v2 @@ -98627,21 +98627,21 @@ __34: // the unverified btrees. Except, if aRoot[1] is 1, then the freelist // checks are still performed. func Xsqlite3BtreeIntegrityCheck(tls *libc.TLS, db uintptr, p uintptr, aRoot uintptr, nRoot int32, mxErr int32, pnErr uintptr) uintptr { /* sqlite3.c:75794:21: */ - bp := tls.Alloc(272) - defer tls.Free(272) + bp := tls.Alloc(248) + defer tls.Free(248) var i Pgno - // var sCheck IntegrityCk at bp+56, 104 + // var sCheck IntegrityCk at bp+32, 104 var pBt uintptr var savedDbFlags U64 - // var zErr [100]int8 at bp+160, 100 + // var zErr [100]int8 at bp+136, 100 var bPartial int32 // True if not checking all btrees var bCkFreelist int32 var mx Pgno var mxInHdr Pgno - // var notUsed I64 at bp+264, 8 + // var notUsed I64 at bp+240, 8 pBt = (*Btree)(unsafe.Pointer(p)).FpBt savedDbFlags = (*Sqlite3)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb)).Fflags bPartial = 0 @@ -98664,49 +98664,49 @@ __1: Xsqlite3BtreeEnter(tls, p) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).Fdb = db - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FpBt = pBt - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FpPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FnPage = btreePagecount(tls, (*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FpBt) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FmxErr = mxErr - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FnErr = 0 - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FbOomFault = 0 - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FzPfx = uintptr(0) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).Fv1 = Pgno(0) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).Fv2 = 0 - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FaPgRef = uintptr(0) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).Fheap = uintptr(0) - Xsqlite3StrAccumInit(tls, (bp + 56 /* &sCheck */ + 56 /* &.errMsg */), uintptr(0), bp+160 /* &zErr[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - if !((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FnPage == Pgno(0)) { + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fdb = db + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FpBt = pBt + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FpPager = (*BtShared)(unsafe.Pointer(pBt)).FpPager + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnPage = btreePagecount(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FpBt) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FmxErr = mxErr + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnErr = 0 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 0 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv1 = Pgno(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fv2 = 0 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = uintptr(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = uintptr(0) + Xsqlite3StrAccumInit(tls, (bp + 32 /* &sCheck */ + 56 /* &.errMsg */), uintptr(0), bp+136 /* &zErr[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FerrMsg.FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) + if !((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnPage == Pgno(0)) { goto __3 } goto integrity_ck_cleanup __3: ; - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FaPgRef = Xsqlite3MallocZero(tls, (uint64(((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FnPage / Pgno(8)) + Pgno(1)))) - if !(!(int32((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FaPgRef) != 0)) { + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FaPgRef = Xsqlite3MallocZero(tls, (uint64(((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnPage / Pgno(8)) + Pgno(1)))) + if !(!(int32((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FaPgRef) != 0)) { goto __4 } - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FbOomFault = 1 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 1 goto integrity_ck_cleanup __4: ; - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).Fheap = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) - if !((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).Fheap == uintptr(0)) { + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).Fheap = Xsqlite3PageMalloc(tls, int32((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) + if !((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).Fheap == uintptr(0)) { goto __5 } - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FbOomFault = 1 + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FbOomFault = 1 goto integrity_ck_cleanup __5: ; i = ((U32(Xsqlite3PendingByte) / ((*BtShared)(unsafe.Pointer(pBt)).FpageSize)) + U32(1)) - if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FnPage) { + if !(i <= (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnPage) { goto __6 } - setPageReferenced(tls, bp+56 /* &sCheck */, i) + setPageReferenced(tls, bp+32 /* &sCheck */, i) __6: ; @@ -98714,10 +98714,10 @@ __6: if !(bCkFreelist != 0) { goto __7 } - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FzPfx = ts + 5133 /* "Main freelist: " */ - checkList(tls, bp+56 /* &sCheck */, 1, Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32)), + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = ts + 5133 /* "Main freelist: " */ + checkList(tls, bp+32 /* &sCheck */, 1, Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+32)), Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+36))) - (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FzPfx = uintptr(0) + (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FzPfx = uintptr(0) __7: ; @@ -98751,7 +98751,7 @@ __13: if !(mx != mxInHdr) { goto __15 } - checkAppendMsg(tls, bp+56, /* &sCheck */ + checkAppendMsg(tls, bp+32, /* &sCheck */ ts+5149, /* "max rootpage (%d..." */ libc.VaList(bp, mx, mxInHdr)) __15: @@ -98761,7 +98761,7 @@ __9: if !(Xsqlite3Get4byte(tls, ((*MemPage)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).FpPage1)).FaData+64)) != U32(0)) { goto __16 } - checkAppendMsg(tls, bp+56, /* &sCheck */ + checkAppendMsg(tls, bp+32, /* &sCheck */ ts+5194 /* "incremental_vacu..." */, 0) __16: ; @@ -98773,7 +98773,7 @@ __8: *(*U64)(unsafe.Pointer((*BtShared)(unsafe.Pointer(pBt)).Fdb + 48 /* &.flags */)) &= (libc.CplUint64(uint64(SQLITE_CellSizeCk))) i = Pgno(0) __17: - if !((int32(i) < nRoot) && ((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FmxErr != 0)) { + if !((int32(i) < nRoot) && ((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FmxErr != 0)) { goto __19 } if !(*(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) == Pgno(0)) { @@ -98785,10 +98785,10 @@ __20: if !((((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0) && (*(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)) > Pgno(1))) && !(bPartial != 0)) { goto __21 } - checkPtrmap(tls, bp+56 /* &sCheck */, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) + checkPtrmap(tls, bp+32 /* &sCheck */, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), uint8(PTRMAP_ROOTPAGE), uint32(0)) __21: ; - checkTreePage(tls, bp+56 /* &sCheck */, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+264 /* ¬Used */, (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) + checkTreePage(tls, bp+32 /* &sCheck */, *(*Pgno)(unsafe.Pointer(aRoot + uintptr(i)*4)), bp+240 /* ¬Used */, (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) goto __18 __18: i++ @@ -98804,21 +98804,21 @@ __19: } i = Pgno(1) __23: - if !((i <= (*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FnPage) && ((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FmxErr != 0)) { + if !((i <= (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnPage) && ((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FmxErr != 0)) { goto __25 } // If the database supports auto-vacuum, make sure no tables contain // references to pointer-map pages. - if !((getPageReferenced(tls, bp+56 /* &sCheck */, i) == 0) && ((ptrmapPageno(tls, pBt, i) != i) || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) { + if !((getPageReferenced(tls, bp+32 /* &sCheck */, i) == 0) && ((ptrmapPageno(tls, pBt, i) != i) || !(int32((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum) != 0))) { goto __26 } - checkAppendMsg(tls, bp+56 /* &sCheck */, ts+5249 /* "Page %d is never..." */, libc.VaList(bp+24, i)) + checkAppendMsg(tls, bp+32 /* &sCheck */, ts+5249 /* "Page %d is never..." */, libc.VaList(bp+16, i)) __26: ; - if !((getPageReferenced(tls, bp+56 /* &sCheck */, i) != 0) && ((ptrmapPageno(tls, pBt, i) == i) && ((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0))) { + if !((getPageReferenced(tls, bp+32 /* &sCheck */, i) != 0) && ((ptrmapPageno(tls, pBt, i) == i) && ((*BtShared)(unsafe.Pointer(pBt)).FautoVacuum != 0))) { goto __27 } - checkAppendMsg(tls, bp+56 /* &sCheck */, ts+5271 /* "Pointer map page..." */, libc.VaList(bp+40, i)) + checkAppendMsg(tls, bp+32 /* &sCheck */, ts+5271 /* "Pointer map page..." */, libc.VaList(bp+24, i)) __27: ; goto __24 @@ -98833,26 +98833,26 @@ __22: // Clean up and report errors. integrity_ck_cleanup: - Xsqlite3PageFree(tls, (*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).Fheap) - Xsqlite3_free(tls, (*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FaPgRef) - if !((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FbOomFault != 0) { + Xsqlite3PageFree(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).Fheap) + Xsqlite3_free(tls, (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FaPgRef) + if !((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FbOomFault != 0) { goto __28 } - Xsqlite3_str_reset(tls, (bp + 56 /* &sCheck */ + 56 /* &.errMsg */)) - (*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FnErr++ + Xsqlite3_str_reset(tls, (bp + 32 /* &sCheck */ + 56 /* &.errMsg */)) + (*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnErr++ __28: ; - *(*int32)(unsafe.Pointer(pnErr)) = (*IntegrityCk)(unsafe.Pointer(bp + 56 /* &sCheck */)).FnErr - if !((*IntegrityCk)(unsafe.Pointer(bp+56 /* &sCheck */)).FnErr == 0) { + *(*int32)(unsafe.Pointer(pnErr)) = (*IntegrityCk)(unsafe.Pointer(bp + 32 /* &sCheck */)).FnErr + if !((*IntegrityCk)(unsafe.Pointer(bp+32 /* &sCheck */)).FnErr == 0) { goto __29 } - Xsqlite3_str_reset(tls, (bp + 56 /* &sCheck */ + 56 /* &.errMsg */)) + Xsqlite3_str_reset(tls, (bp + 32 /* &sCheck */ + 56 /* &.errMsg */)) __29: ; // Make sure this analysis did not leave any unref() pages. Xsqlite3BtreeLeave(tls, p) - return Xsqlite3StrAccumFinish(tls, (bp + 56 /* &sCheck */ + 56 /* &.errMsg */)) + return Xsqlite3StrAccumFinish(tls, (bp + 32 /* &sCheck */ + 56 /* &.errMsg */)) } // Return the full pathname of the underlying database file. Return @@ -99125,30 +99125,30 @@ func Xsqlite3BtreeConnectionCount(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c // function. If an error occurs while doing so, return 0 and write an // error message to pErrorDb. func findBtree(tls *libc.TLS, pErrorDb uintptr, pDb uintptr, zDb uintptr) uintptr { /* sqlite3.c:76305:14: */ - bp := tls.Alloc(440) - defer tls.Free(440) + bp := tls.Alloc(424) + defer tls.Free(424) var i int32 = Xsqlite3FindDbName(tls, pDb, zDb) if i == 1 { - // var sParse Parse at bp+32, 408 + // var sParse Parse at bp+16, 408 var rc int32 = 0 - libc.Xmemset(tls, bp+32 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{}))) - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).Fdb = pDb - if Xsqlite3OpenTempDatabase(tls, bp+32 /* &sParse */) != 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).Frc, ts+3630 /* "%s" */, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FzErrMsg)) + libc.Xmemset(tls, bp+16 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{}))) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = pDb + if Xsqlite3OpenTempDatabase(tls, bp+16 /* &sParse */) != 0 { + Xsqlite3ErrorWithMsg(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc, ts+3630 /* "%s" */, libc.VaList(bp, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg)) rc = SQLITE_ERROR } - Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FzErrMsg) - Xsqlite3ParserReset(tls, bp+32 /* &sParse */) + Xsqlite3DbFree(tls, pErrorDb, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzErrMsg) + Xsqlite3ParserReset(tls, bp+16 /* &sParse */) if rc != 0 { return uintptr(0) } } if i < 0 { - Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+5305 /* "unknown database..." */, libc.VaList(bp+16, zDb)) + Xsqlite3ErrorWithMsg(tls, pErrorDb, SQLITE_ERROR, ts+5305 /* "unknown database..." */, libc.VaList(bp+8, zDb)) return uintptr(0) } @@ -99796,21 +99796,21 @@ copy_finished: // Render a Mem object which is one of MEM_Int, MEM_Real, or MEM_IntReal // into a buffer. func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sqlite3.c:77103:13: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) - // var acc StrAccum at bp+24, 32 + // var acc StrAccum at bp+16, 32 if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_Int) != 0 { // Work-around for GCC bug // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 - // var x I64 at bp+16, 8 + // var x I64 at bp+8, 8 - libc.Xmemcpy(tls, bp+16 /* &x */, (p /* &.u */), (uint64((int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_Int) * 2))) - Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 16 /* x */)), zBuf) + libc.Xmemcpy(tls, bp+8 /* &x */, (p /* &.u */), (uint64((int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_Int) * 2))) + Xsqlite3Int64ToText(tls, *(*I64)(unsafe.Pointer(bp + 8 /* x */)), zBuf) } else { - Xsqlite3StrAccumInit(tls, bp+24 /* &acc */, uintptr(0), zBuf, sz, 0) - Xsqlite3_str_appendf(tls, bp+24 /* &acc */, ts+5396, /* "%!.15g" */ + Xsqlite3StrAccumInit(tls, bp+16 /* &acc */, uintptr(0), zBuf, sz, 0) + Xsqlite3_str_appendf(tls, bp+16 /* &acc */, ts+5396, /* "%!.15g" */ libc.VaList(bp, func() float64 { if (int32((*Mem)(unsafe.Pointer(p)).Fflags) & MEM_IntReal) != 0 { return float64(*(*I64)(unsafe.Pointer(p /* &.u */))) @@ -99818,7 +99818,7 @@ func vdbeMemRenderNum(tls *libc.TLS, sz int32, zBuf uintptr, p uintptr) { /* sql return *(*float64)(unsafe.Pointer(p /* &.u */)) }())) - *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+24 /* &acc */)).FnChar))) = int8(0) // Fast version of sqlite3StrAccumFinish(&acc) + *(*int8)(unsafe.Pointer(zBuf + uintptr((*StrAccum)(unsafe.Pointer(bp+16 /* &acc */)).FnChar))) = int8(0) // Fast version of sqlite3StrAccumFinish(&acc) } } @@ -100878,10 +100878,10 @@ func valueNew(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:78324 // and sets (*ppVal) to NULL. Or, if an error occurs, (*ppVal) is set to // NULL and an SQLite error code returned. func valueFromFunction(tls *libc.TLS, db uintptr, p uintptr, enc U8, aff U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78386:12: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(64) + defer tls.Free(64) - // var ctx Sqlite3_context at bp+16, 56 + // var ctx Sqlite3_context at bp+8, 56 // Context object for function invocation var apVal uintptr // Function arguments var nVal int32 // Size of apVal[] array @@ -100956,14 +100956,14 @@ __3: __9: ; - libc.Xmemset(tls, bp+16 /* &ctx */, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) - (*Sqlite3_context)(unsafe.Pointer(bp + 16 /* &ctx */)).FpOut = pVal - (*Sqlite3_context)(unsafe.Pointer(bp + 16 /* &ctx */)).FpFunc = pFunc - (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pFunc + 24 /* &.xSFunc */))))(tls, bp+16 /* &ctx */, nVal, apVal) - if !((*Sqlite3_context)(unsafe.Pointer(bp+16 /* &ctx */)).FisError != 0) { + libc.Xmemset(tls, bp+8 /* &ctx */, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpOut = pVal + (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FpFunc = pFunc + (*(*func(*libc.TLS, uintptr, int32, uintptr))(unsafe.Pointer((pFunc + 24 /* &.xSFunc */))))(tls, bp+8 /* &ctx */, nVal, apVal) + if !((*Sqlite3_context)(unsafe.Pointer(bp+8 /* &ctx */)).FisError != 0) { goto __10 } - rc = (*Sqlite3_context)(unsafe.Pointer(bp + 16 /* &ctx */)).FisError + rc = (*Sqlite3_context)(unsafe.Pointer(bp + 8 /* &ctx */)).FisError Xsqlite3ErrorMsg(tls, (*ValueNewStat4Ctx)(unsafe.Pointer(pCtx)).FpParse, ts+3630 /* "%s" */, libc.VaList(bp, Xsqlite3_value_text(tls, pVal))) goto __11 __10: @@ -101021,12 +101021,12 @@ __14: // NULL, it is assumed that the caller will free any allocated object // in all cases. func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8, ppVal uintptr, pCtx uintptr) int32 { /* sqlite3.c:78480:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var op int32 var zVal uintptr - // var pVal uintptr at bp+24, 8 + // var pVal uintptr at bp+16, 8 var negInt int32 var zNeg uintptr @@ -101034,7 +101034,7 @@ func valueFromExpr(tls *libc.TLS, db uintptr, pExpr uintptr, enc U8, affinity U8 var aff U8 var nVal int32 zVal = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = uintptr(0) negInt = 1 zNeg = ts + 755 /* "" */ rc = SQLITE_OK @@ -101092,8 +101092,8 @@ __6: if !(((op == TK_STRING) || (op == TK_FLOAT)) || (op == TK_INTEGER)) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) = valueNew(tls, db, pCtx) - if !(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) == uintptr(0)) { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) == uintptr(0)) { goto __9 } goto no_mem @@ -101102,7 +101102,7 @@ __9: if !(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_IntValue))) != U32(0)) { goto __10 } - Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), (I64(*(*int32)(unsafe.Pointer(pExpr + 8 /* &.u */))) * I64(negInt))) + Xsqlite3VdbeMemSetInt64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), (I64(*(*int32)(unsafe.Pointer(pExpr + 8 /* &.u */))) * I64(negInt))) goto __11 __10: zVal = Xsqlite3MPrintf(tls, db, ts+5405 /* "%s%s" */, libc.VaList(bp, zNeg, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)))) @@ -101112,30 +101112,30 @@ __10: goto no_mem __12: ; - Xsqlite3ValueSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), -1, zVal, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) + Xsqlite3ValueSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), -1, zVal, uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) __11: ; if !(((op == TK_INTEGER) || (op == TK_FLOAT)) && (int32(affinity) == SQLITE_AFF_BLOB)) { goto __13 } - Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_UTF8)) + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), uint8(SQLITE_AFF_NUMERIC), uint8(SQLITE_UTF8)) goto __14 __13: - Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), affinity, uint8(SQLITE_UTF8)) + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), affinity, uint8(SQLITE_UTF8)) __14: ; - if !((int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)))).Fflags) & ((MEM_Int | MEM_IntReal) | MEM_Real)) != 0) { + if !((int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags) & ((MEM_Int | MEM_IntReal) | MEM_Real)) != 0) { goto __15 } - *(*U16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Str))) + *(*U16)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Str))) __15: ; if !(int32(enc) != SQLITE_UTF8) { goto __16 } - rc = Xsqlite3VdbeChangeEncoding(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), int32(enc)) + rc = Xsqlite3VdbeChangeEncoding(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), int32(enc)) __16: ; goto __8 @@ -101144,30 +101144,30 @@ __7: goto __17 } // This branch happens for multiple negative signs. Ex: -(-5) - if !((SQLITE_OK == valueFromExpr(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, enc, affinity, bp+24 /* &pVal */, pCtx)) && - (*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) != uintptr(0))) { + if !((SQLITE_OK == valueFromExpr(tls, db, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, enc, affinity, bp+16 /* &pVal */, pCtx)) && + (*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) != uintptr(0))) { goto __19 } - Xsqlite3VdbeMemNumerify(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */))) - if !((int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)))).Fflags) & MEM_Real) != 0) { + Xsqlite3VdbeMemNumerify(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) + if !((int32((*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags) & MEM_Real) != 0) { goto __20 } - *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) = -*(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) + *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) = -*(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) goto __21 __20: - if !(*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)))) { + if !(*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)))) { goto __22 } - *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) = -(float64((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)))) - (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)))).Fflags = (U16((int32((*Sqlite3_value)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */))))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Real)) + *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) = -(float64((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32)))) + (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags = (U16((int32((*Sqlite3_value)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Real)) goto __23 __22: - *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) = -*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) + *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) = -*(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) __23: ; __21: ; - Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), affinity, enc) + Xsqlite3ValueApplyAffinity(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), affinity, enc) __19: ; goto __18 @@ -101175,22 +101175,22 @@ __17: if !(op == TK_NULL) { goto __24 } - *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) = valueNew(tls, db, pCtx) - if !(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) == uintptr(0)) { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) == uintptr(0)) { goto __26 } goto no_mem __26: ; - Xsqlite3VdbeMemSetNull(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */))) + Xsqlite3VdbeMemSetNull(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) goto __25 __24: if !(op == TK_BLOB) { goto __27 } - *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) = valueNew(tls, db, pCtx) - if !(!(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) != 0)) { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(!(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) != 0)) { goto __29 } goto no_mem @@ -101199,25 +101199,25 @@ __29: zVal = (*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 2) nVal = (Xsqlite3Strlen30(tls, zVal) - 1) - Xsqlite3VdbeMemSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)), Xsqlite3HexToBlob(tls, db, zVal, nVal), (int64(nVal / 2)), + Xsqlite3VdbeMemSetStr(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)), Xsqlite3HexToBlob(tls, db, zVal, nVal), (int64(nVal / 2)), uint8(0), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) goto __28 __27: if !((op == TK_FUNCTION) && (pCtx != uintptr(0))) { goto __30 } - rc = valueFromFunction(tls, db, pExpr, enc, affinity, bp+24 /* &pVal */, pCtx) + rc = valueFromFunction(tls, db, pExpr, enc, affinity, bp+16 /* &pVal */, pCtx) goto __31 __30: if !(op == TK_TRUEFALSE) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) = valueNew(tls, db, pCtx) - if !(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) != 0) { + *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) = valueNew(tls, db, pCtx) + if !(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) != 0) { goto __33 } - (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)))).Fflags = U16(MEM_Int) - *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) /* &.u */)) = (I64(libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 4))) == 0))) + (*Sqlite3_value)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)))).Fflags = U16(MEM_Int) + *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) /* &.u */)) = (I64(libc.Bool32(int32(*(*int8)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) + 4))) == 0))) __33: ; __32: @@ -101233,7 +101233,7 @@ __18: __8: ; - *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */)) + *(*uintptr)(unsafe.Pointer(ppVal)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */)) return rc no_mem: @@ -101248,7 +101248,7 @@ __34: if !(pCtx == uintptr(0)) { goto __35 } - Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pVal */))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pVal */))) __35: ; return SQLITE_NOMEM @@ -102537,20 +102537,20 @@ var dummy VdbeOp /* sqlite3.c:80340:17: */ // Compute a string that describes the P4 parameter for an opcode. // Use zTemp for any required temporary buffer space. func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* sqlite3.c:80540:21: */ - bp := tls.Alloc(272) - defer tls.Free(272) + bp := tls.Alloc(176) + defer tls.Free(176) var zP4 uintptr = uintptr(0) - // var x StrAccum at bp+240, 32 + // var x StrAccum at bp+144, 32 - Xsqlite3StrAccumInit(tls, bp+240 /* &x */, uintptr(0), uintptr(0), 0, SQLITE_MAX_LENGTH) + Xsqlite3StrAccumInit(tls, bp+144 /* &x */, uintptr(0), uintptr(0), 0, SQLITE_MAX_LENGTH) switch int32((*Op)(unsafe.Pointer(pOp)).Fp4type) { case -9: { var j int32 var pKeyInfo uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5410 /* "k(%d" */, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5410 /* "k(%d" */, libc.VaList(bp, int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField))) for j = 0; j < int32((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FnKeyField); j++ { var pColl uintptr = *(*uintptr)(unsafe.Pointer((pKeyInfo + 32 /* &.aColl */) + uintptr(j)*8)) var zColl uintptr @@ -102562,8 +102562,8 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* if libc.Xstrcmp(tls, zColl, ts+318 /* "BINARY" */) == 0 { zColl = ts + 5415 /* "B" */ } - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5417, /* ",%s%s%s" */ - libc.VaList(bp+16, func() uintptr { + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5417, /* ",%s%s%s" */ + libc.VaList(bp+8, func() uintptr { if (int32(*(*U8)(unsafe.Pointer((*KeyInfo)(unsafe.Pointer(pKeyInfo)).FaSortFlags + uintptr(j)))) & KEYINFO_ORDER_DESC) != 0 { return ts + 5403 /* "-" */ } @@ -102577,7 +102577,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* }(), zColl)) } - Xsqlite3_str_append(tls, bp+240 /* &x */, ts+5428 /* ")" */, 1) + Xsqlite3_str_append(tls, bp+144 /* &x */, ts+5428 /* ")" */, 1) break } @@ -102585,7 +102585,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* { var pColl uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5430 /* "%.18s-%s" */, libc.VaList(bp+48, (*CollSeq)(unsafe.Pointer(pColl)).FzName, + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5430 /* "%.18s-%s" */, libc.VaList(bp+32, (*CollSeq)(unsafe.Pointer(pColl)).FzName, encnames[(*CollSeq)(unsafe.Pointer(pColl)).Fenc])) break @@ -102593,32 +102593,32 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* case -8: { var pDef uintptr = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5439 /* "%s(%d)" */, libc.VaList(bp+72, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5439 /* "%s(%d)" */, libc.VaList(bp+48, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -16: { var pDef uintptr = (*Sqlite3_context)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpFunc - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5439 /* "%s(%d)" */, libc.VaList(bp+96, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5439 /* "%s(%d)" */, libc.VaList(bp+64, (*FuncDef)(unsafe.Pointer(pDef)).FzName, int32((*FuncDef)(unsafe.Pointer(pDef)).FnArg))) break } case -14: { - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5446 /* "%lld" */, libc.VaList(bp+120, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5446 /* "%lld" */, libc.VaList(bp+80, *(*I64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))))) break } case -3: { - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5451 /* "%d" */, libc.VaList(bp+136, *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5451 /* "%d" */, libc.VaList(bp+88, *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) break } case -13: { - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+538 /* "%.16g" */, libc.VaList(bp+152, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+538 /* "%.16g" */, libc.VaList(bp+96, *(*float64)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))))) break } @@ -102628,9 +102628,9 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Str) != 0 { zP4 = (*Mem)(unsafe.Pointer(pMem)).Fz } else if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & (MEM_Int | MEM_IntReal)) != 0 { - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5446 /* "%lld" */, libc.VaList(bp+168, *(*I64)(unsafe.Pointer(pMem /* &.u */)))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5446 /* "%lld" */, libc.VaList(bp+104, *(*I64)(unsafe.Pointer(pMem /* &.u */)))) } else if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Real) != 0 { - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+538 /* "%.16g" */, libc.VaList(bp+184, *(*float64)(unsafe.Pointer(pMem /* &.u */)))) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+538 /* "%.16g" */, libc.VaList(bp+112, *(*float64)(unsafe.Pointer(pMem /* &.u */)))) } else if (int32((*Mem)(unsafe.Pointer(pMem)).Fflags) & MEM_Null) != 0 { zP4 = ts + 756 /* "NULL" */ } else { @@ -102643,7 +102643,7 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* case -12: { var pVtab uintptr = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpVtab - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5461 /* "vtab:%p" */, libc.VaList(bp+200, pVtab)) + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5461 /* "vtab:%p" */, libc.VaList(bp+120, pVtab)) break } @@ -102654,14 +102654,14 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* var n U32 = *(*U32)(unsafe.Pointer(ai)) // The first element of an INTARRAY is always the // count of the number of elements to follow for i = U32(1); i <= n; i++ { - Xsqlite3_str_appendf(tls, bp+240 /* &x */, ts+5469 /* "%c%u" */, libc.VaList(bp+216, func() int32 { + Xsqlite3_str_appendf(tls, bp+144 /* &x */, ts+5469 /* "%c%u" */, libc.VaList(bp+128, func() int32 { if i == U32(1) { return '[' } return ',' }(), *(*U32)(unsafe.Pointer(ai + uintptr(i)*4)))) } - Xsqlite3_str_append(tls, bp+240 /* &x */, ts+5474 /* "]" */, 1) + Xsqlite3_str_append(tls, bp+144 /* &x */, ts+5474 /* "]" */, 1) break } @@ -102691,12 +102691,12 @@ func Xsqlite3VdbeDisplayP4(tls *libc.TLS, db uintptr, pOp uintptr) uintptr { /* } } if zP4 != 0 { - Xsqlite3_str_appendall(tls, bp+240 /* &x */, zP4) + Xsqlite3_str_appendall(tls, bp+144 /* &x */, zP4) } - if (int32((*StrAccum)(unsafe.Pointer(bp+240 /* &x */)).FaccError) & SQLITE_NOMEM) != 0 { + if (int32((*StrAccum)(unsafe.Pointer(bp+144 /* &x */)).FaccError) & SQLITE_NOMEM) != 0 { Xsqlite3OomFault(tls, db) } - return Xsqlite3StrAccumFinish(tls, bp+240 /* &x */) + return Xsqlite3StrAccumFinish(tls, bp+144 /* &x */) } var encnames = [4]uintptr{ts + 5484 /* "?" */, ts + 5486 /* "8" */, ts + 5488 /* "16LE" */, ts + 5493 /* "16BE" */} /* sqlite3.c:80570:25 */ @@ -103385,8 +103385,8 @@ func Xsqlite3VdbeSetColName(tls *libc.TLS, p uintptr, idx int32, var1 int32, zNa // write-transaction spanning more than one database file, this routine // takes care of the super-journal trickery. func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537:12: */ - bp := tls.Alloc(104) - defer tls.Free(104) + bp := tls.Alloc(72) + defer tls.Free(72) var i int32 var nTrans int32 = 0 // Number of databases with an active write-transaction @@ -103470,9 +103470,9 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537 var pVfs uintptr = (*Sqlite3)(unsafe.Pointer(db)).FpVfs var zSuper uintptr = uintptr(0) // File-name for the super-journal var zMainFile uintptr = Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb)).FpBt) - *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)) = uintptr(0) var offset I64 = int64(0) - // var res int32 at bp+92, 4 + // var res int32 at bp+60, 4 var retryCount int32 = 0 var nMainFile int32 @@ -103484,30 +103484,30 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537 return SQLITE_NOMEM } zSuper += uintptr(4) - for ok := true; ok; ok = ((rc == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 92 /* res */)) != 0)) { - // var iRandom U32 at bp+88, 4 + for ok := true; ok; ok = ((rc == SQLITE_OK) && (*(*int32)(unsafe.Pointer(bp + 60 /* res */)) != 0)) { + // var iRandom U32 at bp+56, 4 if retryCount != 0 { if retryCount > 100 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5570 /* "MJ delete: %s" */, libc.VaList(bp+32, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5570 /* "MJ delete: %s" */, libc.VaList(bp+24, zSuper)) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) break } else if retryCount == 1 { - Xsqlite3_log(tls, SQLITE_FULL, ts+5584 /* "MJ collide: %s" */, libc.VaList(bp+48, zSuper)) + Xsqlite3_log(tls, SQLITE_FULL, ts+5584 /* "MJ collide: %s" */, libc.VaList(bp+32, zSuper)) } } retryCount++ - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+88 /* &iRandom */) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56 /* &iRandom */) Xsqlite3_snprintf(tls, 13, (zSuper + uintptr(nMainFile)), ts+5599, /* "-mj%06X9%02X" */ - libc.VaList(bp+64, ((*(*U32)(unsafe.Pointer(bp + 88 /* iRandom */))>>8)&U32(0xffffff)), (*(*U32)(unsafe.Pointer(bp + 88 /* iRandom */))&U32(0xff)))) + libc.VaList(bp+40, ((*(*U32)(unsafe.Pointer(bp + 56 /* iRandom */))>>8)&U32(0xffffff)), (*(*U32)(unsafe.Pointer(bp + 56 /* iRandom */))&U32(0xff)))) // The antipenultimate character of the super-journal name must // be "9" to avoid name collisions when using 8+3 filenames. - rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+92 /* &res */) + rc = Xsqlite3OsAccess(tls, pVfs, zSuper, SQLITE_ACCESS_EXISTS, bp+60 /* &res */) } if rc == SQLITE_OK { // Open the super-journal. - rc = Xsqlite3OsOpenMalloc(tls, pVfs, zSuper, bp+96, /* &pSuperJrnl */ + rc = Xsqlite3OsOpenMalloc(tls, pVfs, zSuper, bp+64, /* &pSuperJrnl */ (((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_SUPER_JOURNAL), uintptr(0)) } if rc != SQLITE_OK { @@ -103528,10 +103528,10 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537 continue // Ignore TEMP and :memory: databases } - rc = Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */)), zFile, (Xsqlite3Strlen30(tls, zFile) + 1), offset) + rc = Xsqlite3OsWrite(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)), zFile, (Xsqlite3Strlen30(tls, zFile) + 1), offset) offset = offset + (I64(Xsqlite3Strlen30(tls, zFile) + 1)) if rc != SQLITE_OK { - Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */))) + Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) Xsqlite3DbFree(tls, db, (zSuper - uintptr(4))) return rc @@ -103541,9 +103541,9 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537 // Sync the super-journal file. If the IOCAP_SEQUENTIAL device // flag is set this is not required. - if (0 == (Xsqlite3OsDeviceCharacteristics(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */))) & SQLITE_IOCAP_SEQUENTIAL)) && - (SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3OsSync(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */)), SQLITE_SYNC_NORMAL)))) { - Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */))) + if (0 == (Xsqlite3OsDeviceCharacteristics(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) & SQLITE_IOCAP_SEQUENTIAL)) && + (SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3OsSync(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */)), SQLITE_SYNC_NORMAL)))) { + Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) Xsqlite3OsDelete(tls, pVfs, zSuper, 0) Xsqlite3DbFree(tls, db, (zSuper - uintptr(4))) return rc @@ -103564,7 +103564,7 @@ func vdbeCommit(tls *libc.TLS, db uintptr, p uintptr) int32 { /* sqlite3.c:81537 rc = Xsqlite3BtreeCommitPhaseOne(tls, pBt, zSuper) } } - Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pSuperJrnl */))) + Xsqlite3OsCloseFree(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pSuperJrnl */))) if rc != SQLITE_OK { Xsqlite3DbFree(tls, db, (zSuper - uintptr(4))) @@ -103943,8 +103943,8 @@ func Xsqlite3VdbeTransferError(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82 // virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to // VDBE_MAGIC_INIT. func Xsqlite3VdbeReset(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:82187:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var db uintptr db = (*Vdbe)(unsafe.Pointer(p)).Fdb @@ -105513,8 +105513,8 @@ func Xsqlite3VdbeSetVarmask(tls *libc.TLS, v uintptr, iVar int32) { /* sqlite3.c // This routine is invoked by date/time functions that use non-deterministic // features such as 'now'. func Xsqlite3NotPureFunc(tls *libc.TLS, pCtx uintptr) int32 { /* sqlite3.c:84023:20: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pOp uintptr if (*Sqlite3_context)(unsafe.Pointer(pCtx)).FpVdbe == uintptr(0) { @@ -106881,8 +106881,8 @@ func Xsqlite3_column_origin_name16(tls *libc.TLS, pStmt uintptr, N int32) uintpt // The error code stored in database p->db is overwritten with the return // value in any case. func vdbeUnbind(tls *libc.TLS, p uintptr, i int32) int32 { /* sqlite3.c:85487:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pVar uintptr if vdbeSafetyNotNull(tls, p) != 0 { @@ -107644,111 +107644,111 @@ func findNextHostParameter(tls *libc.TLS, zSql uintptr, pnToken uintptr) int32 { // parameter index is known, locate the value in p->aVar[]. Then render // the value as a literal in place of the host parameter name. func Xsqlite3VdbeExpandSql(tls *libc.TLS, p uintptr, zRawSql uintptr) uintptr { /* sqlite3.c:86286:21: */ - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(248) + defer tls.Free(248) var db uintptr // The database connection - *(*int32)(unsafe.Pointer(bp + 224 /* idx */)) = 0 // Index of a host parameter + *(*int32)(unsafe.Pointer(bp + 184 /* idx */)) = 0 // Index of a host parameter var nextIndex int32 = 1 // Index of next ? host parameter var n int32 // Length of a token prefix - // var nToken int32 at bp+220, 4 + // var nToken int32 at bp+180, 4 // Length of the parameter token var i int32 // Loop counter var pVar uintptr // Value of a host parameter - // var out StrAccum at bp+88, 32 + // var out StrAccum at bp+48, 32 // Accumulate the output here - // var utf8 Mem at bp+232, 56 + // var utf8 Mem at bp+192, 56 // Used to convert UTF16 into UTF8 for display - // var zBase [100]int8 at bp+120, 100 + // var zBase [100]int8 at bp+80, 100 // Initial working space db = (*Vdbe)(unsafe.Pointer(p)).Fdb - Xsqlite3StrAccumInit(tls, bp+88 /* &out */, uintptr(0), bp+120 /* &zBase[0] */, int32(unsafe.Sizeof([100]int8{})), + Xsqlite3StrAccumInit(tls, bp+48 /* &out */, uintptr(0), bp+80 /* &zBase[0] */, int32(unsafe.Sizeof([100]int8{})), *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */)))) if (*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1 { for *(*int8)(unsafe.Pointer(zRawSql)) != 0 { var zStart uintptr = zRawSql for (int32(*(*int8)(unsafe.Pointer(libc.PostIncUintptr(&zRawSql, 1)))) != '\n') && (*(*int8)(unsafe.Pointer(zRawSql)) != 0) { } - Xsqlite3_str_append(tls, bp+88 /* &out */, ts+5873 /* "-- " */, 3) + Xsqlite3_str_append(tls, bp+48 /* &out */, ts+5873 /* "-- " */, 3) - Xsqlite3_str_append(tls, bp+88 /* &out */, zStart, (int32((int64(zRawSql) - int64(zStart)) / 1))) + Xsqlite3_str_append(tls, bp+48 /* &out */, zStart, (int32((int64(zRawSql) - int64(zStart)) / 1))) } } else if int32((*Vdbe)(unsafe.Pointer(p)).FnVar) == 0 { - Xsqlite3_str_append(tls, bp+88 /* &out */, zRawSql, Xsqlite3Strlen30(tls, zRawSql)) + Xsqlite3_str_append(tls, bp+48 /* &out */, zRawSql, Xsqlite3Strlen30(tls, zRawSql)) } else { for *(*int8)(unsafe.Pointer(zRawSql)) != 0 { - n = findNextHostParameter(tls, zRawSql, bp+220 /* &nToken */) + n = findNextHostParameter(tls, zRawSql, bp+180 /* &nToken */) - Xsqlite3_str_append(tls, bp+88 /* &out */, zRawSql, n) + Xsqlite3_str_append(tls, bp+48 /* &out */, zRawSql, n) zRawSql += uintptr(n) - if *(*int32)(unsafe.Pointer(bp + 220 /* nToken */)) == 0 { + if *(*int32)(unsafe.Pointer(bp + 180 /* nToken */)) == 0 { break } if int32(*(*int8)(unsafe.Pointer(zRawSql))) == '?' { - if *(*int32)(unsafe.Pointer(bp + 220 /* nToken */)) > 1 { + if *(*int32)(unsafe.Pointer(bp + 180 /* nToken */)) > 1 { - Xsqlite3GetInt32(tls, (zRawSql + 1), bp+224 /* &idx */) + Xsqlite3GetInt32(tls, (zRawSql + 1), bp+184 /* &idx */) } else { - *(*int32)(unsafe.Pointer(bp + 224 /* idx */)) = nextIndex + *(*int32)(unsafe.Pointer(bp + 184 /* idx */)) = nextIndex } } else { - *(*int32)(unsafe.Pointer(bp + 224 /* idx */)) = Xsqlite3VdbeParameterIndex(tls, p, zRawSql, *(*int32)(unsafe.Pointer(bp + 220 /* nToken */))) + *(*int32)(unsafe.Pointer(bp + 184 /* idx */)) = Xsqlite3VdbeParameterIndex(tls, p, zRawSql, *(*int32)(unsafe.Pointer(bp + 180 /* nToken */))) } - zRawSql += uintptr(*(*int32)(unsafe.Pointer(bp + 220 /* nToken */))) + zRawSql += uintptr(*(*int32)(unsafe.Pointer(bp + 180 /* nToken */))) nextIndex = func() int32 { - if (*(*int32)(unsafe.Pointer(bp + 224 /* idx */)) + 1) > (nextIndex) { - return (*(*int32)(unsafe.Pointer(bp + 224 /* idx */)) + 1) + if (*(*int32)(unsafe.Pointer(bp + 184 /* idx */)) + 1) > (nextIndex) { + return (*(*int32)(unsafe.Pointer(bp + 184 /* idx */)) + 1) } return nextIndex }() - pVar = ((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((*(*int32)(unsafe.Pointer(bp + 224 /* idx */))-1))*56) + pVar = ((*Vdbe)(unsafe.Pointer(p)).FaVar + uintptr((*(*int32)(unsafe.Pointer(bp + 184 /* idx */))-1))*56) if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Null) != 0 { - Xsqlite3_str_append(tls, bp+88 /* &out */, ts+756 /* "NULL" */, 4) + Xsqlite3_str_append(tls, bp+48 /* &out */, ts+756 /* "NULL" */, 4) } else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & (MEM_Int | MEM_IntReal)) != 0 { - Xsqlite3_str_appendf(tls, bp+88 /* &out */, ts+5446 /* "%lld" */, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar /* &.u */)))) + Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5446 /* "%lld" */, libc.VaList(bp, *(*I64)(unsafe.Pointer(pVar /* &.u */)))) } else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Real) != 0 { - Xsqlite3_str_appendf(tls, bp+88 /* &out */, ts+5396 /* "%!.15g" */, libc.VaList(bp+16, *(*float64)(unsafe.Pointer(pVar /* &.u */)))) + Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5396 /* "%!.15g" */, libc.VaList(bp+8, *(*float64)(unsafe.Pointer(pVar /* &.u */)))) } else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Str) != 0 { var nOut int32 // Number of bytes of the string text to include in output var enc U8 = (*Sqlite3)(unsafe.Pointer(db)).Fenc if int32(enc) != SQLITE_UTF8 { - libc.Xmemset(tls, bp+232 /* &utf8 */, 0, uint64(unsafe.Sizeof(Mem{}))) - (*Mem)(unsafe.Pointer(bp + 232 /* &utf8 */)).Fdb = db - Xsqlite3VdbeMemSetStr(tls, bp+232 /* &utf8 */, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0)) - if SQLITE_NOMEM == Xsqlite3VdbeChangeEncoding(tls, bp+232 /* &utf8 */, SQLITE_UTF8) { - (*StrAccum)(unsafe.Pointer(bp + 88 /* &out */)).FaccError = U8(SQLITE_NOMEM) - (*StrAccum)(unsafe.Pointer(bp + 88 /* &out */)).FnAlloc = U32(0) + libc.Xmemset(tls, bp+192 /* &utf8 */, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp + 192 /* &utf8 */)).Fdb = db + Xsqlite3VdbeMemSetStr(tls, bp+192 /* &utf8 */, (*Mem)(unsafe.Pointer(pVar)).Fz, int64((*Mem)(unsafe.Pointer(pVar)).Fn), enc, uintptr(0)) + if SQLITE_NOMEM == Xsqlite3VdbeChangeEncoding(tls, bp+192 /* &utf8 */, SQLITE_UTF8) { + (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FaccError = U8(SQLITE_NOMEM) + (*StrAccum)(unsafe.Pointer(bp + 48 /* &out */)).FnAlloc = U32(0) } - pVar = bp + 232 /* &utf8 */ + pVar = bp + 192 /* &utf8 */ } nOut = (*Mem)(unsafe.Pointer(pVar)).Fn - Xsqlite3_str_appendf(tls, bp+88 /* &out */, ts+5877 /* "'%.*q'" */, libc.VaList(bp+32, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) + Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5877 /* "'%.*q'" */, libc.VaList(bp+16, nOut, (*Mem)(unsafe.Pointer(pVar)).Fz)) if int32(enc) != SQLITE_UTF8 { - Xsqlite3VdbeMemRelease(tls, bp+232 /* &utf8 */) + Xsqlite3VdbeMemRelease(tls, bp+192 /* &utf8 */) } } else if (int32((*Mem)(unsafe.Pointer(pVar)).Fflags) & MEM_Zero) != 0 { - Xsqlite3_str_appendf(tls, bp+88 /* &out */, ts+5884 /* "zeroblob(%d)" */, libc.VaList(bp+56, *(*int32)(unsafe.Pointer(pVar /* &.u */)))) + Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5884 /* "zeroblob(%d)" */, libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pVar /* &.u */)))) } else { var nOut int32 // Number of bytes of the blob to include in output - Xsqlite3_str_append(tls, bp+88 /* &out */, ts+5897 /* "x'" */, 2) + Xsqlite3_str_append(tls, bp+48 /* &out */, ts+5897 /* "x'" */, 2) nOut = (*Mem)(unsafe.Pointer(pVar)).Fn for i = 0; i < nOut; i++ { - Xsqlite3_str_appendf(tls, bp+88 /* &out */, ts+5900 /* "%02x" */, libc.VaList(bp+72, (int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff))) + Xsqlite3_str_appendf(tls, bp+48 /* &out */, ts+5900 /* "%02x" */, libc.VaList(bp+40, (int32(*(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pVar)).Fz + uintptr(i))))&0xff))) } - Xsqlite3_str_append(tls, bp+88 /* &out */, ts+5905 /* "'" */, 1) + Xsqlite3_str_append(tls, bp+48 /* &out */, ts+5905 /* "'" */, 1) } } } - if (*StrAccum)(unsafe.Pointer(bp+88 /* &out */)).FaccError != 0 { - Xsqlite3_str_reset(tls, bp+88 /* &out */) + if (*StrAccum)(unsafe.Pointer(bp+48 /* &out */)).FaccError != 0 { + Xsqlite3_str_reset(tls, bp+48 /* &out */) } - return Xsqlite3StrAccumFinish(tls, bp+88 /* &out */) + return Xsqlite3StrAccumFinish(tls, bp+48 /* &out */) } //************* End of vdbetrace.c ****************************************** @@ -108134,8 +108134,8 @@ func out2Prerelease(tls *libc.TLS, p uintptr, pOp uintptr) uintptr { /* sqlite3. // Execute as much of a VDBE program as we can. // This is the core of sqlite3_step(). func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: */ - bp := tls.Alloc(1056) - defer tls.Free(1056) + bp := tls.Alloc(936) + defer tls.Free(936) var aOp uintptr // Copy of p->aOp var pOp uintptr // Current operation @@ -108172,13 +108172,13 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var type1 U16 // Numeric type of left operand var type2 U16 // Numeric type of right operand var iA I64 // Integer value of left operand - // var iB I64 at bp+296, 8 + // var iB I64 at bp+176, 8 // Integer value of right operand var rA float64 // Real value of left operand var rB float64 // same as TK_RSHIFT, in1, in2, out3 - // var iA1 I64 at bp+312, 8 + // var iA1 I64 at bp+192, 8 - // var uA U64 at bp+304, 8 + // var uA U64 at bp+184, 8 var iB1 I64 var op U8 // same as TK_GE, jump, in1, in3 @@ -108202,22 +108202,22 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var c int32 // jump, in1 var c1 int32 // out3 var pC uintptr - // var p22 U32 at bp+328, 4 + // var p22 U32 at bp+208, 4 // column number to retrieve - // var pC1 uintptr at bp+320, 8 + // var pC1 uintptr at bp+200, 8 // The VDBE cursor var pCrsr uintptr // The BTree cursor var aOffset uintptr // aOffset[i] is offset to start of data for i-th column var len int32 // The length of the serialized data for the column var i2 int32 // Loop counter var pDest uintptr // Where to write the extracted value - // var sMem Mem at bp+336, 56 + // var sMem Mem at bp+216, 56 // For storing the record being decoded var zData uintptr // Part of the record being decoded var zHdr uintptr // Next unparsed byte of the header var zEndHdr uintptr // Pointer to first byte after the header var offset64 U64 // 64-bit offset - // var t U32 at bp+392, 4 + // var t U32 at bp+272, 4 // A type code from the record header var pReg uintptr var zAffinity uintptr @@ -108239,7 +108239,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var len1 U32 // Length of a field var zHdr1 uintptr // Where to write next byte of the header var zPayload uintptr // out2 - // var nEntry I64 at bp+400, 8 + // var nEntry I64 at bp+280, 8 var pCrsr1 uintptr var isSchemaChange int32 @@ -108259,9 +108259,9 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var desiredAutoCommit int32 var iRollback int32 var pBt uintptr - // var iMeta int32 at bp+408, 4 + // var iMeta int32 at bp+288, 4 // out2 - // var iMeta1 int32 at bp+412, 4 + // var iMeta1 int32 at bp+292, 4 var iDb int32 var iCookie int32 @@ -108283,20 +108283,20 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pCx3 uintptr var flags31 U16 var newType U16 // jump, in3, group - // var res1 int32 at bp+416, 4 + // var res1 int32 at bp+296, 4 // Comparison result var oc int32 // Opcode var pC3 uintptr // The cursor to seek - // var r UnpackedRecord at bp+424, 24 + // var r UnpackedRecord at bp+304, 24 // The key to seek for var nField2 int32 // Number of columns or fields in the key var iKey I64 // The rowid we are to seek to var eqOnly int32 var pC4 uintptr - // var res3 int32 at bp+472, 4 + // var res3 int32 at bp+352, 4 var nStep int32 - // var r1 UnpackedRecord at bp+448, 24 + // var r1 UnpackedRecord at bp+328, 24 var pC5 uintptr // jump, in3 var pC6 uintptr // jump, in3 @@ -108304,28 +108304,28 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var takeJump int32 var ii1 int32 var pC7 uintptr - // var res4 int32 at bp+504, 4 + // var res4 int32 at bp+384, 4 var pFree uintptr var pIdxKey uintptr - // var r2 UnpackedRecord at bp+480, 24 + // var r2 UnpackedRecord at bp+360, 24 // If pIn3->u.i does not contain an integer, compute iKey as the // integer value of pIn3. Jump to P2 if pIn3 cannot be converted // into an integer without loss of information. Take care to avoid // changing the datatype of pIn3, however, as it is used by other // parts of the prepared statement. - // var x Mem at bp+512, 56 + // var x Mem at bp+392, 56 // jump, in3 var pC8 uintptr var pCrsr2 uintptr - // var res5 int32 at bp+568, 4 + // var res5 int32 at bp+448, 4 var iKey1 U64 // out2 - // var v I64 at bp+576, 8 + // var v I64 at bp+456, 8 // The new rowid var pC9 uintptr // Cursor of table to get the new rowid - // var res6 int32 at bp+572, 4 + // var res6 int32 at bp+452, 4 // Result of an sqlite3BtreeLast() var cnt1 int32 // Counter to limit the number of searches var pMem1 uintptr // Register holding largest rowid for AUTOINCREMENT @@ -108336,7 +108336,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var seekResult int32 // Result of prior seek or 0 if no USESEEKRESULT flag var zDb uintptr // database name - used by the update hook var pTab uintptr // Table structure - used by update and pre-update hooks - // var x1 BtreePayload at bp+584, 48 + // var x1 BtreePayload at bp+464, 48 var pDest1 uintptr // Cursor to write to var pSrc uintptr // Cursor to read from @@ -108346,7 +108346,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pTab1 uintptr var opflags int32 var pC12 uintptr - // var res7 int32 at bp+632, 4 + // var res7 int32 at bp+512, 4 var nKeyCol int32 var pC13 uintptr @@ -108354,69 +108354,69 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pCrsr3 uintptr var n3 U32 // out2 var pC15 uintptr - // var v3 I64 at bp+640, 8 + // var v3 I64 at bp+520, 8 var pVtab uintptr var pModule uintptr var pC16 uintptr // jump var pC17 uintptr var pCrsr4 uintptr - // var res8 int32 at bp+648, 4 + // var res8 int32 at bp+528, 4 // jump var pC18 uintptr var pCrsr5 uintptr - // var res9 int32 at bp+652, 4 + // var res9 int32 at bp+532, 4 var sz I64 // jump var pC19 uintptr var pCrsr6 uintptr - // var res10 int32 at bp+656, 4 + // var res10 int32 at bp+536, 4 // jump var pC20 uintptr // in2 var pC21 uintptr - // var x2 BtreePayload at bp+664, 48 + // var x2 BtreePayload at bp+544, 48 // in2 var pC22 uintptr var pC23 uintptr var pCrsr7 uintptr - // var res11 int32 at bp+736, 4 + // var res11 int32 at bp+616, 4 - // var r3 UnpackedRecord at bp+712, 24 + // var r3 UnpackedRecord at bp+592, 24 // out2 var pC24 uintptr // The P1 index cursor var pTabCur uintptr // The P2 table cursor (OP_DeferredSeek only) - // var rowid I64 at bp+744, 8 + // var rowid I64 at bp+624, 8 var pC25 uintptr var nCellKey I64 var pCur1 uintptr - // var m Mem at bp+752, 56 + // var m Mem at bp+632, 56 // jump var pC26 uintptr var res12 int32 - // var r4 UnpackedRecord at bp+808, 24 + // var r4 UnpackedRecord at bp+688, 24 // out2 - // var iMoved int32 at bp+832, 4 + // var iMoved int32 at bp+712, 4 var iDb2 int32 - // var nChange int32 at bp+836, 4 + // var nChange int32 at bp+716, 4 var pC27 uintptr // out2 - // var pgno Pgno at bp+840, 4 + // var pgno Pgno at bp+720, 4 var pDb2 uintptr var iDb3 int32 var zSchema uintptr var zSql uintptr - // var initData InitData at bp+848, 40 + // var initData InitData at bp+728, 40 var nRoot int32 // Number of tables to check. (Number of root pages.) var aRoot uintptr // Array of rootpage numbers for tables to be checked - // var nErr int32 at bp+888, 4 + // var nErr int32 at bp+768, 4 // Number of errors reported var z uintptr // Text of the error report var pnErr uintptr // jump, in1, out3 - // var val I64 at bp+896, 8 + // var val I64 at bp+776, 8 // jump, in1, in3 var iSet int32 var exists int32 // jump @@ -108431,7 +108431,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pFrame3 uintptr var pIn uintptr // in2 var pFrame4 uintptr // in1, out2, in3 - // var x3 I64 at bp+904, 8 + // var x3 I64 at bp+784, 8 var n4 int32 var pCtx uintptr @@ -108440,7 +108440,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pMem3 uintptr var pMem4 uintptr var i5 int32 // Loop counter - // var aRes [3]int32 at bp+912, 12 + // var aRes [3]int32 at bp+792, 12 // Results var pMem5 uintptr // out2 var pBt1 uintptr // Btree to change journal mode of @@ -108455,11 +108455,11 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var p13 int32 var isWriteLock U8 var pVTab uintptr - // var sMem1 Mem at bp+928, 56 + // var sMem1 Mem at bp+808, 56 // For storing the record being decoded var zTab uintptr var pCur2 uintptr - // var pVCur uintptr at bp+984, 8 + // var pVCur uintptr at bp+864, 8 var pVtab1 uintptr var pModule1 uintptr // jump @@ -108477,7 +108477,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pVtab3 uintptr var pModule3 uintptr var pDest2 uintptr - // var sContext Sqlite3_context at bp+992, 56 + // var sContext Sqlite3_context at bp+872, 56 var pCur4 uintptr // jump var pVtab4 uintptr @@ -108492,7 +108492,7 @@ func Xsqlite3VdbeExec(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:87179:20: * var pModule5 uintptr var nArg1 int32 var i7 int32 - // var rowid1 Sqlite_int64 at bp+1048, 8 + // var rowid1 Sqlite_int64 at bp+928, 8 var apArg1 uintptr var pX1 uintptr // out2 @@ -111444,15 +111444,15 @@ __190: if !(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) != 0) { goto __195 } - (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5928 /* "%z: %s" */, libc.VaList(bp+16, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) + (*Vdbe)(unsafe.Pointer(p)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+5928 /* "%z: %s" */, libc.VaList(bp+8, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) __195: ; goto __194 __193: - Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) + Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) __194: ; - Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5935 /* "abort at %d in [..." */, libc.VaList(bp+56, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + Xsqlite3_log(tls, (*Op)(unsafe.Pointer(pOp)).Fp1, ts+5935 /* "abort at %d in [..." */, libc.VaList(bp+32, pcx, (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) __192: ; rc = Xsqlite3VdbeHalt(tls, p) @@ -112024,7 +112024,7 @@ __37: // Real value of right operand goto __236 } iA = *(*I64)(unsafe.Pointer(pIn1 /* &.u */)) - *(*I64)(unsafe.Pointer(bp + 296 /* iB */)) = *(*I64)(unsafe.Pointer(pIn2 /* &.u */)) + *(*I64)(unsafe.Pointer(bp + 176 /* iB */)) = *(*I64)(unsafe.Pointer(pIn2 /* &.u */)) switch int32((*Op)(unsafe.Pointer(pOp)).Fopcode) { case OP_Add: goto __239 @@ -112039,7 +112039,7 @@ __37: // Real value of right operand } goto __238 __239: - if !(Xsqlite3AddInt64(tls, bp+296 /* &iB */, iA) != 0) { + if !(Xsqlite3AddInt64(tls, bp+176 /* &iB */, iA) != 0) { goto __244 } goto fp_math @@ -112047,7 +112047,7 @@ __244: ; goto __238 __240: - if !(Xsqlite3SubInt64(tls, bp+296 /* &iB */, iA) != 0) { + if !(Xsqlite3SubInt64(tls, bp+176 /* &iB */, iA) != 0) { goto __245 } goto fp_math @@ -112055,7 +112055,7 @@ __245: ; goto __238 __241: - if !(Xsqlite3MulInt64(tls, bp+296 /* &iB */, iA) != 0) { + if !(Xsqlite3MulInt64(tls, bp+176 /* &iB */, iA) != 0) { goto __246 } goto fp_math @@ -112069,13 +112069,13 @@ __242: goto arithmetic_result_is_null __247: ; - if !((iA == int64(-1)) && (*(*I64)(unsafe.Pointer(bp + 296 /* iB */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) { + if !((iA == int64(-1)) && (*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) { goto __248 } goto fp_math __248: ; - *(*I64)(unsafe.Pointer(bp + 296 /* iB */)) /= iA + *(*I64)(unsafe.Pointer(bp + 176 /* iB */)) /= iA goto __238 __243: @@ -112091,12 +112091,12 @@ __249: iA = int64(1) __250: ; - *(*I64)(unsafe.Pointer(bp + 296 /* iB */)) %= iA + *(*I64)(unsafe.Pointer(bp + 176 /* iB */)) %= iA goto __238 __238: ; - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 296 /* iB */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 176 /* iB */)) (*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int)) goto __237 __236: @@ -112144,7 +112144,7 @@ __259: __258: iA = Xsqlite3VdbeIntValue(tls, pIn1) - *(*I64)(unsafe.Pointer(bp + 296 /* iB */)) = Xsqlite3VdbeIntValue(tls, pIn2) + *(*I64)(unsafe.Pointer(bp + 176 /* iB */)) = Xsqlite3VdbeIntValue(tls, pIn2) if !(iA == int64(0)) { goto __260 } @@ -112157,7 +112157,7 @@ __260: iA = int64(1) __261: ; - rB = (float64(*(*I64)(unsafe.Pointer(bp + 296 /* iB */)) % iA)) + rB = (float64(*(*I64)(unsafe.Pointer(bp + 176 /* iB */)) % iA)) goto __253 __253: @@ -112245,19 +112245,19 @@ __42: goto __8 __264: ; - *(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) = Xsqlite3VdbeIntValue(tls, pIn2) + *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) = Xsqlite3VdbeIntValue(tls, pIn2) iB1 = Xsqlite3VdbeIntValue(tls, pIn1) op = (*Op)(unsafe.Pointer(pOp)).Fopcode if !(int32(op) == OP_BitAnd) { goto __265 } - *(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) &= iB1 + *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) &= iB1 goto __266 __265: if !(int32(op) == OP_BitOr) { goto __267 } - *(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) |= iB1 + *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) |= iB1 goto __268 __267: if !(iB1 != int64(0)) { @@ -112281,31 +112281,31 @@ __270: if !(iB1 >= int64(64)) { goto __271 } - if (*(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) >= int64(0)) || (int32(op) == OP_ShiftLeft) { - *(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) = int64(0) + if (*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) >= int64(0)) || (int32(op) == OP_ShiftLeft) { + *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) = int64(0) } else { - *(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) = int64(-1) } goto __272 __271: - libc.Xmemcpy(tls, bp+304 /* &uA */, bp+312 /* &iA1 */, uint64(unsafe.Sizeof(U64(0)))) + libc.Xmemcpy(tls, bp+184 /* &uA */, bp+192 /* &iA1 */, uint64(unsafe.Sizeof(U64(0)))) if !(int32(op) == OP_ShiftLeft) { goto __273 } - *(*U64)(unsafe.Pointer(bp + 304 /* uA */)) <<= iB1 + *(*U64)(unsafe.Pointer(bp + 184 /* uA */)) <<= iB1 goto __274 __273: - *(*U64)(unsafe.Pointer(bp + 304 /* uA */)) >>= iB1 + *(*U64)(unsafe.Pointer(bp + 184 /* uA */)) >>= iB1 // Sign-extend on a right shift of a negative number - if !(*(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) < int64(0)) { goto __275 } - *(*U64)(unsafe.Pointer(bp + 304 /* uA */)) |= (U64(((U64((uint64(0xffffffff))) << 32) | uint64(0xffffffff))) << (int64(64) - iB1)) + *(*U64)(unsafe.Pointer(bp + 184 /* uA */)) |= (U64(((U64((uint64(0xffffffff))) << 32) | uint64(0xffffffff))) << (int64(64) - iB1)) __275: ; __274: ; - libc.Xmemcpy(tls, bp+312 /* &iA1 */, bp+304 /* &uA */, uint64(unsafe.Sizeof(I64(0)))) + libc.Xmemcpy(tls, bp+192 /* &iA1 */, bp+184 /* &uA */, uint64(unsafe.Sizeof(I64(0)))) __272: ; __269: @@ -112314,7 +112314,7 @@ __268: ; __266: ; - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 312 /* iA1 */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 192 /* iA1 */)) (*Mem)(unsafe.Pointer(pOut)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pOut))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Int)) goto __8 @@ -113168,14 +113168,14 @@ __344: __70: // PseudoTable input register ; - *(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) + *(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - *(*U32)(unsafe.Pointer(bp + 328 /* p22 */)) = U32((*Op)(unsafe.Pointer(pOp)).Fp2) + *(*U32)(unsafe.Pointer(bp + 208 /* p22 */)) = U32((*Op)(unsafe.Pointer(pOp)).Fp2) // If the cursor cache is stale (meaning it is not currently point at // the correct row) then bring it up-to-date by doing the necessary // B-Tree seek. - rc = Xsqlite3VdbeCursorMoveto(tls, bp+320 /* &pC1 */, bp+328 /* &p22 */) + rc = Xsqlite3VdbeCursorMoveto(tls, bp+200 /* &pC1 */, bp+208 /* &p22 */) if !(rc != 0) { goto __345 } @@ -113185,24 +113185,24 @@ __345: pDest = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaOffset + aOffset = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaOffset - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FcacheStatus != (*Vdbe)(unsafe.Pointer(p)).FcacheCtr) { goto __346 } //OPTIMIZATION-IF-FALSE - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FnullRow != 0) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnullRow != 0) { goto __347 } - if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FeCurType) == CURTYPE_PSEUDO) { + if !(int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FeCurType) == CURTYPE_PSEUDO) { goto __349 } // For the special case of as pseudo-cursor, the seekResult field // identifies the register that holds the record - pReg = (aMem + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FseekResult)*56) + pReg = (aMem + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FseekResult)*56) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */))+116 /* &.szRow */, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize = libc.AssignPtrUint32(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */))+116 /* &.szRow */, U32((*Mem)(unsafe.Pointer(pReg)).Fn)) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow = (*Mem)(unsafe.Pointer(pReg)).Fz goto __350 __349: Xsqlite3VdbeMemSetNull(tls, pDest) @@ -113211,13 +113211,13 @@ __350: ; goto __348 __347: - pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) + 56 /* &.uc */)) + pCrsr = *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 56 /* &.uc */)) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, (*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) + 116 /* &.szRow */)) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize = Xsqlite3BtreePayloadSize(tls, pCrsr) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow = Xsqlite3BtreePayloadFetch(tls, pCrsr, (*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 116 /* &.szRow */)) // Maximum page size is 64KiB - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize > U32(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */))))) { goto __351 } goto too_big @@ -113225,27 +113225,27 @@ __351: ; __348: ; - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { - if int32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow))) < int32(U8(0x80)) { + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FcacheStatus = (*Vdbe)(unsafe.Pointer(p)).FcacheCtr + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset = U32(func() uint8 { + if int32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow))) < int32(U8(0x80)) { return uint8(func() int32 { - (*(*U32)(unsafe.Pointer(aOffset))) = U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow))) + (*(*U32)(unsafe.Pointer(aOffset))) = U32(*(*U8)(unsafe.Pointer((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow))) return 1 }()) } - return Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow, (aOffset)) + return Xsqlite3GetVarint32(tls, (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow, (aOffset)) }()) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FnHdrParsed = U16(0) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed = U16(0) - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FszRow < *(*U32)(unsafe.Pointer(aOffset))) { goto __352 } //OPTIMIZATION-IF-FALSE // pC->aRow does not have to hold the entire row, but it does at least // need to cover the header of the record. If pC->aRow does not contain // the complete header, then set it to zero, forcing the header to be // dynamically allocated. - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow = uintptr(0) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FszRow = U32(0) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow = uintptr(0) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FszRow = U32(0) // Make sure a corrupt database has not given us an oversize header. // Do this now to avoid an oversize memory allocation. @@ -113255,7 +113255,7 @@ __348: // them, respectively. So the maximum header length results from a // 3-byte type for each of the maximum of 32768 columns plus three // extra bytes for the header length itself. 32768*3 + 3 = 98307. - if !((*(*U32)(unsafe.Pointer(aOffset)) > U32(98307)) || (*(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FpayloadSize)) { + if !((*(*U32)(unsafe.Pointer(aOffset)) > U32(98307)) || (*(*U32)(unsafe.Pointer(aOffset)) > (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize)) { goto __354 } goto op_column_corrupt @@ -113275,7 +113275,7 @@ __352: // content area, the "page header" comes after the page content and so // this overread is harmless. Similar overreads can occur for a corrupt // database file. - zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow // Conditional skipped goto op_column_read_header @@ -113286,57 +113286,57 @@ __346: // Make sure at least the first p2+1 entries of the header have been // parsed and valid information is in aOffset[] and pC->aType[]. - if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 328 /* p22 */))) { + if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 208 /* p22 */))) { goto __355 } // If there is more header available for parsing in the record, try // to extract additional fields up through the p2+1-th field - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset < *(*U32)(unsafe.Pointer(aOffset))) { goto __357 } // Make sure zData points to enough of the record to cover the header. - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow == uintptr(0)) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow == uintptr(0)) { goto __359 } - libc.Xmemset(tls, bp+336 /* &sMem */, 0, uint64(unsafe.Sizeof(Mem{}))) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) + 56 /* &.uc */)), *(*U32)(unsafe.Pointer(aOffset)), bp+336 /* &sMem */) + libc.Xmemset(tls, bp+216 /* &sMem */, 0, uint64(unsafe.Sizeof(Mem{}))) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 56 /* &.uc */)), *(*U32)(unsafe.Pointer(aOffset)), bp+216 /* &sMem */) if !(rc != SQLITE_OK) { goto __361 } goto abort_due_to_error __361: ; - zData = (*Mem)(unsafe.Pointer(bp + 336 /* &sMem */)).Fz + zData = (*Mem)(unsafe.Pointer(bp + 216 /* &sMem */)).Fz goto __360 __359: - zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow + zData = (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow __360: ; // Fill in pC->aType[i] and aOffset[i] values through the p2-th field. op_column_read_header: - i2 = int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FnHdrParsed) + i2 = int32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed) offset64 = U64(*(*U32)(unsafe.Pointer(aOffset + uintptr(i2)*4))) - zHdr = (zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FiHdrOffset)) + zHdr = (zData + uintptr((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset)) zEndHdr = (zData + uintptr(*(*U32)(unsafe.Pointer(aOffset)))) __362: - if !((libc.AssignPtrUint32((*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */))+120 /* &.aType */)+uintptr(i2)*4, libc.AssignPtrUint32(bp+392 /* t */, U32(*(*U8)(unsafe.Pointer(zHdr)))))) < U32(0x80)) { + if !((libc.AssignPtrUint32((*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */))+120 /* &.aType */)+uintptr(i2)*4, libc.AssignPtrUint32(bp+272 /* t */, U32(*(*U8)(unsafe.Pointer(zHdr)))))) < U32(0x80)) { goto __365 } zHdr++ - offset64 = offset64 + (U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 392 /* t */)))))) + offset64 = offset64 + (U64(Xsqlite3VdbeOneByteSerialTypeLen(tls, uint8(*(*U32)(unsafe.Pointer(bp + 272 /* t */)))))) goto __366 __365: - zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+392 /* &t */)) - *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) + 120 /* &.aType */) + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 392 /* t */)) - offset64 = offset64 + (U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 392 /* t */))))) + zHdr += uintptr(Xsqlite3GetVarint32(tls, zHdr, bp+272 /* &t */)) + *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 120 /* &.aType */) + uintptr(i2)*4)) = *(*U32)(unsafe.Pointer(bp + 272 /* t */)) + offset64 = offset64 + (U64(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272 /* t */))))) __366: ; *(*U32)(unsafe.Pointer(aOffset + uintptr(libc.PreIncInt32(&i2, 1))*4)) = (U32(offset64 & uint64(0xffffffff))) goto __363 __363: - if (U32(i2) <= *(*U32)(unsafe.Pointer(bp + 328 /* p22 */))) && (zHdr < zEndHdr) { + if (U32(i2) <= *(*U32)(unsafe.Pointer(bp + 208 /* p22 */))) && (zHdr < zEndHdr) { goto __362 } goto __364 @@ -113347,8 +113347,8 @@ __364: // (1) the bytes of the header extend past the declared header size // (2) the entire header was used but not all data was used // (3) the end of the data extends beyond the end of the record. - if !(((zHdr >= zEndHdr) && ((zHdr > zEndHdr) || (offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FpayloadSize)))) || - (offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FpayloadSize))) { + if !(((zHdr >= zEndHdr) && ((zHdr > zEndHdr) || (offset64 != U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize)))) || + (offset64 > U64((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FpayloadSize))) { goto __367 } if !(*(*U32)(unsafe.Pointer(aOffset)) == U32(0)) { @@ -113358,10 +113358,10 @@ __364: zHdr = zEndHdr goto __369 __368: - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow == uintptr(0)) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow == uintptr(0)) { goto __370 } - Xsqlite3VdbeMemRelease(tls, bp+336 /* &sMem */) + Xsqlite3VdbeMemRelease(tls, bp+216 /* &sMem */) __370: ; goto op_column_corrupt @@ -113370,24 +113370,24 @@ __369: __367: ; - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FnHdrParsed = U16(i2) - (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FiHdrOffset = (U32((int64(zHdr) - int64(zData)) / 1)) - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow == uintptr(0)) { + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed = U16(i2) + (*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FiHdrOffset = (U32((int64(zHdr) - int64(zData)) / 1)) + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow == uintptr(0)) { goto __371 } - Xsqlite3VdbeMemRelease(tls, bp+336 /* &sMem */) + Xsqlite3VdbeMemRelease(tls, bp+216 /* &sMem */) __371: ; goto __358 __357: - *(*U32)(unsafe.Pointer(bp + 392 /* t */)) = U32(0) + *(*U32)(unsafe.Pointer(bp + 272 /* t */)) = U32(0) __358: ; // If after trying to extract new entries from the header, nHdrParsed is // still not up to p2, that means that the record has fewer than p2 // columns. So the result will be either the default value or a NULL. - if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 328 /* p22 */))) { + if !(U32((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FnHdrParsed) <= *(*U32)(unsafe.Pointer(bp + 208 /* p22 */))) { goto __372 } if !(int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-11)) { @@ -113404,7 +113404,7 @@ __372: ; goto __356 __355: - *(*U32)(unsafe.Pointer(bp + 392 /* t */)) = *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) + 120 /* &.aType */) + uintptr(*(*U32)(unsafe.Pointer(bp + 328 /* p22 */)))*4)) + *(*U32)(unsafe.Pointer(bp + 272 /* t */)) = *(*U32)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 120 /* &.aType */) + uintptr(*(*U32)(unsafe.Pointer(bp + 208 /* p22 */)))*4)) __356: ; @@ -113419,19 +113419,19 @@ __356: __375: ; - if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr((*(*U32)(unsafe.Pointer(bp + 328 /* p22 */))+U32(1)))*4))) { + if !((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FszRow >= *(*U32)(unsafe.Pointer(aOffset + uintptr((*(*U32)(unsafe.Pointer(bp + 208 /* p22 */))+U32(1)))*4))) { goto __376 } // This is the common case where the desired content fits on the original // page - where the content is not on an overflow page - zData = ((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 328 /* p22 */)))*4)))) - if !(*(*U32)(unsafe.Pointer(bp + 392 /* t */)) < U32(12)) { + zData = ((*VdbeCursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)))).FaRow + uintptr(*(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 208 /* p22 */)))*4)))) + if !(*(*U32)(unsafe.Pointer(bp + 272 /* t */)) < U32(12)) { goto __378 } - Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 392 /* t */)), pDest) + Xsqlite3VdbeSerialGet(tls, zData, *(*U32)(unsafe.Pointer(bp + 272 /* t */)), pDest) goto __379 __378: - (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, (int32((*(*U32)(unsafe.Pointer(bp + 392 /* t */)) - U32(12)) / U32(2)))) + (*Mem)(unsafe.Pointer(pDest)).Fn = libc.AssignInt32(&len, (int32((*(*U32)(unsafe.Pointer(bp + 272 /* t */)) - U32(12)) / U32(2)))) (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding if !((*Mem)(unsafe.Pointer(pDest)).FszMalloc < (len + 2)) { goto __380 @@ -113451,7 +113451,7 @@ __381: libc.Xmemcpy(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, zData, uint64(len)) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr(len))) = int8(0) *(*int8)(unsafe.Pointer((*Mem)(unsafe.Pointer(pDest)).Fz + uintptr((len + 1)))) = int8(0) - (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[(*(*U32)(unsafe.Pointer(bp + 392 /* t */)) & U32(1))] + (*Mem)(unsafe.Pointer(pDest)).Fflags = aFlag1[(*(*U32)(unsafe.Pointer(bp + 272 /* t */)) & U32(1))] __379: ; goto __377 @@ -113459,8 +113459,8 @@ __376: (*Mem)(unsafe.Pointer(pDest)).Fenc = encoding // This branch happens only when content is on overflow pages if !((((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & (OPFLAG_LENGTHARG | OPFLAG_TYPEOFARG)) != 0) && - (((*(*U32)(unsafe.Pointer(bp + 392 /* t */)) >= U32(12)) && ((*(*U32)(unsafe.Pointer(bp + 392 /* t */)) & U32(1)) == U32(0))) || ((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_TYPEOFARG) != 0))) || - ((libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 392 /* t */)))))) == 0)) { + (((*(*U32)(unsafe.Pointer(bp + 272 /* t */)) >= U32(12)) && ((*(*U32)(unsafe.Pointer(bp + 272 /* t */)) & U32(1)) == U32(0))) || ((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_TYPEOFARG) != 0))) || + ((libc.AssignInt32(&len, int32(Xsqlite3VdbeSerialTypeLen(tls, *(*U32)(unsafe.Pointer(bp + 272 /* t */)))))) == 0)) { goto __383 } // Content is irrelevant for @@ -113475,17 +113475,17 @@ __376: // read more. Use the global constant sqlite3CtypeMap[] as the array, // as that array is 256 bytes long (plenty for VdbeMemPrettyPrint()) // and it begins with a bunch of zeros. - Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 392 /* t */)), pDest) + Xsqlite3VdbeSerialGet(tls, uintptr(uintptr(unsafe.Pointer(&Xsqlite3CtypeMap))), *(*U32)(unsafe.Pointer(bp + 272 /* t */)), pDest) goto __384 __383: - rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 320 /* pC1 */)) + 56 /* &.uc */)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 328 /* p22 */)))*4)), uint32(len), pDest) + rc = Xsqlite3VdbeMemFromBtree(tls, *(*uintptr)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pC1 */)) + 56 /* &.uc */)), *(*U32)(unsafe.Pointer(aOffset + uintptr(*(*U32)(unsafe.Pointer(bp + 208 /* p22 */)))*4)), uint32(len), pDest) if !(rc != SQLITE_OK) { goto __385 } goto abort_due_to_error __385: ; - Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 392 /* t */)), pDest) + Xsqlite3VdbeSerialGet(tls, (*Mem)(unsafe.Pointer(pDest)).Fz, *(*U32)(unsafe.Pointer(bp + 272 /* t */)), pDest) *(*U16)(unsafe.Pointer(pDest + 8 /* &.flags */)) &= libc.Uint16FromInt32((libc.CplInt32(MEM_Ephem))) __384: ; @@ -113963,11 +113963,11 @@ __73: if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __442 } - *(*I64)(unsafe.Pointer(bp + 400 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) + *(*I64)(unsafe.Pointer(bp + 280 /* nEntry */)) = Xsqlite3BtreeRowCountEst(tls, pCrsr1) goto __443 __442: - *(*I64)(unsafe.Pointer(bp + 400 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. - rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+400 /* &nEntry */) + *(*I64)(unsafe.Pointer(bp + 280 /* nEntry */)) = int64(0) // Not needed. Only used to silence a warning. + rc = Xsqlite3BtreeCount(tls, db, pCrsr1, bp+280 /* &nEntry */) if !(rc != 0) { goto __444 } @@ -113977,7 +113977,7 @@ __444: __443: ; pOut = out2Prerelease(tls, p, pOp) - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 400 /* nEntry */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 280 /* nEntry */)) goto check_for_interrupt // Opcode: Savepoint P1 * * P4 * @@ -114075,7 +114075,7 @@ __455: if !(!(pSavepoint != 0)) { goto __456 } - Xsqlite3VdbeError(tls, p, ts+6010 /* "no such savepoin..." */, libc.VaList(bp+88, zName)) + Xsqlite3VdbeError(tls, p, ts+6010 /* "no such savepoin..." */, libc.VaList(bp+56, zName)) rc = SQLITE_ERROR goto __457 __456: @@ -114384,7 +114384,7 @@ __487: // halts. The sqlite3_step() wrapper function might then reprepare the // statement and rerun it from the beginning. __76: - *(*int32)(unsafe.Pointer(bp + 408 /* iMeta */)) = 0 + *(*int32)(unsafe.Pointer(bp + 288 /* iMeta */)) = 0 if !(((*Op)(unsafe.Pointer(pOp)).Fp2 != 0) && (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_QueryOnly)) != uint64(0))) { goto __497 @@ -114398,7 +114398,7 @@ __497: if !(pBt != 0) { goto __498 } - rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+408 /* &iMeta */) + rc = Xsqlite3BtreeBeginTrans(tls, pBt, (*Op)(unsafe.Pointer(pOp)).Fp2, bp+288 /* &iMeta */) if !(rc != SQLITE_OK) { goto __499 @@ -114449,7 +114449,7 @@ __498: ; if !(((*Op)(unsafe.Pointer(pOp)).Fp5 != 0) && - ((*(*int32)(unsafe.Pointer(bp + 408 /* iMeta */)) != (*Op)(unsafe.Pointer(pOp)).Fp3) || + ((*(*int32)(unsafe.Pointer(bp + 288 /* iMeta */)) != (*Op)(unsafe.Pointer(pOp)).Fp3) || ((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).FiGeneration != *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))))) { goto __504 } @@ -114470,7 +114470,7 @@ __498: // v-table would have to be ready for the sqlite3_vtab structure itself // to be invalidated whenever sqlite3_step() is called from within // a v-table method. - if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 408 /* iMeta */))) { + if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32)).FpSchema)).Fschema_cookie != *(*int32)(unsafe.Pointer(bp + 288 /* iMeta */))) { goto __505 } Xsqlite3ResetOneSchema(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1) @@ -114504,9 +114504,9 @@ __77: iDb = (*Op)(unsafe.Pointer(pOp)).Fp1 iCookie = (*Op)(unsafe.Pointer(pOp)).Fp3 - Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt, iCookie, bp+412 /* &iMeta1 */) + Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FpBt, iCookie, bp+292 /* &iMeta1 */) pOut = out2Prerelease(tls, p, pOp) - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*int32)(unsafe.Pointer(bp + 412 /* iMeta1 */))) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*int32)(unsafe.Pointer(bp + 292 /* iMeta1 */))) goto __8 // Opcode: SetCookie P1 P2 P3 * P5 @@ -115152,7 +115152,7 @@ __541: goto jump_to_p2 goto __546 __545: - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), bp+416 /* &res1 */) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), bp+296 /* &res1 */) if !(rc != SQLITE_OK) { goto __547 } @@ -115201,7 +115201,7 @@ __544: ; __542: ; - rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), uintptr(0), int64(U64(iKey)), 0, bp+416 /* &res1 */) + rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), uintptr(0), int64(U64(iKey)), 0, bp+296 /* &res1 */) (*VdbeCursor)(unsafe.Pointer(pC3)).FmovetoTarget = iKey // Used by OP_Delete if !(rc != SQLITE_OK) { goto __553 @@ -115225,8 +115225,8 @@ __554: nField2 = *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)) - (*UnpackedRecord)(unsafe.Pointer(bp + 424 /* &r */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo - (*UnpackedRecord)(unsafe.Pointer(bp + 424 /* &r */)).FnField = U16(nField2) + (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC3)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FnField = U16(nField2) // The next line of code computes as follows, only faster: // if( oc==OP_SeekGT || oc==OP_SeekLE ){ @@ -115234,23 +115234,23 @@ __554: // }else{ // r.default_rc = +1; // } - (*UnpackedRecord)(unsafe.Pointer(bp + 424 /* &r */)).Fdefault_rc = func() int8 { + (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).Fdefault_rc = func() int8 { if (1 & (oc - OP_SeekLT)) != 0 { return int8(-1) } return +int8(1) }() - (*UnpackedRecord)(unsafe.Pointer(bp + 424 /* &r */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - (*UnpackedRecord)(unsafe.Pointer(bp + 424 /* &r */)).FeqSeen = U8(0) - rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), bp+424 /* &r */, int64(0), 0, bp+416 /* &res1 */) + (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) + (*UnpackedRecord)(unsafe.Pointer(bp + 304 /* &r */)).FeqSeen = U8(0) + rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), bp+304 /* &r */, int64(0), 0, bp+296 /* &res1 */) if !(rc != SQLITE_OK) { goto __555 } goto abort_due_to_error __555: ; - if !((eqOnly != 0) && (int32((*UnpackedRecord)(unsafe.Pointer(bp+424 /* &r */)).FeqSeen) == 0)) { + if !((eqOnly != 0) && (int32((*UnpackedRecord)(unsafe.Pointer(bp+304 /* &r */)).FeqSeen) == 0)) { goto __556 } @@ -115262,10 +115262,10 @@ __540: if !(oc >= OP_SeekGE) { goto __557 } - if !((*(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) < 0) || ((*(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) == 0) && (oc == OP_SeekGT))) { + if !((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) < 0) || ((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) == 0) && (oc == OP_SeekGT))) { goto __559 } - *(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0 rc = Xsqlite3BtreeNext(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), 0) if !(rc != SQLITE_OK) { goto __561 @@ -115274,7 +115274,7 @@ __540: goto __562 } rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) = 1 + *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 1 goto __563 __562: goto abort_due_to_error @@ -115284,16 +115284,16 @@ __561: ; goto __560 __559: - *(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0 __560: ; goto __558 __557: ; - if !((*(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) > 0) || ((*(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) == 0) && (oc == OP_SeekLT))) { + if !((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) > 0) || ((*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) == 0) && (oc == OP_SeekLT))) { goto __564 } - *(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 0 rc = Xsqlite3BtreePrevious(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */)), 0) if !(rc != SQLITE_OK) { goto __566 @@ -115302,7 +115302,7 @@ __557: goto __567 } rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) = 1 + *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = 1 goto __568 __567: goto abort_due_to_error @@ -115314,7 +115314,7 @@ __566: __564: // res might be negative because the table is empty. Check to // see if this is the case. - *(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */))) + *(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) = Xsqlite3BtreeEof(tls, *(*uintptr)(unsafe.Pointer(pC3 + 56 /* &.uc */))) __565: ; __558: @@ -115322,7 +115322,7 @@ __558: seek_not_found: ; - if !(*(*int32)(unsafe.Pointer(bp + 416 /* res1 */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 296 /* res1 */)) != 0) { goto __569 } goto jump_to_p2 @@ -115400,23 +115400,23 @@ __572: ; nStep = (*Op)(unsafe.Pointer(pOp)).Fp1 - (*UnpackedRecord)(unsafe.Pointer(bp + 448 /* &r1 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo - (*UnpackedRecord)(unsafe.Pointer(bp + 448 /* &r1 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16 /* &.p4 */))) - (*UnpackedRecord)(unsafe.Pointer(bp + 448 /* &r1 */)).Fdefault_rc = int8(0) - (*UnpackedRecord)(unsafe.Pointer(bp + 448 /* &r1 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56) - *(*int32)(unsafe.Pointer(bp + 472 /* res3 */)) = 0 // Not needed. Only used to silence a warning. + (*UnpackedRecord)(unsafe.Pointer(bp + 328 /* &r1 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC4)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 328 /* &r1 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 1*24 + 16 /* &.p4 */))) + (*UnpackedRecord)(unsafe.Pointer(bp + 328 /* &r1 */)).Fdefault_rc = int8(0) + (*UnpackedRecord)(unsafe.Pointer(bp + 328 /* &r1 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp+1*24)).Fp3)*56) + *(*int32)(unsafe.Pointer(bp + 352 /* res3 */)) = 0 // Not needed. Only used to silence a warning. __573: if !(1 != 0) { goto __574 } - rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+448 /* &r1 */, bp+472 /* &res3 */) + rc = Xsqlite3VdbeIdxKeyCompare(tls, db, pC4, bp+328 /* &r1 */, bp+352 /* &res3 */) if !(rc != 0) { goto __575 } goto abort_due_to_error __575: ; - if !(*(*int32)(unsafe.Pointer(bp + 472 /* res3 */)) > 0) { + if !(*(*int32)(unsafe.Pointer(bp + 352 /* res3 */)) > 0) { goto __576 } seekscan_search_fail: @@ -115425,7 +115425,7 @@ seekscan_search_fail: goto jump_to_p2 __576: ; - if !(*(*int32)(unsafe.Pointer(bp + 472 /* res3 */)) == 0) { + if !(*(*int32)(unsafe.Pointer(bp + 352 /* res3 */)) == 0) { goto __577 } @@ -115620,10 +115620,10 @@ __99: if !(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)) > 0) { goto __587 } - (*UnpackedRecord)(unsafe.Pointer(bp + 480 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo - (*UnpackedRecord)(unsafe.Pointer(bp + 480 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) - (*UnpackedRecord)(unsafe.Pointer(bp + 480 /* &r2 */)).FaMem = pIn3 - pIdxKey = bp + 480 /* &r2 */ + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r2 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC7)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r2 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) + (*UnpackedRecord)(unsafe.Pointer(bp + 360 /* &r2 */)).FaMem = pIn3 + pIdxKey = bp + 360 /* &r2 */ pFree = uintptr(0) goto __588 __587: @@ -115680,7 +115680,7 @@ __594: ; __591: ; - rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC7 + 56 /* &.uc */)), pIdxKey, int64(0), 0, bp+504 /* &res4 */) + rc = Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC7 + 56 /* &.uc */)), pIdxKey, int64(0), 0, bp+384 /* &res4 */) if !(pFree != 0) { goto __596 } @@ -115693,8 +115693,8 @@ __596: goto abort_due_to_error __597: ; - (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 504 /* res4 */)) - alreadyExists = (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 504 /* res4 */)) == 0)) + (*VdbeCursor)(unsafe.Pointer(pC7)).FseekResult = *(*int32)(unsafe.Pointer(bp + 384 /* res4 */)) + alreadyExists = (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 384 /* res4 */)) == 0)) (*VdbeCursor)(unsafe.Pointer(pC7)).FnullRow = (U8(1 - alreadyExists)) (*VdbeCursor)(unsafe.Pointer(pC7)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC7)).FcacheStatus = U32(CACHE_STALE) @@ -115784,15 +115784,15 @@ __100: // into an integer without loss of information. Take care to avoid // changing the datatype of pIn3, however, as it is used by other // parts of the prepared statement. - *(*Mem)(unsafe.Pointer(bp + 512 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) - applyAffinity(tls, bp+512 /* &x */, int8(SQLITE_AFF_NUMERIC), encoding) - if !((int32((*Mem)(unsafe.Pointer(bp+512 /* &x */)).Fflags) & MEM_Int) == 0) { + *(*Mem)(unsafe.Pointer(bp + 392 /* x */)) = *(*Mem)(unsafe.Pointer(pIn3)) + applyAffinity(tls, bp+392 /* &x */, int8(SQLITE_AFF_NUMERIC), encoding) + if !((int32((*Mem)(unsafe.Pointer(bp+392 /* &x */)).Fflags) & MEM_Int) == 0) { goto __604 } goto jump_to_p2 __604: ; - iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 512 /* &x */ /* &.u */))) + iKey1 = U64(*(*I64)(unsafe.Pointer(bp + 392 /* &x */ /* &.u */))) goto notExistsWithKey __603: ; @@ -115805,16 +115805,16 @@ notExistsWithKey: pCrsr2 = *(*uintptr)(unsafe.Pointer(pC8 + 56 /* &.uc */)) - *(*int32)(unsafe.Pointer(bp + 568 /* res5 */)) = 0 - rc = Xsqlite3BtreeMovetoUnpacked(tls, pCrsr2, uintptr(0), int64(iKey1), 0, bp+568 /* &res5 */) + *(*int32)(unsafe.Pointer(bp + 448 /* res5 */)) = 0 + rc = Xsqlite3BtreeMovetoUnpacked(tls, pCrsr2, uintptr(0), int64(iKey1), 0, bp+448 /* &res5 */) (*VdbeCursor)(unsafe.Pointer(pC8)).FmovetoTarget = I64(iKey1) // Used by OP_Delete (*VdbeCursor)(unsafe.Pointer(pC8)).FnullRow = U8(0) (*VdbeCursor)(unsafe.Pointer(pC8)).FcacheStatus = U32(CACHE_STALE) (*VdbeCursor)(unsafe.Pointer(pC8)).FdeferredMoveto = U8(0) - (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 568 /* res5 */)) - if !(*(*int32)(unsafe.Pointer(bp + 568 /* res5 */)) != 0) { + (*VdbeCursor)(unsafe.Pointer(pC8)).FseekResult = *(*int32)(unsafe.Pointer(bp + 448 /* res5 */)) + if !(*(*int32)(unsafe.Pointer(bp + 448 /* res5 */)) != 0) { goto __605 } @@ -115867,8 +115867,8 @@ __102: // out2 // AUTOINCREMENT feature. __103: // Root frame of VDBE - *(*I64)(unsafe.Pointer(bp + 576 /* v */)) = int64(0) - *(*int32)(unsafe.Pointer(bp + 572 /* res6 */)) = 0 + *(*I64)(unsafe.Pointer(bp + 456 /* v */)) = int64(0) + *(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) = 0 pOut = out2Prerelease(tls, p, pOp) pC9 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) @@ -115893,28 +115893,28 @@ __103: // Root frame of VDBE if !(!((int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) & 0x2 >> 1)) != 0)) { goto __609 } - rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)), bp+572 /* &res6 */) + rc = Xsqlite3BtreeLast(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)), bp+452 /* &res6 */) if !(rc != SQLITE_OK) { goto __610 } goto abort_due_to_error __610: ; - if !(*(*int32)(unsafe.Pointer(bp + 572 /* res6 */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) != 0) { goto __611 } - *(*I64)(unsafe.Pointer(bp + 576 /* v */)) = int64(1) // IMP: R-61914-48074 + *(*I64)(unsafe.Pointer(bp + 456 /* v */)) = int64(1) // IMP: R-61914-48074 goto __612 __611: ; - *(*I64)(unsafe.Pointer(bp + 576 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */))) - if !(*(*I64)(unsafe.Pointer(bp + 576 /* v */)) >= (int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) { + *(*I64)(unsafe.Pointer(bp + 456 /* v */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */))) + if !(*(*I64)(unsafe.Pointer(bp + 456 /* v */)) >= (int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) { goto __613 } libc.SetBitFieldPtr8Uint32(pC9+8 /* &.useRandomRowid */, Bool(1), 1, 0x2) goto __614 __613: - *(*I64)(unsafe.Pointer(bp + 576 /* v */))++ // IMP: R-29538-34987 + *(*I64)(unsafe.Pointer(bp + 456 /* v */))++ // IMP: R-29538-34987 __614: ; __612: @@ -115963,13 +115963,13 @@ __617: goto abort_due_to_error __621: ; - if !(*(*I64)(unsafe.Pointer(bp + 576 /* v */)) < (*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) + int64(1))) { + if !(*(*I64)(unsafe.Pointer(bp + 456 /* v */)) < (*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) + int64(1))) { goto __622 } - *(*I64)(unsafe.Pointer(bp + 576 /* v */)) = (*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) + int64(1)) + *(*I64)(unsafe.Pointer(bp + 456 /* v */)) = (*(*I64)(unsafe.Pointer(pMem1 /* &.u */)) + int64(1)) __622: ; - *(*I64)(unsafe.Pointer(pMem1 /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 576 /* v */)) + *(*I64)(unsafe.Pointer(pMem1 /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 456 /* v */)) __615: ; if !((Bool(int32(*(*uint8)(unsafe.Pointer(pC9 + 8 /* &.useRandomRowid */)) & 0x2 >> 1))) != 0) { @@ -115983,14 +115983,14 @@ __615: // an AUTOINCREMENT table. cnt1 = 0 __624: - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+576 /* &v */) - *(*I64)(unsafe.Pointer(bp + 576 /* v */)) &= (I64((int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) >> 1) - *(*I64)(unsafe.Pointer(bp + 576 /* v */))++ // Ensure that v is greater than zero + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(I64(0))), bp+456 /* &v */) + *(*I64)(unsafe.Pointer(bp + 456 /* v */)) &= (I64((int64((U64((uint64(0x7fffffff))) << 32) | uint64(0xffffffff)))) >> 1) + *(*I64)(unsafe.Pointer(bp + 456 /* v */))++ // Ensure that v is greater than zero goto __625 __625: - if (((libc.AssignInt32(&rc, Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)), uintptr(0), int64(U64(*(*I64)(unsafe.Pointer(bp + 576 /* v */)))), - 0, bp+572 /* &res6 */))) == SQLITE_OK) && - (*(*int32)(unsafe.Pointer(bp + 572 /* res6 */)) == 0)) && + if (((libc.AssignInt32(&rc, Xsqlite3BtreeMovetoUnpacked(tls, *(*uintptr)(unsafe.Pointer(pC9 + 56 /* &.uc */)), uintptr(0), int64(U64(*(*I64)(unsafe.Pointer(bp + 456 /* v */)))), + 0, bp+452 /* &res6 */))) == SQLITE_OK) && + (*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) == 0)) && (libc.PreIncInt32(&cnt1, 1) < 100) { goto __624 } @@ -116003,7 +116003,7 @@ __626: goto abort_due_to_error __627: ; - if !(*(*int32)(unsafe.Pointer(bp + 572 /* res6 */)) == 0) { + if !(*(*int32)(unsafe.Pointer(bp + 452 /* res6 */)) == 0) { goto __628 } rc = SQLITE_FULL // IMP: R-38219-53002 @@ -116016,7 +116016,7 @@ __623: (*VdbeCursor)(unsafe.Pointer(pC9)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC9)).FcacheStatus = U32(CACHE_STALE) - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 576 /* v */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 456 /* v */)) goto __8 // Opcode: Insert P1 P2 P3 P4 P5 @@ -116063,7 +116063,7 @@ __104: // Payload to be inserted pKey = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey /* &.u */)) + (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnKey = *(*I64)(unsafe.Pointer(pKey /* &.u */)) if !((int32((*Op)(unsafe.Pointer(pOp)).Fp4type) == (-6)) && (((*Sqlite3)(unsafe.Pointer((db))).FxPreUpdateCallback != 0) || ((*Sqlite3)(unsafe.Pointer((db))).FxUpdateCallback != 0))) { goto __629 @@ -116086,7 +116086,7 @@ __630: if !(((*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0) && !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_ISUPDATE) != 0)) { goto __632 } - Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab, (*BtreePayload)(unsafe.Pointer(bp+584 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) + Xsqlite3VdbePreUpdateHook(tls, p, pC10, SQLITE_INSERT, zDb, pTab, (*BtreePayload)(unsafe.Pointer(bp+464 /* &x1 */)).FnKey, (*Op)(unsafe.Pointer(pOp)).Fp2, -1) __632: ; if !(((*Sqlite3)(unsafe.Pointer(db)).FxUpdateCallback == uintptr(0)) || ((*Table)(unsafe.Pointer(pTab)).FaCol == uintptr(0))) { @@ -116114,12 +116114,12 @@ __635: if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_LASTROWID) != 0) { goto __636 } - (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FnKey + (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnKey __636: ; - (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz - (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FnData = (*Mem)(unsafe.Pointer(pData)).Fn + (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FpData = (*Mem)(unsafe.Pointer(pData)).Fz + (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnData = (*Mem)(unsafe.Pointer(pData)).Fn seekResult = func() int32 { if (int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_USESEEKRESULT) != 0 { return (*VdbeCursor)(unsafe.Pointer(pC10)).FseekResult @@ -116129,14 +116129,14 @@ __636: if !((int32((*Mem)(unsafe.Pointer(pData)).Fflags) & MEM_Zero) != 0) { goto __637 } - (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData /* &.u */)) + (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnZero = *(*int32)(unsafe.Pointer(pData /* &.u */)) goto __638 __637: - (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FnZero = 0 + (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FnZero = 0 __638: ; - (*BtreePayload)(unsafe.Pointer(bp + 584 /* &x1 */)).FpKey = uintptr(0) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 56 /* &.uc */)), bp+584, /* &x1 */ + (*BtreePayload)(unsafe.Pointer(bp + 464 /* &x1 */)).FpKey = uintptr(0) + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC10 + 56 /* &.uc */)), bp+464, /* &x1 */ (int32((*Op)(unsafe.Pointer(pOp)).Fp5) & ((OPFLAG_APPEND | OPFLAG_SAVEPOSITION) | OPFLAG_PREFORMAT)), seekResult) (*VdbeCursor)(unsafe.Pointer(pC10)).FdeferredMoveto = U8(0) @@ -116160,7 +116160,7 @@ __639: } return SQLITE_INSERT }(), - zDb, (*Table)(unsafe.Pointer(pTab)).FzName, (*BtreePayload)(unsafe.Pointer(bp+584 /* &x1 */)).FnKey) + zDb, (*Table)(unsafe.Pointer(pTab)).FzName, (*BtreePayload)(unsafe.Pointer(bp+464 /* &x1 */)).FnKey) __640: ; goto __8 @@ -116342,8 +116342,8 @@ __108: pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) nKeyCol = *(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */)) - *(*int32)(unsafe.Pointer(bp + 632 /* res7 */)) = 0 - rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+632 /* &res7 */) + *(*int32)(unsafe.Pointer(bp + 512 /* res7 */)) = 0 + rc = Xsqlite3VdbeSorterCompare(tls, pC12, pIn3, nKeyCol, bp+512 /* &res7 */) if !(rc != 0) { goto __650 @@ -116351,7 +116351,7 @@ __108: goto abort_due_to_error __650: ; - if !(*(*int32)(unsafe.Pointer(bp + 632 /* res7 */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 512 /* res7 */)) != 0) { goto __651 } goto jump_to_p2 @@ -116483,7 +116483,7 @@ __657: if !((*VdbeCursor)(unsafe.Pointer(pC15)).FdeferredMoveto != 0) { goto __659 } - *(*I64)(unsafe.Pointer(bp + 640 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget + *(*I64)(unsafe.Pointer(bp + 520 /* v3 */)) = (*VdbeCursor)(unsafe.Pointer(pC15)).FmovetoTarget goto __660 __659: if !(int32((*VdbeCursor)(unsafe.Pointer(pC15)).FeCurType) == CURTYPE_VTAB) { @@ -116493,7 +116493,7 @@ __659: pVtab = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)))).FpVtab pModule = (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FpModule - rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pModule + 96 /* &.xRowid */))))(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)), bp+640 /* &v3 */) + rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pModule + 96 /* &.xRowid */))))(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */)), bp+520 /* &v3 */) Xsqlite3VtabImportErrmsg(tls, p, pVtab) if !(rc != 0) { goto __663 @@ -116519,14 +116519,14 @@ __664: goto __8 __665: ; - *(*I64)(unsafe.Pointer(bp + 640 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */))) + *(*I64)(unsafe.Pointer(bp + 520 /* v3 */)) = Xsqlite3BtreeIntegerKey(tls, *(*uintptr)(unsafe.Pointer(pC15 + 56 /* &.uc */))) __662: ; __660: ; __658: ; - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 640 /* v3 */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 520 /* v3 */)) goto __8 // Opcode: NullRow P1 * * * * @@ -116575,7 +116575,7 @@ __114: pC17 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) pCrsr4 = *(*uintptr)(unsafe.Pointer(pC17 + 56 /* &.uc */)) - *(*int32)(unsafe.Pointer(bp + 648 /* res8 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 528 /* res8 */)) = 0 if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) == OP_SeekEnd) { goto __667 @@ -116590,8 +116590,8 @@ __668: ; __667: ; - rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+648 /* &res8 */) - (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 648 /* res8 */))) + rc = Xsqlite3BtreeLast(tls, pCrsr4, bp+528 /* &res8 */) + (*VdbeCursor)(unsafe.Pointer(pC17)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 528 /* res8 */))) (*VdbeCursor)(unsafe.Pointer(pC17)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC17)).FcacheStatus = U32(CACHE_STALE) if !(rc != 0) { @@ -116604,7 +116604,7 @@ __669: goto __670 } - if !(*(*int32)(unsafe.Pointer(bp + 648 /* res8 */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 528 /* res8 */)) != 0) { goto __671 } goto jump_to_p2 @@ -116624,27 +116624,27 @@ __115: pCrsr5 = *(*uintptr)(unsafe.Pointer(pC18 + 56 /* &.uc */)) - rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+652 /* &res9 */) + rc = Xsqlite3BtreeFirst(tls, pCrsr5, bp+532 /* &res9 */) if !(rc != 0) { goto __672 } goto abort_due_to_error __672: ; - if !(*(*int32)(unsafe.Pointer(bp + 652 /* res9 */)) == 0) { + if !(*(*int32)(unsafe.Pointer(bp + 532 /* res9 */)) == 0) { goto __673 } sz = Xsqlite3BtreeRowCountEst(tls, pCrsr5) if !((sz >= int64(0)) && (int32(Xsqlite3LogEst(tls, U64(sz))) < (*Op)(unsafe.Pointer(pOp)).Fp3)) { goto __674 } - *(*int32)(unsafe.Pointer(bp + 652 /* res9 */)) = 1 + *(*int32)(unsafe.Pointer(bp + 532 /* res9 */)) = 1 __674: ; __673: ; - if !(*(*int32)(unsafe.Pointer(bp + 652 /* res9 */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 532 /* res9 */)) != 0) { goto __675 } goto jump_to_p2 @@ -116691,17 +116691,17 @@ __118: pC19 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - *(*int32)(unsafe.Pointer(bp + 656 /* res10 */)) = 1 + *(*int32)(unsafe.Pointer(bp + 536 /* res10 */)) = 1 if !(int32((*VdbeCursor)(unsafe.Pointer((pC19))).FeCurType) == CURTYPE_SORTER) { goto __676 } - rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+656 /* &res10 */) + rc = Xsqlite3VdbeSorterRewind(tls, pC19, bp+536 /* &res10 */) goto __677 __676: ; pCrsr6 = *(*uintptr)(unsafe.Pointer(pC19 + 56 /* &.uc */)) - rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+656 /* &res10 */) + rc = Xsqlite3BtreeFirst(tls, pCrsr6, bp+536 /* &res10 */) (*VdbeCursor)(unsafe.Pointer(pC19)).FdeferredMoveto = U8(0) (*VdbeCursor)(unsafe.Pointer(pC19)).FcacheStatus = U32(CACHE_STALE) __677: @@ -116712,9 +116712,9 @@ __677: goto abort_due_to_error __678: ; - (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 656 /* res10 */))) + (*VdbeCursor)(unsafe.Pointer(pC19)).FnullRow = U8(*(*int32)(unsafe.Pointer(bp + 536 /* res10 */))) - if !(*(*int32)(unsafe.Pointer(bp + 656 /* res10 */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 536 /* res10 */)) != 0) { goto __679 } goto jump_to_p2 @@ -116868,11 +116868,11 @@ __682: goto abort_due_to_error __683: ; - (*BtreePayload)(unsafe.Pointer(bp + 664 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) - (*BtreePayload)(unsafe.Pointer(bp + 664 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz - (*BtreePayload)(unsafe.Pointer(bp + 664 /* &x2 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) - (*BtreePayload)(unsafe.Pointer(bp + 664 /* &x2 */)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) - rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 56 /* &.uc */)), bp+664, /* &x2 */ + (*BtreePayload)(unsafe.Pointer(bp + 544 /* &x2 */)).FnKey = Sqlite3_int64((*Mem)(unsafe.Pointer(pIn2)).Fn) + (*BtreePayload)(unsafe.Pointer(bp + 544 /* &x2 */)).FpKey = (*Mem)(unsafe.Pointer(pIn2)).Fz + (*BtreePayload)(unsafe.Pointer(bp + 544 /* &x2 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) + (*BtreePayload)(unsafe.Pointer(bp + 544 /* &x2 */)).FnMem = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) + rc = Xsqlite3BtreeInsert(tls, *(*uintptr)(unsafe.Pointer(pC21 + 56 /* &.uc */)), bp+544, /* &x2 */ (int32((*Op)(unsafe.Pointer(pOp)).Fp5) & ((OPFLAG_APPEND | OPFLAG_SAVEPOSITION) | OPFLAG_PREFORMAT)), func() int32 { if (int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_USESEEKRESULT) != 0 { @@ -116943,18 +116943,18 @@ __124: pCrsr7 = *(*uintptr)(unsafe.Pointer(pC23 + 56 /* &.uc */)) - (*UnpackedRecord)(unsafe.Pointer(bp + 712 /* &r3 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo - (*UnpackedRecord)(unsafe.Pointer(bp + 712 /* &r3 */)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) - (*UnpackedRecord)(unsafe.Pointer(bp + 712 /* &r3 */)).Fdefault_rc = int8(0) - (*UnpackedRecord)(unsafe.Pointer(bp + 712 /* &r3 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) - rc = Xsqlite3BtreeMovetoUnpacked(tls, pCrsr7, bp+712 /* &r3 */, int64(0), 0, bp+736 /* &res11 */) + (*UnpackedRecord)(unsafe.Pointer(bp + 592 /* &r3 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC23)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 592 /* &r3 */)).FnField = U16((*Op)(unsafe.Pointer(pOp)).Fp3) + (*UnpackedRecord)(unsafe.Pointer(bp + 592 /* &r3 */)).Fdefault_rc = int8(0) + (*UnpackedRecord)(unsafe.Pointer(bp + 592 /* &r3 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56) + rc = Xsqlite3BtreeMovetoUnpacked(tls, pCrsr7, bp+592 /* &r3 */, int64(0), 0, bp+616 /* &res11 */) if !(rc != 0) { goto __687 } goto abort_due_to_error __687: ; - if !(*(*int32)(unsafe.Pointer(bp + 736 /* res11 */)) == 0) { + if !(*(*int32)(unsafe.Pointer(bp + 616 /* res11 */)) == 0) { goto __688 } rc = Xsqlite3BtreeDelete(tls, pCrsr7, uint8(BTREE_AUXDELETE)) @@ -117029,8 +117029,8 @@ __692: if !(!(int32((*VdbeCursor)(unsafe.Pointer(pC24)).FnullRow) != 0)) { goto __693 } - *(*I64)(unsafe.Pointer(bp + 744 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. - rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 56 /* &.uc */)), bp+744 /* &rowid */) + *(*I64)(unsafe.Pointer(bp + 624 /* rowid */)) = int64(0) // Not needed. Only used to silence a warning. + rc = Xsqlite3VdbeIdxRowid(tls, db, *(*uintptr)(unsafe.Pointer(pC24 + 56 /* &.uc */)), bp+624 /* &rowid */) if !(rc != SQLITE_OK) { goto __695 } @@ -117044,7 +117044,7 @@ __695: pTabCur = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*8)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FnullRow = U8(0) - (*VdbeCursor)(unsafe.Pointer(pTabCur)).FmovetoTarget = *(*I64)(unsafe.Pointer(bp + 744 /* rowid */)) + (*VdbeCursor)(unsafe.Pointer(pTabCur)).FmovetoTarget = *(*I64)(unsafe.Pointer(bp + 624 /* rowid */)) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FdeferredMoveto = U8(1) (*VdbeCursor)(unsafe.Pointer(pTabCur)).FaAltMap = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) @@ -117053,7 +117053,7 @@ __695: goto __697 __696: pOut = out2Prerelease(tls, p, pOp) - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 744 /* rowid */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 624 /* rowid */)) __697: ; goto __694 @@ -117134,20 +117134,20 @@ __131: ; pC26 = *(*uintptr)(unsafe.Pointer((*Vdbe)(unsafe.Pointer(p)).FapCsr + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*8)) - (*UnpackedRecord)(unsafe.Pointer(bp + 808 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo - (*UnpackedRecord)(unsafe.Pointer(bp + 808 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) + (*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).FpKeyInfo = (*VdbeCursor)(unsafe.Pointer(pC26)).FpKeyInfo + (*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).FnField = U16(*(*int32)(unsafe.Pointer(pOp + 16 /* &.p4 */))) if !(int32((*Op)(unsafe.Pointer(pOp)).Fopcode) < OP_IdxLT) { goto __700 } - (*UnpackedRecord)(unsafe.Pointer(bp + 808 /* &r4 */)).Fdefault_rc = int8(-1) + (*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).Fdefault_rc = int8(-1) goto __701 __700: ; - (*UnpackedRecord)(unsafe.Pointer(bp + 808 /* &r4 */)).Fdefault_rc = int8(0) + (*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).Fdefault_rc = int8(0) __701: ; - (*UnpackedRecord)(unsafe.Pointer(bp + 808 /* &r4 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) + (*UnpackedRecord)(unsafe.Pointer(bp + 688 /* &r4 */)).FaMem = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) /* Inlined version of sqlite3VdbeIdxKeyCompare() */ @@ -117165,16 +117165,16 @@ __701: goto abort_due_to_error __702: ; - Xsqlite3VdbeMemInit(tls, bp+752 /* &m */, db, uint16(0)) - rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+752 /* &m */) + Xsqlite3VdbeMemInit(tls, bp+632 /* &m */, db, uint16(0)) + rc = Xsqlite3VdbeMemFromBtreeZeroOffset(tls, pCur1, U32(nCellKey), bp+632 /* &m */) if !(rc != 0) { goto __703 } goto abort_due_to_error __703: ; - res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+752 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+752 /* &m */)).Fz, bp+808 /* &r4 */, 0) - Xsqlite3VdbeMemRelease(tls, bp+752 /* &m */) + res12 = Xsqlite3VdbeRecordCompareWithSkip(tls, (*Mem)(unsafe.Pointer(bp+632 /* &m */)).Fn, (*Mem)(unsafe.Pointer(bp+632 /* &m */)).Fz, bp+688 /* &r4 */, 0) + Xsqlite3VdbeMemRelease(tls, bp+632 /* &m */) // End of inlined sqlite3VdbeIdxKeyCompare() @@ -117239,20 +117239,20 @@ __132: __707: iDb2 = (*Op)(unsafe.Pointer(pOp)).Fp3 - *(*int32)(unsafe.Pointer(bp + 832 /* iMoved */)) = 0 // Not needed. Only to silence a warning. - rc = Xsqlite3BtreeDropTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb2)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp1, bp+832 /* &iMoved */) + *(*int32)(unsafe.Pointer(bp + 712 /* iMoved */)) = 0 // Not needed. Only to silence a warning. + rc = Xsqlite3BtreeDropTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb2)*32)).FpBt, (*Op)(unsafe.Pointer(pOp)).Fp1, bp+712 /* &iMoved */) (*Mem)(unsafe.Pointer(pOut)).Fflags = U16(MEM_Int) - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*int32)(unsafe.Pointer(bp + 832 /* iMoved */))) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */))) if !(rc != 0) { goto __709 } goto abort_due_to_error __709: ; - if !(*(*int32)(unsafe.Pointer(bp + 832 /* iMoved */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */)) != 0) { goto __710 } - Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 832 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) + Xsqlite3RootPageMoved(tls, db, iDb2, uint32(*(*int32)(unsafe.Pointer(bp + 712 /* iMoved */))), uint32((*Op)(unsafe.Pointer(pOp)).Fp1)) // All OP_Destroy operations occur on the same btree resetSchemaOnFault = (U8(iDb2 + 1)) @@ -117280,18 +117280,18 @@ __708: // See also: Destroy __133: ; - *(*int32)(unsafe.Pointer(bp + 836 /* nChange */)) = 0 + *(*int32)(unsafe.Pointer(bp + 716 /* nChange */)) = 0 - rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+836 /* &nChange */) + rc = Xsqlite3BtreeClearTable(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*32)).FpBt, int32(U32((*Op)(unsafe.Pointer(pOp)).Fp1)), bp+716 /* &nChange */) if !((*Op)(unsafe.Pointer(pOp)).Fp3 != 0) { goto __711 } - *(*int32)(unsafe.Pointer(p + 60 /* &.nChange */)) += (*(*int32)(unsafe.Pointer(bp + 836 /* nChange */))) + *(*int32)(unsafe.Pointer(p + 60 /* &.nChange */)) += (*(*int32)(unsafe.Pointer(bp + 716 /* nChange */))) if !((*Op)(unsafe.Pointer(pOp)).Fp3 > 0) { goto __712 } - *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 /* &.u */ /* &.i */)) += (I64(*(*int32)(unsafe.Pointer(bp + 836 /* nChange */)))) + *(*I64)(unsafe.Pointer(aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56 /* &.u */ /* &.i */)) += (I64(*(*int32)(unsafe.Pointer(bp + 716 /* nChange */)))) __712: ; __711: @@ -117345,18 +117345,18 @@ __715: __135: ; pOut = out2Prerelease(tls, p, pOp) - *(*Pgno)(unsafe.Pointer(bp + 840 /* pgno */)) = Pgno(0) + *(*Pgno)(unsafe.Pointer(bp + 720 /* pgno */)) = Pgno(0) pDb2 = ((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*32) - rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+840 /* &pgno */, (*Op)(unsafe.Pointer(pOp)).Fp3) + rc = Xsqlite3BtreeCreateTable(tls, (*Db)(unsafe.Pointer(pDb2)).FpBt, bp+720 /* &pgno */, (*Op)(unsafe.Pointer(pOp)).Fp3) if !(rc != 0) { goto __717 } goto abort_due_to_error __717: ; - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*Pgno)(unsafe.Pointer(bp + 840 /* pgno */))) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = I64(*(*Pgno)(unsafe.Pointer(bp + 720 /* pgno */))) goto __8 // Opcode: SqlExec * * * P4 * @@ -117403,14 +117403,14 @@ __137: __719: zSchema = ts + 6318 /* "sqlite_master" */ - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).Fdb = db - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).FiDb = iDb3 - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).FpzErrMsg = (p + 168 /* &.zErrMsg */) - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).FmInitFlags = U32(0) - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).Fdb = db + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FiDb = iDb3 + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FpzErrMsg = (p + 168 /* &.zErrMsg */) + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FmInitFlags = U32(0) + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FpBt) zSql = Xsqlite3MPrintf(tls, db, ts+6332, /* "SELECT*FROM\"%w\"...." */ - libc.VaList(bp+104, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) + libc.VaList(bp+64, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb3)*32)).FzDbSName, zSchema, *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))) if !(zSql == uintptr(0)) { goto __721 } @@ -117419,19 +117419,19 @@ __719: __721: ; (*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy = U8(1) - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).Frc = SQLITE_OK - (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).FnInitRow = U32(0) + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).Frc = SQLITE_OK + (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).FnInitRow = U32(0) rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 - }{Xsqlite3InitCallback})), bp+848 /* &initData */, uintptr(0)) + }{Xsqlite3InitCallback})), bp+728 /* &initData */, uintptr(0)) if !(rc == SQLITE_OK) { goto __723 } - rc = (*InitData)(unsafe.Pointer(bp + 848 /* &initData */)).Frc + rc = (*InitData)(unsafe.Pointer(bp + 728 /* &initData */)).Frc __723: ; - if !((rc == SQLITE_OK) && ((*InitData)(unsafe.Pointer(bp+848 /* &initData */)).FnInitRow == U32(0))) { + if !((rc == SQLITE_OK) && ((*InitData)(unsafe.Pointer(bp+728 /* &initData */)).FnInitRow == U32(0))) { goto __724 } // The OP_ParseSchema opcode with a non-NULL P4 argument should parse @@ -117542,9 +117542,9 @@ __142: // Register keeping track of errors remaining pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56) z = Xsqlite3BtreeIntegrityCheck(tls, db, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr((*Op)(unsafe.Pointer(pOp)).Fp5)*32)).FpBt, (aRoot + 1*4), nRoot, - (int32(*(*I64)(unsafe.Pointer(pnErr /* &.u */))) + 1), bp+888 /* &nErr */) + (int32(*(*I64)(unsafe.Pointer(pnErr /* &.u */))) + 1), bp+768 /* &nErr */) Xsqlite3VdbeMemSetNull(tls, pIn1) - if !(*(*int32)(unsafe.Pointer(bp + 888 /* nErr */)) == 0) { + if !(*(*int32)(unsafe.Pointer(bp + 768 /* nErr */)) == 0) { goto __728 } @@ -117556,7 +117556,7 @@ __728: goto no_mem goto __731 __730: - *(*I64)(unsafe.Pointer(pnErr /* &.u */ /* &.i */)) -= (I64(*(*int32)(unsafe.Pointer(bp + 888 /* nErr */)) - 1)) + *(*I64)(unsafe.Pointer(pnErr /* &.u */ /* &.i */)) -= (I64(*(*int32)(unsafe.Pointer(bp + 768 /* nErr */)) - 1)) Xsqlite3VdbeMemSetStr(tls, pIn1, z, int64(-1), uint8(SQLITE_UTF8), *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) __731: ; @@ -117604,7 +117604,7 @@ __144: pIn1 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp1)*56) if !(((int32((*Mem)(unsafe.Pointer(pIn1)).Fflags) & MEM_Blob) == 0) || - (Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+896 /* &val */) == 0)) { + (Xsqlite3RowSetNext(tls, (*Mem)(unsafe.Pointer(pIn1)).Fz, bp+776 /* &val */) == 0)) { goto __734 } // The boolean index is empty @@ -117615,7 +117615,7 @@ __144: __734: // A value was pulled from the index ; - Xsqlite3VdbeMemSetInt64(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56), *(*I64)(unsafe.Pointer(bp + 896 /* val */))) + Xsqlite3VdbeMemSetInt64(tls, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56), *(*I64)(unsafe.Pointer(bp + 776 /* val */))) __735: ; goto check_for_interrupt @@ -118005,8 +118005,8 @@ __152: pIn3 = (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp3)*56) pOut = out2Prerelease(tls, p, pOp) - *(*I64)(unsafe.Pointer(bp + 904 /* x3 */)) = *(*I64)(unsafe.Pointer(pIn1 /* &.u */)) - if !((*(*I64)(unsafe.Pointer(bp + 904 /* x3 */)) <= int64(0)) || (Xsqlite3AddInt64(tls, bp+904 /* &x3 */, func() int64 { + *(*I64)(unsafe.Pointer(bp + 784 /* x3 */)) = *(*I64)(unsafe.Pointer(pIn1 /* &.u */)) + if !((*(*I64)(unsafe.Pointer(bp + 784 /* x3 */)) <= int64(0)) || (Xsqlite3AddInt64(tls, bp+784 /* &x3 */, func() int64 { if *(*I64)(unsafe.Pointer(pIn3 /* &.u */)) > int64(0) { return *(*I64)(unsafe.Pointer(pIn3 /* &.u */)) } @@ -118024,7 +118024,7 @@ __152: *(*I64)(unsafe.Pointer(pOut /* &.u */)) = int64(-1) goto __770 __769: - *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 904 /* x3 */)) + *(*I64)(unsafe.Pointer(pOut /* &.u */)) = *(*I64)(unsafe.Pointer(bp + 784 /* x3 */)) __770: ; goto __8 @@ -118187,7 +118187,7 @@ __781: if !((*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError > 0) { goto __783 } - Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+136, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) + Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+88, Xsqlite3_value_text(tls, (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FpOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx1)).FisError __783: ; @@ -118265,7 +118265,7 @@ __788: if !(rc != 0) { goto __789 } - Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+152, Xsqlite3_value_text(tls, pMem4))) + Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+96, Xsqlite3_value_text(tls, pMem4))) goto abort_due_to_error __789: ; @@ -118292,10 +118292,10 @@ __790: __160: // Write results here ; - *(*int32)(unsafe.Pointer(bp + 912 /* &aRes[0] */)) = 0 - *(*int32)(unsafe.Pointer(bp + 912 /* &aRes[0] */ + 1*4)) = libc.AssignPtrInt32(bp+912 /* &aRes */ +2*4, -1) + *(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */)) = 0 + *(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */ + 1*4)) = libc.AssignPtrInt32(bp+792 /* &aRes */ +2*4, -1) - rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, (bp + 912 /* &aRes */ + 1*4), (bp + 912 /* &aRes */ + 2*4)) + rc = Xsqlite3Checkpoint(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, (*Op)(unsafe.Pointer(pOp)).Fp2, (bp + 792 /* &aRes */ + 1*4), (bp + 792 /* &aRes */ + 2*4)) if !(rc != 0) { goto __791 } @@ -118306,7 +118306,7 @@ __160: // Write results here __792: ; rc = SQLITE_OK - *(*int32)(unsafe.Pointer(bp + 912 /* &aRes[0] */)) = 1 + *(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */)) = 1 __791: ; i5 = 0 @@ -118315,7 +118315,7 @@ __793: if !(i5 < 3) { goto __795 } - Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 912 /* &aRes[0] */ + uintptr(i5)*4)))) + Xsqlite3VdbeMemSetInt64(tls, pMem5, I64(*(*int32)(unsafe.Pointer(bp + 792 /* &aRes[0] */ + uintptr(i5)*4)))) goto __794 __794: i5++ @@ -118381,7 +118381,7 @@ __798: rc = SQLITE_ERROR Xsqlite3VdbeError(tls, p, ts+6412, /* "cannot change %s..." */ - libc.VaList(bp+168, func() uintptr { + libc.VaList(bp+104, func() uintptr { if eNew == PAGER_JOURNALMODE_WAL { return ts + 6464 /* "into" */ } @@ -118588,7 +118588,7 @@ __167: goto __816 } z1 = *(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)) - Xsqlite3VdbeError(tls, p, ts+6476 /* "database table i..." */, libc.VaList(bp+184, z1)) + Xsqlite3VdbeError(tls, p, ts+6476 /* "database table i..." */, libc.VaList(bp+112, z1)) __816: ; goto abort_due_to_error @@ -118629,14 +118629,14 @@ __818: // P1. Call the xCreate method for that table. __169: // Name of the virtual table - libc.Xmemset(tls, bp+928 /* &sMem1 */, 0, uint64(unsafe.Sizeof(Mem{}))) - (*Mem)(unsafe.Pointer(bp + 928 /* &sMem1 */)).Fdb = db + libc.Xmemset(tls, bp+808 /* &sMem1 */, 0, uint64(unsafe.Sizeof(Mem{}))) + (*Mem)(unsafe.Pointer(bp + 808 /* &sMem1 */)).Fdb = db // Because P2 is always a static string, it is impossible for the // sqlite3VdbeMemCopy() to fail - rc = Xsqlite3VdbeMemCopy(tls, bp+928 /* &sMem1 */, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)) + rc = Xsqlite3VdbeMemCopy(tls, bp+808 /* &sMem1 */, (aMem + uintptr((*Op)(unsafe.Pointer(pOp)).Fp2)*56)) - zTab = Xsqlite3_value_text(tls, bp+928 /* &sMem1 */) + zTab = Xsqlite3_value_text(tls, bp+808 /* &sMem1 */) if !(zTab != 0) { goto __819 @@ -118644,7 +118644,7 @@ __169: // Name of the virtual table rc = Xsqlite3VtabCallCreate(tls, db, (*Op)(unsafe.Pointer(pOp)).Fp1, zTab, (p + 168 /* &.zErrMsg */)) __819: ; - Xsqlite3VdbeMemRelease(tls, bp+928 /* &sMem1 */) + Xsqlite3VdbeMemRelease(tls, bp+808 /* &sMem1 */) if !(rc != 0) { goto __820 } @@ -118678,7 +118678,7 @@ __821: __171: ; pCur2 = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 984 /* pVCur */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */)) = uintptr(0) pVtab1 = (*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FpVtab if !((pVtab1 == uintptr(0)) || ((*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule == uintptr(0))) { goto __822 @@ -118688,7 +118688,7 @@ __171: __822: ; pModule1 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FpModule - rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pModule1 + 48 /* &.xOpen */))))(tls, pVtab1, bp+984 /* &pVCur */) + rc = (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer((pModule1 + 48 /* &.xOpen */))))(tls, pVtab1, bp+864 /* &pVCur */) Xsqlite3VtabImportErrmsg(tls, p, pVtab1) if !(rc != 0) { goto __823 @@ -118698,19 +118698,19 @@ __823: ; // Initialize sqlite3_vtab_cursor base class - (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 984 /* pVCur */)))).FpVtab = pVtab1 + (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */)))).FpVtab = pVtab1 // Initialize vdbe cursor object pCur2 = allocateCursor(tls, p, (*Op)(unsafe.Pointer(pOp)).Fp1, 0, -1, uint8(CURTYPE_VTAB)) if !(pCur2 != 0) { goto __824 } - *(*uintptr)(unsafe.Pointer(pCur2 + 56 /* &.uc */)) = *(*uintptr)(unsafe.Pointer(bp + 984 /* pVCur */)) + *(*uintptr)(unsafe.Pointer(pCur2 + 56 /* &.uc */)) = *(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */)) (*Sqlite3_vtab)(unsafe.Pointer(pVtab1)).FnRef++ goto __825 __824: ; - (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule1 + 56 /* &.xClose */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 984 /* pVCur */))) + (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer((pModule1 + 56 /* &.xClose */))))(tls, *(*uintptr)(unsafe.Pointer(bp + 864 /* pVCur */))) goto no_mem __825: ; @@ -118813,8 +118813,8 @@ __831: pVtab3 = (*Sqlite3_vtab_cursor)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pCur4 + 56 /* &.uc */)))).FpVtab pModule3 = (*Sqlite3_vtab)(unsafe.Pointer(pVtab3)).FpModule - libc.Xmemset(tls, bp+992 /* &sContext */, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) - (*Sqlite3_context)(unsafe.Pointer(bp + 992 /* &sContext */)).FpOut = pDest2 + libc.Xmemset(tls, bp+872 /* &sContext */, 0, uint64(unsafe.Sizeof(Sqlite3_context{}))) + (*Sqlite3_context)(unsafe.Pointer(bp + 872 /* &sContext */)).FpOut = pDest2 if !((int32((*Op)(unsafe.Pointer(pOp)).Fp5) & OPFLAG_NOCHNG) != 0) { goto __832 @@ -118827,13 +118827,13 @@ __832: (*Mem)(unsafe.Pointer(pDest2)).Fflags = (U16((int32((*Mem)(unsafe.Pointer((pDest2))).Fflags) & libc.CplInt32((MEM_TypeMask | MEM_Zero))) | MEM_Null)) __833: ; - rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pModule3 + 88 /* &.xColumn */))))(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 56 /* &.uc */)), bp+992 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) + rc = (*(*func(*libc.TLS, uintptr, uintptr, int32) int32)(unsafe.Pointer((pModule3 + 88 /* &.xColumn */))))(tls, *(*uintptr)(unsafe.Pointer(pCur4 + 56 /* &.uc */)), bp+872 /* &sContext */, (*Op)(unsafe.Pointer(pOp)).Fp2) Xsqlite3VtabImportErrmsg(tls, p, pVtab3) - if !((*Sqlite3_context)(unsafe.Pointer(bp+992 /* &sContext */)).FisError > 0) { + if !((*Sqlite3_context)(unsafe.Pointer(bp+872 /* &sContext */)).FisError > 0) { goto __834 } - Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+200, Xsqlite3_value_text(tls, pDest2))) - rc = (*Sqlite3_context)(unsafe.Pointer(bp + 992 /* &sContext */)).FisError + Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+120, Xsqlite3_value_text(tls, pDest2))) + rc = (*Sqlite3_context)(unsafe.Pointer(bp + 872 /* &sContext */)).FisError __834: ; Xsqlite3VdbeChangeEncoding(tls, pDest2, int32(encoding)) @@ -119000,14 +119000,14 @@ __847: __848: ; (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = U8((*Op)(unsafe.Pointer(pOp)).Fp5) - rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pModule5 + 104 /* &.xUpdate */))))(tls, pVtab6, nArg1, apArg1, bp+1048 /* &rowid1 */) + rc = (*(*func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32)(unsafe.Pointer((pModule5 + 104 /* &.xUpdate */))))(tls, pVtab6, nArg1, apArg1, bp+928 /* &rowid1 */) (*Sqlite3)(unsafe.Pointer(db)).FvtabOnConflict = vtabOnConflict Xsqlite3VtabImportErrmsg(tls, p, pVtab6) if !((rc == SQLITE_OK) && ((*Op)(unsafe.Pointer(pOp)).Fp1 != 0)) { goto __849 } - (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 1048 /* rowid1 */)) + (*Sqlite3)(unsafe.Pointer(db)).FlastRowid = *(*Sqlite_int64)(unsafe.Pointer(bp + 928 /* rowid1 */)) __849: ; if !(((rc & 0xff) == SQLITE_CONSTRAINT) && ((*VTable)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pOp + 16 /* &.p4 */)))).FbConstraint != 0)) { @@ -119163,7 +119163,7 @@ __857: if !((*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError > 0) { goto __862 } - Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+216, Xsqlite3_value_text(tls, pOut))) + Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+128, Xsqlite3_value_text(tls, pOut))) rc = (*Sqlite3_context)(unsafe.Pointer(pCtx2)).FisError __862: ; @@ -119253,7 +119253,7 @@ __867: if !((*Sqlite3)(unsafe.Pointer(db)).FnVdbeExec > 1) { goto __869 } - z3 = Xsqlite3MPrintf(tls, db, ts+6505 /* "-- %s" */, libc.VaList(bp+232, zTrace)) + z3 = Xsqlite3MPrintf(tls, db, ts+6505 /* "-- %s" */, libc.VaList(bp+136, zTrace)) (*(*func(*libc.TLS, U32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer((db + 240 /* &.trace */ /* &.xV2 */))))(tls, uint32(SQLITE_TRACE_STMT), (*Sqlite3)(unsafe.Pointer(db)).FpTraceArg, p, z3) Xsqlite3DbFree(tls, db, z3) goto __870 @@ -119356,14 +119356,14 @@ __878: if !(((*Vdbe)(unsafe.Pointer(p)).FzErrMsg == uintptr(0)) && (rc != (SQLITE_IOERR | (int32(12) << 8)))) { goto __880 } - Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+248, Xsqlite3ErrStr(tls, rc))) + Xsqlite3VdbeError(tls, p, ts+3630 /* "%s" */, libc.VaList(bp+144, Xsqlite3ErrStr(tls, rc))) __880: ; (*Vdbe)(unsafe.Pointer(p)).Frc = rc Xsqlite3SystemError(tls, db, rc) Xsqlite3_log(tls, rc, ts+6511, /* "statement aborts..." */ - libc.VaList(bp+264, (int32((int64(pOp)-int64(aOp))/24)), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) + libc.VaList(bp+152, (int32((int64(pOp)-int64(aOp))/24)), (*Vdbe)(unsafe.Pointer(p)).FzSql, (*Vdbe)(unsafe.Pointer(p)).FzErrMsg)) Xsqlite3VdbeHalt(tls, p) if !(rc == (SQLITE_IOERR | (int32(12) << 8))) { goto __881 @@ -119502,8 +119502,8 @@ type Incrblob = Incrblob1 /* sqlite3.c:94829:25 */ // calls to sqlite3_blob_read(), blob_write() or blob_reopen() will // immediately return SQLITE_ABORT. func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) int32 { /* sqlite3.c:94859:12: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(24) + defer tls.Free(24) var rc int32 // Error code var zErr uintptr = uintptr(0) // Error message @@ -119564,10 +119564,10 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) rc = Xsqlite3_finalize(tls, (*Incrblob)(unsafe.Pointer(p)).FpStmt) (*Incrblob)(unsafe.Pointer(p)).FpStmt = uintptr(0) if rc == SQLITE_OK { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6638 /* "no such rowid: %..." */, libc.VaList(bp+16, iRow)) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+6638 /* "no such rowid: %..." */, libc.VaList(bp+8, iRow)) rc = SQLITE_ERROR } else { - zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3630 /* "%s" */, libc.VaList(bp+32, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) + zErr = Xsqlite3MPrintf(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb, ts+3630 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, (*Incrblob)(unsafe.Pointer(p)).Fdb))) } } @@ -119577,17 +119577,17 @@ func blobSeekToRow(tls *libc.TLS, p uintptr, iRow Sqlite3_int64, pzErr uintptr) // Open a blob handle. func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, zColumn uintptr, iRow Sqlite_int64, wrFlag int32, ppBlob uintptr) int32 { /* sqlite3.c:94924:16: */ - bp := tls.Alloc(512) - defer tls.Free(512) + bp := tls.Alloc(464) + defer tls.Free(464) var nAttempt int32 var iCol int32 // Index of zColumn in row-record var rc int32 - // var zErr uintptr at bp+504, 8 + // var zErr uintptr at bp+456, 8 var pTab uintptr var pBlob uintptr - // var sParse Parse at bp+96, 408 + // var sParse Parse at bp+48, 408 var j int32 // Check that the column is not part of an FK child key definition. It @@ -119603,7 +119603,7 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, var aOp uintptr nAttempt = 0 rc = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = uintptr(0) pBlob = uintptr(0) *(*uintptr)(unsafe.Pointer(ppBlob)) = uintptr(0) @@ -119613,49 +119613,49 @@ func Xsqlite3_blob_open(tls *libc.TLS, db uintptr, zDb uintptr, zTable uintptr, pBlob = Xsqlite3DbMallocZero(tls, db, uint64(unsafe.Sizeof(Incrblob{}))) __1: - libc.Xmemset(tls, bp+96 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{}))) + libc.Xmemset(tls, bp+48 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{}))) if !(!(pBlob != 0)) { goto __4 } goto blob_open_out __4: ; - (*Parse)(unsafe.Pointer(bp + 96 /* &sParse */)).Fdb = db - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */))) - *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)) = uintptr(0) + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).Fdb = db + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = uintptr(0) Xsqlite3BtreeEnterAll(tls, db) - pTab = Xsqlite3LocateTable(tls, bp+96 /* &sParse */, uint32(0), zTable, zDb) + pTab = Xsqlite3LocateTable(tls, bp+48 /* &sParse */, uint32(0), zTable, zDb) if !((pTab != 0) && ((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0)) { goto __5 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+96 /* &sParse */, ts+6658 /* "cannot open virt..." */, libc.VaList(bp, zTable)) + Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+6658 /* "cannot open virt..." */, libc.VaList(bp, zTable)) __5: ; if !((pTab != 0) && !(((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0))) { goto __6 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+96 /* &sParse */, ts+6688 /* "cannot open tabl..." */, libc.VaList(bp+16, zTable)) + Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+6688 /* "cannot open tabl..." */, libc.VaList(bp+8, zTable)) __6: ; if !((pTab != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect != 0)) { goto __7 } pTab = uintptr(0) - Xsqlite3ErrorMsg(tls, bp+96 /* &sParse */, ts+6724 /* "cannot open view..." */, libc.VaList(bp+32, zTable)) + Xsqlite3ErrorMsg(tls, bp+48 /* &sParse */, ts+6724 /* "cannot open view..." */, libc.VaList(bp+16, zTable)) __7: ; if !(!(pTab != 0)) { goto __8 } - if !((*Parse)(unsafe.Pointer(bp+96 /* &sParse */)).FzErrMsg != 0) { + if !((*Parse)(unsafe.Pointer(bp+48 /* &sParse */)).FzErrMsg != 0) { goto __9 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */))) - *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)) = (*Parse)(unsafe.Pointer(bp + 96 /* &sParse */)).FzErrMsg - (*Parse)(unsafe.Pointer(bp + 96 /* &sParse */)).FzErrMsg = uintptr(0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FzErrMsg + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FzErrMsg = uintptr(0) __9: ; rc = SQLITE_ERROR @@ -119688,8 +119688,8 @@ __12: if !(iCol == int32((*Table)(unsafe.Pointer(pTab)).FnCol)) { goto __14 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */))) - *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6745 /* "no such column: ..." */, libc.VaList(bp+48, zColumn)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6745 /* "no such column: ..." */, libc.VaList(bp+24, zColumn)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -119771,8 +119771,8 @@ __26: if !(zFault != 0) { goto __31 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */))) - *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6786 /* "cannot open %s c..." */, libc.VaList(bp+64, zFault)) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) = Xsqlite3MPrintf(tls, db, ts+6786 /* "cannot open %s c..." */, libc.VaList(bp+32, zFault)) rc = SQLITE_ERROR Xsqlite3BtreeLeaveAll(tls, db) goto blob_open_out @@ -119781,7 +119781,7 @@ __31: __15: ; - (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt = Xsqlite3VdbeCreate(tls, bp+96 /* &sParse */) + (*Incrblob)(unsafe.Pointer(pBlob)).FpStmt = Xsqlite3VdbeCreate(tls, bp+48 /* &sParse */) if !((*Incrblob)(unsafe.Pointer(pBlob)).FpStmt != 0) { goto __32 @@ -119835,10 +119835,10 @@ __35: *(*int32)(unsafe.Pointer(aOp + 1*24 + 16 /* &.p4 */)) = (int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1) (*VdbeOp)(unsafe.Pointer(aOp + 3*24)).Fp2 = int32((*Table)(unsafe.Pointer(pTab)).FnCol) - (*Parse)(unsafe.Pointer(bp + 96 /* &sParse */)).FnVar = int16(0) - (*Parse)(unsafe.Pointer(bp + 96 /* &sParse */)).FnMem = 1 - (*Parse)(unsafe.Pointer(bp + 96 /* &sParse */)).FnTab = 1 - Xsqlite3VdbeMakeReady(tls, v, bp+96 /* &sParse */) + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnVar = int16(0) + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnMem = 1 + (*Parse)(unsafe.Pointer(bp + 48 /* &sParse */)).FnTab = 1 + Xsqlite3VdbeMakeReady(tls, v, bp+48 /* &sParse */) __34: ; __32: @@ -119853,7 +119853,7 @@ __32: goto blob_open_out __36: ; - rc = blobSeekToRow(tls, pBlob, iRow, bp+504 /* &zErr */) + rc = blobSeekToRow(tls, pBlob, iRow, bp+456 /* &zErr */) goto __2 __2: if ((libc.PreIncInt32(&nAttempt, 1)) < SQLITE_MAX_SCHEMA_RETRY) && (rc == SQLITE_SCHEMA) { @@ -119880,13 +119880,13 @@ __39: __38: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)) != 0 { return ts + 3630 /* "%s" */ } return uintptr(0) - }(), libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 504 /* zErr */))) - Xsqlite3ParserReset(tls, bp+96 /* &sParse */) + }(), libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 456 /* zErr */))) + Xsqlite3ParserReset(tls, bp+48 /* &sParse */) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc @@ -120021,8 +120021,8 @@ func Xsqlite3_blob_bytes(tls *libc.TLS, pBlob uintptr) int32 { /* sqlite3.c:9526 // subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) // immediately return SQLITE_ABORT. func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int32 { /* sqlite3.c:95283:16: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var rc int32 var p uintptr = pBlob @@ -120039,18 +120039,18 @@ func Xsqlite3_blob_reopen(tls *libc.TLS, pBlob uintptr, iRow Sqlite3_int64) int3 // already been invalidated. Return SQLITE_ABORT in this case. rc = SQLITE_ABORT } else { - // var zErr uintptr at bp+16, 8 + // var zErr uintptr at bp+8, 8 (*Vdbe)(unsafe.Pointer((*Incrblob)(unsafe.Pointer(p)).FpStmt)).Frc = SQLITE_OK - rc = blobSeekToRow(tls, p, iRow, bp+16 /* &zErr */) + rc = blobSeekToRow(tls, p, iRow, bp+8 /* &zErr */) if rc != SQLITE_OK { Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)) != 0 { return ts + 3630 /* "%s" */ } return uintptr(0) - }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))) + }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))) } } @@ -123523,8 +123523,8 @@ func Xsqlite3ExprColUsed(tls *libc.TLS, pExpr uintptr) Bitmask { /* sqlite3.c:99 // If the name cannot be resolved unambiguously, leave an error message // in pParse and return WRC_Abort. Return WRC_Prune on success. func lookupName(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zCol uintptr, pNC uintptr, pExpr uintptr) int32 { /* sqlite3.c:99446:12: */ - bp := tls.Alloc(144) - defer tls.Free(144) + bp := tls.Alloc(96) + defer tls.Free(96) var i int32 var j int32 // Loop counters @@ -124016,7 +124016,7 @@ __70: ((((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_AllowWin) == 0) || (pNC != pTopNC))) { goto __71 } - Xsqlite3ErrorMsg(tls, pParse, ts+6873 /* "misuse of aliase..." */, libc.VaList(bp+16, zAs)) + Xsqlite3ErrorMsg(tls, pParse, ts+6873 /* "misuse of aliase..." */, libc.VaList(bp+8, zAs)) return WRC_Abort __71: ; @@ -124099,7 +124099,7 @@ __11: // a huge amount of legacy SQL that uses it. So for now, we just // issue a warning. Xsqlite3_log(tls, SQLITE_WARNING, - ts+6928 /* "double-quoted st..." */, libc.VaList(bp+32, zCol)) + ts+6928 /* "double-quoted st..." */, libc.VaList(bp+16, zCol)) (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_STRING) *(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)) = uintptr(0) return WRC_Prune @@ -124127,16 +124127,16 @@ __75: if !(zDb != 0) { goto __79 } - Xsqlite3ErrorMsg(tls, pParse, ts+7000 /* "%s: %s.%s.%s" */, libc.VaList(bp+48, zErr, zDb, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7000 /* "%s: %s.%s.%s" */, libc.VaList(bp+24, zErr, zDb, zTab, zCol)) goto __80 __79: if !(zTab != 0) { goto __81 } - Xsqlite3ErrorMsg(tls, pParse, ts+7013 /* "%s: %s.%s" */, libc.VaList(bp+88, zErr, zTab, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7013 /* "%s: %s.%s" */, libc.VaList(bp+56, zErr, zTab, zCol)) goto __82 __81: - Xsqlite3ErrorMsg(tls, pParse, ts+7023 /* "%s: %s" */, libc.VaList(bp+120, zErr, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+7023 /* "%s: %s" */, libc.VaList(bp+80, zErr, zCol)) __82: ; __80: @@ -124267,8 +124267,8 @@ func Xsqlite3CreateColumnExpr(tls *libc.TLS, db uintptr, pSrc uintptr, iSrc int3 // (because errors are rare), the conditional is moved outside of the // function call using a macro. func notValidImpl(tls *libc.TLS, pParse uintptr, pNC uintptr, zMsg uintptr, pExpr uintptr) { /* sqlite3.c:99922:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var zIn uintptr = ts + 7030 /* "partial index WH..." */ if ((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_IdxExpr) != 0 { @@ -124313,8 +124313,8 @@ func exprProbability(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:99948:12: */ // function names. The operator for aggregate functions is changed // to TK_AGG_FUNCTION. func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:99968:12: */ - bp := tls.Alloc(176) - defer tls.Free(176) + bp := tls.Alloc(128) + defer tls.Free(128) var pNC uintptr var pParse uintptr @@ -124361,7 +124361,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s fallthrough case TK_ISNULL: { - // var anRef [8]int32 at bp+144, 32 + // var anRef [8]int32 at bp+96, 32 var p uintptr var i int32 @@ -124372,7 +124372,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s goto __3 } { - *(*int32)(unsafe.Pointer(bp + 144 /* &anRef[0] */ + uintptr(i)*4)) = (*NameContext)(unsafe.Pointer(p)).FnRef + *(*int32)(unsafe.Pointer(bp + 96 /* &anRef[0] */ + uintptr(i)*4)) = (*NameContext)(unsafe.Pointer(p)).FnRef } goto __2 @@ -124400,7 +124400,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s goto __6 } { - (*NameContext)(unsafe.Pointer(p)).FnRef = *(*int32)(unsafe.Pointer(bp + 144 /* &anRef[0] */ + uintptr(i)*4)) + (*NameContext)(unsafe.Pointer(p)).FnRef = *(*int32)(unsafe.Pointer(bp + 96 /* &anRef[0] */ + uintptr(i)*4)) } goto __5 @@ -124587,7 +124587,7 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s if ((pDef != 0) && ((*FuncDef)(unsafe.Pointer(pDef)).FxValue == uintptr(0))) && (pWin != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+7294 /* "%.*s() may not b..." */, libc.VaList(bp+16, nId, zId)) + ts+7294 /* "%.*s() may not b..." */, libc.VaList(bp+8, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if (((is_agg != 0) && (((*NameContext)(unsafe.Pointer(pNC)).FncFlags & NC_AllowAgg) == 0)) || (((is_agg != 0) && (((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_WINDOW)) != 0)) && !(pWin != 0))) || @@ -124598,20 +124598,20 @@ func resolveExprStep(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* s } else { zType = ts + 7345 /* "aggregate" */ } - Xsqlite3ErrorMsg(tls, pParse, ts+7355 /* "misuse of %s fun..." */, libc.VaList(bp+40, zType, nId, zId)) + Xsqlite3ErrorMsg(tls, pParse, ts+7355 /* "misuse of %s fun..." */, libc.VaList(bp+24, zType, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ is_agg = 0 } else if (no_such_func != 0) && (int32((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).Finit.Fbusy) == 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+7384 /* "no such function..." */, libc.VaList(bp+72, nId, zId)) + Xsqlite3ErrorMsg(tls, pParse, ts+7384 /* "no such function..." */, libc.VaList(bp+48, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if wrong_num_args != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+7407, /* "wrong number of ..." */ - libc.VaList(bp+96, nId, zId)) + libc.VaList(bp+64, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } else if (is_agg == 0) && (((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) { Xsqlite3ErrorMsg(tls, pParse, ts+7452, /* "FILTER may not b..." */ - libc.VaList(bp+120, nId, zId)) + libc.VaList(bp+80, nId, zId)) (*NameContext)(unsafe.Pointer(pNC)).FnNcErr++ } if is_agg != 0 { @@ -124862,8 +124862,8 @@ func resolveOrderByTermToExprList(tls *libc.TLS, pParse uintptr, pSelect uintptr // Generate an ORDER BY or GROUP BY term out-of-range error. func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int32, mx int32) { /* sqlite3.c:100497:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) Xsqlite3ErrorMsg(tls, pParse, @@ -124884,8 +124884,8 @@ func resolveOutOfRangeError(tls *libc.TLS, pParse uintptr, zType uintptr, i int3 // // Return the number of errors seen. func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int32 { /* sqlite3.c:100523:12: */ - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(12) + defer tls.Free(12) var i int32 var pOrderBy uintptr @@ -124922,7 +124922,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 goto __3 } { - *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) = -1 + *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = -1 var pE uintptr var pDup uintptr if (uint32(int32(*(*uint8)(unsafe.Pointer(pItem + 20 /* &.done */)) & 0x4 >> 2))) != 0 { @@ -124932,14 +124932,14 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 if pE == uintptr(0) { goto __2 } - if Xsqlite3ExprIsInteger(tls, pE, bp+16 /* &iCol */) != 0 { - if (*(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) <= 0) || (*(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { + if Xsqlite3ExprIsInteger(tls, pE, bp+8 /* &iCol */) != 0 { + if (*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) <= 0) || (*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) > (*ExprList)(unsafe.Pointer(pEList)).FnExpr) { resolveOutOfRangeError(tls, pParse, ts+7613 /* "ORDER" */, (i + 1), (*ExprList)(unsafe.Pointer(pEList)).FnExpr) return 1 } } else { - *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) = resolveAsName(tls, pParse, pEList, pE) - if *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) == 0 { + *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveAsName(tls, pParse, pEList, pE) + if *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) == 0 { // Now test if expression pE matches one of the values returned // by pSelect. In the usual case this is done by duplicating the // expression, resolving any symbols in it, and then comparing @@ -124954,15 +124954,15 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 pDup = Xsqlite3ExprDup(tls, db, pE, 0) if !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0) { - *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) = resolveOrderByTermToExprList(tls, pParse, pSelect, pDup) - if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) > 0) { + *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) = resolveOrderByTermToExprList(tls, pParse, pSelect, pDup) + if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) > 0) { resolveOrderByTermToExprList(tls, pParse, pSelect, pE) } } Xsqlite3ExprDelete(tls, db, pDup) } } - if *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) > 0 { + if *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) > 0 { // Convert the ORDER BY term into an integer column number iCol, // taking care to preserve the COLLATE clause if it exists. if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { @@ -124971,7 +124971,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 return 1 } *(*U32)(unsafe.Pointer(pNew + 4 /* &.flags */)) |= (U32(EP_IntValue)) - *(*int32)(unsafe.Pointer(pNew + 8 /* &.u */)) = *(*int32)(unsafe.Pointer(bp + 16 /* iCol */)) + *(*int32)(unsafe.Pointer(pNew + 8 /* &.u */)) = *(*int32)(unsafe.Pointer(bp + 8 /* iCol */)) if (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr == pE { (*ExprList_item)(unsafe.Pointer(pItem)).FpExpr = pNew } else { @@ -124984,7 +124984,7 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 (*Expr)(unsafe.Pointer(pParent)).FpLeft = pNew } Xsqlite3ExprDelete(tls, db, pE) - *(*U16)(unsafe.Pointer(pItem + 24 /* &.u */ /* &.x */ /* &.iOrderByCol */)) = U16(*(*int32)(unsafe.Pointer(bp + 16 /* iCol */))) + *(*U16)(unsafe.Pointer(pItem + 24 /* &.u */ /* &.x */ /* &.iOrderByCol */)) = U16(*(*int32)(unsafe.Pointer(bp + 8 /* iCol */))) } libc.SetBitFieldPtr8Uint32(pItem+20 /* &.done */, uint32(1), 2, 0x4) } else { @@ -125021,8 +125021,8 @@ func resolveCompoundOrderBy(tls *libc.TLS, pParse uintptr, pSelect uintptr) int3 // If any errors are detected, add an error message to pParse and // return non-zero. Return zero if no errors are seen. func Xsqlite3ResolveOrderGroupBy(tls *libc.TLS, pParse uintptr, pSelect uintptr, pOrderBy uintptr, zType uintptr) int32 { /* sqlite3.c:100636:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var i int32 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -126243,8 +126243,8 @@ func codeVectorCompare(tls *libc.TLS, pParse uintptr, pExpr uintptr, dest int32, // expression depth allowed. If it is not, leave an error message in // pParse. func Xsqlite3ExprCheckHeight(tls *libc.TLS, pParse uintptr, nHeight int32) int32 { /* sqlite3.c:101913:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = SQLITE_OK var mxHeight int32 = *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */) + 3*4)) @@ -126501,8 +126501,8 @@ func Xsqlite3ExprAnd(tls *libc.TLS, pParse uintptr, pLeft uintptr, pRight uintpt // Construct a new expression node for a function with multiple // arguments. func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken uintptr, eDistinct int32) uintptr { /* sqlite3.c:102202:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pNew uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -126535,8 +126535,8 @@ func Xsqlite3ExprFunction(tls *libc.TLS, pParse uintptr, pList uintptr, pToken u // // If the function is not usable, create an error. func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pDef uintptr) { /* sqlite3.c:102238:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) if ((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_FromDDL))) != U32(0) { if (((*FuncDef)(unsafe.Pointer(pDef)).FfuncFlags & U32(SQLITE_FUNC_DIRECT)) != U32(0)) || @@ -126567,8 +126567,8 @@ func Xsqlite3ExprFunctionUsable(tls *libc.TLS, pParse uintptr, pExpr uintptr, pD // instance of the wildcard, the next sequential variable number is // assigned. func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n U32) { /* sqlite3.c:102277:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var z uintptr @@ -126589,22 +126589,22 @@ func Xsqlite3ExprAssignVarNumber(tls *libc.TLS, pParse uintptr, pExpr uintptr, n if int32(*(*int8)(unsafe.Pointer(z))) == '?' { // Wildcard of the form "?nnn". Convert "nnn" to an integer and // use it as the variable number - // var i I64 at bp+16, 8 + // var i I64 at bp+8, 8 var bOk int32 if n == U32(2) { //OPTIMIZATION-IF-TRUE - *(*I64)(unsafe.Pointer(bp + 16 /* i */)) = (I64(int32(*(*int8)(unsafe.Pointer(z + 1))) - '0')) // The common case of ?N for a single digit N + *(*I64)(unsafe.Pointer(bp + 8 /* i */)) = (I64(int32(*(*int8)(unsafe.Pointer(z + 1))) - '0')) // The common case of ?N for a single digit N bOk = 1 } else { - bOk = (libc.Bool32(0 == Xsqlite3Atoi64(tls, (z+1), bp+16 /* &i */, (int32(n-U32(1))), uint8(SQLITE_UTF8)))) + bOk = (libc.Bool32(0 == Xsqlite3Atoi64(tls, (z+1), bp+8 /* &i */, (int32(n-U32(1))), uint8(SQLITE_UTF8)))) } - if ((bOk == 0) || (*(*I64)(unsafe.Pointer(bp + 16 /* i */)) < int64(1))) || (*(*I64)(unsafe.Pointer(bp + 16 /* i */)) > I64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 9*4)))) { + if ((bOk == 0) || (*(*I64)(unsafe.Pointer(bp + 8 /* i */)) < int64(1))) || (*(*I64)(unsafe.Pointer(bp + 8 /* i */)) > I64(*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 9*4)))) { Xsqlite3ErrorMsg(tls, pParse, ts+7923, /* "variable number ..." */ libc.VaList(bp, *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 9*4)))) return } - x = YnVar(*(*I64)(unsafe.Pointer(bp + 16 /* i */))) + x = YnVar(*(*I64)(unsafe.Pointer(bp + 8 /* i */))) if int32(x) > int32((*Parse)(unsafe.Pointer(pParse)).FnVar) { (*Parse)(unsafe.Pointer(pParse)).FnVar = YnVar(int32(x)) doAdd = 1 @@ -127259,8 +127259,8 @@ func Xsqlite3ExprListAppend(tls *libc.TLS, pParse uintptr, pList uintptr, pExpr // expression list pList. In the case of a subquery on the RHS, append // TK_SELECT_COLUMN expressions. func Xsqlite3ExprListAppendVector(tls *libc.TLS, pParse uintptr, pList uintptr, pColumns uintptr, pExpr uintptr) uintptr { /* sqlite3.c:102981:25: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var db uintptr var n int32 @@ -127425,8 +127425,8 @@ func Xsqlite3ExprListSetSpan(tls *libc.TLS, pParse uintptr, pList uintptr, zStar // If the expression list pEList contains more than iLimit elements, // leave an error message in pParse. func Xsqlite3ExprListCheckLength(tls *libc.TLS, pParse uintptr, pEList uintptr, zObject uintptr) { /* sqlite3.c:103140:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var mx int32 = *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */) + 2*4)) @@ -128111,8 +128111,8 @@ func sqlite3InRhsIsConstant(tls *libc.TLS, pIn uintptr) int32 { /* sqlite3.c:103 // // then aiMap[] is populated with {2, 0, 1}. func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, prRhsHasNull uintptr, aiMap uintptr, piTab uintptr) int32 { /* sqlite3.c:103820:20: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var p uintptr // SELECT to the right of IN operator var eType int32 = 0 // Type of RHS table. IN_INDEX_* @@ -128259,7 +128259,7 @@ func Xsqlite3FindInIndex(tls *libc.TLS, pParse uintptr, pX uintptr, inFlags U32, if colUsed == ((Bitmask((uint64(1))) << (nExpr)) - uint64(1)) { // If we reach this point, that means the index pIdx is usable var iAddr int32 = Xsqlite3VdbeAddOp0(tls, v, OP_Once) - Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8107 /* "USING INDEX %s F..." */, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+8107 /* "USING INDEX %s F..." */, libc.VaList(bp+8, (*Index)(unsafe.Pointer(pIdx)).FzName)) Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, iTab, int32((*Index)(unsafe.Pointer(pIdx)).Ftnum), iDb) Xsqlite3VdbeSetP4KeyInfo(tls, pParse, pIdx) @@ -128361,8 +128361,8 @@ func exprINAffinity(tls *libc.TLS, pParse uintptr, pExpr uintptr) uintptr { /* s // // "sub-select returns N columns - expected M" func Xsqlite3SubselectError(tls *libc.TLS, pParse uintptr, nActual int32, nExpect int32) { /* sqlite3.c:104075:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Parse)(unsafe.Pointer(pParse)).FnErr == 0 { var zFmt uintptr = ts + 8138 /* "sub-select retur..." */ @@ -128408,8 +128408,8 @@ func Xsqlite3VectorErrorMsg(tls *libc.TLS, pParse uintptr, pExpr uintptr) { /* s // 'x' nor the SELECT... statement are columns, then numeric affinity // is used. func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int32) { /* sqlite3.c:104128:21: */ - bp := tls.Alloc(81) - defer tls.Free(81) + bp := tls.Alloc(65) + defer tls.Free(65) var addrOnce int32 = 0 // Address of the OP_Once instruction at top var addr int32 // Address of OP_OpenEphemeral instruction @@ -128472,7 +128472,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 var pSelect uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)) var pEList uintptr = (*Select)(unsafe.Pointer(pSelect)).FpEList - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+8205 /* "%sLIST SUBQUERY ..." */, libc.VaList(bp+16, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+8205 /* "%sLIST SUBQUERY ..." */, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 755 /* "" */ } @@ -128482,12 +128482,12 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // error will have been caught long before we reach this point. if (*ExprList)(unsafe.Pointer(pEList)).FnExpr == nVal { var pCopy uintptr - // var dest SelectDest at bp+40, 40 + // var dest SelectDest at bp+24, 40 var i int32 var rc int32 - Xsqlite3SelectDestInit(tls, bp+40 /* &dest */, SRT_Set, iTab) - (*SelectDest)(unsafe.Pointer(bp + 40 /* &dest */)).FzAffSdst = exprINAffinity(tls, pParse, pExpr) + Xsqlite3SelectDestInit(tls, bp+24 /* &dest */, SRT_Set, iTab) + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FzAffSdst = exprINAffinity(tls, pParse, pExpr) (*Select)(unsafe.Pointer(pSelect)).FiLimit = 0 // Caused by OOM in sqlite3KeyInfoAlloc() @@ -128495,10 +128495,10 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 if (*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FmallocFailed != 0 { rc = 1 } else { - rc = Xsqlite3Select(tls, pParse, pCopy, bp+40 /* &dest */) + rc = Xsqlite3Select(tls, pParse, pCopy, bp+24 /* &dest */) } Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pCopy) - Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+40 /* &dest */)).FzAffSdst) + Xsqlite3DbFree(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FzAffSdst) if rc != 0 { Xsqlite3KeyInfoUnref(tls, pKeyInfo) return @@ -128518,18 +128518,18 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // store it in the temporary table. If <expr> is a column, then use // that columns affinity when building index keys. If <expr> is not // a column, use numeric affinity. - // var affinity int8 at bp+80, 1 + // var affinity int8 at bp+64, 1 // Affinity of the LHS of the IN var i int32 var pList uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */)) var pItem uintptr var r1 int32 var r2 int32 - *(*int8)(unsafe.Pointer(bp + 80 /* affinity */)) = Xsqlite3ExprAffinity(tls, pLeft) - if int32(*(*int8)(unsafe.Pointer(bp + 80 /* affinity */))) <= SQLITE_AFF_NONE { - *(*int8)(unsafe.Pointer(bp + 80 /* affinity */)) = int8(SQLITE_AFF_BLOB) - } else if int32(*(*int8)(unsafe.Pointer(bp + 80 /* affinity */))) == SQLITE_AFF_REAL { - *(*int8)(unsafe.Pointer(bp + 80 /* affinity */)) = int8(SQLITE_AFF_NUMERIC) + *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = Xsqlite3ExprAffinity(tls, pLeft) + if int32(*(*int8)(unsafe.Pointer(bp + 64 /* affinity */))) <= SQLITE_AFF_NONE { + *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = int8(SQLITE_AFF_BLOB) + } else if int32(*(*int8)(unsafe.Pointer(bp + 64 /* affinity */))) == SQLITE_AFF_REAL { + *(*int8)(unsafe.Pointer(bp + 64 /* affinity */)) = int8(SQLITE_AFF_NUMERIC) } if pKeyInfo != 0 { @@ -128560,7 +128560,7 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // Evaluate the expression and insert it into the temp table Xsqlite3ExprCode(tls, pParse, pE2, r1) - Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, r1, 1, r2, bp+80 /* &affinity */, 1) + Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, r1, 1, r2, bp+64 /* &affinity */, 1) Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxInsert, iTab, r2, r1, 1) } @@ -128600,13 +128600,13 @@ func Xsqlite3CodeRhsOfIN(tls *libc.TLS, pParse uintptr, pExpr uintptr, iTab int3 // return value is the register of the left-most result column. // Return 0 if an error occurs. func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { /* sqlite3.c:104320:20: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(64) + defer tls.Free(64) var addrOnce int32 = 0 // Address of OP_Once at top of subroutine var rReg int32 = 0 // Register storing resulting var pSel uintptr // SELECT statement to encode - // var dest SelectDest at bp+40, 40 + // var dest SelectDest at bp+24, 40 // How to deal with SELECT result var nReg int32 // Registers to allocate var pLimit uintptr // New limit expression @@ -128655,7 +128655,7 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { // // In both cases, the query is augmented with "LIMIT 1". Any // preexisting limit is discarded in place of the new LIMIT 1. - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+8254 /* "%sSCALAR SUBQUER..." */, libc.VaList(bp+16, func() uintptr { + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+8254 /* "%sSCALAR SUBQUER..." */, libc.VaList(bp+8, func() uintptr { if addrOnce != 0 { return ts + 755 /* "" */ } @@ -128666,17 +128666,17 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { } else { nReg = 1 } - Xsqlite3SelectDestInit(tls, bp+40 /* &dest */, 0, ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)) + Xsqlite3SelectDestInit(tls, bp+24 /* &dest */, 0, ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1)) *(*int32)(unsafe.Pointer(pParse + 56 /* &.nMem */)) += (nReg) if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_SELECT { - (*SelectDest)(unsafe.Pointer(bp + 40 /* &dest */)).FeDest = U8(SRT_Mem) - (*SelectDest)(unsafe.Pointer(bp + 40 /* &dest */)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 40 /* &dest */)).FiSDParm - (*SelectDest)(unsafe.Pointer(bp + 40 /* &dest */)).FnSdst = nReg - Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*SelectDest)(unsafe.Pointer(bp+40 /* &dest */)).FiSDParm, (((*SelectDest)(unsafe.Pointer(bp+40 /* &dest */)).FiSDParm + nReg) - 1)) + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Mem) + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FiSDParm + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FnSdst = nReg + Xsqlite3VdbeAddOp3(tls, v, OP_Null, 0, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm, (((*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm + nReg) - 1)) } else { - (*SelectDest)(unsafe.Pointer(bp + 40 /* &dest */)).FeDest = U8(SRT_Exists) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*SelectDest)(unsafe.Pointer(bp+40 /* &dest */)).FiSDParm) + (*SelectDest)(unsafe.Pointer(bp + 24 /* &dest */)).FeDest = U8(SRT_Exists) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm) } if (*Select)(unsafe.Pointer(pSel)).FpLimit != 0 { @@ -128697,14 +128697,14 @@ func Xsqlite3CodeSubselect(tls *libc.TLS, pParse uintptr, pExpr uintptr) int32 { (*Select)(unsafe.Pointer(pSel)).FpLimit = Xsqlite3PExpr(tls, pParse, TK_LIMIT, pLimit, uintptr(0)) } (*Select)(unsafe.Pointer(pSel)).FiLimit = 0 - if Xsqlite3Select(tls, pParse, pSel, bp+40 /* &dest */) != 0 { + if Xsqlite3Select(tls, pParse, pSel, bp+24 /* &dest */) != 0 { if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { (*Expr)(unsafe.Pointer(pExpr)).Fop2 = (*Expr)(unsafe.Pointer(pExpr)).Fop (*Expr)(unsafe.Pointer(pExpr)).Fop = U8(TK_ERROR) } return 0 } - (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.AssignInt32(&rReg, (*SelectDest)(unsafe.Pointer(bp+40 /* &dest */)).FiSDParm) + (*Expr)(unsafe.Pointer(pExpr)).FiTable = libc.AssignInt32(&rReg, (*SelectDest)(unsafe.Pointer(bp+24 /* &dest */)).FiSDParm) if addrOnce != 0 { Xsqlite3VdbeJumpHere(tls, v, addrOnce) @@ -129166,8 +129166,8 @@ func codeReal(tls *libc.TLS, v uintptr, z uintptr, negateFlag int32, iMem int32) // // Expr.u.zToken is always UTF8 and zero-terminated. func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iMem int32) { /* sqlite3.c:104756:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe if ((*Expr)(unsafe.Pointer(pExpr)).Fflags & U32(EP_IntValue)) != 0 { @@ -129179,12 +129179,12 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM Xsqlite3VdbeAddOp2(tls, v, OP_Integer, i, iMem) } else { var c int32 - // var value I64 at bp+24, 8 + // var value I64 at bp+16, 8 var z uintptr = *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)) - c = Xsqlite3DecOrHexToI64(tls, z, bp+24 /* &value */) - if (((c == 3) && !(negFlag != 0)) || (c == 2)) || ((negFlag != 0) && (*(*I64)(unsafe.Pointer(bp + 24 /* value */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) { + c = Xsqlite3DecOrHexToI64(tls, z, bp+16 /* &value */) + if (((c == 3) && !(negFlag != 0)) || (c == 2)) || ((negFlag != 0) && (*(*I64)(unsafe.Pointer(bp + 16 /* value */)) == ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))))) { if Xsqlite3_strnicmp(tls, z, ts+8277 /* "0x" */, 2) == 0 { Xsqlite3ErrorMsg(tls, pParse, ts+8280 /* "hex literal too ..." */, libc.VaList(bp, func() uintptr { if negFlag != 0 { @@ -129198,12 +129198,12 @@ func codeInteger(tls *libc.TLS, pParse uintptr, pExpr uintptr, negFlag int32, iM } else { if negFlag != 0 { if c == 3 { - *(*I64)(unsafe.Pointer(bp + 24 /* value */)) = ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) + *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = ((int64(-1)) - (int64(0xffffffff) | (I64((int64(0x7fffffff))) << 32))) } else { - *(*I64)(unsafe.Pointer(bp + 24 /* value */)) = -*(*I64)(unsafe.Pointer(bp + 24 /* value */)) + *(*I64)(unsafe.Pointer(bp + 16 /* value */)) = -*(*I64)(unsafe.Pointer(bp + 16 /* value */)) } } - Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, iMem, 0, bp+24 /* &value */, -14) + Xsqlite3VdbeAddOp4Dup8(tls, v, OP_Int64, 0, iMem, 0, bp+16 /* &value */, -14) } } } @@ -129245,8 +129245,8 @@ func Xsqlite3ExprCodeGeneratedColumn(tls *libc.TLS, pParse uintptr, pCol uintptr // Generate code to extract the value of the iCol-th column of a table. func Xsqlite3ExprCodeGetColumnOfTable(tls *libc.TLS, v uintptr, pTab uintptr, iTabCur int32, iCol int32, regOut int32) { /* sqlite3.c:104843:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pCol uintptr @@ -129472,19 +129472,19 @@ func exprCodeInlineFunction(tls *libc.TLS, pParse uintptr, pFarg uintptr, iFuncI // must check the return code and move the results to the desired // register. func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target int32) int32 { /* sqlite3.c:105104:20: */ - bp := tls.Alloc(224) - defer tls.Free(224) + bp := tls.Alloc(192) + defer tls.Free(192) var v uintptr // The VM under construction var op int32 // The opcode being coded var inReg int32 // Results stored in register inReg - // var regFree1 int32 at bp+72, 4 + // var regFree1 int32 at bp+40, 4 // If non-zero free this temporary register - // var regFree2 int32 at bp+76, 4 + // var regFree2 int32 at bp+44, 4 // If non-zero free this temporary register var r1 int32 var r2 int32 // Various register numbers - // var tempX Expr at bp+80, 72 + // var tempX Expr at bp+48, 72 // Temporary expression node var p5 int32 var pTab uintptr @@ -129567,7 +129567,7 @@ func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target var i1 int32 // Loop counter var pEList uintptr // List of WHEN terms var aListelem uintptr // Array of WHEN terms - // var opCompare Expr at bp+152, 72 + // var opCompare Expr at bp+120, 72 // The X==Ei expression var pX uintptr // The X expression var pTest uintptr // X==Ei (form A) or just Ei (form B) @@ -129575,8 +129575,8 @@ func Xsqlite3ExprCodeTarget(tls *libc.TLS, pParse uintptr, pExpr uintptr, target var db1 uintptr v = (*Parse)(unsafe.Pointer(pParse)).FpVdbe inReg = target - *(*int32)(unsafe.Pointer(bp + 72 /* regFree1 */)) = 0 - *(*int32)(unsafe.Pointer(bp + 76 /* regFree2 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 44 /* regFree2 */)) = 0 p5 = 0 expr_code_doover: @@ -129964,8 +129964,8 @@ __22: codeVectorCompare(tls, pParse, pExpr, target, uint8(op), uint8(p5)) goto __80 __79: - r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+72 /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+76 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, pLeft, bp+40 /* ®Free1 */) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44 /* ®Free2 */) Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, inReg) codeCompare(tls, pParse, pLeft, (*Expr)(unsafe.Pointer(pExpr)).FpRight, op, r1, r2, (Xsqlite3VdbeCurrentAddr(tls, v) + 2), p5, @@ -129999,8 +129999,8 @@ __33: __34: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+72 /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+76 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpRight, bp+44 /* ®Free2 */) Xsqlite3VdbeAddOp3(tls, v, op, r2, r1, target) goto __3 @@ -130023,12 +130023,12 @@ __83: return target goto __86 __85: - (*Expr)(unsafe.Pointer(bp + 80 /* &tempX */)).Fop = U8(TK_INTEGER) - (*Expr)(unsafe.Pointer(bp + 80 /* &tempX */)).Fflags = (U32(EP_IntValue | EP_TokenOnly)) - *(*int32)(unsafe.Pointer(bp + 80 /* &tempX */ + 8 /* &.u */)) = 0 + (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fop = U8(TK_INTEGER) + (*Expr)(unsafe.Pointer(bp + 48 /* &tempX */)).Fflags = (U32(EP_IntValue | EP_TokenOnly)) + *(*int32)(unsafe.Pointer(bp + 48 /* &tempX */ + 8 /* &.u */)) = 0 - r1 = Xsqlite3ExprCodeTemp(tls, pParse, bp+80 /* &tempX */, bp+72 /* ®Free1 */) - r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+76 /* ®Free2 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, bp+48 /* &tempX */, bp+40 /* ®Free1 */) + r2 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+44 /* ®Free2 */) Xsqlite3VdbeAddOp3(tls, v, OP_Subtract, r2, r1, target) __86: @@ -130041,13 +130041,13 @@ __36: __37: ; - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+72 /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) Xsqlite3VdbeAddOp2(tls, v, op, r1, inReg) goto __3 __38: // IS TRUE or IS FALSE - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+72 /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) isTrue = Xsqlite3ExprTruthValue(tls, (*Expr)(unsafe.Pointer(pExpr)).FpRight) bNormal = (libc.Bool32(int32((*Expr)(unsafe.Pointer(pExpr)).Fop2) == TK_IS)) @@ -130060,7 +130060,7 @@ __40: ; Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 1, target) - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+72 /* ®Free1 */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pExpr)).FpLeft, bp+40 /* ®Free1 */) addr = Xsqlite3VdbeAddOp1(tls, v, op, r1) @@ -130076,7 +130076,7 @@ __41: goto __87 } - Xsqlite3ErrorMsg(tls, pParse, ts+8336 /* "misuse of aggreg..." */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+8336 /* "misuse of aggreg..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(pExpr + 8 /* &.u */)))) goto __88 __87: return (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pInfo)).FaFunc + uintptr((*Expr)(unsafe.Pointer(pExpr)).FiAgg)*32)).FiMem @@ -130118,7 +130118,7 @@ __90: if !((pDef == uintptr(0)) || ((*FuncDef)(unsafe.Pointer(pDef)).FxFinalize != uintptr(0))) { goto __91 } - Xsqlite3ErrorMsg(tls, pParse, ts+8362 /* "unknown function..." */, libc.VaList(bp+32, zId)) + Xsqlite3ErrorMsg(tls, pParse, ts+8362 /* "unknown function..." */, libc.VaList(bp+16, zId)) goto __3 __91: ; @@ -130313,7 +130313,7 @@ __122: goto __123 } Xsqlite3ErrorMsg(tls, pParse, ts+7989, /* "%d columns assig..." */ - libc.VaList(bp+48, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) + libc.VaList(bp+24, (*Expr)(unsafe.Pointer(pExpr)).FiTable, n1)) __123: ; return ((*Expr)(unsafe.Pointer((*Expr)(unsafe.Pointer(pExpr)).FpLeft)).FiTable + int32((*Expr)(unsafe.Pointer(pExpr)).FiColumn)) @@ -130456,17 +130456,17 @@ __54: // The X expression __126: ; - exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+72 /* ®Free1 */)) + exprToRegister(tls, pDel, exprCodeVector(tls, pParse, pDel, bp+40 /* ®Free1 */)) - libc.Xmemset(tls, bp+152 /* &opCompare */, 0, uint64(unsafe.Sizeof(Expr{}))) - (*Expr)(unsafe.Pointer(bp + 152 /* &opCompare */)).Fop = U8(TK_EQ) - (*Expr)(unsafe.Pointer(bp + 152 /* &opCompare */)).FpLeft = pDel - pTest = bp + 152 /* &opCompare */ + libc.Xmemset(tls, bp+120 /* &opCompare */, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).Fop = U8(TK_EQ) + (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpLeft = pDel + pTest = bp + 120 /* &opCompare */ // Ticket b351d95f9cd5ef17e9d9dbae18f5ca8611190001: // The value in regFree1 might get SCopy-ed into the file result. // So make sure that the regFree1 register is not reused for other // purposes and possibly overwritten. - *(*int32)(unsafe.Pointer(bp + 72 /* regFree1 */)) = 0 + *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */)) = 0 __125: ; i1 = 0 @@ -130478,7 +130478,7 @@ __127: goto __130 } - (*Expr)(unsafe.Pointer(bp + 152 /* &opCompare */)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr + (*Expr)(unsafe.Pointer(bp + 120 /* &opCompare */)).FpRight = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr goto __131 __130: pTest = (*ExprList_item)(unsafe.Pointer(aListelem + uintptr(i1)*32)).FpExpr @@ -130552,8 +130552,8 @@ __137: __3: ; - Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 72 /* regFree1 */))) - Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 76 /* regFree2 */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 40 /* regFree1 */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 44 /* regFree2 */))) return inReg } @@ -132391,8 +132391,8 @@ func Xsqlite3ClearTempRegCache(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:107 // // Or, if zName is not a system table, zero is returned. func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:107433:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) if ((0 == Xsqlite3_strnicmp(tls, (*Table)(unsafe.Pointer(pTab)).FzName, ts+8443 /* "sqlite_" */, 7)) || (((*Table)(unsafe.Pointer(pTab)).FtabFlags & U32(TF_Eponymous)) != U32(0))) || @@ -132410,8 +132410,8 @@ func isAlterableTable(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sq // statement to ensure that the operation has not rendered any schema // objects unusable. func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, zWhen uintptr, bNoDQS int32) { /* sqlite3.c:107455:13: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(64) + defer tls.Free(64) (*Parse)(unsafe.Pointer(pParse)).FcolNamesSet = U8(1) Xsqlite3NestedParse(tls, pParse, @@ -132424,7 +132424,7 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z Xsqlite3NestedParse(tls, pParse, ts+8654, /* "SELECT 1 FROM te..." */ - libc.VaList(bp+48, zDb, zWhen, bNoDQS)) + libc.VaList(bp+40, zDb, zWhen, bNoDQS)) } } @@ -132434,8 +132434,8 @@ func renameTestSchema(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32, z // not true, similarly update all SQL statements in the sqlite_schema table // of the temp db. func renameFixQuotes(tls *libc.TLS, pParse uintptr, zDb uintptr, bTemp int32) { /* sqlite3.c:107492:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) Xsqlite3NestedParse(tls, pParse, @@ -132463,8 +132463,8 @@ func renameReloadSchema(tls *libc.TLS, pParse uintptr, iDb int32, p5 U16) { /* s // Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" // command. func Xsqlite3AlterRenameTable(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:107526:21: */ - bp := tls.Alloc(232) - defer tls.Free(232) + bp := tls.Alloc(184) + defer tls.Free(184) var iDb int32 // Database that contains the table var zDb uintptr // Name of database iDb @@ -132540,7 +132540,7 @@ __6: if !((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) { goto __7 } - Xsqlite3ErrorMsg(tls, pParse, ts+9191 /* "view %s may not ..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+9191 /* "view %s may not ..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_rename_table __7: ; @@ -132593,14 +132593,14 @@ __12: // the schema to use the new table name. Xsqlite3NestedParse(tls, pParse, - ts+9218 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+32, zDb, zDb, zTabName, zName, (libc.Bool32(iDb == 1)), zTabName)) + ts+9218 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+16, zDb, zDb, zTabName, zName, (libc.Bool32(iDb == 1)), zTabName)) // Update the tbl_name and name columns of the sqlite_schema table // as required. Xsqlite3NestedParse(tls, pParse, ts+9402, /* "UPDATE %Q.sqlite..." */ - libc.VaList(bp+88, zDb, + libc.VaList(bp+64, zDb, zName, zName, zName, nTabName, zTabName)) @@ -132611,7 +132611,7 @@ __12: } Xsqlite3NestedParse(tls, pParse, ts+9723, /* "UPDATE \"%w\".sqli..." */ - libc.VaList(bp+144, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) + libc.VaList(bp+112, zDb, zName, (*Table)(unsafe.Pointer(pTab)).FzName)) __13: ; @@ -132623,7 +132623,7 @@ __13: } Xsqlite3NestedParse(tls, pParse, - ts+9781 /* "UPDATE sqlite_te..." */, libc.VaList(bp+176, zDb, zTabName, zName, zTabName, zDb, zName)) + ts+9781 /* "UPDATE sqlite_te..." */, libc.VaList(bp+136, zDb, zTabName, zName, zTabName, zDb, zName)) __14: ; @@ -132652,8 +132652,8 @@ exit_rename_table: // Write code that will raise an error if the table described by // zDb and zTab is not empty. func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uintptr, zErr uintptr) { /* sqlite3.c:107699:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) Xsqlite3NestedParse(tls, pParse, ts+10059, /* "SELECT raise(ABO..." */ @@ -132667,8 +132667,8 @@ func sqlite3ErrorIfNotEmpty(tls *libc.TLS, pParse uintptr, zDb uintptr, zTab uin // The Table structure pParse->pNewTable was extended to include // the new column during parsing. func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr) { /* sqlite3.c:107719:21: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) var pNew uintptr // Copy of pParse->pNewTable var pTab uintptr // Table being altered @@ -132732,19 +132732,19 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // Ensure the default expression is something that sqlite3ValueFromExpr() // can handle (i.e. not CURRENT_TIME etc.) if pDflt != 0 { - *(*uintptr)(unsafe.Pointer(bp + 48 /* pVal */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* pVal */)) = uintptr(0) var rc int32 - rc = Xsqlite3ValueFromExpr(tls, db, pDflt, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp+48 /* &pVal */) + rc = Xsqlite3ValueFromExpr(tls, db, pDflt, uint8(SQLITE_UTF8), uint8(SQLITE_AFF_BLOB), bp+40 /* &pVal */) if rc != SQLITE_OK { return } - if !(*(*uintptr)(unsafe.Pointer(bp + 48 /* pVal */)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 40 /* pVal */)) != 0) { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+10268 /* "Cannot add a col..." */) } - Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pVal */))) + Xsqlite3ValueFree(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pVal */))) } } else if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_STORED) != 0 { sqlite3ErrorIfNotEmpty(tls, pParse, zDb, zTab, ts+10314 /* "cannot add a STO..." */) @@ -132803,8 +132803,8 @@ func Xsqlite3AlterFinishAddColumn(tls *libc.TLS, pParse uintptr, pColDef uintptr // Routine sqlite3AlterFinishAddColumn() will be called to complete // coding the "ALTER TABLE ... ADD" statement. func Xsqlite3AlterBeginAddColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr) { /* sqlite3.c:107867:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pNew uintptr var pTab uintptr @@ -132920,8 +132920,8 @@ exit_begin_add_column: // // Or, if pTab is not a view or virtual table, zero is returned. func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 { /* sqlite3.c:107949:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var zType uintptr = uintptr(0) if (*Table)(unsafe.Pointer(pTab)).FpSelect != 0 { @@ -132948,8 +132948,8 @@ func isRealTable(tls *libc.TLS, pParse uintptr, pTab uintptr, bDrop int32) int32 // // cmd ::= ALTER TABLE pSrc RENAME COLUMN pOld TO pNew func Xsqlite3AlterRenameColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pOld uintptr, pNew uintptr) { /* sqlite3.c:107979:21: */ - bp := tls.Alloc(136) - defer tls.Free(136) + bp := tls.Alloc(112) + defer tls.Free(112) var db uintptr // Database connection var pTab uintptr // Table being updated @@ -133054,14 +133054,14 @@ __11: Xsqlite3NestedParse(tls, pParse, ts+10642, /* "UPDATE \"%w\".sqli..." */ - libc.VaList(bp+16, zDb, + libc.VaList(bp+8, zDb, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote, (libc.Bool32(iSchema == 1)), (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3NestedParse(tls, pParse, ts+10860, /* "UPDATE temp.sqli..." */ - libc.VaList(bp+88, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) + libc.VaList(bp+72, zDb, (*Table)(unsafe.Pointer(pTab)).FzName, iCol, zNew, bQuote)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iSchema, uint16(INITFLAG_AlterRename)) @@ -133353,8 +133353,8 @@ func renameColumnTokenNext(tls *libc.TLS, pCtx uintptr) uintptr { /* sqlite3.c:1 // sub-routine is currently stored in pParse->zErrMsg. This function // adds context to the error message and then stores it in pCtx. func renameColumnParseError(tls *libc.TLS, pCtx uintptr, zWhen uintptr, pType uintptr, pObject uintptr, pParse uintptr) { /* sqlite3.c:108431:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) var zT uintptr = Xsqlite3_value_text(tls, pType) var zN uintptr = Xsqlite3_value_text(tls, pObject) @@ -133455,8 +133455,8 @@ func renameParseSql(tls *libc.TLS, p uintptr, zDb uintptr, db uintptr, zSql uint // Or, if an error occurs (i.e. an OOM condition), an error is left in // pCtx and an SQLite error code returned. func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, zNew uintptr, bQuote int32) int32 { /* sqlite3.c:108558:12: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var nNew I64 = I64(Xsqlite3Strlen30(tls, zNew)) var nSql I64 = I64(Xsqlite3Strlen30(tls, zSql)) @@ -133524,7 +133524,7 @@ func renameEditSql(tls *libc.TLS, pCtx uintptr, pRename uintptr, zSql uintptr, z libc.Xmemcpy(tls, zBuf1, (*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz, uint64((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)) *(*int8)(unsafe.Pointer(zBuf1 + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn))) = int8(0) Xsqlite3Dequote(tls, zBuf1) - Xsqlite3_snprintf(tls, (int32(nSql * int64(2))), zBuf2, ts+11022 /* "%Q%s" */, libc.VaList(bp+16, zBuf1, + Xsqlite3_snprintf(tls, (int32(nSql * int64(2))), zBuf2, ts+11022 /* "%Q%s" */, libc.VaList(bp+8, zBuf1, func() uintptr { if int32(*(*int8)(unsafe.Pointer((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fz + uintptr((*RenameToken)(unsafe.Pointer(pBest)).Ft.Fn)))) == '\'' { return ts + 11014 /* " " */ @@ -134432,8 +134432,8 @@ func renameTableTest(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr // The value returned is a string containing the CREATE TABLE statement // with column argv[2] removed. func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:109390:13: */ - bp := tls.Alloc(440) - defer tls.Free(440) + bp := tls.Alloc(432) + defer tls.Free(432) var db uintptr var iSchema int32 @@ -134441,7 +134441,7 @@ func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) var iCol int32 var zDb uintptr var rc int32 - // var sParse Parse at bp+32, 408 + // var sParse Parse at bp+24, 408 var pCol uintptr var pTab uintptr @@ -134459,14 +134459,14 @@ func dropColumnFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) _ = NotUsed - rc = renameParseSql(tls, bp+32 /* &sParse */, zDb, db, zSql, (libc.Bool32(iSchema == 1))) + rc = renameParseSql(tls, bp+24 /* &sParse */, zDb, db, zSql, (libc.Bool32(iSchema == 1))) if !(rc != SQLITE_OK) { goto __1 } goto drop_column_done __1: ; - pTab = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpNewTable + pTab = (*Parse)(unsafe.Pointer(bp + 24 /* &sParse */)).FpNewTable if !(((pTab == uintptr(0)) || (int32((*Table)(unsafe.Pointer(pTab)).FnCol) == 1)) || (iCol >= int32((*Table)(unsafe.Pointer(pTab)).FnCol))) { goto __2 } @@ -134476,11 +134476,11 @@ __1: __2: ; - pCol = renameTokenFind(tls, bp+32 /* &sParse */, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*32)).FzName) + pCol = renameTokenFind(tls, bp+24 /* &sParse */, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*32)).FzName) if !(iCol < (int32((*Table)(unsafe.Pointer(pTab)).FnCol) - 1)) { goto __3 } - pEnd = renameTokenFind(tls, bp+32 /* &sParse */, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((iCol+1))*32)).FzName) + pEnd = renameTokenFind(tls, bp+24 /* &sParse */, uintptr(0), (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((iCol+1))*32)).FzName) zEnd = (*RenameToken)(unsafe.Pointer(pEnd)).Ft.Fz goto __4 __3: @@ -134501,7 +134501,7 @@ __4: Xsqlite3_free(tls, zNew) drop_column_done: - renameParseCleanup(tls, bp+32 /* &sParse */) + renameParseCleanup(tls, bp+24 /* &sParse */) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc != SQLITE_OK) { goto __7 @@ -134517,8 +134517,8 @@ __7: // statement. Argument pSrc contains the possibly qualified name of the // table being edited, and token pName the name of the column to drop. func Xsqlite3AlterDropColumn(tls *libc.TLS, pParse uintptr, pSrc uintptr, pName uintptr) { /* sqlite3.c:109454:21: */ - bp := tls.Alloc(96) - defer tls.Free(96) + bp := tls.Alloc(64) + defer tls.Free(64) var db uintptr // Database handle var pTab uintptr // Table to modify @@ -134595,7 +134595,7 @@ __6: goto __7 } Xsqlite3ErrorMsg(tls, pParse, ts+11034, /* "cannot drop %s c..." */ - libc.VaList(bp+16, func() uintptr { + libc.VaList(bp+8, func() uintptr { if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr(iCol)*32)).FcolFlags) & COLFLAG_PRIMKEY) != 0 { return ts + 11062 /* "PRIMARY KEY" */ } @@ -134610,7 +134610,7 @@ __7: if !(int32((*Table)(unsafe.Pointer(pTab)).FnCol) <= 1) { goto __8 } - Xsqlite3ErrorMsg(tls, pParse, ts+11074 /* "cannot drop colu..." */, libc.VaList(bp+40, zCol)) + Xsqlite3ErrorMsg(tls, pParse, ts+11074 /* "cannot drop colu..." */, libc.VaList(bp+24, zCol)) goto exit_drop_column __8: ; @@ -134623,7 +134623,7 @@ __8: renameFixQuotes(tls, pParse, zDb, (libc.Bool32(iDb == 1))) Xsqlite3NestedParse(tls, pParse, - ts+11122 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+56, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) + ts+11122 /* "UPDATE \"%w\".sqli..." */, libc.VaList(bp+32, zDb, iDb, iCol, (*Table)(unsafe.Pointer(pTab)).FzName)) // Drop and reload the database schema. renameReloadSchema(tls, pParse, iDb, uint16(INITFLAG_AlterDrop)) @@ -134899,16 +134899,16 @@ var aAlterTableFuncs = [5]FuncDef{ // the sqlite_statN tables associated with the named table are deleted. // If zWhere==0, then code is generated to delete all stat table entries. func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWhere uintptr, zWhereType uintptr) { /* sqlite3.c:109763:13: */ - bp := tls.Alloc(112) - defer tls.Free(112) + bp := tls.Alloc(88) + defer tls.Free(88) var i int32 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pDb uintptr var v uintptr = Xsqlite3GetVdbe(tls, pParse) - // var aRoot [3]U32 at bp+100, 12 + // var aRoot [3]U32 at bp+76, 12 - // var aCreateTbl [3]U8 at bp+96, 3 + // var aCreateTbl [3]U8 at bp+72, 3 var nToOpen int32 if ((*Sqlite3)(unsafe.Pointer((db))).FdbOptFlags & (U32(SQLITE_Stat4))) == U32(0) { @@ -134931,7 +134931,7 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh }{})))); i++ { var zTab uintptr = aTable[i].FzName var pStat uintptr - *(*U8)(unsafe.Pointer(bp + 96 /* &aCreateTbl[0] */ + uintptr(i))) = U8(0) + *(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))) = U8(0) if (libc.AssignUintptr(&pStat, Xsqlite3FindTable(tls, db, zTab, (*Db)(unsafe.Pointer(pDb)).FzDbSName))) == uintptr(0) { if i < nToOpen { // The sqlite_statN table does not exist. Create it. Note that a @@ -134940,24 +134940,24 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // because the OpenWrite opcode below will be needing it. Xsqlite3NestedParse(tls, pParse, ts+11363 /* "CREATE TABLE %Q...." */, libc.VaList(bp, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, aTable[i].FzCols)) - *(*U32)(unsafe.Pointer(bp + 100 /* &aRoot[0] */ + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) - *(*U8)(unsafe.Pointer(bp + 96 /* &aCreateTbl[0] */ + uintptr(i))) = U8(OPFLAG_P2ISREG) + *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)) = U32((*Parse)(unsafe.Pointer(pParse)).FregRoot) + *(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))) = U8(OPFLAG_P2ISREG) } } else { // The table already exists. If zWhere is not NULL, delete all entries // associated with the table zWhere. If zWhere is NULL, delete the // entire contents of the table. - *(*U32)(unsafe.Pointer(bp + 100 /* &aRoot[0] */ + uintptr(i)*4)) = (*Table)(unsafe.Pointer(pStat)).Ftnum - Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 100 /* &aRoot[0] */ + uintptr(i)*4)), uint8(1), zTab) + *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)) = (*Table)(unsafe.Pointer(pStat)).Ftnum + Xsqlite3TableLock(tls, pParse, iDb, *(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4)), uint8(1), zTab) if zWhere != 0 { Xsqlite3NestedParse(tls, pParse, ts+11386, /* "DELETE FROM %Q.%..." */ - libc.VaList(bp+32, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) + libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab, zWhereType, zWhere)) } else if (*Sqlite3)(unsafe.Pointer(db)).FxPreUpdateCallback != 0 { - Xsqlite3NestedParse(tls, pParse, ts+11416 /* "DELETE FROM %Q.%..." */, libc.VaList(bp+72, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) + Xsqlite3NestedParse(tls, pParse, ts+11416 /* "DELETE FROM %Q.%..." */, libc.VaList(bp+56, (*Db)(unsafe.Pointer(pDb)).FzDbSName, zTab)) } else { // The sqlite_stat[134] table already exists. Delete all rows. - Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 100 /* &aRoot[0] */ + uintptr(i)*4))), iDb) + Xsqlite3VdbeAddOp2(tls, v, OP_Clear, int32(*(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4))), iDb) } } } @@ -134965,8 +134965,8 @@ func openStatTable(tls *libc.TLS, pParse uintptr, iDb int32, iStatCur int32, zWh // Open the sqlite_stat[134] tables for writing. for i = 0; i < nToOpen; i++ { - Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, (iStatCur + i), int32(*(*U32)(unsafe.Pointer(bp + 100 /* &aRoot[0] */ + uintptr(i)*4))), iDb, 3) - Xsqlite3VdbeChangeP5(tls, v, uint16(*(*U8)(unsafe.Pointer(bp + 96 /* &aCreateTbl[0] */ + uintptr(i))))) + Xsqlite3VdbeAddOp4Int(tls, v, OP_OpenWrite, (iStatCur + i), int32(*(*U32)(unsafe.Pointer(bp + 76 /* &aRoot[0] */ + uintptr(i)*4))), iDb, 3) + Xsqlite3VdbeChangeP5(tls, v, uint16(*(*U8)(unsafe.Pointer(bp + 72 /* &aCreateTbl[0] */ + uintptr(i))))) } } @@ -135546,8 +135546,8 @@ var statPushFuncdef = FuncDef{ // a one-parameter function, stat_get(P), that always returns the // stat1 table entry information. func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:110411:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(24) + defer tls.Free(24) var p uintptr = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(argv))) // STAT4 has a parameter on this routine. @@ -135594,7 +135594,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnKeyCol; i++ { var nDistinct U64 = (U64(*(*TRowcnt)(unsafe.Pointer((*StatAccum)(unsafe.Pointer(p)).Fcurrent.FanDLt + uintptr(i)*4)) + TRowcnt(1))) var iVal U64 = (((U64((*StatAccum)(unsafe.Pointer(p)).FnRow) + nDistinct) - uint64(1)) / nDistinct) - Xsqlite3_snprintf(tls, 24, z, ts+11539 /* " %llu" */, libc.VaList(bp+16, iVal)) + Xsqlite3_snprintf(tls, 24, z, ts+11539 /* " %llu" */, libc.VaList(bp+8, iVal)) z += uintptr(Xsqlite3Strlen30(tls, z)) } @@ -135643,7 +135643,7 @@ func statGet(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqli var i int32 var z uintptr = zRet for i = 0; i < (*StatAccum)(unsafe.Pointer(p)).FnCol; i++ { - Xsqlite3_snprintf(tls, 24, z, ts+11545 /* "%llu " */, libc.VaList(bp+32, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) + Xsqlite3_snprintf(tls, 24, z, ts+11545 /* "%llu " */, libc.VaList(bp+16, U64(*(*TRowcnt)(unsafe.Pointer(aCnt + uintptr(i)*4))))) z += uintptr(Xsqlite3Strlen30(tls, z)) } @@ -136381,11 +136381,11 @@ func findIndexOrPrimaryKey(tls *libc.TLS, db uintptr, zName uintptr, zDb uintptr // // where %Q is replaced with the database name before the SQL is executed. func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb uintptr) int32 { /* sqlite3.c:111317:12: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var rc int32 // Result codes from subroutines - *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) = uintptr(0) // An SQL statement being run + *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) // An SQL statement being run var zSql uintptr // Text of the SQL statement var pPrevIdx uintptr = uintptr(0) // Previous index in the loop var pSample uintptr // A slot in pIdx->aSample[] @@ -136394,13 +136394,13 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui if !(zSql != 0) { return SQLITE_NOMEM } - rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+32 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) if rc != 0 { return rc } - for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) == SQLITE_ROW { + for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) == SQLITE_ROW { var nIdxCol int32 = 1 // Number of columns in stat4 records var zIndex uintptr // Index name @@ -136410,11 +136410,11 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui var i int32 // Bytes of space required var pSpace uintptr - zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 0) + zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) if zIndex == uintptr(0) { continue } - nSample = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 1) + nSample = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) pIdx = findIndexOrPrimaryKey(tls, db, zIndex, zDb) if pIdx == uintptr(0) { @@ -136433,7 +136433,7 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui (*Index)(unsafe.Pointer(pIdx)).FaSample = Xsqlite3DbMallocZero(tls, db, uint64(nByte)) if (*Index)(unsafe.Pointer(pIdx)).FaSample == uintptr(0) { - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) return SQLITE_NOMEM } pSpace = ((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr(nSample)*40) @@ -136450,27 +136450,27 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui } } - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc != 0 { return rc } - zSql = Xsqlite3MPrintf(tls, db, zSql2, libc.VaList(bp+16, zDb)) + zSql = Xsqlite3MPrintf(tls, db, zSql2, libc.VaList(bp+8, zDb)) if !(zSql != 0) { return SQLITE_NOMEM } - rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+32 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, db, zSql, -1, bp+16 /* &pStmt */, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) if rc != 0 { return rc } - for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) == SQLITE_ROW { + for Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) == SQLITE_ROW { var zIndex uintptr // Index name var pIdx uintptr // Pointer to the index object var nCol int32 = 1 // Number of columns in index - zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 0) + zIndex = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) if zIndex == uintptr(0) { continue } @@ -136486,9 +136486,9 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui pPrevIdx = pIdx } pSample = ((*Index)(unsafe.Pointer(pIdx)).FaSample + uintptr((*Index)(unsafe.Pointer(pIdx)).FnSample)*40) - decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 1), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanEq, uintptr(0), uintptr(0)) - decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 2), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanLt, uintptr(0), uintptr(0)) - decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 3), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanDLt, uintptr(0), uintptr(0)) + decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanEq, uintptr(0), uintptr(0)) + decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 2), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanLt, uintptr(0), uintptr(0)) + decodeIntArray(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 3), nCol, (*IndexSample)(unsafe.Pointer(pSample)).FanDLt, uintptr(0), uintptr(0)) // Take a copy of the sample. Add two 0x00 bytes the end of the buffer. // This is in case the sample record is corrupted. In that case, the @@ -136496,18 +136496,18 @@ func loadStatTbl(tls *libc.TLS, db uintptr, zSql1 uintptr, zSql2 uintptr, zDb ui // end of the allocated buffer before it realizes it is dealing with // a corrupt record. Adding the two 0x00 bytes prevents this from causing // a buffer overread. - (*IndexSample)(unsafe.Pointer(pSample)).Fn = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 4) + (*IndexSample)(unsafe.Pointer(pSample)).Fn = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 4) (*IndexSample)(unsafe.Pointer(pSample)).Fp = Xsqlite3DbMallocZero(tls, db, (uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn + 2))) if (*IndexSample)(unsafe.Pointer(pSample)).Fp == uintptr(0) { - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) return SQLITE_NOMEM } if (*IndexSample)(unsafe.Pointer(pSample)).Fn != 0 { - libc.Xmemcpy(tls, (*IndexSample)(unsafe.Pointer(pSample)).Fp, Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 4), uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn)) + libc.Xmemcpy(tls, (*IndexSample)(unsafe.Pointer(pSample)).Fp, Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 4), uint64((*IndexSample)(unsafe.Pointer(pSample)).Fn)) } (*Index)(unsafe.Pointer(pIdx)).FnSample++ } - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc == SQLITE_OK { initAvgEq(tls, pPrevIdx) } @@ -136547,10 +136547,10 @@ func loadStat4(tls *libc.TLS, db uintptr, zDb uintptr) int32 { /* sqlite3.c:1114 // This means if the caller does not care about other errors, the return // code may be ignored. func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlite3.c:111473:20: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) - // var sInfo AnalysisInfo at bp+16, 16 + // var sInfo AnalysisInfo at bp+8, 16 var i uintptr var zSql uintptr @@ -136571,17 +136571,17 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit } // Load new statistics out of the sqlite_stat1 table - (*AnalysisInfo)(unsafe.Pointer(bp + 16 /* &sInfo */)).Fdb = db - (*AnalysisInfo)(unsafe.Pointer(bp + 16 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName - if Xsqlite3FindTable(tls, db, ts+11434 /* "sqlite_stat1" */, (*AnalysisInfo)(unsafe.Pointer(bp+16 /* &sInfo */)).FzDatabase) != uintptr(0) { + (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).Fdb = db + (*AnalysisInfo)(unsafe.Pointer(bp + 8 /* &sInfo */)).FzDatabase = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName + if Xsqlite3FindTable(tls, db, ts+11434 /* "sqlite_stat1" */, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase) != uintptr(0) { zSql = Xsqlite3MPrintf(tls, db, - ts+11721 /* "SELECT tbl,idx,s..." */, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+16 /* &sInfo */)).FzDatabase)) + ts+11721 /* "SELECT tbl,idx,s..." */, libc.VaList(bp, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase)) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 - }{analysisLoader})), bp+16 /* &sInfo */, uintptr(0)) + }{analysisLoader})), bp+8 /* &sInfo */, uintptr(0)) Xsqlite3DbFree(tls, db, zSql) } } @@ -136599,7 +136599,7 @@ func Xsqlite3AnalysisLoad(tls *libc.TLS, db uintptr, iDb int32) int32 { /* sqlit if rc == SQLITE_OK { (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) - rc = loadStat4(tls, db, (*AnalysisInfo)(unsafe.Pointer(bp+16 /* &sInfo */)).FzDatabase) + rc = loadStat4(tls, db, (*AnalysisInfo)(unsafe.Pointer(bp+8 /* &sInfo */)).FzDatabase) (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable-- (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = func() uint16 { if (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable != 0 { @@ -136684,33 +136684,33 @@ func Xsqlite3DbIsNamed(tls *libc.TLS, db uintptr, iDb int32, zName uintptr) int3 // new database, close the database on db->init.iDb and reopen it as an // empty MemDB. func attachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:111617:13: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(64) + defer tls.Free(64) var i int32 var rc int32 var db uintptr var zName uintptr var zFile uintptr - // var zPath uintptr at bp+64, 8 + // var zPath uintptr at bp+40, 8 - // var zErr uintptr at bp+72, 8 + // var zErr uintptr at bp+48, 8 - // var flags uint32 at bp+48, 4 + // var flags uint32 at bp+24, 4 var aNew uintptr // New array of Db pointers var pNew uintptr // Db object for the newly attached database - // var zErrDyn uintptr at bp+80, 8 + // var zErrDyn uintptr at bp+56, 8 - // var pVfs uintptr at bp+56, 8 + // var pVfs uintptr at bp+32, 8 var pPager uintptr var iDb int32 rc = 0 db = Xsqlite3_context_db_handle(tls, context) - *(*uintptr)(unsafe.Pointer(bp + 64 /* zPath */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 72 /* zErr */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = uintptr(0) _ = NotUsed zFile = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -136734,8 +136734,8 @@ __2: // This is not a real ATTACH. Instead, this routine is being called // from sqlite3_deserialize() to close database db->init.iDb and // reopen it as a MemDB - *(*uintptr)(unsafe.Pointer(bp + 56 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+4324 /* "memdb" */) - if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* pVfs */)) == uintptr(0)) { + *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) = Xsqlite3_vfs_find(tls, ts+4324 /* "memdb" */) + if !(*(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)) == uintptr(0)) { goto __5 } return @@ -136750,7 +136750,7 @@ __6: ; (*Db)(unsafe.Pointer(pNew)).FpBt = uintptr(0) (*Db)(unsafe.Pointer(pNew)).FpSchema = uintptr(0) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pVfs */)), ts+11762 /* "x\x00" */, db, (pNew + 8 /* &.pBt */), 0, SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), ts+11762 /* "x\x00" */, db, (pNew + 8 /* &.pBt */), 0, SQLITE_OPEN_MAIN_DB) goto __4 __3: // This is a real ATTACH @@ -136763,7 +136763,7 @@ __3: if !((*Sqlite3)(unsafe.Pointer(db)).FnDb >= (*(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 7*4)) + 2)) { goto __7 } - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11765, /* "too many attache..." */ + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11765, /* "too many attache..." */ libc.VaList(bp, *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 7*4)))) goto attach_error __7: @@ -136777,7 +136777,7 @@ __8: if !(Xsqlite3DbIsNamed(tls, db, i, zName) != 0) { goto __11 } - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11802 /* "database %s is a..." */, libc.VaList(bp+16, zName)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11802 /* "database %s is a..." */, libc.VaList(bp+8, zName)) goto attach_error __11: ; @@ -136820,8 +136820,8 @@ __13: // Open the database file. If the btree is successfully opened, use // it to obtain the database schema. At this point the schema may // or may not be initialized. - *(*uint32)(unsafe.Pointer(bp + 48 /* flags */)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags - rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+48 /* &flags */, bp+56 /* &pVfs */, bp+64 /* &zPath */, bp+72 /* &zErr */) + *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) = (*Sqlite3)(unsafe.Pointer(db)).FopenFlags + rc = Xsqlite3ParseUri(tls, (*Sqlite3_vfs)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FpVfs)).FzName, zFile, bp+24 /* &flags */, bp+32 /* &pVfs */, bp+40 /* &zPath */, bp+48 /* &zErr */) if !(rc != SQLITE_OK) { goto __16 } @@ -136831,14 +136831,14 @@ __13: Xsqlite3OomFault(tls, db) __17: ; - Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErr */)), -1) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zErr */))) + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */)), -1) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zErr */))) return __16: ; - *(*uint32)(unsafe.Pointer(bp + 48 /* flags */)) |= uint32(SQLITE_OPEN_MAIN_DB) - rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pVfs */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* zPath */)), db, (pNew + 8 /* &.pBt */), 0, int32(*(*uint32)(unsafe.Pointer(bp + 48 /* flags */)))) + *(*uint32)(unsafe.Pointer(bp + 24 /* flags */)) |= uint32(SQLITE_OPEN_MAIN_DB) + rc = Xsqlite3BtreeOpen(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pVfs */)), *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */)), db, (pNew + 8 /* &.pBt */), 0, int32(*(*uint32)(unsafe.Pointer(bp + 24 /* flags */)))) (*Sqlite3)(unsafe.Pointer(db)).FnDb++ (*Db)(unsafe.Pointer(pNew)).FzDbSName = Xsqlite3DbStrDup(tls, db, zName) __4: @@ -136848,7 +136848,7 @@ __4: goto __18 } rc = SQLITE_ERROR - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11832 /* "database is alre..." */, 0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11832 /* "database is alre..." */, 0) goto __19 __18: if !(rc == SQLITE_OK) { @@ -136864,7 +136864,7 @@ __21: if !(((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Ffile_format != 0) && (int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pNew)).FpSchema)).Fenc) != (int32((*Sqlite3)(unsafe.Pointer(db)).Fenc)))) { goto __23 } - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11861 /* "attached databas..." */, 0) rc = SQLITE_ERROR __23: @@ -136890,7 +136890,7 @@ __19: rc = SQLITE_NOMEM __24: ; - Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zPath */))) + Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* zPath */))) // If the file was opened successfully, read the schema for the new database. // If this fails, or if opening the file failed, then close the file and @@ -136905,7 +136905,7 @@ __24: if !(!((int32(*(*uint8)(unsafe.Pointer(db + 184 /* &.init */ + 8 /* &.reopenMemdb */)) & 0x4 >> 2)) != 0)) { goto __26 } - rc = Xsqlite3Init(tls, db, bp+80 /* &zErrDyn */) + rc = Xsqlite3Init(tls, db, bp+56 /* &zErrDyn */) __26: ; Xsqlite3BtreeLeaveAll(tls, db) @@ -136934,14 +136934,14 @@ __29: goto __30 } Xsqlite3OomFault(tls, db) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */))) - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+6543 /* "out of memory" */, 0) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */))) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+6543 /* "out of memory" */, 0) goto __31 __30: - if !(*(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) == uintptr(0)) { goto __32 } - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11929 /* "unable to open d..." */, libc.VaList(bp+32, zFile)) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) = Xsqlite3MPrintf(tls, db, ts+11929 /* "unable to open d..." */, libc.VaList(bp+16, zFile)) __32: ; __31: @@ -136956,11 +136956,11 @@ __27: attach_error: // Return an error if we get here - if !(*(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)) != 0) { goto __33 } - Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */)), -1) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 80 /* zErrDyn */))) + Xsqlite3_result_error(tls, context, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */)), -1) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrDyn */))) __33: ; if !(rc != 0) { @@ -136977,15 +136977,15 @@ __34: // // SELECT sqlite_detach(x) func detachFunc(tls *libc.TLS, context uintptr, NotUsed int32, argv uintptr) { /* sqlite3.c:111810:13: */ - bp := tls.Alloc(176) - defer tls.Free(176) + bp := tls.Alloc(152) + defer tls.Free(152) var zName uintptr var db uintptr var i int32 var pDb uintptr var pEntry uintptr - // var zErr [128]int8 at bp+48, 128 + // var zErr [128]int8 at bp+24, 128 var pTrig uintptr zName = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))) @@ -137029,14 +137029,14 @@ __4: if !(i >= (*Sqlite3)(unsafe.Pointer(db)).FnDb) { goto __7 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+48 /* &zErr[0] */, ts+11957 /* "no such database..." */, libc.VaList(bp, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+11957 /* "no such database..." */, libc.VaList(bp, zName)) goto detach_error __7: ; if !(i < 2) { goto __8 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+48 /* &zErr[0] */, ts+11978 /* "cannot detach da..." */, libc.VaList(bp+16, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+11978 /* "cannot detach da..." */, libc.VaList(bp+8, zName)) goto detach_error __8: ; @@ -137044,7 +137044,7 @@ __8: (Xsqlite3BtreeIsInBackup(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) != 0)) { goto __9 } - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+48 /* &zErr[0] */, ts+12004 /* "database %s is l..." */, libc.VaList(bp+32, zName)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([128]int8{})), bp+24 /* &zErr[0] */, ts+12004 /* "database %s is l..." */, libc.VaList(bp+16, zName)) goto detach_error __9: ; @@ -137076,7 +137076,7 @@ __11: return detach_error: - Xsqlite3_result_error(tls, context, bp+48 /* &zErr[0] */, -1) + Xsqlite3_result_error(tls, context, bp+24 /* &zErr[0] */, -1) } // This procedure generates VDBE code for a single invocation of either the @@ -137184,8 +137184,8 @@ var attach_func = FuncDef{ // Expression callback used by sqlite3FixAAAA() routines. func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:111982:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pFix uintptr = *(*uintptr)(unsafe.Pointer(p + 40 /* &.u */)) if !(int32((*DbFixer)(unsafe.Pointer(pFix)).FbTemp) != 0) { @@ -137204,8 +137204,8 @@ func fixExprCb(tls *libc.TLS, p uintptr, pExpr uintptr) int32 { /* sqlite3.c:111 // Select callback used by sqlite3FixAAAA() routines. func fixSelectCb(tls *libc.TLS, p uintptr, pSelect uintptr) int32 { /* sqlite3.c:111999:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var pFix uintptr = *(*uintptr)(unsafe.Pointer(p + 40 /* &.u */)) var i int32 @@ -137439,8 +137439,8 @@ func sqliteAuthBadReturnCode(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11223 // to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE // is treated as SQLITE_DENY. In this case an error is left in pParse. func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintptr, iDb int32) int32 { /* sqlite3.c:112247:20: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(40) + defer tls.Free(40) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database handle var zDb uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb + uintptr(iDb)*32)).FzDbSName // Schema name of attached database @@ -137453,9 +137453,9 @@ func Xsqlite3AuthReadCol(tls *libc.TLS, pParse uintptr, zTab uintptr, zCol uintp if rc == SQLITE_DENY { var z uintptr = Xsqlite3_mprintf(tls, ts+12147 /* "%s.%s" */, libc.VaList(bp, zTab, zCol)) if ((*Sqlite3)(unsafe.Pointer(db)).FnDb > 2) || (iDb != 0) { - z = Xsqlite3_mprintf(tls, ts+12153 /* "%s.%z" */, libc.VaList(bp+24, zDb, z)) + z = Xsqlite3_mprintf(tls, ts+12153 /* "%s.%z" */, libc.VaList(bp+16, zDb, z)) } - Xsqlite3ErrorMsg(tls, pParse, ts+12159 /* "access to %z is ..." */, libc.VaList(bp+48, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12159 /* "access to %z is ..." */, libc.VaList(bp+32, z)) (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_AUTH } else if (rc != SQLITE_IGNORE) && (rc != SQLITE_OK) { sqliteAuthBadReturnCode(tls, pParse) @@ -137911,8 +137911,8 @@ func Xsqlite3FindTable(tls *libc.TLS, db uintptr, zName uintptr, zDatabase uintp // routine leaves an error message in pParse->zErrMsg where // sqlite3FindTable() does not. func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr, zDbase uintptr) uintptr { /* sqlite3.c:112841:22: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(40) + defer tls.Free(40) var p uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -137956,7 +137956,7 @@ func Xsqlite3LocateTable(tls *libc.TLS, pParse uintptr, flags U32, zName uintptr if zDbase != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+7013 /* "%s: %s.%s" */, libc.VaList(bp, zMsg, zDbase, zName)) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+7023 /* "%s: %s" */, libc.VaList(bp+32, zMsg, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+7023 /* "%s: %s" */, libc.VaList(bp+24, zMsg, zName)) } } else { @@ -138341,8 +138341,8 @@ func Xsqlite3FindDb(tls *libc.TLS, db uintptr, pName uintptr) int32 { /* sqlite3 // pName2) that stores the unqualified table name. The index of the // database "xxx" is returned. func Xsqlite3TwoPartName(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pUnqual uintptr) int32 { /* sqlite3.c:113283:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var iDb int32 // Database holding the object var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -138382,8 +138382,8 @@ func Xsqlite3WritableSchema(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:1133 // make sure the "type", "name", and "tbl_name" columns are consistent // with the SQL. func Xsqlite3CheckObjectName(tls *libc.TLS, pParse uintptr, zName uintptr, zType uintptr, zTblName uintptr) int32 { /* sqlite3.c:113338:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if ((Xsqlite3WritableSchema(tls, db) != 0) || @@ -138544,15 +138544,15 @@ func sqlite3ForceNotReadOnly(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:11348 // At the end of the CREATE TABLE statement, the sqlite3EndTable() routine // is called to complete the construction of the new table record. func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, isTemp int32, isView int32, isVirtual int32, noErr int32) { /* sqlite3.c:113507:21: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var pTable uintptr var zName uintptr // The name of the new table var db uintptr var v uintptr var iDb int32 // Database number to create the table in - // var pName uintptr at bp+32, 8 + // var pName uintptr at bp+16, 8 var zDb uintptr var zDb1 uintptr @@ -138575,11 +138575,11 @@ func Xsqlite3StartTable(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 ui } return ts + 6318 /* "sqlite_master" */ }()) - *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)) = pName1 + *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)) = pName1 goto __2 __1: // The common case - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+32 /* &pName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+16 /* &pName */) if !(iDb < 0) { goto __3 } @@ -138601,16 +138601,16 @@ __4: iDb = 1 __5: ; - zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */))) if !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { goto __6 } - Xsqlite3RenameTokenMap(tls, pParse, zName, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + Xsqlite3RenameTokenMap(tls, pParse, zName, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */))) __6: ; __2: ; - (*Parse)(unsafe.Pointer(pParse)).FsNameToken = *(*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + (*Parse)(unsafe.Pointer(pParse)).FsNameToken = *(*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)))) if !(zName == uintptr(0)) { goto __7 } @@ -138678,7 +138678,7 @@ __13: if !(!(noErr != 0)) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+12408 /* "table %T already..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+12408 /* "table %T already..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* pName */)))) goto __16 __15: ; @@ -138692,7 +138692,7 @@ __14: if !(Xsqlite3FindIndex(tls, db, zName, zDb1) != uintptr(0)) { goto __17 } - Xsqlite3ErrorMsg(tls, pParse, ts+12432 /* "there is already..." */, libc.VaList(bp+16, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+12432 /* "there is already..." */, libc.VaList(bp+8, zName)) goto begin_table_error __17: ; @@ -138878,8 +138878,8 @@ func Xsqlite3AddReturning(tls *libc.TLS, pParse uintptr, pList uintptr) { /* sql // first to get things going. Then this routine is called for each // column. func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintptr) { /* sqlite3.c:113788:21: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var p uintptr var i int32 @@ -138909,7 +138909,7 @@ func Xsqlite3AddColumn(tls *libc.TLS, pParse uintptr, pName uintptr, pType uintp hName = Xsqlite3StrIHash(tls, z) for i = 0; i < int32((*Table)(unsafe.Pointer(p)).FnCol); i++ { if (int32((*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*32)).FhName) == int32(hName)) && (Xsqlite3StrICmp(tls, z, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(p)).FaCol+uintptr(i)*32)).FzName) == 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+12541 /* "duplicate column..." */, libc.VaList(bp+16, z)) + Xsqlite3ErrorMsg(tls, pParse, ts+12541 /* "duplicate column..." */, libc.VaList(bp+8, z)) Xsqlite3DbFree(tls, db, z) return } @@ -139072,8 +139072,8 @@ func Xsqlite3AffinityType(tls *libc.TLS, zIn uintptr, pCol uintptr) int8 { /* sq // This routine is called by the parser while in the middle of // parsing a CREATE TABLE statement. func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStart uintptr, zEnd uintptr) { /* sqlite3.c:113984:21: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(80) + defer tls.Free(80) var p uintptr var pCol uintptr @@ -139091,16 +139091,16 @@ func Xsqlite3AddDefaultValue(tls *libc.TLS, pParse uintptr, pExpr uintptr, zStar } else { // A copy of pExpr is used instead of the original, as pExpr contains // tokens that point to volatile memory. - // var x Expr at bp+16, 72 + // var x Expr at bp+8, 72 Xsqlite3ExprDelete(tls, db, (*Column)(unsafe.Pointer(pCol)).FpDflt) - libc.Xmemset(tls, bp+16 /* &x */, 0, uint64(unsafe.Sizeof(Expr{}))) - (*Expr)(unsafe.Pointer(bp + 16 /* &x */)).Fop = U8(TK_SPAN) - *(*uintptr)(unsafe.Pointer(bp + 16 /* &x */ + 8 /* &.u */)) = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) - (*Expr)(unsafe.Pointer(bp + 16 /* &x */)).FpLeft = pExpr - (*Expr)(unsafe.Pointer(bp + 16 /* &x */)).Fflags = U32(EP_Skip) - (*Column)(unsafe.Pointer(pCol)).FpDflt = Xsqlite3ExprDup(tls, db, bp+16 /* &x */, EXPRDUP_REDUCE) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* &x */ + 8 /* &.u */))) + libc.Xmemset(tls, bp+8 /* &x */, 0, uint64(unsafe.Sizeof(Expr{}))) + (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fop = U8(TK_SPAN) + *(*uintptr)(unsafe.Pointer(bp + 8 /* &x */ + 8 /* &.u */)) = Xsqlite3DbSpanDup(tls, db, zStart, zEnd) + (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).FpLeft = pExpr + (*Expr)(unsafe.Pointer(bp + 8 /* &x */)).Fflags = U32(EP_Skip) + (*Column)(unsafe.Pointer(pCol)).FpDflt = Xsqlite3ExprDup(tls, db, bp+8 /* &x */, EXPRDUP_REDUCE) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* &x */ + 8 /* &.u */))) } } if int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME { @@ -139158,8 +139158,8 @@ func makeColumnPartOfPrimaryKey(tls *libc.TLS, pParse uintptr, pCol uintptr) { / // If the key is not an INTEGER PRIMARY KEY, then create a unique // index for the key. No index is created for INTEGER PRIMARY KEYs. func Xsqlite3AddPrimaryKey(tls *libc.TLS, pParse uintptr, pList uintptr, onError int32, autoInc int32, sortOrder int32) { /* sqlite3.c:114084:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pTab uintptr var pCol uintptr @@ -139355,8 +139355,8 @@ func Xsqlite3AddCollateType(tls *libc.TLS, pParse uintptr, pToken uintptr) { /* // Change the most recently parsed column to be a GENERATED ALWAYS AS // column. func Xsqlite3AddGenerated(tls *libc.TLS, pParse uintptr, pExpr uintptr, pType uintptr) { /* sqlite3.c:114228:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var eType U8 var pTab uintptr @@ -139535,11 +139535,11 @@ func identPut(tls *libc.TLS, z uintptr, pIdx uintptr, zSignedIdent uintptr) { /* // table. Memory to hold the text of the statement is obtained // from sqliteMalloc() and must be freed by the calling function. func createTableStmt(tls *libc.TLS, db uintptr, p uintptr) uintptr { /* sqlite3.c:114361:13: */ - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(12) + defer tls.Free(12) var i int32 - // var k int32 at bp+16, 4 + // var k int32 at bp+8, 4 var n int32 var zStmt uintptr @@ -139583,9 +139583,9 @@ __3: return uintptr(0) } Xsqlite3_snprintf(tls, n, zStmt, ts+12913 /* "CREATE TABLE " */, 0) - *(*int32)(unsafe.Pointer(bp + 16 /* k */)) = Xsqlite3Strlen30(tls, zStmt) - identPut(tls, zStmt, bp+16 /* &k */, (*Table)(unsafe.Pointer(p)).FzName) - *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 16 /* k */)), 1)))) = int8('(') + *(*int32)(unsafe.Pointer(bp + 8 /* k */)) = Xsqlite3Strlen30(tls, zStmt) + identPut(tls, zStmt, bp+8 /* &k */, (*Table)(unsafe.Pointer(p)).FzName) + *(*int8)(unsafe.Pointer(zStmt + uintptr(libc.PostIncInt32(&*(*int32)(unsafe.Pointer(bp + 8 /* k */)), 1)))) = int8('(') pCol = (*Table)(unsafe.Pointer(p)).FaCol i = 0 __4: @@ -139596,16 +139596,16 @@ __4: var len int32 var zType uintptr - Xsqlite3_snprintf(tls, (n - *(*int32)(unsafe.Pointer(bp + 16 /* k */))), (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* k */)))), zSep, 0) - *(*int32)(unsafe.Pointer(bp + 16 /* k */)) += Xsqlite3Strlen30(tls, (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* k */))))) + Xsqlite3_snprintf(tls, (n - *(*int32)(unsafe.Pointer(bp + 8 /* k */))), (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* k */)))), zSep, 0) + *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += Xsqlite3Strlen30(tls, (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* k */))))) zSep = zSep2 - identPut(tls, zStmt, bp+16 /* &k */, (*Column)(unsafe.Pointer(pCol)).FzName) + identPut(tls, zStmt, bp+8 /* &k */, (*Column)(unsafe.Pointer(pCol)).FzName) zType = azType1[(int32((*Column)(unsafe.Pointer(pCol)).Faffinity) - SQLITE_AFF_BLOB)] len = Xsqlite3Strlen30(tls, zType) - libc.Xmemcpy(tls, (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* k */)))), zType, uint64(len)) - *(*int32)(unsafe.Pointer(bp + 16 /* k */)) += len + libc.Xmemcpy(tls, (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* k */)))), zType, uint64(len)) + *(*int32)(unsafe.Pointer(bp + 8 /* k */)) += len } goto __5 @@ -139616,7 +139616,7 @@ __5: goto __6 __6: ; - Xsqlite3_snprintf(tls, (n - *(*int32)(unsafe.Pointer(bp + 16 /* k */))), (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 16 /* k */)))), ts+3630 /* "%s" */, libc.VaList(bp, zEnd)) + Xsqlite3_snprintf(tls, (n - *(*int32)(unsafe.Pointer(bp + 8 /* k */))), (zStmt + uintptr(*(*int32)(unsafe.Pointer(bp + 8 /* k */)))), ts+3630 /* "%s" */, libc.VaList(bp, zEnd)) return zStmt } @@ -140032,8 +140032,8 @@ func Xsqlite3ShadowTableName(tls *libc.TLS, db uintptr, zName uintptr) int32 { / // "CREATE TABLE ... AS SELECT ..." statement. The column names of // the new table will match the result set of the SELECT. func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr, tabOpts U8, pSelect uintptr) { /* sqlite3.c:114830:21: */ - bp := tls.Alloc(184) - defer tls.Free(184) + bp := tls.Alloc(144) + defer tls.Free(144) var p uintptr // The new table var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -140177,7 +140177,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr // a schema-lock excludes all other database users, the write-lock would // be redundant. if pSelect != 0 { - // var dest SelectDest at bp+144, 40 + // var dest SelectDest at bp+104, 40 // Where the SELECT should store results var regYield int32 // Register holding co-routine entry-point var addrTop int32 // Top of the co-routine @@ -140209,16 +140209,16 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr (*Table)(unsafe.Pointer(pSelTab)).FnCol = int16(0) (*Table)(unsafe.Pointer(pSelTab)).FaCol = uintptr(0) Xsqlite3DeleteTable(tls, db, pSelTab) - Xsqlite3SelectDestInit(tls, bp+144 /* &dest */, SRT_Coroutine, regYield) - Xsqlite3Select(tls, pParse, pSelect, bp+144 /* &dest */) + Xsqlite3SelectDestInit(tls, bp+104 /* &dest */, SRT_Coroutine, regYield) + Xsqlite3Select(tls, pParse, pSelect, bp+104 /* &dest */) if (*Parse)(unsafe.Pointer(pParse)).FnErr != 0 { return } Xsqlite3VdbeEndCoroutine(tls, v, regYield) Xsqlite3VdbeJumpHere(tls, v, (addrTop - 1)) - addrInsLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FiSDParm) + addrInsLoop = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+104 /* &dest */)).FiSDParm) - Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+144 /* &dest */)).FnSdst, regRec) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (*SelectDest)(unsafe.Pointer(bp+104 /* &dest */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+104 /* &dest */)).FnSdst, regRec) Xsqlite3TableAffinity(tls, v, p, 0) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, 1, regRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, 1, regRec, regRowid) @@ -140242,7 +140242,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr n = int32(uint32(n) + ((*Token)(unsafe.Pointer(pEnd2)).Fn)) } zStmt = Xsqlite3MPrintf(tls, db, - ts+13086 /* "CREATE %s %.*s" */, libc.VaList(bp+16, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) + ts+13086 /* "CREATE %s %.*s" */, libc.VaList(bp+8, zType2, n, (*Parse)(unsafe.Pointer(pParse)).FsNameToken.Fz)) } // A slot for the record has already been allocated in the @@ -140251,7 +140251,7 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr Xsqlite3NestedParse(tls, pParse, ts+13101, /* "UPDATE %Q.sqlite..." */ - libc.VaList(bp+48, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + libc.VaList(bp+32, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, zType, (*Table)(unsafe.Pointer(p)).FzName, (*Table)(unsafe.Pointer(p)).FzName, @@ -140269,13 +140269,13 @@ func Xsqlite3EndTable(tls *libc.TLS, pParse uintptr, pCons uintptr, pEnd uintptr if (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).FpSeqTab == uintptr(0) { Xsqlite3NestedParse(tls, pParse, ts+13199, /* "CREATE TABLE %Q...." */ - libc.VaList(bp+112, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) + libc.VaList(bp+88, (*Db)(unsafe.Pointer(pDb)).FzDbSName)) } } // Reparse everything to update our internal data structures Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+13241 /* "tbl_name='%q' AN..." */, libc.VaList(bp+128, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+13241 /* "tbl_name='%q' AN..." */, libc.VaList(bp+96, (*Table)(unsafe.Pointer(p)).FzName)), uint16(0)) } // Add the table to the in-memory representation of the database. @@ -140430,8 +140430,8 @@ __10: // the columns of the view in the pTable structure. Return the number // of errors. If an error is seen leave an error message in pParse->zErrMsg. func Xsqlite3ViewGetColumnNames(tls *libc.TLS, pParse uintptr, pTable uintptr) int32 { /* sqlite3.c:115220:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pSelTab uintptr // A fake table from which we get the result set var pSel uintptr // Copy of the SELECT that implements the view @@ -140608,8 +140608,8 @@ func Xsqlite3RootPageMoved(tls *libc.TLS, db uintptr, iDb int32, iFrom Pgno, iTo // if a root-page of another table is moved by the btree-layer whilst // erasing iTable (this can happen with an auto-vacuum database). func destroyRootPage(tls *libc.TLS, pParse uintptr, iTable int32, iDb int32) { /* sqlite3.c:115417:13: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(32) + defer tls.Free(32) var v uintptr = Xsqlite3GetVdbe(tls, pParse) var r1 int32 = Xsqlite3GetTempReg(tls, pParse) @@ -140684,27 +140684,27 @@ func destroyTable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* sqlite3.c:11 // Remove entries from the sqlite_statN tables (for N in (1,2,3)) // after a DROP INDEX or DROP TABLE command. func sqlite3ClearStatTables(tls *libc.TLS, pParse uintptr, iDb int32, zType uintptr, zName uintptr) { /* sqlite3.c:115496:13: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(64) + defer tls.Free(64) var i int32 var zDbName uintptr = (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer((*Parse)(unsafe.Pointer(pParse)).Fdb)).FaDb + uintptr(iDb)*32)).FzDbSName for i = 1; i <= 4; i++ { - // var zTab [24]int8 at bp+56, 24 + // var zTab [24]int8 at bp+40, 24 - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+56 /* &zTab[0] */, ts+13423 /* "sqlite_stat%d" */, libc.VaList(bp, i)) - if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+56 /* &zTab[0] */, zDbName) != 0 { + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([24]int8{})), bp+40 /* &zTab[0] */, ts+13423 /* "sqlite_stat%d" */, libc.VaList(bp, i)) + if Xsqlite3FindTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, bp+40 /* &zTab[0] */, zDbName) != 0 { Xsqlite3NestedParse(tls, pParse, ts+11386, /* "DELETE FROM %Q.%..." */ - libc.VaList(bp+16, zDbName, bp+56 /* &zTab[0] */, zType, zName)) + libc.VaList(bp+8, zDbName, bp+40 /* &zTab[0] */, zType, zName)) } } } // Generate code to drop a table. func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int32, isView int32) { /* sqlite3.c:115519:21: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) var v uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -140748,7 +140748,7 @@ func Xsqlite3CodeDropTable(tls *libc.TLS, pParse uintptr, pTab uintptr, iDb int3 Xsqlite3NestedParse(tls, pParse, ts+13482, /* "DELETE FROM %Q.s..." */ - libc.VaList(bp+24, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) + libc.VaList(bp+16, (*Db)(unsafe.Pointer(pDb)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName)) if !(isView != 0) && !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) { destroyTable(tls, pParse, pTab) } @@ -140795,8 +140795,8 @@ func tableMayNotBeDropped(tls *libc.TLS, db uintptr, pTab uintptr) int32 { /* sq // This routine is called to do the work of a DROP TABLE statement. // pName is the name of the table to be dropped. func Xsqlite3DropTable(tls *libc.TLS, pParse uintptr, pName uintptr, isView int32, noErr int32) { /* sqlite3.c:115623:21: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(24) + defer tls.Free(24) var pTab uintptr var v uintptr @@ -140934,14 +140934,14 @@ __19: if !((isView != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect == uintptr(0))) { goto __20 } - Xsqlite3ErrorMsg(tls, pParse, ts+13582 /* "use DROP TABLE t..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13582 /* "use DROP TABLE t..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __20: ; if !(!(isView != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect != 0)) { goto __21 } - Xsqlite3ErrorMsg(tls, pParse, ts+13616 /* "use DROP VIEW to..." */, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13616 /* "use DROP VIEW to..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_drop_table __21: ; @@ -140983,8 +140983,8 @@ exit_drop_table: // The foreign key is set for IMMEDIATE processing. A subsequent call // to sqlite3DeferForeignKey() might change this to DEFERRED. func Xsqlite3CreateForeignKey(tls *libc.TLS, pParse uintptr, pFromCol uintptr, pTo uintptr, pToCol uintptr, flags int32) { /* sqlite3.c:115743:21: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var db uintptr var pFKey uintptr @@ -141119,7 +141119,7 @@ __21: } Xsqlite3ErrorMsg(tls, pParse, ts+13805, /* "unknown column \"..." */ - libc.VaList(bp+24, (*ExprList_item)(unsafe.Pointer((pFromCol+8 /* &.a */)+uintptr(i)*32)).FzEName)) + libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer((pFromCol+8 /* &.a */)+uintptr(i)*32)).FzEName)) goto fk_end __23: ; @@ -141360,8 +141360,8 @@ func Xsqlite3AllocateIndexObject(tls *libc.TLS, db uintptr, nCol I16, nExtra int // an explicit "NULLS FIRST" or "NULLS LAST" clause, leave an error in // pParse and return non-zero. Otherwise, return zero. func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int32 { /* sqlite3.c:116033:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) if pList != 0 { var i int32 @@ -141393,8 +141393,8 @@ func Xsqlite3HasExplicitNulls(tls *libc.TLS, pParse uintptr, pList uintptr) int3 // is a primary key or unique-constraint on the most recent column added // to the table currently under construction. func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, pTblName uintptr, pList uintptr, onError int32, pStart uintptr, pPIWhere uintptr, sortOrder int32, ifNotExist int32, idxType U8) { /* sqlite3.c:116061:21: */ - bp := tls.Alloc(328) - defer tls.Free(328) + bp := tls.Alloc(256) + defer tls.Free(256) var pTab uintptr // Table to be indexed var pIndex uintptr // The index to be created @@ -141402,24 +141402,24 @@ func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u var nName int32 // Number of characters in zName var i int32 var j int32 - // var sFix DbFixer at bp+208, 96 + // var sFix DbFixer at bp+136, 96 // For assigning database names to pTable var sortOrderMask int32 // 1 to honor DESC in index. 0 to ignore. var db uintptr var pDb uintptr // The specific table containing the indexed database var iDb int32 // Index of the database that is being written - // var pName uintptr at bp+200, 8 + // var pName uintptr at bp+128, 8 // Unqualified name of the index to create var pListItem uintptr // For looping over pList var nExtra int32 // Space allocated for zExtra[] var nExtraCol int32 // Number of extra columns needed - // var zExtra uintptr at bp+320, 8 + // var zExtra uintptr at bp+248, 8 // Extra space after the Index object var pPk uintptr var n int32 var pLoop uintptr var zDb uintptr - // var prevCol Token at bp+304, 16 + // var prevCol Token at bp+232, 16 var pCol uintptr var pExpr uintptr @@ -141468,9 +141468,9 @@ func Xsqlite3CreateIndex(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 u pIndex = uintptr(0) zName = uintptr(0) db = (*Parse)(unsafe.Pointer(pParse)).Fdb - *(*uintptr)(unsafe.Pointer(bp + 200 /* pName */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)) = uintptr(0) nExtra = 0 - *(*uintptr)(unsafe.Pointer(bp + 320 /* zExtra */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) = uintptr(0) pPk = uintptr(0) // PRIMARY KEY index for WITHOUT ROWID tables if !(((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) || ((*Parse)(unsafe.Pointer(pParse)).FnErr > 0)) { @@ -141507,7 +141507,7 @@ __4: // to search for the table. 'Fix' the table name to this db // before looking up the table. - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+200 /* &pName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+128 /* &pName */) if !(iDb < 0) { goto __7 } @@ -141531,8 +141531,8 @@ __9: __8: ; - Xsqlite3FixInit(tls, bp+208 /* &sFix */, pParse, iDb, ts+13890 /* "index" */, *(*uintptr)(unsafe.Pointer(bp + 200 /* pName */))) - if !(Xsqlite3FixSrcList(tls, bp+208 /* &sFix */, pTblName) != 0) { + Xsqlite3FixInit(tls, bp+136 /* &sFix */, pParse, iDb, ts+13890 /* "index" */, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) + if !(Xsqlite3FixSrcList(tls, bp+136 /* &sFix */, pTblName) != 0) { goto __10 } // Because the parser constructs pTblName from a single identifier, @@ -141584,7 +141584,7 @@ __6: (pTblName != uintptr(0))) { goto __15 } - Xsqlite3ErrorMsg(tls, pParse, ts+13946 /* "table %s may not..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+13946 /* "table %s may not..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) goto exit_create_index __15: ; @@ -141614,10 +141614,10 @@ __17: // If pName==0 it means that we are // dealing with a primary key or UNIQUE constraint. We have to invent our // own name. - if !(*(*uintptr)(unsafe.Pointer(bp + 200 /* pName */)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)) != 0) { goto __18 } - zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* pName */))) + zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 128 /* pName */))) if !(zName == uintptr(0)) { goto __20 } @@ -141640,7 +141640,7 @@ __21: if !(Xsqlite3FindTable(tls, db, zName, uintptr(0)) != uintptr(0)) { goto __24 } - Xsqlite3ErrorMsg(tls, pParse, ts+14033 /* "there is already..." */, libc.VaList(bp+32, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14033 /* "there is already..." */, libc.VaList(bp+16, zName)) goto exit_create_index __24: ; @@ -141652,7 +141652,7 @@ __23: if !(!(ifNotExist != 0)) { goto __26 } - Xsqlite3ErrorMsg(tls, pParse, ts+14067 /* "index %s already..." */, libc.VaList(bp+48, zName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14067 /* "index %s already..." */, libc.VaList(bp+24, zName)) goto __27 __26: ; @@ -141681,7 +141681,7 @@ __29: goto __30 __30: ; - zName = Xsqlite3MPrintf(tls, db, ts+14091 /* "sqlite_autoindex..." */, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName, n)) + zName = Xsqlite3MPrintf(tls, db, ts+14091 /* "sqlite_autoindex..." */, libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName, n)) if !(zName == uintptr(0)) { goto __31 } @@ -141743,9 +141743,9 @@ __33: } pCol = ((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr((int32((*Table)(unsafe.Pointer(pTab)).FnCol)-1))*32) *(*U16)(unsafe.Pointer(pCol + 28 /* &.colFlags */)) |= U16((COLFLAG_UNIQUE)) - Xsqlite3TokenInit(tls, bp+304 /* &prevCol */, (*Column)(unsafe.Pointer(pCol)).FzName) + Xsqlite3TokenInit(tls, bp+232 /* &prevCol */, (*Column)(unsafe.Pointer(pCol)).FzName) pList = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), - Xsqlite3ExprAlloc(tls, db, TK_ID, bp+304 /* &prevCol */, 0)) + Xsqlite3ExprAlloc(tls, db, TK_ID, bp+232 /* &prevCol */, 0)) if !(pList == uintptr(0)) { goto __39 } @@ -141798,7 +141798,7 @@ __43: } pIndex = Xsqlite3AllocateIndexObject(tls, db, (int16((*ExprList)(unsafe.Pointer(pList)).FnExpr + nExtraCol)), - ((nName + nExtra) + 1), bp+320 /* &zExtra */) + ((nName + nExtra) + 1), bp+248 /* &zExtra */) if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __45 } @@ -141806,8 +141806,8 @@ __43: __45: ; - (*Index)(unsafe.Pointer(pIndex)).FzName = *(*uintptr)(unsafe.Pointer(bp + 320 /* zExtra */)) - *(*uintptr)(unsafe.Pointer(bp + 320 /* zExtra */)) += (uintptr(nName + 1)) + (*Index)(unsafe.Pointer(pIndex)).FzName = *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) + *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) += (uintptr(nName + 1)) libc.Xmemcpy(tls, (*Index)(unsafe.Pointer(pIndex)).FzName, zName, (uint64(nName + 1))) (*Index)(unsafe.Pointer(pIndex)).FpTable = pTab (*Index)(unsafe.Pointer(pIndex)).FonError = U8(onError) @@ -141921,9 +141921,9 @@ __55: zColl = *(*uintptr)(unsafe.Pointer((*ExprList_item)(unsafe.Pointer(pListItem)).FpExpr + 8 /* &.u */)) nColl = (Xsqlite3Strlen30(tls, zColl) + 1) - libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 320 /* zExtra */)), zColl, uint64(nColl)) - zColl = *(*uintptr)(unsafe.Pointer(bp + 320 /* zExtra */)) - *(*uintptr)(unsafe.Pointer(bp + 320 /* zExtra */)) += uintptr(nColl) + libc.Xmemcpy(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)), zColl, uint64(nColl)) + zColl = *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) + *(*uintptr)(unsafe.Pointer(bp + 248 /* zExtra */)) += uintptr(nColl) nExtra = nExtra - (nColl) goto __63 __62: @@ -142102,7 +142102,7 @@ __88: goto __93 } Xsqlite3ErrorMsg(tls, pParse, - ts+14175 /* "conflicting ON C..." */, libc.VaList(bp+88, 0)) + ts+14175 /* "conflicting ON C..." */, libc.VaList(bp+48, 0)) __93: ; if !(int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Default) { @@ -142208,8 +142208,8 @@ __104: if !(pStart != 0) { goto __105 } - n1 = (int32(uint32((int32((int64((*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz) - int64((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pName */)))).Fz)) / 1))) + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn)) - if !(int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pName */)))).Fz + uintptr((n1 - 1))))) == ';') { + n1 = (int32(uint32((int32((int64((*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz) - int64((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) / 1))) + (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn)) + if !(int32(*(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz + uintptr((n1 - 1))))) == ';') { goto __107 } n1-- @@ -142217,12 +142217,12 @@ __107: ; // A named index with an explicit CREATE INDEX statement zStmt = Xsqlite3MPrintf(tls, db, ts+14234, /* "CREATE%s INDEX %..." */ - libc.VaList(bp+104, func() uintptr { + libc.VaList(bp+56, func() uintptr { if onError == OE_None { return ts + 755 /* "" */ } return ts + 14254 /* " UNIQUE" */ - }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 200 /* pName */)))).Fz)) + }(), n1, (*Token)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 128 /* pName */)))).Fz)) goto __106 __105: // An automatic index created by a PRIMARY KEY or UNIQUE constraint @@ -142234,7 +142234,7 @@ __106: // Add an entry in sqlite_schema for this index Xsqlite3NestedParse(tls, pParse, ts+14262, /* "INSERT INTO %Q.s..." */ - libc.VaList(bp+136, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + libc.VaList(bp+80, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, iMem, @@ -142249,7 +142249,7 @@ __106: sqlite3RefillIndex(tls, pParse, pIndex, iMem) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+14321 /* "name='%q' AND ty..." */, libc.VaList(bp+184, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+14321 /* "name='%q' AND ty..." */, libc.VaList(bp+120, (*Index)(unsafe.Pointer(pIndex)).FzName)), uint16(0)) Xsqlite3VdbeAddOp2(tls, v, OP_Expire, 0, 1) __108: ; @@ -142399,8 +142399,8 @@ var aVal = [5]LogEst{int16(33), int16(32), int16(30), int16(28), int16(26)} /* s // This routine will drop an existing named index. This routine // implements the DROP INDEX statement. func Xsqlite3DropIndex(tls *libc.TLS, pParse uintptr, pName uintptr, ifExists int32) { /* sqlite3.c:116713:21: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(32) + defer tls.Free(32) var pIndex uintptr var v uintptr @@ -142448,7 +142448,7 @@ __3: goto __6 } Xsqlite3ErrorMsg(tls, pParse, - ts+14366 /* "index associated..." */, libc.VaList(bp+16, 0)) + ts+14366 /* "index associated..." */, libc.VaList(bp+8, 0)) goto exit_drop_index __6: ; @@ -142490,7 +142490,7 @@ __9: Xsqlite3BeginWriteOperation(tls, pParse, 1, iDb) Xsqlite3NestedParse(tls, pParse, ts+14439, /* "DELETE FROM %Q.s..." */ - libc.VaList(bp+32, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) + libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Index)(unsafe.Pointer(pIndex)).FzName)) sqlite3ClearStatTables(tls, pParse, iDb, ts+11574 /* "idx" */, (*Index)(unsafe.Pointer(pIndex)).FzName) Xsqlite3ChangeCookie(tls, pParse, iDb) destroyRootPage(tls, pParse, int32((*Index)(unsafe.Pointer(pIndex)).Ftnum), iDb) @@ -142628,8 +142628,8 @@ func Xsqlite3IdListIndex(tls *libc.TLS, pList uintptr, zName uintptr) int32 { /* // the original SrcList unchanged, return NULL, and leave an error message // in pParse. func Xsqlite3SrcListEnlarge(tls *libc.TLS, pParse uintptr, pSrc uintptr, nExtra int32, iStart int32) uintptr { /* sqlite3.c:116908:24: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var i int32 @@ -142844,8 +142844,8 @@ __3: // Return a new SrcList which encodes is the FROM with the new // term added. func Xsqlite3SrcListAppendFromTerm(tls *libc.TLS, pParse uintptr, p uintptr, pTable uintptr, pDatabase uintptr, pAlias uintptr, pSubquery uintptr, pOn uintptr, pUsing uintptr) uintptr { /* sqlite3.c:117094:24: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pItem uintptr var db uintptr @@ -143197,33 +143197,33 @@ func Xsqlite3HaltConstraint(tls *libc.TLS, pParse uintptr, errCode int32, onErro // Code an OP_Halt due to UNIQUE or PRIMARY KEY constraint violation. func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx uintptr) { /* sqlite3.c:117455:21: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) var zErr uintptr var j int32 - // var errMsg StrAccum at bp+16, 32 + // var errMsg StrAccum at bp+8, 32 var pTab uintptr = (*Index)(unsafe.Pointer(pIdx)).FpTable - Xsqlite3StrAccumInit(tls, bp+16 /* &errMsg */, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, + Xsqlite3StrAccumInit(tls, bp+8 /* &errMsg */, (*Parse)(unsafe.Pointer(pParse)).Fdb, uintptr(0), 0, *(*int32)(unsafe.Pointer(((*Parse)(unsafe.Pointer(pParse)).Fdb + 128 /* &.aLimit */)))) if (*Index)(unsafe.Pointer(pIdx)).FaColExpr != 0 { - Xsqlite3_str_appendf(tls, bp+16 /* &errMsg */, ts+14680 /* "index '%q'" */, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) + Xsqlite3_str_appendf(tls, bp+8 /* &errMsg */, ts+14680 /* "index '%q'" */, libc.VaList(bp, (*Index)(unsafe.Pointer(pIdx)).FzName)) } else { for j = 0; j < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol); j++ { var zCol uintptr zCol = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(j)*2)))*32)).FzName if j != 0 { - Xsqlite3_str_append(tls, bp+16 /* &errMsg */, ts+14691 /* ", " */, 2) + Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+14691 /* ", " */, 2) } - Xsqlite3_str_appendall(tls, bp+16 /* &errMsg */, (*Table)(unsafe.Pointer(pTab)).FzName) - Xsqlite3_str_append(tls, bp+16 /* &errMsg */, ts+768 /* "." */, 1) - Xsqlite3_str_appendall(tls, bp+16 /* &errMsg */, zCol) + Xsqlite3_str_appendall(tls, bp+8 /* &errMsg */, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3_str_append(tls, bp+8 /* &errMsg */, ts+768 /* "." */, 1) + Xsqlite3_str_appendall(tls, bp+8 /* &errMsg */, zCol) } } - zErr = Xsqlite3StrAccumFinish(tls, bp+16 /* &errMsg */) + zErr = Xsqlite3StrAccumFinish(tls, bp+8 /* &errMsg */) Xsqlite3HaltConstraint(tls, pParse, func() int32 { if (int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0x3 >> 0)) == SQLITE_IDXTYPE_PRIMARYKEY { @@ -143236,8 +143236,8 @@ func Xsqlite3UniqueConstraint(tls *libc.TLS, pParse uintptr, onError int32, pIdx // Code an OP_Halt due to non-unique rowid. func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab uintptr) { /* sqlite3.c:117491:21: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var zMsg uintptr var rc int32 @@ -143246,7 +143246,7 @@ func Xsqlite3RowidConstraint(tls *libc.TLS, pParse uintptr, onError int32, pTab (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol+uintptr((*Table)(unsafe.Pointer(pTab)).FiPKey)*32)).FzName)) rc = (SQLITE_CONSTRAINT | (int32(6) << 8)) } else { - zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14694 /* "%s.rowid" */, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) + zMsg = Xsqlite3MPrintf(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, ts+14694 /* "%s.rowid" */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) rc = (SQLITE_CONSTRAINT | (int32(10) << 8)) } Xsqlite3HaltConstraint(tls, pParse, rc, onError, zMsg, int8(-7), @@ -143481,8 +143481,8 @@ func Xsqlite3CteDelete(tls *libc.TLS, db uintptr, pCte uintptr) { /* sqlite3.c:1 // the WITH clause of the second argument. If the second argument is // NULL, then a new WITH argument is created. func Xsqlite3WithAdd(tls *libc.TLS, pParse uintptr, pWith uintptr, pCte uintptr) uintptr { /* sqlite3.c:117742:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pNew uintptr @@ -143712,8 +143712,8 @@ func Xsqlite3SetTextEncoding(tls *libc.TLS, db uintptr, enc U8) { /* sqlite3.c:1 // // See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq() func Xsqlite3GetCollSeq(tls *libc.TLS, pParse uintptr, enc U8, pColl uintptr, zName uintptr) uintptr { /* sqlite3.c:118005:24: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var p uintptr var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -144095,15 +144095,15 @@ func tabIsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlit // writable, generate an error message and return 1. If it is // writable return 0; func Xsqlite3IsReadOnly(tls *libc.TLS, pParse uintptr, pTab uintptr, viewOk int32) int32 { /* sqlite3.c:118421:20: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) if tabIsReadOnly(tls, pParse, pTab) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+14810 /* "table %s may not..." */, libc.VaList(bp, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } if !(viewOk != 0) && ((*Table)(unsafe.Pointer(pTab)).FpSelect != 0) { - Xsqlite3ErrorMsg(tls, pParse, ts+14839 /* "cannot modify %s..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+14839 /* "cannot modify %s..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) return 1 } return 0 @@ -145341,26 +145341,26 @@ endInstrOOM: // Implementation of the printf() function. func printfFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119577:13: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(56) + defer tls.Free(56) - // var x PrintfArguments at bp+48, 16 + // var x PrintfArguments at bp+40, 16 - // var str StrAccum at bp+16, 32 + // var str StrAccum at bp+8, 32 var zFormat uintptr var n int32 var db uintptr = Xsqlite3_context_db_handle(tls, context) if (argc >= 1) && ((libc.AssignUintptr(&zFormat, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv))))) != uintptr(0)) { - (*PrintfArguments)(unsafe.Pointer(bp + 48 /* &x */)).FnArg = (argc - 1) - (*PrintfArguments)(unsafe.Pointer(bp + 48 /* &x */)).FnUsed = 0 - (*PrintfArguments)(unsafe.Pointer(bp + 48 /* &x */)).FapArg = (argv + uintptr(1)*8) - Xsqlite3StrAccumInit(tls, bp+16 /* &str */, db, uintptr(0), 0, *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */)))) - (*StrAccum)(unsafe.Pointer(bp + 16 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_SQLFUNC) - Xsqlite3_str_appendf(tls, bp+16 /* &str */, zFormat, libc.VaList(bp, bp+48 /* &x */)) - n = int32((*StrAccum)(unsafe.Pointer(bp + 16 /* &str */)).FnChar) - Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp+16 /* &str */), n, + (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FnArg = (argc - 1) + (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FnUsed = 0 + (*PrintfArguments)(unsafe.Pointer(bp + 40 /* &x */)).FapArg = (argv + uintptr(1)*8) + Xsqlite3StrAccumInit(tls, bp+8 /* &str */, db, uintptr(0), 0, *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */)))) + (*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_SQLFUNC) + Xsqlite3_str_appendf(tls, bp+8 /* &str */, zFormat, libc.VaList(bp, bp+40 /* &x */)) + n = int32((*StrAccum)(unsafe.Pointer(bp + 8 /* &str */)).FnChar) + Xsqlite3_result_text(tls, context, Xsqlite3StrAccumFinish(tls, bp+8 /* &str */), n, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3OomFault}))) } } @@ -145484,11 +145484,11 @@ func substrFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* s // Implementation of the round() function func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:119708:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var n int32 = 0 - // var r float64 at bp+24, 8 + // var r float64 at bp+16, 8 var zBuf uintptr @@ -145507,29 +145507,29 @@ func roundFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sq if Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) == SQLITE_NULL { return } - *(*float64)(unsafe.Pointer(bp + 24 /* r */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) + *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) // If Y==0 and X will fit in a 64-bit int, // handle the rounding directly, // otherwise use printf. - if (*(*float64)(unsafe.Pointer(bp + 24 /* r */)) < -4503599627370496.0) || (*(*float64)(unsafe.Pointer(bp + 24 /* r */)) > +4503599627370496.0) { + if (*(*float64)(unsafe.Pointer(bp + 16 /* r */)) < -4503599627370496.0) || (*(*float64)(unsafe.Pointer(bp + 16 /* r */)) > +4503599627370496.0) { // The value has no fractional part so there is nothing to round } else if n == 0 { - *(*float64)(unsafe.Pointer(bp + 24 /* r */)) = float64((Sqlite_int64(*(*float64)(unsafe.Pointer(bp + 24 /* r */)) + (func() float64 { - if *(*float64)(unsafe.Pointer(bp + 24 /* r */)) < float64(0) { + *(*float64)(unsafe.Pointer(bp + 16 /* r */)) = float64((Sqlite_int64(*(*float64)(unsafe.Pointer(bp + 16 /* r */)) + (func() float64 { + if *(*float64)(unsafe.Pointer(bp + 16 /* r */)) < float64(0) { return -0.5 } return +0.5 }())))) } else { - zBuf = Xsqlite3_mprintf(tls, ts+14917 /* "%.*f" */, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 24 /* r */)))) + zBuf = Xsqlite3_mprintf(tls, ts+14917 /* "%.*f" */, libc.VaList(bp, n, *(*float64)(unsafe.Pointer(bp + 16 /* r */)))) if zBuf == uintptr(0) { Xsqlite3_result_error_nomem(tls, context) return } - Xsqlite3AtoF(tls, zBuf, bp+24 /* &r */, Xsqlite3Strlen30(tls, zBuf), uint8(SQLITE_UTF8)) + Xsqlite3AtoF(tls, zBuf, bp+16 /* &r */, Xsqlite3Strlen30(tls, zBuf), uint8(SQLITE_UTF8)) Xsqlite3_free(tls, zBuf) } - Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 24 /* r */))) + Xsqlite3_result_double(tls, context, *(*float64)(unsafe.Pointer(bp + 16 /* r */))) } // Allocate nByte bytes of space using sqlite3Malloc(). If the @@ -146044,8 +146044,8 @@ func sourceidFunc(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintpt // sqlite3_log(). The return value is NULL. The function exists purely for // its side-effects. func errlogFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120280:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) _ = argc _ = context @@ -146093,25 +146093,25 @@ var hexdigits = [16]int8{ // "NULL". Otherwise, the argument is enclosed in single quotes with // single-quote escapes. func quoteFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:120350:13: */ - bp := tls.Alloc(96) - defer tls.Free(96) + bp := tls.Alloc(80) + defer tls.Free(80) _ = argc switch Xsqlite3_value_type(tls, *(*uintptr)(unsafe.Pointer(argv))) { case SQLITE_FLOAT: { var r1 float64 - // var r2 float64 at bp+88, 8 + // var r2 float64 at bp+72, 8 - // var zBuf [50]int8 at bp+32, 50 + // var zBuf [50]int8 at bp+16, 50 r1 = Xsqlite3_value_double(tls, *(*uintptr)(unsafe.Pointer(argv))) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+32 /* &zBuf[0] */, ts+5396 /* "%!.15g" */, libc.VaList(bp, r1)) - Xsqlite3AtoF(tls, bp+32 /* &zBuf[0] */, bp+88 /* &r2 */, 20, uint8(SQLITE_UTF8)) - if r1 != *(*float64)(unsafe.Pointer(bp + 88 /* r2 */)) { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+32 /* &zBuf[0] */, ts+15000 /* "%!.20e" */, libc.VaList(bp+16, r1)) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zBuf[0] */, ts+5396 /* "%!.15g" */, libc.VaList(bp, r1)) + Xsqlite3AtoF(tls, bp+16 /* &zBuf[0] */, bp+72 /* &r2 */, 20, uint8(SQLITE_UTF8)) + if r1 != *(*float64)(unsafe.Pointer(bp + 72 /* r2 */)) { + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([50]int8{})), bp+16 /* &zBuf[0] */, ts+15000 /* "%!.20e" */, libc.VaList(bp+8, r1)) } - Xsqlite3_result_text(tls, context, bp+32 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) + Xsqlite3_result_text(tls, context, bp+16 /* &zBuf[0] */, -1, libc.UintptrFromInt32(-1)) break } @@ -147266,8 +147266,8 @@ var aBuiltinFunc = [68]FuncDef{ // into pParse. If an OOM error occurs, non-zero is returned and the // pParse->db->mallocFailed flag is set. func Xsqlite3FkLocateIndex(tls *libc.TLS, pParse uintptr, pParent uintptr, pFKey uintptr, ppIdx uintptr, paiCol uintptr) int32 { /* sqlite3.c:121786:20: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pIdx uintptr = uintptr(0) // Value to return via *ppIdx var aiCol uintptr = uintptr(0) // Value to return via *paiCol @@ -148712,11 +148712,11 @@ func exprColumnFlagUnion(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { // back and computes the values for those columns based on the previously // computed normal columns. func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore int32, pTab uintptr) { /* sqlite3.c:123282:21: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(56) + defer tls.Free(56) var i int32 - // var w Walker at bp+16, 48 + // var w Walker at bp+8, 48 var pRedo uintptr var eProgress int32 @@ -148755,12 +148755,12 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in } } - *(*uintptr)(unsafe.Pointer(bp + 16 /* &w */ + 40 /* &.u */)) = pTab - (*Walker)(unsafe.Pointer(bp + 16 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { + *(*uintptr)(unsafe.Pointer(bp + 8 /* &w */ + 40 /* &.u */)) = pTab + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxExprCallback = *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, uintptr) int32 }{exprColumnFlagUnion})) - (*Walker)(unsafe.Pointer(bp + 16 /* &w */)).FxSelectCallback = uintptr(0) - (*Walker)(unsafe.Pointer(bp + 16 /* &w */)).FxSelectCallback2 = uintptr(0) + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxSelectCallback = uintptr(0) + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FxSelectCallback2 = uintptr(0) // On the second pass, compute the value of each NOT-AVAILABLE column. // Companion code in the TK_COLUMN case of sqlite3ExprCodeTarget() will @@ -148775,10 +148775,10 @@ func Xsqlite3ComputeGeneratedColumns(tls *libc.TLS, pParse uintptr, iRegStore in if (int32((*Column)(unsafe.Pointer(pCol)).FcolFlags) & COLFLAG_NOTAVAIL) != 0 { var x int32 *(*U16)(unsafe.Pointer(pCol + 28 /* &.colFlags */)) |= U16((COLFLAG_BUSY)) - (*Walker)(unsafe.Pointer(bp + 16 /* &w */)).FeCode = U16(0) - Xsqlite3WalkExpr(tls, bp+16 /* &w */, (*Column)(unsafe.Pointer(pCol)).FpDflt) + (*Walker)(unsafe.Pointer(bp + 8 /* &w */)).FeCode = U16(0) + Xsqlite3WalkExpr(tls, bp+8 /* &w */, (*Column)(unsafe.Pointer(pCol)).FpDflt) *(*U16)(unsafe.Pointer(pCol + 28 /* &.colFlags */)) &= libc.Uint16FromInt32((libc.CplInt32(COLFLAG_BUSY))) - if (int32((*Walker)(unsafe.Pointer(bp+16 /* &w */)).FeCode) & COLFLAG_NOTAVAIL) != 0 { + if (int32((*Walker)(unsafe.Pointer(bp+8 /* &w */)).FeCode) & COLFLAG_NOTAVAIL) != 0 { pRedo = pCol continue } @@ -149086,8 +149086,8 @@ func Xsqlite3AutoincrementEnd(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:1235 // end loop // D: cleanup func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uintptr, pColumn uintptr, onError int32, pUpsert uintptr) { /* sqlite3.c:123681:21: */ - bp := tls.Alloc(228) - defer tls.Free(228) + bp := tls.Alloc(188) + defer tls.Free(188) var db uintptr // The main database structure var pTab uintptr // The table to insert into. aka TABLE @@ -149097,16 +149097,16 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var pIdx uintptr // For looping over indices of the table var nColumn int32 // Number of columns in the data var nHidden int32 // Number of hidden columns if TABLE is virtual - // var iDataCur int32 at bp+216, 4 + // var iDataCur int32 at bp+176, 4 // VDBE cursor that is the main data repository - // var iIdxCur int32 at bp+220, 4 + // var iIdxCur int32 at bp+180, 4 // First index cursor var ipkColumn int32 // Column that is the INTEGER PRIMARY KEY var endOfLoop int32 // Label for the end of the insertion loop var srcTab int32 // Data comes from this temporary cursor if >=0 var addrInsTop int32 // Jump to label "D" var addrCont int32 // Top of insert loop. Label "C" in templates 3 and 4 - // var dest SelectDest at bp+120, 40 + // var dest SelectDest at bp+80, 40 // Destination for SELECT on rhs of INSERT var iDb int32 // Index of database holding TABLE var useTempTable U8 // Store SELECT results in intermediate table @@ -149127,7 +149127,7 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var isView int32 // True if attempting to insert into a view var pTrigger uintptr // List of triggers on pTab, if required - // var tmask int32 at bp+112, 4 + // var tmask int32 at bp+72, 4 // Invoke the coroutine to extract information from the SELECT // and add it to a transient table srcTab. The code generated @@ -149148,7 +149148,7 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var rc int32 // This is the case if the data for the INSERT is coming from a // single-row VALUES clause - // var sNC NameContext at bp+160, 56 + // var sNC NameContext at bp+120, 56 var nIdx int32 var pNx uintptr @@ -149159,12 +149159,12 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin var pIpk uintptr var addr11 int32 var pVTab uintptr - // var isReplace int32 at bp+224, 4 + // var isReplace int32 at bp+184, 4 // Set to true if constraints may cause a replace var bUseSeek int32 nHidden = 0 - *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)) = 0 - *(*int32)(unsafe.Pointer(bp + 220 /* iIdxCur */)) = 0 + *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) = 0 + *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) = 0 ipkColumn = -1 srcTab = 0 addrInsTop = 0 @@ -149184,7 +149184,7 @@ func Xsqlite3Insert(tls *libc.TLS, pParse uintptr, pTabList uintptr, pSelect uin goto insert_cleanup __1: ; - (*SelectDest)(unsafe.Pointer(bp + 120 /* &dest */)).FiSDParm = 0 // Suppress a harmless compiler warning + (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSDParm = 0 // Suppress a harmless compiler warning // If the Select object is really just a simple VALUES() list with a // single row (the common case) then keep that one row of values @@ -149221,7 +149221,7 @@ __4: // Figure out if we have any triggers and if the table being // inserted into is a view - pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+112 /* &tmask */) + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_INSERT, uintptr(0), bp+72 /* &tmask */) isView = (libc.Bool32((*Table)(unsafe.Pointer(pTab)).FpSelect != uintptr(0))) // If pTab is really a view, make sure it has been initialized. @@ -149234,7 +149234,7 @@ __5: ; // Cannot insert into a read-only table. - if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 112 /* tmask */))) != 0) { + if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 72 /* tmask */))) != 0) { goto __6 } goto insert_cleanup @@ -149381,7 +149381,7 @@ __20: goto __27 __26: Xsqlite3ErrorMsg(tls, pParse, ts+15577, /* "table %S has no ..." */ - libc.VaList(bp+16, pTabList+8 /* &.a */, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) + libc.VaList(bp+8, pTabList+8 /* &.a */, (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pColumn)).Fa+uintptr(i)*16)).FzName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto insert_cleanup __27: @@ -149409,16 +149409,16 @@ __11: regYield = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) addrTop = (Xsqlite3VdbeCurrentAddr(tls, v) + 1) Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, regYield, 0, addrTop) - Xsqlite3SelectDestInit(tls, bp+120 /* &dest */, SRT_Coroutine, regYield) - (*SelectDest)(unsafe.Pointer(bp + 120 /* &dest */)).FiSdst = func() int32 { + Xsqlite3SelectDestInit(tls, bp+80 /* &dest */, SRT_Coroutine, regYield) + (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst = func() int32 { if bIdListInOrder != 0 { return regData } return 0 }() - (*SelectDest)(unsafe.Pointer(bp + 120 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol) - rc = Xsqlite3Select(tls, pParse, pSelect, bp+120 /* &dest */) - regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 120 /* &dest */)).FiSdst + (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FnSdst = int32((*Table)(unsafe.Pointer(pTab)).FnCol) + rc = Xsqlite3Select(tls, pParse, pSelect, bp+80 /* &dest */) + regFromSelect = (*SelectDest)(unsafe.Pointer(bp + 80 /* &dest */)).FiSdst if !(((rc != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0)) || ((*Parse)(unsafe.Pointer(pParse)).FnErr != 0)) { goto __30 } @@ -149453,7 +149453,7 @@ __31: regRec = Xsqlite3GetTempReg(tls, pParse) regTempRowid = Xsqlite3GetTempReg(tls, pParse) Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, srcTab, nColumn) - addrL = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+120 /* &dest */)).FiSDParm) + addrL = Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regFromSelect, nColumn, regRec) Xsqlite3VdbeAddOp2(tls, v, OP_NewRowid, srcTab, regTempRowid) Xsqlite3VdbeAddOp3(tls, v, OP_Insert, srcTab, regRec, regTempRowid) @@ -149465,15 +149465,15 @@ __32: ; goto __29 __28: - libc.Xmemset(tls, bp+160 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 160 /* &sNC */)).FpParse = pParse + libc.Xmemset(tls, bp+120 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 120 /* &sNC */)).FpParse = pParse srcTab = -1 if !(pList != 0) { goto __33 } nColumn = (*ExprList)(unsafe.Pointer(pList)).FnExpr - if !(Xsqlite3ResolveExprListNames(tls, bp+160 /* &sNC */, pList) != 0) { + if !(Xsqlite3ResolveExprListNames(tls, bp+120 /* &sNC */, pList) != 0) { goto __35 } goto insert_cleanup @@ -149551,7 +149551,7 @@ __42: } Xsqlite3ErrorMsg(tls, pParse, ts+15609, /* "table %S has %d ..." */ - libc.VaList(bp+40, pTabList+8 /* &.a */, (int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden), nColumn)) + libc.VaList(bp+24, pTabList+8 /* &.a */, (int32((*Table)(unsafe.Pointer(pTab)).FnCol)-nHidden), nColumn)) goto insert_cleanup __47: ; @@ -149560,7 +149560,7 @@ __36: if !((pColumn != uintptr(0)) && (nColumn != (*IdList)(unsafe.Pointer(pColumn)).FnId)) { goto __48 } - Xsqlite3ErrorMsg(tls, pParse, ts+15661 /* "%d values for %d..." */, libc.VaList(bp+72, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) + Xsqlite3ErrorMsg(tls, pParse, ts+15661 /* "%d values for %d..." */, libc.VaList(bp+48, nColumn, (*IdList)(unsafe.Pointer(pColumn)).FnId)) goto insert_cleanup __48: ; @@ -149582,7 +149582,7 @@ __49: goto __50 } nIdx = Xsqlite3OpenTableAndIndices(tls, pParse, pTab, OP_OpenWrite, uint8(0), -1, uintptr(0), - bp+216 /* &iDataCur */, bp+220 /* &iIdxCur */) + bp+176 /* &iDataCur */, bp+180 /* &iIdxCur */) aRegIdx = Xsqlite3DbMallocRawNN(tls, db, (uint64(unsafe.Sizeof(int32(0))) * (uint64(nIdx + 2)))) if !(aRegIdx == uintptr(0)) { goto __51 @@ -149617,7 +149617,7 @@ __50: goto __56 } Xsqlite3ErrorMsg(tls, pParse, ts+15686, /* "UPSERT not imple..." */ - libc.VaList(bp+96, (*Table)(unsafe.Pointer(pTab)).FzName)) + libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName)) goto insert_cleanup __56: ; @@ -149634,13 +149634,13 @@ __57: goto insert_cleanup __58: ; - (*SrcItem)(unsafe.Pointer((pTabList + 8 /* &.a */))).FiCursor = *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)) + (*SrcItem)(unsafe.Pointer((pTabList + 8 /* &.a */))).FiCursor = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) pNx = pUpsert __59: (*Upsert)(unsafe.Pointer(pNx)).FpUpsertSrc = pTabList (*Upsert)(unsafe.Pointer(pNx)).FregData = regData - (*Upsert)(unsafe.Pointer(pNx)).FiDataCur = *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)) - (*Upsert)(unsafe.Pointer(pNx)).FiIdxCur = *(*int32)(unsafe.Pointer(bp + 220 /* iIdxCur */)) + (*Upsert)(unsafe.Pointer(pNx)).FiDataCur = *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)) + (*Upsert)(unsafe.Pointer(pNx)).FiIdxCur = *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)) if !((*Upsert)(unsafe.Pointer(pNx)).FpUpsertTarget != 0) { goto __62 } @@ -149691,7 +149691,7 @@ __64: // goto C // D: ... - addrInsTop = libc.AssignInt32(&addrCont, Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+120 /* &dest */)).FiSDParm)) + addrInsTop = libc.AssignInt32(&addrCont, Xsqlite3VdbeAddOp1(tls, v, OP_Yield, (*SelectDest)(unsafe.Pointer(bp+80 /* &dest */)).FiSDParm)) if !(ipkColumn >= 0) { goto __67 @@ -149753,7 +149753,7 @@ __73: // triggers, the slots used for stored columns will be OP_Copy-ed // to a second block of registers, so the register needs to be // initialized to NULL to avoid an uninitialized register read - if !((*(*int32)(unsafe.Pointer(bp + 112 /* tmask */)) & TRIGGER_BEFORE) != 0) { + if !((*(*int32)(unsafe.Pointer(bp + 72 /* tmask */)) & TRIGGER_BEFORE) != 0) { goto __77 } Xsqlite3VdbeAddOp1(tls, v, OP_SoftNull, iRegStore) @@ -149851,7 +149851,7 @@ __70: // Run the BEFORE and INSTEAD OF triggers, if there are any endOfLoop = Xsqlite3VdbeMakeLabel(tls, pParse) - if !((*(*int32)(unsafe.Pointer(bp + 112 /* tmask */)) & TRIGGER_BEFORE) != 0) { + if !((*(*int32)(unsafe.Pointer(bp + 72 /* tmask */)) & TRIGGER_BEFORE) != 0) { goto __92 } regCols = Xsqlite3GetTempRange(tls, pParse, (int32((*Table)(unsafe.Pointer(pTab)).FnCol) + 1)) @@ -149950,7 +149950,7 @@ __105: if !((int32((*Expr)(unsafe.Pointer(pIpk)).Fop) == TK_NULL) && !((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0)) { goto __107 } - Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)), regRowid, regAutoinc) + Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) appendFlag = U8(1) goto __108 __107: @@ -149970,7 +149970,7 @@ __104: goto __110 } addr11 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, regRowid) - Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)), regRowid, regAutoinc) + Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) Xsqlite3VdbeJumpHere(tls, v, addr11) goto __111 __110: @@ -149989,7 +149989,7 @@ __101: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, regRowid) goto __113 __112: - Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)), regRowid, regAutoinc) + Xsqlite3VdbeAddOp3(tls, v, OP_NewRowid, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), regRowid, regAutoinc) appendFlag = U8(1) __113: ; @@ -150026,9 +150026,9 @@ __114: goto __116 __115: - *(*int32)(unsafe.Pointer(bp + 224 /* isReplace */)) = 0 // True to use OPFLAG_SEEKRESULT - Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 220 /* iIdxCur */)), - regIns, 0, (uint8(libc.Bool32(ipkColumn >= 0))), uint8(onError), endOfLoop, bp+224 /* &isReplace */, uintptr(0), pUpsert) + *(*int32)(unsafe.Pointer(bp + 184 /* isReplace */)) = 0 // True to use OPFLAG_SEEKRESULT + Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)), + regIns, 0, (uint8(libc.Bool32(ipkColumn >= 0))), uint8(onError), endOfLoop, bp+184 /* &isReplace */, uintptr(0), pUpsert) Xsqlite3FkCheck(tls, pParse, pTab, 0, regIns, uintptr(0), 0) // Set the OPFLAG_USESEEKRESULT flag if either (a) there are no REPLACE @@ -150039,8 +150039,8 @@ __115: // cursor that is disturbed. And these instructions both clear the // VdbeCursor.seekResult variable, disabling the OPFLAG_USESEEKRESULT // functionality. - bUseSeek = (libc.Bool32((*(*int32)(unsafe.Pointer(bp + 224 /* isReplace */)) == 0) || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0))) - Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 216 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 220 /* iIdxCur */)), + bUseSeek = (libc.Bool32((*(*int32)(unsafe.Pointer(bp + 184 /* isReplace */)) == 0) || !(Xsqlite3VdbeHasSubProgram(tls, v) != 0))) + Xsqlite3CompleteInsertion(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 176 /* iDataCur */)), *(*int32)(unsafe.Pointer(bp + 180 /* iIdxCur */)), regIns, aRegIdx, 0, int32(appendFlag), bUseSeek) __116: ; @@ -150333,15 +150333,15 @@ func indexIteratorNext(tls *libc.TLS, pIter uintptr, pIx uintptr) uintptr { /* s // is used. Or if pParse->onError==OE_Default then the onError value // for the constraint is used. func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintptr, aRegIdx uintptr, iDataCur int32, iIdxCur int32, regNewData int32, regOldData int32, pkChng U8, overrideError U8, ignoreDest int32, pbMayReplace uintptr, aiChng uintptr, pUpsert uintptr) { /* sqlite3.c:124634:21: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(72) + defer tls.Free(72) var v uintptr // VDBE under constrution var pIdx uintptr // Pointer to one of the indices var pPk uintptr = uintptr(0) // The PRIMARY KEY index for WITHOUT ROWID tables var db uintptr // Database connection var i int32 // loop counter - // var ix int32 at bp+48, 4 + // var ix int32 at bp+40, 4 // Index loop counter var nCol int32 // Number of columns var onError int32 // Conflict resolution strategy @@ -150361,7 +150361,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt var lblRecheckOk int32 = 0 // Each recheck jumps to this label if it passes var pTrigger uintptr // List of DELETE triggers on the table pTab var nReplaceTrig int32 = 0 // Number of replace triggers coded - // var sIdxIter IndexIterator at bp+24, 24 + // var sIdxIter IndexIterator at bp+16, 24 // Index iterator isUpdate = (U8(libc.Bool32(regOldData != 0))) @@ -150562,10 +150562,10 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // The ordering of (2) and (3) is accomplished by making sure the linked // list of indexes attached to a table puts all OE_Replace indexes last // in the list. See sqlite3CreateIndex() for where that happens. - (*IndexIterator)(unsafe.Pointer(bp + 24 /* &sIdxIter */)).FeType = 0 - (*IndexIterator)(unsafe.Pointer(bp + 24 /* &sIdxIter */)).Fi = 0 - *(*uintptr)(unsafe.Pointer(bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ + 8 /* &.aIdx */)) = uintptr(0) // Silence harmless compiler warning - *(*uintptr)(unsafe.Pointer(bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.lx */ /* &.pIdx */)) = (*Table)(unsafe.Pointer(pTab)).FpIndex + (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).FeType = 0 + (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).Fi = 0 + *(*uintptr)(unsafe.Pointer(bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ + 8 /* &.aIdx */)) = uintptr(0) // Silence harmless compiler warning + *(*uintptr)(unsafe.Pointer(bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.lx */ /* &.pIdx */)) = (*Table)(unsafe.Pointer(pTab)).FpIndex if pUpsert != 0 { if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget == uintptr(0) { // There is just on ON CONFLICT clause and it has no constraint-target @@ -150605,15 +150605,15 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt goto __3 __3: ; - (*IndexIterator)(unsafe.Pointer(bp + 24 /* &sIdxIter */)).FeType = 1 - *(*int32)(unsafe.Pointer(bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ /* &.nIdx */)) = nIdx + (*IndexIterator)(unsafe.Pointer(bp + 16 /* &sIdxIter */)).FeType = 1 + *(*int32)(unsafe.Pointer(bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ /* &.nIdx */)) = nIdx nByte = (((uint64(unsafe.Sizeof(IndexListTerm{})) + uint64(1)) * uint64(nIdx)) + uint64(nIdx)) - *(*uintptr)(unsafe.Pointer(bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ + 8 /* &.aIdx */)) = Xsqlite3DbMallocZero(tls, db, nByte) - if *(*uintptr)(unsafe.Pointer((bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ + 8 /* &.aIdx */)) = Xsqlite3DbMallocZero(tls, db, nByte) + if *(*uintptr)(unsafe.Pointer((bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) == uintptr(0) { return } // OOM - bUsed = (*(*uintptr)(unsafe.Pointer((bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(nIdx)*16) - (*Upsert)(unsafe.Pointer(pUpsert)).FpToFree = *(*uintptr)(unsafe.Pointer(bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ + 8 /* &.aIdx */)) + bUsed = (*(*uintptr)(unsafe.Pointer((bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(nIdx)*16) + (*Upsert)(unsafe.Pointer(pUpsert)).FpToFree = *(*uintptr)(unsafe.Pointer(bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */ + 8 /* &.aIdx */)) i = 0 pTerm = pUpsert for ; pTerm != 0; pTerm = (*Upsert)(unsafe.Pointer(pTerm)).FpNextUpsert { @@ -150633,8 +150633,8 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt continue } // Duplicate ON CONFLICT clause ignored *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) = U8(1) - (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx - (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj i++ } jj = 0 @@ -150647,8 +150647,8 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt if *(*U8)(unsafe.Pointer(bUsed + uintptr(jj))) != 0 { goto __5 } - (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx - (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 24 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fp = pIdx + (*IndexListTerm)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer((bp + 16 /* &sIdxIter */ + 8 /* &.u */ /* &.ax */) + 8 /* &.aIdx */)) + uintptr(i)*16)).Fix = jj i++ } @@ -150856,14 +150856,14 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // // This loop also handles the case of the PRIMARY KEY index for a // WITHOUT ROWID table. - for pIdx = indexIteratorFirst(tls, bp+24 /* &sIdxIter */, bp+48 /* &ix */); pIdx != 0; pIdx = indexIteratorNext(tls, bp+24 /* &sIdxIter */, bp+48 /* &ix */) { + for pIdx = indexIteratorFirst(tls, bp+16 /* &sIdxIter */, bp+40 /* &ix */); pIdx != 0; pIdx = indexIteratorNext(tls, bp+16 /* &sIdxIter */, bp+40 /* &ix */) { var regIdx int32 // Range of registers hold conent for pIdx var regR int32 // Range of registers holding conflicting PK var iThisCur int32 // Cursor for this UNIQUE index var addrUniqueOk int32 // Jump here if the UNIQUE constraint is satisfied var addrConflictCk int32 // First opcode in the conflict check logic - if *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* ix */)))*4)) == 0 { + if *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4)) == 0 { continue } // Skip indices that do not change if pUpsert != 0 { @@ -150878,11 +150878,11 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt bAffinityDone = U8(1) } - iThisCur = (iIdxCur + *(*int32)(unsafe.Pointer(bp + 48 /* ix */))) + iThisCur = (iIdxCur + *(*int32)(unsafe.Pointer(bp + 40 /* ix */))) // Skip partial indices for which the WHERE clause is not true if (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere != 0 { - Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* ix */)))*4))) + Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4))) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = -(regNewData + 1) Xsqlite3ExprIfFalseDup(tls, pParse, (*Index)(unsafe.Pointer(pIdx)).FpPartIdxWhere, addrUniqueOk, SQLITE_JUMPIFNULL) @@ -150891,7 +150891,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // Create a record for this index entry as it should appear after // the insert or update. Store that record in the aRegIdx[ix] register - regIdx = (*(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* ix */)))*4)) + 1) + regIdx = (*(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4)) + 1) for i = 0; i < int32((*Index)(unsafe.Pointer(pIdx)).FnColumn); i++ { var iField int32 = int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i)*2))) var x int32 @@ -150911,7 +150911,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt } } - Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnColumn), *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* ix */)))*4))) + Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, regIdx, int32((*Index)(unsafe.Pointer(pIdx)).FnColumn), *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4))) // In an UPDATE operation, if this index is the PRIMARY KEY index // of a WITHOUT ROWID table and there has been no change the @@ -151038,7 +151038,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt } case OE_Update: { - Xsqlite3UpsertDoUpdate(tls, pParse, pUpsert, pTab, pIdx, (iIdxCur + *(*int32)(unsafe.Pointer(bp + 48 /* ix */)))) + Xsqlite3UpsertDoUpdate(tls, pParse, pUpsert, pTab, pIdx, (iIdxCur + *(*int32)(unsafe.Pointer(bp + 40 /* ix */)))) } fallthrough @@ -151094,27 +151094,27 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // the constraint-ok jump destination to be the address of // the next retest block for nConflictCk > 0 { - // var x VdbeOp at bp+56, 24 + // var x VdbeOp at bp+48, 24 // Conflict check opcode to copy // The sqlite3VdbeAddOp4() call might reallocate the opcode array. // Hence, make a complete copy of the opcode, rather than using // a pointer to the opcode. - *(*VdbeOp)(unsafe.Pointer(bp + 56 /* x */)) = *(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, addrConflictCk))) - if int32((*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fopcode) != OP_IdxRowid { + *(*VdbeOp)(unsafe.Pointer(bp + 48 /* x */)) = *(*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, addrConflictCk))) + if int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fopcode) != OP_IdxRowid { var p2 int32 // New P2 value for copied conflict check opcode var zP4 uintptr - if (int32(Xsqlite3OpcodeProperty[(*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fopcode]) & OPFLG_JUMP) != 0 { + if (int32(Xsqlite3OpcodeProperty[(*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fopcode]) & OPFLG_JUMP) != 0 { p2 = lblRecheckOk } else { - p2 = (*VdbeOp)(unsafe.Pointer(bp + 56 /* &x */)).Fp2 + p2 = (*VdbeOp)(unsafe.Pointer(bp + 48 /* &x */)).Fp2 } - if int32((*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fp4type) == (-3) { - zP4 = uintptr(int64(*(*int32)(unsafe.Pointer(bp + 56 /* &x */ + 16 /* &.p4 */)))) + if int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp4type) == (-3) { + zP4 = uintptr(int64(*(*int32)(unsafe.Pointer(bp + 48 /* &x */ + 16 /* &.p4 */)))) } else { - zP4 = *(*uintptr)(unsafe.Pointer(bp + 56 /* &x */ + 16 /* &.p4 */)) + zP4 = *(*uintptr)(unsafe.Pointer(bp + 48 /* &x */ + 16 /* &.p4 */)) } - Xsqlite3VdbeAddOp4(tls, v, int32((*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fopcode), (*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fp1, p2, (*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fp3, zP4, int32((*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fp4type)) - Xsqlite3VdbeChangeP5(tls, v, (*VdbeOp)(unsafe.Pointer(bp+56 /* &x */)).Fp5) + Xsqlite3VdbeAddOp4(tls, v, int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fopcode), (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp1, p2, (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp3, zP4, int32((*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp4type)) + Xsqlite3VdbeChangeP5(tls, v, (*VdbeOp)(unsafe.Pointer(bp+48 /* &x */)).Fp5) } nConflictCk-- @@ -151172,7 +151172,7 @@ func Xsqlite3GenerateConstraintChecks(tls *libc.TLS, pParse uintptr, pTab uintpt // Generate the table record if ((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0) { - var regRec int32 = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 48 /* ix */)))*4)) + var regRec int32 = *(*int32)(unsafe.Pointer(aRegIdx + uintptr(*(*int32)(unsafe.Pointer(bp + 40 /* ix */)))*4)) Xsqlite3VdbeAddOp3(tls, v, OP_MakeRecord, (regNewData + 1), int32((*Table)(unsafe.Pointer(pTab)).FnNVCol), regRec) if !(bAffinityDone != 0) { @@ -152369,13 +152369,13 @@ var sqlite3Apis = Sqlite3_api_routines{ // error message text. The calling function should free this memory // by calling sqlite3DbFree(db, ). func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:127439:12: */ - bp := tls.Alloc(96) - defer tls.Free(96) + bp := tls.Alloc(64) + defer tls.Free(64) var pVfs uintptr var handle uintptr var xInit Sqlite3_loadext_entry - // var zErrmsg uintptr at bp+88, 8 + // var zErrmsg uintptr at bp+56, 8 var zEntry uintptr var zAltEntry uintptr @@ -152389,7 +152389,7 @@ func sqlite3LoadExtension(tls *libc.TLS, db uintptr, zFile uintptr, zProc uintpt var c int32 var ncFile int32 pVfs = (*Sqlite3)(unsafe.Pointer(db)).FpVfs - *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) = uintptr(0) zAltEntry = uintptr(0) nMsg = libc.Xstrlen(tls, zFile) @@ -152538,14 +152538,14 @@ __10: goto __21 } nMsg = nMsg + (libc.Xstrlen(tls, zEntry) + uint64(300)) - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+88 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) - if !(*(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */)) != 0) { + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) + if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) != 0) { goto __22 } // zErrmsg would be NULL if not so - Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */)), - ts+15809 /* "no entry point [..." */, libc.VaList(bp+24, zEntry, zFile)) - Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */))) + Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), + ts+15809 /* "no entry point [..." */, libc.VaList(bp+16, zEntry, zFile)) + Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __22: ; __21: @@ -152556,7 +152556,7 @@ __21: __20: ; Xsqlite3_free(tls, zAltEntry) - rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xInit)))(tls, db, bp+88 /* &zErrmsg */, uintptr(unsafe.Pointer(&sqlite3Apis))) + rc = (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xInit)))(tls, db, bp+56 /* &zErrmsg */, uintptr(unsafe.Pointer(&sqlite3Apis))) if !(rc != 0) { goto __23 } @@ -152569,10 +152569,10 @@ __24: if !(pzErrMsg != 0) { goto __25 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15852 /* "error during ini..." */, libc.VaList(bp+48, *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */)))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+15852 /* "error during ini..." */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)))) __25: ; - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) Xsqlite3OsDlClose(tls, pVfs, handle) return SQLITE_ERROR __23: @@ -152603,14 +152603,14 @@ extension_not_found: goto __28 } nMsg = nMsg + (uint64(300)) - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+88 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) - if !(*(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */)) != 0) { + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = libc.AssignPtrUintptr(bp+56 /* zErrmsg */, Xsqlite3_malloc64(tls, nMsg)) + if !(*(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)) != 0) { goto __29 } // zErrmsg would be NULL if not so - Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */)), - ts+15884 /* "unable to open s..." */, libc.VaList(bp+64, FILENAME_MAX, zFile)) - Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 88 /* zErrmsg */))) + Xsqlite3_snprintf(tls, int32(nMsg), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */)), + ts+15884 /* "unable to open s..." */, libc.VaList(bp+40, FILENAME_MAX, zFile)) + Xsqlite3OsDlError(tls, pVfs, (int32(nMsg - uint64(1))), *(*uintptr)(unsafe.Pointer(bp + 56 /* zErrmsg */))) __29: ; __28: @@ -152758,8 +152758,8 @@ func Xsqlite3_reset_auto_extension(tls *libc.TLS) { /* sqlite3.c:127739:17: */ // // If anything goes wrong, set an error in the database connection. func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:127761:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var i U32 var go1 int32 = 1 @@ -152771,7 +152771,7 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:127761 return } for i = U32(0); go1 != 0; i++ { - // var zErrmsg uintptr at bp+16, 8 + // var zErrmsg uintptr at bp+8, 8 var mutex uintptr = Xsqlite3MutexAlloc(tls, SQLITE_MUTEX_STATIC_MAIN) var pThunk uintptr = uintptr(unsafe.Pointer(&sqlite3Apis)) @@ -152783,13 +152783,13 @@ func Xsqlite3AutoLoadExtensions(tls *libc.TLS, db uintptr) { /* sqlite3.c:127761 xInit = *(*uintptr)(unsafe.Pointer(sqlite3Autoext.FaExt + uintptr(i)*8)) } Xsqlite3_mutex_leave(tls, mutex) - *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)) = uintptr(0) - if (xInit != 0) && ((libc.AssignInt32(&rc, (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xInit)))(tls, db, bp+16 /* &zErrmsg */, pThunk))) != 0) { + *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)) = uintptr(0) + if (xInit != 0) && ((libc.AssignInt32(&rc, (*(*func(*libc.TLS, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xInit)))(tls, db, bp+8 /* &zErrmsg */, pThunk))) != 0) { Xsqlite3ErrorWithMsg(tls, db, rc, - ts+15925 /* "automatic extens..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)))) + ts+15925 /* "automatic extens..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */)))) go1 = 0 } - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErrmsg */))) } } @@ -153406,8 +153406,8 @@ func pragmaLocate(tls *libc.TLS, zName uintptr) uintptr { /* sqlite3.c:128736:25 // Create zero or more entries in the output for the SQL functions // defined by FuncDef p. func pragmaFunclistLine(tls *libc.TLS, v uintptr, p uintptr, isBuiltin int32, showInternFuncs int32) { /* sqlite3.c:128757:13: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) for ; p != 0; p = (*FuncDef)(unsafe.Pointer(p)).FpNext { var zType uintptr @@ -153465,15 +153465,15 @@ func integrityCheckResultRow(tls *libc.TLS, v uintptr) int32 { /* sqlite3.c:1288 // and pId2 is the id. If the left side is just "id" then pId1 is the // id and pId2 is any empty string. func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, pValue uintptr, minusFlag int32) { /* sqlite3.c:128833:21: */ - bp := tls.Alloc(688) - defer tls.Free(688) + bp := tls.Alloc(536) + defer tls.Free(536) var zLeft uintptr // Nul-terminated UTF-8 string <id> var zRight uintptr // Nul-terminated UTF-8 string <value>, or NULL var zDb uintptr // The database name - // var pId uintptr at bp+520, 8 + // var pId uintptr at bp+368, 8 // Pointer to <id> token - // var aFcntl [4]uintptr at bp+528, 32 + // var aFcntl [4]uintptr at bp+376, 32 // Argument to SQLITE_FCNTL_PRAGMA var iDb int32 // Database index for <database> var rc int32 // return value form SQLITE_FCNTL_PRAGMA @@ -153489,7 +153489,7 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var pBt1 uintptr var b int32 var iReg int32 - // var x I64 at bp+560, 8 + // var x I64 at bp+408, 8 // This indicates that no database name was specified as part // of the PRAGMA command. In this case the locking-mode must be @@ -153507,24 +153507,24 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var eMode1 int32 // One of the PAGER_JOURNALMODE_XXX symbols var ii2 int32 var pPager1 uintptr - // var iLimit I64 at bp+568, 8 + // var iLimit I64 at bp+416, 8 var aOp1 uintptr var iAddr int32 var eAuto int32 var pBt2 uintptr - // var iLimit1 int32 at bp+576, 4 + // var iLimit1 int32 at bp+424, 4 var addr int32 var size2 int32 - // var size3 int32 at bp+580, 4 + // var size3 int32 at bp+428, 4 var ii3 int32 - // var sz Sqlite3_int64 at bp+584, 8 + // var sz Sqlite3_int64 at bp+432, 8 - // var res int32 at bp+592, 4 + // var res int32 at bp+440, 4 - // var res1 int32 at bp+596, 4 + // var res1 int32 at bp+444, 4 var iLevel int32 var mask U64 @@ -153541,7 +153541,7 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var mx int32 var pIdx uintptr var pTab1 uintptr - // var azOrigin [3]uintptr at bp+600, 24 + // var azOrigin [3]uintptr at bp+448, 24 var iTabDb int32 var pIdx1 uintptr @@ -153568,7 +153568,7 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var pFK1 uintptr // A foreign key constraint var pTab4 uintptr // Child table contain "REFERENCES" keyword var pParent uintptr // Parent table that child points to - // var pIdx2 uintptr at bp+624, 8 + // var pIdx2 uintptr at bp+472, 8 // Index in the parent table var i8 int32 // Loop counter: Foreign key number for pTab var j3 int32 // Loop counter: Field of the foreign key @@ -153579,7 +153579,7 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var regRow int32 // Registers to hold a row from pTab var addrTop int32 // Top of a loop checking foreign keys var addrOk int32 // Jump here if the key is OK - // var aiCols uintptr at bp+632, 8 + // var aiCols uintptr at bp+480, 8 var pTab5 uintptr // Current table var pIdx3 uintptr // An index on pTab @@ -153598,7 +153598,7 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var jmp6 int32 var kk int32 var jmp21 int32 - // var jmp3 int32 at bp+652, 4 + // var jmp3 int32 at bp+500, 4 var jmp4 int32 var jmp5 int32 @@ -153608,9 +153608,9 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var pPk1 uintptr var pPrior uintptr var loopTop int32 - // var iDataCur int32 at bp+644, 4 + // var iDataCur int32 at bp+492, 4 - // var iIdxCur int32 at bp+648, 4 + // var iIdxCur int32 at bp+496, 4 var r1 int32 var x2 uintptr // For looping over tables in the schema @@ -153622,7 +153622,7 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var i9 int32 var j4 int32 var addr1 int32 - // var mxErr int32 at bp+640, 4 + // var mxErr int32 at bp+488, 4 var pObjTab uintptr // Check only this one table, if not NULL @@ -153646,14 +153646,14 @@ func Xsqlite3Pragma(tls *libc.TLS, pParse uintptr, pId1 uintptr, pId2 uintptr, p var szThreshold LogEst // Size threshold above which reanalysis is needd var zSubSql uintptr // SQL statement for the OP_SqlExec opcode var opMask U32 - // var N Sqlite3_int64 at bp+656, 8 + // var N Sqlite3_int64 at bp+504, 8 var iPrior Sqlite3_int64 - // var N1 Sqlite3_int64 at bp+664, 8 + // var N1 Sqlite3_int64 at bp+512, 8 - // var N2 Sqlite3_int64 at bp+672, 8 + // var N2 Sqlite3_int64 at bp+520, 8 - // var N3 Sqlite3_int64 at bp+680, 8 + // var N3 Sqlite3_int64 at bp+528, 8 zLeft = uintptr(0) zRight = uintptr(0) zDb = uintptr(0) @@ -153671,7 +153671,7 @@ __1: // Interpret the [schema.] part of the pragma statement. iDb is the // index of the database this pragma is being applied to in db.aDb[]. - iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+520 /* &pId */) + iDb = Xsqlite3TwoPartName(tls, pParse, pId1, pId2, bp+368 /* &pId */) if !(iDb < 0) { goto __2 } @@ -153689,7 +153689,7 @@ __2: __3: ; - zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 520 /* pId */))) + zLeft = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 368 /* pId */))) if !(!(zLeft != 0)) { goto __4 } @@ -153732,30 +153732,30 @@ __7: // second element of the array is the name of the pragma and the third // element is the argument to the pragma or NULL if the pragma has no // argument. - *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */ + 1*8)) = zLeft - *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */ + 2*8)) = zRight - *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */ + 3*8)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */ + 1*8)) = zLeft + *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */ + 2*8)) = zRight + *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */ + 3*8)) = uintptr(0) (*Sqlite3)(unsafe.Pointer(db)).FbusyHandler.FnBusy = 0 - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+528 /* aFcntl */) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_PRAGMA, bp+376 /* aFcntl */) if !(rc == SQLITE_OK) { goto __8 } Xsqlite3VdbeSetNumCols(tls, v, 1) - Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */)), libc.UintptrFromInt32(-1)) - returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */))) + Xsqlite3VdbeSetColName(tls, v, 0, COLNAME_NAME, *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */)), libc.UintptrFromInt32(-1)) + returnSingleText(tls, v, *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */))) goto pragma_out __8: ; if !(rc != SQLITE_NOTFOUND) { goto __9 } - if !(*(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */)) != 0) { goto __10 } - Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 528 /* &aFcntl[0] */))) + Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 376 /* &aFcntl[0] */))) __10: ; (*Parse)(unsafe.Pointer(pParse)).FnErr++ @@ -154389,7 +154389,7 @@ __66: // // Return the number of pages in the specified database. __19: - *(*I64)(unsafe.Pointer(bp + 560 /* x */)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 408 /* x */)) = int64(0) Xsqlite3CodeVerifySchema(tls, pParse, iDb) iReg = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) if !((int32(Xsqlite3UpperToLower[uint8(*(*int8)(unsafe.Pointer(zLeft)))])) == 'p') { @@ -154398,29 +154398,29 @@ __19: Xsqlite3VdbeAddOp2(tls, v, OP_Pagecount, iDb, iReg) goto __71 __70: - if !((zRight != 0) && (Xsqlite3DecOrHexToI64(tls, zRight, bp+560 /* &x */) == 0)) { + if !((zRight != 0) && (Xsqlite3DecOrHexToI64(tls, zRight, bp+408 /* &x */) == 0)) { goto __72 } - if !(*(*I64)(unsafe.Pointer(bp + 560 /* x */)) < int64(0)) { + if !(*(*I64)(unsafe.Pointer(bp + 408 /* x */)) < int64(0)) { goto __74 } - *(*I64)(unsafe.Pointer(bp + 560 /* x */)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 408 /* x */)) = int64(0) goto __75 __74: - if !(*(*I64)(unsafe.Pointer(bp + 560 /* x */)) > int64(0xfffffffe)) { + if !(*(*I64)(unsafe.Pointer(bp + 408 /* x */)) > int64(0xfffffffe)) { goto __76 } - *(*I64)(unsafe.Pointer(bp + 560 /* x */)) = int64(0xfffffffe) + *(*I64)(unsafe.Pointer(bp + 408 /* x */)) = int64(0xfffffffe) __76: ; __75: ; goto __73 __72: - *(*I64)(unsafe.Pointer(bp + 560 /* x */)) = int64(0) + *(*I64)(unsafe.Pointer(bp + 408 /* x */)) = int64(0) __73: ; - Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 560 /* x */)))) + Xsqlite3VdbeAddOp3(tls, v, OP_MaxPgcnt, iDb, iReg, int32(*(*I64)(unsafe.Pointer(bp + 408 /* x */)))) __71: ; Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, iReg, 1) @@ -154562,21 +154562,21 @@ __95: // Get or set the size limit on rollback journal files. __22: pPager1 = Xsqlite3BtreePager(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) - *(*I64)(unsafe.Pointer(bp + 568 /* iLimit */)) = int64(-2) + *(*I64)(unsafe.Pointer(bp + 416 /* iLimit */)) = int64(-2) if !(zRight != 0) { goto __97 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+568 /* &iLimit */) - if !(*(*I64)(unsafe.Pointer(bp + 568 /* iLimit */)) < int64(-1)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+416 /* &iLimit */) + if !(*(*I64)(unsafe.Pointer(bp + 416 /* iLimit */)) < int64(-1)) { goto __98 } - *(*I64)(unsafe.Pointer(bp + 568 /* iLimit */)) = int64(-1) + *(*I64)(unsafe.Pointer(bp + 416 /* iLimit */)) = int64(-1) __98: ; __97: ; - *(*I64)(unsafe.Pointer(bp + 568 /* iLimit */)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 568 /* iLimit */))) - returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 568 /* iLimit */))) + *(*I64)(unsafe.Pointer(bp + 416 /* iLimit */)) = Xsqlite3PagerJournalSizeLimit(tls, pPager1, *(*I64)(unsafe.Pointer(bp + 416 /* iLimit */))) + returnSingleInt(tls, v, *(*I64)(unsafe.Pointer(bp + 416 /* iLimit */))) goto __15 // PRAGMA [schema.]auto_vacuum @@ -154629,14 +154629,14 @@ __100: // // Do N steps of incremental vacuuming on a database. __24: - if !(((zRight == uintptr(0)) || !(Xsqlite3GetInt32(tls, zRight, bp+576 /* &iLimit1 */) != 0)) || (*(*int32)(unsafe.Pointer(bp + 576 /* iLimit1 */)) <= 0)) { + if !(((zRight == uintptr(0)) || !(Xsqlite3GetInt32(tls, zRight, bp+424 /* &iLimit1 */) != 0)) || (*(*int32)(unsafe.Pointer(bp + 424 /* iLimit1 */)) <= 0)) { goto __103 } - *(*int32)(unsafe.Pointer(bp + 576 /* iLimit1 */)) = 0x7fffffff + *(*int32)(unsafe.Pointer(bp + 424 /* iLimit1 */)) = 0x7fffffff __103: ; Xsqlite3BeginWriteOperation(tls, pParse, 0, iDb) - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 576 /* iLimit1 */)), 1) + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, *(*int32)(unsafe.Pointer(bp + 424 /* iLimit1 */)), 1) addr = Xsqlite3VdbeAddOp1(tls, v, OP_IncrVacuum, iDb) Xsqlite3VdbeAddOp1(tls, v, OP_ResultRow, 1) Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 1, -1) @@ -154702,14 +154702,14 @@ __26: }()) goto __107 __106: - *(*int32)(unsafe.Pointer(bp + 580 /* size3 */)) = 1 - if !(Xsqlite3GetInt32(tls, zRight, bp+580 /* &size3 */) != 0) { + *(*int32)(unsafe.Pointer(bp + 428 /* size3 */)) = 1 + if !(Xsqlite3GetInt32(tls, zRight, bp+428 /* &size3 */) != 0) { goto __108 } - Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 580 /* size3 */))) + Xsqlite3BtreeSetSpillSize(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, *(*int32)(unsafe.Pointer(bp + 428 /* size3 */))) __108: ; - if !(Xsqlite3GetBoolean(tls, zRight, (uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 580 /* size3 */)) != 0)))) != 0) { + if !(Xsqlite3GetBoolean(tls, zRight, (uint8(libc.Bool32(*(*int32)(unsafe.Pointer(bp + 428 /* size3 */)) != 0)))) != 0) { goto __109 } *(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) |= (uint64(SQLITE_CacheSpill)) @@ -154740,17 +154740,17 @@ __27: if !(zRight != 0) { goto __111 } - Xsqlite3DecOrHexToI64(tls, zRight, bp+584 /* &sz */) - if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* sz */)) < int64(0)) { + Xsqlite3DecOrHexToI64(tls, zRight, bp+432 /* &sz */) + if !(*(*Sqlite3_int64)(unsafe.Pointer(bp + 432 /* sz */)) < int64(0)) { goto __112 } - *(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* sz */)) = Xsqlite3Config.FszMmap + *(*Sqlite3_int64)(unsafe.Pointer(bp + 432 /* sz */)) = Xsqlite3Config.FszMmap __112: ; if !((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)) { goto __113 } - (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* sz */)) + (*Sqlite3)(unsafe.Pointer(db)).FszMmap = *(*Sqlite3_int64)(unsafe.Pointer(bp + 432 /* sz */)) __113: ; ii3 = ((*Sqlite3)(unsafe.Pointer(db)).FnDb - 1) @@ -154761,7 +154761,7 @@ __114: if !(((*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt != 0) && ((ii3 == iDb) || ((*Token)(unsafe.Pointer(pId2)).Fn == uint32(0)))) { goto __117 } - Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* sz */))) + Xsqlite3BtreeSetMmapLimit(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(ii3)*32)).FpBt, *(*Sqlite3_int64)(unsafe.Pointer(bp + 432 /* sz */))) __117: ; goto __115 @@ -154773,12 +154773,12 @@ __116: ; __111: ; - *(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* sz */)) = int64(-1) - rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+584 /* &sz */) + *(*Sqlite3_int64)(unsafe.Pointer(bp + 432 /* sz */)) = int64(-1) + rc = Xsqlite3_file_control(tls, db, zDb, SQLITE_FCNTL_MMAP_SIZE, bp+432 /* &sz */) if !(rc == SQLITE_OK) { goto __118 } - returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 584 /* sz */))) + returnSingleInt(tls, v, *(*Sqlite3_int64)(unsafe.Pointer(bp + 432 /* sz */))) goto __119 __118: if !(rc != SQLITE_NOTFOUND) { @@ -154831,8 +154831,8 @@ __123: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __125 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+592 /* &res */) - if !((rc != SQLITE_OK) || (*(*int32)(unsafe.Pointer(bp + 592 /* res */)) == 0)) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+440 /* &res */) + if !((rc != SQLITE_OK) || (*(*int32)(unsafe.Pointer(bp + 440 /* res */)) == 0)) { goto __126 } Xsqlite3ErrorMsg(tls, pParse, ts+17421 /* "not a writable d..." */, 0) @@ -154853,7 +154853,7 @@ __127: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __128 } - Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+32, zRight)) + Xsqlite3_temp_directory = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+16, zRight)) goto __129 __128: Xsqlite3_temp_directory = uintptr(0) @@ -154884,8 +154884,8 @@ __130: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __132 } - rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+596 /* &res1 */) - if !((rc != SQLITE_OK) || (*(*int32)(unsafe.Pointer(bp + 596 /* res1 */)) == 0)) { + rc = Xsqlite3OsAccess(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, zRight, SQLITE_ACCESS_READWRITE, bp+444 /* &res1 */) + if !((rc != SQLITE_OK) || (*(*int32)(unsafe.Pointer(bp + 444 /* res1 */)) == 0)) { goto __133 } Xsqlite3ErrorMsg(tls, pParse, ts+17421 /* "not a writable d..." */, 0) @@ -154898,7 +154898,7 @@ __132: if !(*(*int8)(unsafe.Pointer(zRight)) != 0) { goto __134 } - Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+48, zRight)) + Xsqlite3_data_directory = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+24, zRight)) goto __135 __134: Xsqlite3_data_directory = uintptr(0) @@ -155089,7 +155089,7 @@ __160: } return ts + 17507 /* "issisi" */ }(), - libc.VaList(bp+64, (i-nHidden), + libc.VaList(bp+32, (i-nHidden), (*Column)(unsafe.Pointer(pCol)).FzName, Xsqlite3ColumnType(tls, pCol, ts+755 /* "" */), func() int32 { @@ -155166,7 +155166,7 @@ __172: goto __174 } cnum = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(i1)*2)) - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17514 /* "iisX" */, libc.VaList(bp+128, i1, int32(cnum), + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17514 /* "iisX" */, libc.VaList(bp+88, i1, int32(cnum), func() uintptr { if int32(cnum) < 0 { return uintptr(0) @@ -155177,7 +155177,7 @@ __172: goto __175 } Xsqlite3VdbeMultiLoad(tls, v, 4, ts+17519, /* "isiX" */ - libc.VaList(bp+160, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), + libc.VaList(bp+112, int32(*(*U8)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaSortOrder + uintptr(i1)))), *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(i1)*8)), (libc.Bool32(i1 < int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol))))) __175: @@ -155213,12 +155213,12 @@ __178: if !(pIdx1 != 0) { goto __180 } - *(*[3]uintptr)(unsafe.Pointer(bp + 600 /* azOrigin */)) = [3]uintptr{ts + 17524 /* "c" */, ts + 17526 /* "u" */, ts + 16035 /* "pk" */} + *(*[3]uintptr)(unsafe.Pointer(bp + 448 /* azOrigin */)) = [3]uintptr{ts + 17524 /* "c" */, ts + 17526 /* "u" */, ts + 16035 /* "pk" */} Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17528, /* "isisi" */ - libc.VaList(bp+192, i2, + libc.VaList(bp+136, i2, (*Index)(unsafe.Pointer(pIdx1)).FzName, (libc.Bool32(int32((*Index)(unsafe.Pointer((pIdx1))).FonError) != OE_None)), - *(*uintptr)(unsafe.Pointer(bp + 600 /* &azOrigin[0] */ + uintptr((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100 /* &.idxType */))&0x3>>0))))*8)), + *(*uintptr)(unsafe.Pointer(bp + 448 /* &azOrigin[0] */ + uintptr((uint32(int32(*(*uint16)(unsafe.Pointer(pIdx1 + 100 /* &.idxType */))&0x3>>0))))*8)), (libc.Bool32((*Index)(unsafe.Pointer(pIdx1)).FpPartIdxWhere != uintptr(0))))) goto __179 __179: @@ -155249,7 +155249,7 @@ __184: ; Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17534, /* "iss" */ - libc.VaList(bp+240, i3, + libc.VaList(bp+176, i3, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FzDbSName, Xsqlite3BtreeGetFilename(tls, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i3)*32)).FpBt))) goto __182 @@ -155271,7 +155271,7 @@ __185: goto __187 } pColl = (*HashElem)(unsafe.Pointer(p)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17538 /* "is" */, libc.VaList(bp+272, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17538 /* "is" */, libc.VaList(bp+200, libc.PostIncInt32(&i4, 1), (*CollSeq)(unsafe.Pointer(pColl)).FzName)) goto __186 __186: p = (*HashElem)(unsafe.Pointer(p)).Fnext @@ -155335,7 +155335,7 @@ __197: goto __199 } pMod = (*HashElem)(unsafe.Pointer(j1)).Fdata - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17382 /* "s" */, libc.VaList(bp+296, (*Module)(unsafe.Pointer(pMod)).FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17382 /* "s" */, libc.VaList(bp+216, (*Module)(unsafe.Pointer(pMod)).FzName)) goto __198 __198: j1 = (*HashElem)(unsafe.Pointer(j1)).Fnext @@ -155352,7 +155352,7 @@ __200: if !(i6 < (int32(uint64(unsafe.Sizeof(aPragmaName)) / uint64(unsafe.Sizeof(PragmaName{}))))) { goto __202 } - Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17382 /* "s" */, libc.VaList(bp+312, aPragmaName[i6].FzName)) + Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17382 /* "s" */, libc.VaList(bp+224, aPragmaName[i6].FzName)) goto __201 __201: i6++ @@ -155389,7 +155389,7 @@ __208: goto __210 } Xsqlite3VdbeMultiLoad(tls, v, 1, ts+17541, /* "iissssss" */ - libc.VaList(bp+328, i7, + libc.VaList(bp+232, i7, j2, (*FKey)(unsafe.Pointer(pFK)).FzTo, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab3)).FaCol+uintptr((*sColMap)(unsafe.Pointer((pFK+64 /* &.aCol */)+uintptr(j2)*16)).FiFrom)*32)).FzName, @@ -155470,20 +155470,20 @@ __217: goto __218 __220: ; - *(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */)) = uintptr(0) Xsqlite3TableLock(tls, pParse, iDb, (*Table)(unsafe.Pointer(pParent)).Ftnum, uint8(0), (*Table)(unsafe.Pointer(pParent)).FzName) - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+624 /* &pIdx2 */, uintptr(0)) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+472 /* &pIdx2 */, uintptr(0)) if !(x1 == 0) { goto __221 } - if !(*(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */)) == uintptr(0)) { + if !(*(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */)) == uintptr(0)) { goto __223 } Xsqlite3OpenTable(tls, pParse, i8, iDb, pParent, OP_OpenRead) goto __224 __223: - Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */)))).Ftnum), iDb) - Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */))) + Xsqlite3VdbeAddOp3(tls, v, OP_OpenRead, i8, int32((*Index)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */)))).Ftnum), iDb) + Xsqlite3VdbeSetP4KeyInfo(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */))) __224: ; goto __222 @@ -155521,12 +155521,12 @@ __227: goto __229 } pParent = Xsqlite3FindTable(tls, db, (*FKey)(unsafe.Pointer(pFK1)).FzTo, zDb) - *(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 632 /* aiCols */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 480 /* aiCols */)) = uintptr(0) if !(pParent != 0) { goto __230 } - x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+624 /* &pIdx2 */, bp+632 /* &aiCols */) + x1 = Xsqlite3FkLocateIndex(tls, pParse, pParent, pFK1, bp+472 /* &pIdx2 */, bp+480 /* &aiCols */) __230: ; @@ -155541,8 +155541,8 @@ __231: if !(j3 < (*FKey)(unsafe.Pointer(pFK1)).FnCol) { goto __233 } - if *(*uintptr)(unsafe.Pointer(bp + 632 /* aiCols */)) != 0 { - iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 632 /* aiCols */)) + uintptr(j3)*4)) + if *(*uintptr)(unsafe.Pointer(bp + 480 /* aiCols */)) != 0 { + iCol = *(*int32)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 480 /* aiCols */)) + uintptr(j3)*4)) } else { iCol = (*sColMap)(unsafe.Pointer((pFK1 + 64 /* &.aCol */) + uintptr(j3)*16)).FiFrom } @@ -155558,11 +155558,11 @@ __233: // Generate code to query the parent index for a matching parent // key. If a match is found, jump to addrOk. - if !(*(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */)) != 0) { + if !(*(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */)) != 0) { goto __234 } Xsqlite3VdbeAddOp4(tls, v, OP_MakeRecord, regRow, (*FKey)(unsafe.Pointer(pFK1)).FnCol, regKey, - Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 624 /* pIdx2 */))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) + Xsqlite3IndexAffinityStr(tls, db, *(*uintptr)(unsafe.Pointer(bp + 472 /* pIdx2 */))), (*FKey)(unsafe.Pointer(pFK1)).FnCol) Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, i8, addrOk, regKey, 0) goto __235 @@ -155589,10 +155589,10 @@ __237: Xsqlite3VdbeAddOp2(tls, v, OP_Null, 0, (regResult + 1)) __238: ; - Xsqlite3VdbeMultiLoad(tls, v, (regResult + 2), ts+17555 /* "siX" */, libc.VaList(bp+400, (*FKey)(unsafe.Pointer(pFK1)).FzTo, (i8-1))) + Xsqlite3VdbeMultiLoad(tls, v, (regResult + 2), ts+17555 /* "siX" */, libc.VaList(bp+296, (*FKey)(unsafe.Pointer(pFK1)).FzTo, (i8-1))) Xsqlite3VdbeAddOp2(tls, v, OP_ResultRow, regResult, 4) Xsqlite3VdbeResolveLabel(tls, v, addrOk) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 632 /* aiCols */))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 480 /* aiCols */))) goto __228 __228: i8++ @@ -155670,17 +155670,17 @@ __240: (*Parse)(unsafe.Pointer(pParse)).FnMem = 6 // Set the maximum error count - *(*int32)(unsafe.Pointer(bp + 640 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 488 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX if !(zRight != 0) { goto __241 } - if !(Xsqlite3GetInt32(tls, zRight, bp+640 /* &mxErr */) != 0) { + if !(Xsqlite3GetInt32(tls, zRight, bp+488 /* &mxErr */) != 0) { goto __242 } - if !(*(*int32)(unsafe.Pointer(bp + 640 /* mxErr */)) <= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 488 /* mxErr */)) <= 0) { goto __244 } - *(*int32)(unsafe.Pointer(bp + 640 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX + *(*int32)(unsafe.Pointer(bp + 488 /* mxErr */)) = SQLITE_INTEGRITY_CHECK_ERROR_MAX __244: ; goto __243 @@ -155696,7 +155696,7 @@ __243: ; __241: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Integer, (*(*int32)(unsafe.Pointer(bp + 640 /* mxErr */)) - 1), 1) // reg[1] holds errors left + Xsqlite3VdbeAddOp2(tls, v, OP_Integer, (*(*int32)(unsafe.Pointer(bp + 488 /* mxErr */)) - 1), 1) // reg[1] holds errors left // Do an integrity check on each database file i9 = 0 @@ -155855,7 +155855,7 @@ __265: Xsqlite3VdbeChangeP5(tls, v, uint16(U8(i9))) addr1 = Xsqlite3VdbeAddOp1(tls, v, OP_IsNull, 2) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, - Xsqlite3MPrintf(tls, db, ts+17559 /* "*** in database ..." */, libc.VaList(bp+424, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), + Xsqlite3MPrintf(tls, db, ts+17559 /* "*** in database ..." */, libc.VaList(bp+312, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(i9)*32)).FzDbSName)), -7) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 2, 3, 3) integrityCheckResultRow(tls, v) @@ -155889,7 +155889,7 @@ __275: pPk1 = Xsqlite3PrimaryKeyIndex(tls, pTab7) } Xsqlite3OpenTableAndIndices(tls, pParse, pTab7, OP_OpenRead, uint8(0), - 1, uintptr(0), bp+644 /* &iDataCur */, bp+648 /* &iIdxCur */) + 1, uintptr(0), bp+492 /* &iDataCur */, bp+496 /* &iIdxCur */) // reg[7] counts the number of entries in the table. // reg[8+i] counts the number of entries in the i-th index Xsqlite3VdbeAddOp2(tls, v, OP_Integer, 0, 7) @@ -155909,13 +155909,13 @@ __277: __278: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 644 /* iDataCur */)), 0) + Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, *(*int32)(unsafe.Pointer(bp + 492 /* iDataCur */)), 0) loopTop = Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, 7, 1) if !(!(isQuick != 0)) { goto __279 } // Sanity check on record header decoding - Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 644 /* iDataCur */)), (int32((*Table)(unsafe.Pointer(pTab7)).FnNVCol) - 1), 3) + Xsqlite3VdbeAddOp3(tls, v, OP_Column, *(*int32)(unsafe.Pointer(bp + 492 /* iDataCur */)), (int32((*Table)(unsafe.Pointer(pTab7)).FnNVCol) - 1), 3) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_TYPEOFARG)) __279: ; @@ -155937,7 +155937,7 @@ __283: goto __281 __284: ; - Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab7, *(*int32)(unsafe.Pointer(bp + 644 /* iDataCur */)), j4, 3) + Xsqlite3ExprCodeGetColumnOfTable(tls, v, pTab7, *(*int32)(unsafe.Pointer(bp + 492 /* iDataCur */)), j4, 3) if !(int32((*VdbeOp)(unsafe.Pointer(Xsqlite3VdbeGetOp(tls, v, -1))).Fopcode) == OP_Column) { goto __285 } @@ -155945,7 +155945,7 @@ __284: __285: ; jmp2 = Xsqlite3VdbeAddOp1(tls, v, OP_NotNull, 3) - zErr = Xsqlite3MPrintf(tls, db, ts+17583 /* "NULL value in %s..." */, libc.VaList(bp+440, (*Table)(unsafe.Pointer(pTab7)).FzName, + zErr = Xsqlite3MPrintf(tls, db, ts+17583 /* "NULL value in %s..." */, libc.VaList(bp+320, (*Table)(unsafe.Pointer(pTab7)).FzName, (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab7)).FaCol+uintptr(j4)*32)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr, -7) integrityCheckResultRow(tls, v) @@ -155967,7 +155967,7 @@ __282: } addrCkFault = Xsqlite3VdbeMakeLabel(tls, pParse) addrCkOk = Xsqlite3VdbeMakeLabel(tls, pParse) - (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = (*(*int32)(unsafe.Pointer(bp + 644 /* iDataCur */)) + 1) + (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = (*(*int32)(unsafe.Pointer(bp + 492 /* iDataCur */)) + 1) k2 = ((*ExprList)(unsafe.Pointer(pCheck)).FnExpr - 1) __288: if !(k2 > 0) { @@ -155986,7 +155986,7 @@ __290: Xsqlite3VdbeResolveLabel(tls, v, addrCkFault) (*Parse)(unsafe.Pointer(pParse)).FiSelfTab = 0 zErr1 = Xsqlite3MPrintf(tls, db, ts+17603, /* "CHECK constraint..." */ - libc.VaList(bp+464, (*Table)(unsafe.Pointer(pTab7)).FzName)) + libc.VaList(bp+336, (*Table)(unsafe.Pointer(pTab7)).FzName)) Xsqlite3VdbeAddOp4(tls, v, OP_String8, 0, 3, 0, zErr1, -7) integrityCheckResultRow(tls, v) Xsqlite3VdbeResolveLabel(tls, v, addrCkOk) @@ -156012,12 +156012,12 @@ __292: goto __293 __295: ; - r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 644 /* iDataCur */)), 0, 0, bp+652, /* &jmp3 */ + r1 = Xsqlite3GenerateIndexKey(tls, pParse, pIdx5, *(*int32)(unsafe.Pointer(bp + 492 /* iDataCur */)), 0, 0, bp+500, /* &jmp3 */ pPrior, r1) pPrior = pIdx5 Xsqlite3VdbeAddOp2(tls, v, OP_AddImm, (8 + j4), 1) // increment entry count // Verify that an index entry exists for the current table row - jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*(*int32)(unsafe.Pointer(bp + 648 /* iIdxCur */)) + j4), ckUniq, r1, + jmp21 = Xsqlite3VdbeAddOp4Int(tls, v, OP_Found, (*(*int32)(unsafe.Pointer(bp + 496 /* iIdxCur */)) + j4), ckUniq, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnColumn)) Xsqlite3VdbeLoadString(tls, v, 3, ts+17633 /* "row " */) Xsqlite3VdbeAddOp3(tls, v, OP_Concat, 7, 3, 3) @@ -156056,10 +156056,10 @@ __298: goto __299 __299: ; - jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, (*(*int32)(unsafe.Pointer(bp + 648 /* iIdxCur */)) + j4)) + jmp6 = Xsqlite3VdbeAddOp1(tls, v, OP_Next, (*(*int32)(unsafe.Pointer(bp + 496 /* iIdxCur */)) + j4)) Xsqlite3VdbeGoto(tls, v, uniqOk) Xsqlite3VdbeJumpHere(tls, v, jmp6) - Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, (*(*int32)(unsafe.Pointer(bp + 648 /* iIdxCur */)) + j4), uniqOk, r1, + Xsqlite3VdbeAddOp4Int(tls, v, OP_IdxGT, (*(*int32)(unsafe.Pointer(bp + 496 /* iIdxCur */)) + j4), uniqOk, r1, int32((*Index)(unsafe.Pointer(pIdx5)).FnKeyCol)) Xsqlite3VdbeLoadString(tls, v, 3, ts+17659 /* "non-unique entry..." */) Xsqlite3VdbeGoto(tls, v, jmp5) @@ -156067,7 +156067,7 @@ __299: __296: ; Xsqlite3VdbeJumpHere(tls, v, jmp4) - Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 652 /* jmp3 */))) + Xsqlite3ResolvePartIdxLabel(tls, pParse, *(*int32)(unsafe.Pointer(bp + 500 /* jmp3 */))) goto __293 __293: pIdx5 = (*Index)(unsafe.Pointer(pIdx5)).FpNext @@ -156078,7 +156078,7 @@ __294: ; __291: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 644 /* iDataCur */)), loopTop) + Xsqlite3VdbeAddOp2(tls, v, OP_Next, *(*int32)(unsafe.Pointer(bp + 492 /* iDataCur */)), loopTop) Xsqlite3VdbeJumpHere(tls, v, (loopTop - 1)) if !(!(isQuick != 0)) { goto __301 @@ -156096,7 +156096,7 @@ __302: goto __303 __305: ; - Xsqlite3VdbeAddOp2(tls, v, OP_Count, (*(*int32)(unsafe.Pointer(bp + 648 /* iIdxCur */)) + j4), 3) + Xsqlite3VdbeAddOp2(tls, v, OP_Count, (*(*int32)(unsafe.Pointer(bp + 496 /* iIdxCur */)) + j4), 3) addr1 = Xsqlite3VdbeAddOp3(tls, v, OP_Eq, (8 + j4), 0, 3) Xsqlite3VdbeChangeP5(tls, v, uint16(SQLITE_NOTNULL)) Xsqlite3VdbeLoadString(tls, v, 4, (*Index)(unsafe.Pointer(pIdx5)).FzName) @@ -156132,7 +156132,7 @@ __247: if !(aOp2 != 0) { goto __306 } - (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = (1 - *(*int32)(unsafe.Pointer(bp + 640 /* mxErr */))) + (*VdbeOp)(unsafe.Pointer(aOp2)).Fp2 = (1 - *(*int32)(unsafe.Pointer(bp + 488 /* mxErr */))) (*VdbeOp)(unsafe.Pointer(aOp2 + 2*24)).Fp4type = int8(-1) *(*uintptr)(unsafe.Pointer(aOp2 + 2*24 + 16 /* &.p4 */)) = ts + 17715 /* "ok" */ (*VdbeOp)(unsafe.Pointer(aOp2 + 5*24)).Fp4type = int8(-1) @@ -156212,7 +156212,7 @@ __313: if !(!(int32((*EncName)(unsafe.Pointer(pEnc)).FzName) != 0)) { goto __315 } - Xsqlite3ErrorMsg(tls, pParse, ts+17718 /* "unsupported enco..." */, libc.VaList(bp+480, zRight)) + Xsqlite3ErrorMsg(tls, pParse, ts+17718 /* "unsupported enco..." */, libc.VaList(bp+344, zRight)) __315: ; __310: @@ -156524,7 +156524,7 @@ __342: __344: ; zSubSql = Xsqlite3MPrintf(tls, db, ts+17751, /* "ANALYZE \"%w\".\"%w..." */ - libc.VaList(bp+496, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab8)).FzName)) + libc.VaList(bp+352, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab8)).FzName)) if !((opMask & U32(0x01)) != 0) { goto __345 } @@ -156582,10 +156582,10 @@ __347: // returns the same integer that would be returned by the // sqlite3_soft_heap_limit64(-1) C-language function. __53: - if !((zRight != 0) && (Xsqlite3DecOrHexToI64(tls, zRight, bp+656 /* &N */) == SQLITE_OK)) { + if !((zRight != 0) && (Xsqlite3DecOrHexToI64(tls, zRight, bp+504 /* &N */) == SQLITE_OK)) { goto __348 } - Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 656 /* N */))) + Xsqlite3_soft_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 504 /* N */))) __348: ; returnSingleInt(tls, v, Xsqlite3_soft_heap_limit64(tls, int64(-1))) @@ -156601,14 +156601,14 @@ __348: // the hard heap limit. This allows an application to set a heap limit // constraint that cannot be relaxed by an untrusted SQL script. __54: - if !((zRight != 0) && (Xsqlite3DecOrHexToI64(tls, zRight, bp+664 /* &N1 */) == SQLITE_OK)) { + if !((zRight != 0) && (Xsqlite3DecOrHexToI64(tls, zRight, bp+512 /* &N1 */) == SQLITE_OK)) { goto __349 } iPrior = Xsqlite3_hard_heap_limit64(tls, int64(-1)) - if !((*(*Sqlite3_int64)(unsafe.Pointer(bp + 664 /* N1 */)) > int64(0)) && ((iPrior == int64(0)) || (iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 664 /* N1 */))))) { + if !((*(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* N1 */)) > int64(0)) && ((iPrior == int64(0)) || (iPrior > *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* N1 */))))) { goto __350 } - Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 664 /* N1 */))) + Xsqlite3_hard_heap_limit64(tls, *(*Sqlite3_int64)(unsafe.Pointer(bp + 512 /* N1 */))) __350: ; __349: @@ -156623,11 +156623,11 @@ __349: // maximum, which might be less than requested. __55: if !(((zRight != 0) && - (Xsqlite3DecOrHexToI64(tls, zRight, bp+672 /* &N2 */) == SQLITE_OK)) && - (*(*Sqlite3_int64)(unsafe.Pointer(bp + 672 /* N2 */)) >= int64(0))) { + (Xsqlite3DecOrHexToI64(tls, zRight, bp+520 /* &N2 */) == SQLITE_OK)) && + (*(*Sqlite3_int64)(unsafe.Pointer(bp + 520 /* N2 */)) >= int64(0))) { goto __351 } - Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, (int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 672 /* N2 */)) & int64(0x7fffffff)))) + Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, (int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 520 /* N2 */)) & int64(0x7fffffff)))) __351: ; returnSingleInt(tls, v, int64(Xsqlite3_limit(tls, db, SQLITE_LIMIT_WORKER_THREADS, -1))) @@ -156640,11 +156640,11 @@ __351: // in each index that it looks at. Return the new limit. __56: if !(((zRight != 0) && - (Xsqlite3DecOrHexToI64(tls, zRight, bp+680 /* &N3 */) == SQLITE_OK)) && - (*(*Sqlite3_int64)(unsafe.Pointer(bp + 680 /* N3 */)) >= int64(0))) { + (Xsqlite3DecOrHexToI64(tls, zRight, bp+528 /* &N3 */) == SQLITE_OK)) && + (*(*Sqlite3_int64)(unsafe.Pointer(bp + 528 /* N3 */)) >= int64(0))) { goto __352 } - (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = (int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 680 /* N3 */)) & int64(0x7fffffff))) + (*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit = (int32(*(*Sqlite3_int64)(unsafe.Pointer(bp + 528 /* N3 */)) & int64(0x7fffffff))) __352: ; returnSingleInt(tls, v, int64((*Sqlite3)(unsafe.Pointer(db)).FnAnalysisLimit)) @@ -156755,8 +156755,8 @@ type PragmaVtabCursor = PragmaVtabCursor1 /* sqlite3.c:130741:33 */ // Pragma virtual table module xConnect method. func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr) int32 { /* sqlite3.c:130759:12: */ - bp := tls.Alloc(288) - defer tls.Free(288) + bp := tls.Alloc(264) + defer tls.Free(264) var pPragma uintptr = pAux var pTab uintptr = uintptr(0) @@ -156764,14 +156764,14 @@ func pragmaVtabConnect(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv var i int32 var j int32 var cSep int8 = int8('(') - // var acc StrAccum at bp+56, 32 + // var acc StrAccum at bp+32, 32 - // var zBuf [200]int8 at bp+88, 200 + // var zBuf [200]int8 at bp+64, 200 _ = argc _ = argv - Xsqlite3StrAccumInit(tls, bp+56 /* &acc */, uintptr(0), bp+88 /* &zBuf[0] */, int32(unsafe.Sizeof([200]int8{})), 0) - Xsqlite3_str_appendall(tls, bp+56 /* &acc */, ts+17827 /* "CREATE TABLE x" */) + Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), bp+64 /* &zBuf[0] */, int32(unsafe.Sizeof([200]int8{})), 0) + Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17827 /* "CREATE TABLE x" */) i = 0 j = int32((*PragmaName)(unsafe.Pointer(pPragma)).FiPragCName) __1: @@ -156779,7 +156779,7 @@ __1: goto __3 } { - Xsqlite3_str_appendf(tls, bp+56 /* &acc */, ts+17842 /* "%c\"%s\"" */, libc.VaList(bp, int32(cSep), pragCName[j])) + Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17842 /* "%c\"%s\"" */, libc.VaList(bp, int32(cSep), pragCName[j])) cSep = int8(',') } @@ -156792,22 +156792,22 @@ __2: __3: ; if i == 0 { - Xsqlite3_str_appendf(tls, bp+56 /* &acc */, ts+17849 /* "(\"%s\"" */, libc.VaList(bp+24, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) + Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17849 /* "(\"%s\"" */, libc.VaList(bp+16, (*PragmaName)(unsafe.Pointer(pPragma)).FzName)) i++ } j = 0 if (int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg) & PragFlg_Result1) != 0 { - Xsqlite3_str_appendall(tls, bp+56 /* &acc */, ts+17855 /* ",arg HIDDEN" */) + Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17855 /* ",arg HIDDEN" */) j++ } if (int32((*PragmaName)(unsafe.Pointer(pPragma)).FmPragFlg) & (PragFlg_SchemaOpt | PragFlg_SchemaReq)) != 0 { - Xsqlite3_str_appendall(tls, bp+56 /* &acc */, ts+17867 /* ",schema HIDDEN" */) + Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17867 /* ",schema HIDDEN" */) j++ } - Xsqlite3_str_append(tls, bp+56 /* &acc */, ts+5428 /* ")" */, 1) - Xsqlite3StrAccumFinish(tls, bp+56 /* &acc */) + Xsqlite3_str_append(tls, bp+32 /* &acc */, ts+5428 /* ")" */, 1) + Xsqlite3StrAccumFinish(tls, bp+32 /* &acc */) - rc = Xsqlite3_declare_vtab(tls, db, bp+88 /* &zBuf[0] */) + rc = Xsqlite3_declare_vtab(tls, db, bp+64 /* &zBuf[0] */) if rc == SQLITE_OK { pTab = Xsqlite3_malloc(tls, int32(unsafe.Sizeof(PragmaVtab{}))) if pTab == uintptr(0) { @@ -156820,7 +156820,7 @@ __3: (*PragmaVtab)(unsafe.Pointer(pTab)).FnHidden = U8(j) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+40, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) } *(*uintptr)(unsafe.Pointer(ppVtab)) = pTab @@ -156954,15 +156954,15 @@ func pragmaVtabNext(tls *libc.TLS, pVtabCursor uintptr) int32 { /* sqlite3.c:130 // Pragma virtual table module xFilter method. func pragmaVtabFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintptr, argc int32, argv uintptr) int32 { /* sqlite3.c:130919:12: */ - bp := tls.Alloc(96) - defer tls.Free(96) + bp := tls.Alloc(64) + defer tls.Free(64) var pCsr uintptr = pVtabCursor var pTab uintptr = (*Sqlite3_vtab_cursor)(unsafe.Pointer(pVtabCursor)).FpVtab var rc int32 var i int32 var j int32 - // var acc StrAccum at bp+64, 32 + // var acc StrAccum at bp+32, 32 var zSql uintptr @@ -156998,23 +156998,23 @@ __2: goto __3 __3: ; - Xsqlite3StrAccumInit(tls, bp+64 /* &acc */, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 128 /* &.aLimit */) + 1*4))) - Xsqlite3_str_appendall(tls, bp+64 /* &acc */, ts+17882 /* "PRAGMA " */) + Xsqlite3StrAccumInit(tls, bp+32 /* &acc */, uintptr(0), uintptr(0), 0, *(*int32)(unsafe.Pointer(((*PragmaVtab)(unsafe.Pointer(pTab)).Fdb + 128 /* &.aLimit */) + 1*4))) + Xsqlite3_str_appendall(tls, bp+32 /* &acc */, ts+17882 /* "PRAGMA " */) if *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + 1*8)) != 0 { - Xsqlite3_str_appendf(tls, bp+64 /* &acc */, ts+17890 /* "%Q." */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + 1*8)))) + Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17890 /* "%Q." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */) + 1*8)))) } - Xsqlite3_str_appendall(tls, bp+64 /* &acc */, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) + Xsqlite3_str_appendall(tls, bp+32 /* &acc */, (*PragmaName)(unsafe.Pointer((*PragmaVtab)(unsafe.Pointer(pTab)).FpName)).FzName) if *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */))) != 0 { - Xsqlite3_str_appendf(tls, bp+64 /* &acc */, ts+17894 /* "=%Q" */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */))))) + Xsqlite3_str_appendf(tls, bp+32 /* &acc */, ts+17894 /* "=%Q" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer((pCsr + 24 /* &.azArg */))))) } - zSql = Xsqlite3StrAccumFinish(tls, bp+64 /* &acc */) + zSql = Xsqlite3StrAccumFinish(tls, bp+32 /* &acc */) if zSql == uintptr(0) { return SQLITE_NOMEM } rc = Xsqlite3_prepare_v2(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb, zSql, -1, (pCsr + 8 /* &.pPragma */), uintptr(0)) Xsqlite3_free(tls, zSql) if rc != SQLITE_OK { - (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+48, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) + (*PragmaVtab)(unsafe.Pointer(pTab)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, (*PragmaVtab)(unsafe.Pointer(pTab)).Fdb))) return rc } return pragmaVtabNext(tls, pVtabCursor) @@ -157097,8 +157097,8 @@ func Xsqlite3PragmaVtabRegister(tls *libc.TLS, db uintptr, zName uintptr) uintpt // Fill the InitData structure with an error message that indicates // that the database is corrupt. func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) { /* sqlite3.c:131071:13: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(56) + defer tls.Free(56) var db uintptr = (*InitData)(unsafe.Pointer(pData)).Fdb if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { @@ -157126,9 +157126,9 @@ func corruptSchema(tls *libc.TLS, pData uintptr, azObj uintptr, zExtra uintptr) } else { zObj = ts + 5484 /* "?" */ } - z = Xsqlite3MPrintf(tls, db, ts+17945 /* "malformed databa..." */, libc.VaList(bp+40, zObj)) + z = Xsqlite3MPrintf(tls, db, ts+17945 /* "malformed databa..." */, libc.VaList(bp+32, zObj)) if (zExtra != 0) && (*(*int8)(unsafe.Pointer(zExtra)) != 0) { - z = Xsqlite3MPrintf(tls, db, ts+17976 /* "%z - %s" */, libc.VaList(bp+56, z, zExtra)) + z = Xsqlite3MPrintf(tls, db, ts+17976 /* "%z - %s" */, libc.VaList(bp+40, z, zExtra)) } *(*uintptr)(unsafe.Pointer((*InitData)(unsafe.Pointer(pData)).FpzErrMsg)) = z (*InitData)(unsafe.Pointer(pData)).Frc = Xsqlite3CorruptError(tls, 131096) @@ -157262,18 +157262,18 @@ func Xsqlite3InitCallback(tls *libc.TLS, pInit uintptr, argc int32, argv uintptr // auxiliary databases. Return one of the SQLITE_ error codes to // indicate success or failure. func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFlags U32) int32 { /* sqlite3.c:131241:20: */ - bp := tls.Alloc(132) - defer tls.Free(132) + bp := tls.Alloc(124) + defer tls.Free(124) var rc int32 var i int32 var size int32 var pDb uintptr - // var azArg [6]uintptr at bp+24, 48 + // var azArg [6]uintptr at bp+16, 48 - // var meta [5]int32 at bp+112, 20 + // var meta [5]int32 at bp+104, 20 - // var initData InitData at bp+72, 40 + // var initData InitData at bp+64, 40 var zSchemaTabName uintptr var openedTransaction int32 @@ -157291,30 +157291,30 @@ func Xsqlite3InitOne(tls *libc.TLS, db uintptr, iDb int32, pzErrMsg uintptr, mFl // table name will be inserted automatically by the parser so we can just // use the abbreviation "x" here. The parser will also automatically tag // the schema table as read-only. - *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */)) = ts + 9185 /* "table" */ - *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */ + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { + *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */)) = ts + 9185 /* "table" */ + *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 1*8)) = libc.AssignUintptr(&zSchemaTabName, func() uintptr { if (!(0 != 0)) && (iDb == 1) { return ts + 12234 /* "sqlite_temp_mast..." */ } return ts + 6318 /* "sqlite_master" */ }()) - *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */ + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */ + 1*8)) - *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */ + 3*8)) = ts + 8275 /* "1" */ - *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */ + 4*8)) = ts + 17997 /* "CREATE TABLE x(t..." */ - *(*uintptr)(unsafe.Pointer(bp + 24 /* &azArg[0] */ + 5*8)) = uintptr(0) - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).Fdb = db - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).FiDb = iDb - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).Frc = SQLITE_OK - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).FpzErrMsg = pzErrMsg - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).FmInitFlags = mFlags - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).FnInitRow = U32(0) - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).FmxPage = Pgno(0) - Xsqlite3InitCallback(tls, bp+72 /* &initData */, 5, bp+24 /* azArg */, uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 2*8)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 1*8)) + *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 3*8)) = ts + 8275 /* "1" */ + *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 4*8)) = ts + 17997 /* "CREATE TABLE x(t..." */ + *(*uintptr)(unsafe.Pointer(bp + 16 /* &azArg[0] */ + 5*8)) = uintptr(0) + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Fdb = db + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FiDb = iDb + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc = SQLITE_OK + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FpzErrMsg = pzErrMsg + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmInitFlags = mFlags + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FnInitRow = U32(0) + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Pgno(0) + Xsqlite3InitCallback(tls, bp+64 /* &initData */, 5, bp+16 /* azArg */, uintptr(0)) *(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) &= (U32(mask)) - if !((*InitData)(unsafe.Pointer(bp+72 /* &initData */)).Frc != 0) { + if !((*InitData)(unsafe.Pointer(bp+64 /* &initData */)).Frc != 0) { goto __1 } - rc = (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).Frc + rc = (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc goto error_out __1: ; @@ -157371,7 +157371,7 @@ __5: if !(i < (int32(uint64(unsafe.Sizeof([5]int32{})) / uint64(unsafe.Sizeof(int32(0)))))) { goto __7 } - Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (i + 1), (bp + 112 /* &meta */ + uintptr(i)*4)) + Xsqlite3BtreeGetMeta(tls, (*Db)(unsafe.Pointer(pDb)).FpBt, (i + 1), (bp + 104 /* &meta */ + uintptr(i)*4)) goto __6 __6: i++ @@ -157382,23 +157382,23 @@ __7: if !(((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_ResetDatabase)) != uint64(0)) { goto __8 } - libc.Xmemset(tls, bp+112 /* &meta[0] */, 0, uint64(unsafe.Sizeof([5]int32{}))) + libc.Xmemset(tls, bp+104 /* &meta[0] */, 0, uint64(unsafe.Sizeof([5]int32{}))) __8: ; - (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = *(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */)) + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fschema_cookie = *(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */)) // If opening a non-empty database, check the text encoding. For the // main database, set sqlite3.enc to the encoding of the main database. // For an attached db, it is an error if the encoding is not the same // as sqlite3.enc. - if !(*(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */ + 4*4)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */ + 4*4)) != 0) { goto __9 } // text encoding if !((iDb == 0) && (((*Sqlite3)(unsafe.Pointer(db)).FmDbFlags & U32(DBFLAG_EncodingFixed)) == U32(0))) { goto __10 } // If opening the main database, set ENC(db). - encoding = (U8(int32(U8(*(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */ + 4*4)))) & 3)) + encoding = (U8(int32(U8(*(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */ + 4*4)))) & 3)) if !(int32(encoding) == 0) { goto __12 } @@ -157409,7 +157409,7 @@ __12: goto __11 __10: // If opening an attached database, the encoding much match ENC(db) - if !((*(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */ + 4*4)) & 3) != (int32((*Sqlite3)(unsafe.Pointer(db)).Fenc))) { + if !((*(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */ + 4*4)) & 3) != (int32((*Sqlite3)(unsafe.Pointer(db)).Fenc))) { goto __13 } Xsqlite3SetString(tls, pzErrMsg, db, @@ -157427,7 +157427,7 @@ __9: if !((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Fcache_size == 0) { goto __14 } - size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */ + 2*4))) + size = Xsqlite3AbsInt32(tls, *(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */ + 2*4))) if !(size == 0) { goto __15 } @@ -157443,7 +157443,7 @@ __14: // file_format==2 Version 3.1.3. // ALTER TABLE ADD COLUMN // file_format==3 Version 3.1.4. // ditto but with non-NULL defaults // file_format==4 Version 3.3.0. // DESC indices. Boolean constants - (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */ + 1*4))) + (*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format = U8(*(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */ + 1*4))) if !(int32((*Schema)(unsafe.Pointer((*Db)(unsafe.Pointer(pDb)).FpSchema)).Ffile_format) == 0) { goto __16 } @@ -157463,7 +157463,7 @@ __17: // clear the legacy_file_format pragma flag so that a VACUUM will // not downgrade the database and thus invalidate any descending // indices that the user might have created. - if !((iDb == 0) && (*(*int32)(unsafe.Pointer(bp + 112 /* &meta[0] */ + 1*4)) >= 4)) { + if !((iDb == 0) && (*(*int32)(unsafe.Pointer(bp + 104 /* &meta[0] */ + 1*4)) >= 4)) { goto __18 } *(*U64)(unsafe.Pointer(db + 48 /* &.flags */)) &= (libc.CplUint64(uint64(SQLITE_LegacyFileFmt))) @@ -157472,7 +157472,7 @@ __18: // Read the schema information out of the schema tables - (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) + (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).FmxPage = Xsqlite3BtreeLastPage(tls, (*Db)(unsafe.Pointer(pDb)).FpBt) zSql = Xsqlite3MPrintf(tls, db, ts+18093, /* "SELECT*FROM\"%w\"...." */ @@ -157482,13 +157482,13 @@ __18: (*Sqlite3)(unsafe.Pointer(db)).FxAuth = uintptr(0) rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 - }{Xsqlite3InitCallback})), bp+72 /* &initData */, uintptr(0)) + }{Xsqlite3InitCallback})), bp+64 /* &initData */, uintptr(0)) (*Sqlite3)(unsafe.Pointer(db)).FxAuth = xAuth if !(rc == SQLITE_OK) { goto __19 } - rc = (*InitData)(unsafe.Pointer(bp + 72 /* &initData */)).Frc + rc = (*InitData)(unsafe.Pointer(bp + 64 /* &initData */)).Frc __19: ; Xsqlite3DbFree(tls, db, zSql) @@ -157760,26 +157760,26 @@ func Xsqlite3ParserAddCleanup(tls *libc.TLS, pParse uintptr, xCleanup uintptr, p // Compile the UTF-8 encoded SQL statement zSql into a statement handle. func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepFlags U32, pReprepare uintptr, ppStmt uintptr, pzTail uintptr) int32 { /* sqlite3.c:131686:12: */ - bp := tls.Alloc(448) - defer tls.Free(448) + bp := tls.Alloc(432) + defer tls.Free(432) - // var zErrMsg uintptr at bp+440, 8 + // var zErrMsg uintptr at bp+424, 8 // Error message var rc int32 // Result code var i int32 // Loop counter - // var sParse Parse at bp+32, 408 + // var sParse Parse at bp+16, 408 var zDb uintptr var pBt uintptr var zSqlCopy uintptr var mxLen int32 var pT uintptr - *(*uintptr)(unsafe.Pointer(bp + 440 /* zErrMsg */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */)) = uintptr(0) rc = SQLITE_OK // Parsing context - libc.Xmemset(tls, bp+32 /* &sParse */, 0, uint64((uintptr(0) + 208 /* &.aTempReg */))) - libc.Xmemset(tls, ((bp + 32 /* &sParse */) + uintptr((uint64((uintptr(0) + 256 /* &.sLastToken */))))), 0, (uint64(unsafe.Sizeof(Parse{})) - (uint64((uintptr(0) + 256 /* &.sLastToken */))))) - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpReprepare = pReprepare + libc.Xmemset(tls, bp+16 /* &sParse */, 0, uint64((uintptr(0) + 208 /* &.aTempReg */))) + libc.Xmemset(tls, ((bp + 16 /* &sParse */) + uintptr((uint64((uintptr(0) + 256 /* &.sLastToken */))))), 0, (uint64(unsafe.Sizeof(Parse{})) - (uint64((uintptr(0) + 256 /* &.sLastToken */))))) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpReprepare = pReprepare // assert( !db->mallocFailed ); // not true with SQLITE_USE_ALLOCA @@ -157788,12 +157788,12 @@ func sqlite3Prepare(tls *libc.TLS, db uintptr, zSql uintptr, nBytes int32, prepF if !((prepFlags & U32(SQLITE_PREPARE_PERSISTENT)) != 0) { goto __1 } - (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FdisableLookaside++ + (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FdisableLookaside++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.FbDisable++ (*Sqlite3)(unsafe.Pointer(db)).Flookaside.Fsz = U16(0) __1: ; - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FdisableVtab = (U8(libc.Bool32((prepFlags & U32(SQLITE_PREPARE_NO_VTAB)) != U32(0)))) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FdisableVtab = (U8(libc.Bool32((prepFlags & U32(SQLITE_PREPARE_NO_VTAB)) != U32(0)))) // Check to verify that it is possible to get a read lock on all // database schemas. The inability to get a read lock indicates that @@ -157854,7 +157854,7 @@ __2: Xsqlite3VtabUnlockList(tls, db) - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).Fdb = db + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = db if !((nBytes >= 0) && ((nBytes == 0) || (int32(*(*int8)(unsafe.Pointer(zSql + uintptr((nBytes - 1))))) != 0))) { goto __8 } @@ -157872,62 +157872,62 @@ __10: if !(zSqlCopy != 0) { goto __11 } - Xsqlite3RunParser(tls, bp+32 /* &sParse */, zSqlCopy, bp+440 /* &zErrMsg */) - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FzTail = (zSql + uintptr(((int64((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FzTail) - int64(zSqlCopy)) / 1))) + Xsqlite3RunParser(tls, bp+16 /* &sParse */, zSqlCopy, bp+424 /* &zErrMsg */) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = (zSql + uintptr(((int64((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzTail) - int64(zSqlCopy)) / 1))) Xsqlite3DbFree(tls, db, zSqlCopy) goto __12 __11: - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FzTail = (zSql + uintptr(nBytes)) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail = (zSql + uintptr(nBytes)) __12: ; goto __9 __8: - Xsqlite3RunParser(tls, bp+32 /* &sParse */, zSql, bp+440 /* &zErrMsg */) + Xsqlite3RunParser(tls, bp+16 /* &sParse */, zSql, bp+424 /* &zErrMsg */) __9: ; if !(pzTail != 0) { goto __13 } - *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FzTail + *(*uintptr)(unsafe.Pointer(pzTail)) = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FzTail __13: ; if !(int32((*Sqlite3)(unsafe.Pointer(db)).Finit.Fbusy) == 0) { goto __14 } - Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpVdbe, zSql, (int32((int64((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FzTail) - int64(zSql)) / 1)), uint8(prepFlags)) + Xsqlite3VdbeSetSql(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe, zSql, (int32((int64((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FzTail) - int64(zSql)) / 1)), uint8(prepFlags)) __14: ; if !((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0) { goto __15 } - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).Frc = SQLITE_NOMEM - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FcheckSchema = U8(0) + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc = SQLITE_NOMEM + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FcheckSchema = U8(0) __15: ; - if !(((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).Frc != SQLITE_OK) && ((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).Frc != SQLITE_DONE)) { + if !(((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc != SQLITE_OK) && ((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).Frc != SQLITE_DONE)) { goto __16 } - if !((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FcheckSchema != 0) { + if !((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FcheckSchema != 0) { goto __18 } - schemaIsValid(tls, bp+32 /* &sParse */) + schemaIsValid(tls, bp+16 /* &sParse */) __18: ; - if !((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpVdbe != 0) { + if !((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe != 0) { goto __19 } - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpVdbe) + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe) __19: ; - rc = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).Frc - if !(*(*uintptr)(unsafe.Pointer(bp + 440 /* zErrMsg */)) != 0) { + rc = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Frc + if !(*(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */)) != 0) { goto __20 } - Xsqlite3ErrorWithMsg(tls, db, rc, ts+3630 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 440 /* zErrMsg */)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 440 /* zErrMsg */))) + Xsqlite3ErrorWithMsg(tls, db, rc, ts+3630 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErrMsg */))) goto __21 __20: Xsqlite3Error(tls, db, rc) @@ -157936,7 +157936,7 @@ __21: goto __17 __16: ; - *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpVdbe + *(*uintptr)(unsafe.Pointer(ppStmt)) = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpVdbe rc = SQLITE_OK Xsqlite3ErrorClear(tls, db) __17: @@ -157944,11 +157944,11 @@ __17: // Delete any TriggerPrg structures allocated while parsing this statement. __22: - if !((*Parse)(unsafe.Pointer(bp+32 /* &sParse */)).FpTriggerPrg != 0) { + if !((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpTriggerPrg != 0) { goto __23 } - pT = (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpTriggerPrg - (*Parse)(unsafe.Pointer(bp + 32 /* &sParse */)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext + pT = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpTriggerPrg + (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpTriggerPrg = (*TriggerPrg)(unsafe.Pointer(pT)).FpNext Xsqlite3DbFree(tls, db, pT) goto __22 __23: @@ -157956,7 +157956,7 @@ __23: end_prepare: - Xsqlite3ParserReset(tls, bp+32 /* &sParse */) + Xsqlite3ParserReset(tls, bp+16 /* &sParse */) return rc } @@ -158365,20 +158365,20 @@ func findRightmost(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:132257:15: * // If an illegal or unsupported join type is seen, then still return // a join type, but put an error in the pParse structure. func Xsqlite3JoinType(tls *libc.TLS, pParse uintptr, pA uintptr, pB uintptr, pC uintptr) int32 { /* sqlite3.c:132279:20: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(56) + defer tls.Free(56) var jointype int32 = 0 - // var apAll [3]uintptr at bp+40, 24 + // var apAll [3]uintptr at bp+32, 24 var p uintptr var i int32 var j int32 - *(*uintptr)(unsafe.Pointer(bp + 40 /* &apAll[0] */)) = pA - *(*uintptr)(unsafe.Pointer(bp + 40 /* &apAll[0] */ + 1*8)) = pB - *(*uintptr)(unsafe.Pointer(bp + 40 /* &apAll[0] */ + 2*8)) = pC - for i = 0; (i < 3) && (*(*uintptr)(unsafe.Pointer(bp + 40 /* &apAll[0] */ + uintptr(i)*8)) != 0); i++ { - p = *(*uintptr)(unsafe.Pointer(bp + 40 /* &apAll[0] */ + uintptr(i)*8)) + *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */)) = pA + *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + 1*8)) = pB + *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + 2*8)) = pC + for i = 0; (i < 3) && (*(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + uintptr(i)*8)) != 0); i++ { + p = *(*uintptr)(unsafe.Pointer(bp + 32 /* &apAll[0] */ + uintptr(i)*8)) for j = 0; j < (int32(uint64(unsafe.Sizeof(aKeyword)) / uint64(unsafe.Sizeof(struct { Fi U8 FnChar U8 @@ -158593,8 +158593,8 @@ func unsetJoinExpr(tls *libc.TLS, p uintptr, iTable int32) { /* sqlite3.c:132479 // // This routine returns the number of errors encountered. func sqliteProcessJoin(tls *libc.TLS, pParse uintptr, p uintptr) int32 { /* sqlite3.c:132513:12: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) var pSrc uintptr // All tables in the FROM clause var i int32 @@ -158629,17 +158629,17 @@ __1: } for j = 0; j < int32((*Table)(unsafe.Pointer(pRightTab)).FnCol); j++ { var zName uintptr // Name of column in the right table - // var iLeft int32 at bp+32, 4 + // var iLeft int32 at bp+16, 4 // Matching left table - // var iLeftCol int32 at bp+36, 4 + // var iLeftCol int32 at bp+20, 4 // Matching column in the left table if (int32((*Column)(unsafe.Pointer(((*Table)(unsafe.Pointer(pRightTab)).FaCol + uintptr(j)*32))).FcolFlags) & COLFLAG_HIDDEN) != 0 { continue } zName = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pRightTab)).FaCol + uintptr(j)*32)).FzName - if tableAndColumnIndex(tls, pSrc, (i+1), zName, bp+32 /* &iLeft */, bp+36 /* &iLeftCol */, 1) != 0 { - addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 32 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 36 /* iLeftCol */)), (i + 1), j, + if tableAndColumnIndex(tls, pSrc, (i+1), zName, bp+16 /* &iLeft */, bp+20 /* &iLeftCol */, 1) != 0 { + addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 16 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 20 /* iLeftCol */)), (i + 1), j, isOuter, (p + 48 /* &.pWhere */)) } } @@ -158672,21 +158672,21 @@ __1: var pList uintptr = (*SrcItem)(unsafe.Pointer(pRight)).FpUsing for j = 0; j < (*IdList)(unsafe.Pointer(pList)).FnId; j++ { var zName uintptr // Name of the term in the USING clause - // var iLeft int32 at bp+40, 4 + // var iLeft int32 at bp+24, 4 // Table on the left with matching column name - // var iLeftCol int32 at bp+44, 4 + // var iLeftCol int32 at bp+28, 4 // Column number of matching column on the left var iRightCol int32 // Column number of matching column on the right zName = (*IdList_item)(unsafe.Pointer((*IdList)(unsafe.Pointer(pList)).Fa + uintptr(j)*16)).FzName iRightCol = Xsqlite3ColumnIndex(tls, pRightTab, zName) if (iRightCol < 0) || - !(tableAndColumnIndex(tls, pSrc, (i+1), zName, bp+40 /* &iLeft */, bp+44 /* &iLeftCol */, 0) != 0) { + !(tableAndColumnIndex(tls, pSrc, (i+1), zName, bp+24 /* &iLeft */, bp+28 /* &iLeftCol */, 0) != 0) { Xsqlite3ErrorMsg(tls, pParse, - ts+18414 /* "cannot join usin..." */, libc.VaList(bp+16, zName)) + ts+18414 /* "cannot join usin..." */, libc.VaList(bp+8, zName)) return 1 } - addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 40 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 44 /* iLeftCol */)), (i + 1), iRightCol, + addWhereTerm(tls, pParse, pSrc, *(*int32)(unsafe.Pointer(bp + 24 /* iLeft */)), *(*int32)(unsafe.Pointer(bp + 28 /* iLeftCol */)), (i + 1), iRightCol, isOuter, (p + 48 /* &.pWhere */)) } } @@ -159498,8 +159498,8 @@ func Xsqlite3SelectOpName(tls *libc.TLS, id int32) uintptr { /* sqlite3.c:133540 // where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which // is determined by the zUsage argument. func explainTempTable(tls *libc.TLS, pParse uintptr, zUsage uintptr) { /* sqlite3.c:133562:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) Xsqlite3VdbeExplain(tls, pParse, uint8(0), ts+18511 /* "USE TEMP B-TREE ..." */, libc.VaList(bp, zUsage)) } @@ -159870,8 +159870,8 @@ func generateColumnTypes(tls *libc.TLS, pParse uintptr, pTabList uintptr, pEList // then the result column name with the table name // prefix, ex: TABLE.COLUMN. Otherwise use zSpan. func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) { /* sqlite3.c:134029:21: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -159935,7 +159935,7 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) } else { var z uintptr = (*ExprList_item)(unsafe.Pointer((pEList + 8 /* &.a */) + uintptr(i)*32)).FzEName if z == uintptr(0) { - z = Xsqlite3MPrintf(tls, db, ts+18534 /* "column%d" */, libc.VaList(bp+24, (i+1))) + z = Xsqlite3MPrintf(tls, db, ts+18534 /* "column%d" */, libc.VaList(bp+16, (i+1))) } else { z = Xsqlite3DbStrDup(tls, db, z) } @@ -159966,24 +159966,24 @@ func Xsqlite3GenerateColumnNames(tls *libc.TLS, pParse uintptr, pSelect uintptr) // // See Also: sqlite3GenerateColumnNames() func Xsqlite3ColumnsFromExprList(tls *libc.TLS, pParse uintptr, pEList uintptr, pnCol uintptr, paCol uintptr) int32 { /* sqlite3.c:134121:20: */ - bp := tls.Alloc(76) - defer tls.Free(76) + bp := tls.Alloc(60) + defer tls.Free(60) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // Database connection var i int32 var j int32 // Loop counters - // var cnt U32 at bp+72, 4 + // var cnt U32 at bp+56, 4 // Index added to make the name unique var aCol uintptr var pCol uintptr // For looping over result columns var nCol int32 // Number of columns in the result set var zName uintptr // Column name var nName int32 // Size of name in zName[] - // var ht Hash at bp+48, 24 + // var ht Hash at bp+32, 24 // Hash table of column names var pTab uintptr - Xsqlite3HashInit(tls, bp+48 /* &ht */) + Xsqlite3HashInit(tls, bp+32 /* &ht */) if pEList != 0 { nCol = (*ExprList)(unsafe.Pointer(pEList)).FnExpr aCol = Xsqlite3DbMallocZero(tls, db, (uint64(unsafe.Sizeof(Column{})) * uint64(nCol))) @@ -160042,8 +160042,8 @@ __1: // Make sure the column name is unique. If the name is not unique, // append an integer to the name so that it becomes unique. - *(*U32)(unsafe.Pointer(bp + 72 /* cnt */)) = U32(0) - for (zName != 0) && (Xsqlite3HashFind(tls, bp+48 /* &ht */, zName) != uintptr(0)) { + *(*U32)(unsafe.Pointer(bp + 56 /* cnt */)) = U32(0) + for (zName != 0) && (Xsqlite3HashFind(tls, bp+32 /* &ht */, zName) != uintptr(0)) { nName = Xsqlite3Strlen30(tls, zName) if nName > 0 { for j = (nName - 1); (j > 0) && ((int32(Xsqlite3CtypeMap[uint8(*(*int8)(unsafe.Pointer(zName + uintptr(j))))]) & 0x04) != 0); j-- { @@ -160052,15 +160052,15 @@ __1: nName = j } } - zName = Xsqlite3MPrintf(tls, db, ts+18543 /* "%.*z:%u" */, libc.VaList(bp+16, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 72 /* cnt */)), 1))) - if *(*U32)(unsafe.Pointer(bp + 72 /* cnt */)) > U32(3) { - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+72 /* &cnt */) + zName = Xsqlite3MPrintf(tls, db, ts+18543 /* "%.*z:%u" */, libc.VaList(bp+8, nName, zName, libc.PreIncUint32(&*(*U32)(unsafe.Pointer(bp + 56 /* cnt */)), 1))) + if *(*U32)(unsafe.Pointer(bp + 56 /* cnt */)) > U32(3) { + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(U32(0))), bp+56 /* &cnt */) } } (*Column)(unsafe.Pointer(pCol)).FzName = zName (*Column)(unsafe.Pointer(pCol)).FhName = Xsqlite3StrIHash(tls, zName) - if (zName != 0) && (Xsqlite3HashInsert(tls, bp+48 /* &ht */, zName, pCol) == pCol) { + if (zName != 0) && (Xsqlite3HashInsert(tls, bp+32 /* &ht */, zName, pCol) == pCol) { Xsqlite3OomFault(tls, db) } @@ -160073,7 +160073,7 @@ __2: goto __3 __3: ; - Xsqlite3HashClear(tls, bp+48 /* &ht */) + Xsqlite3HashClear(tls, bp+32 /* &ht */) if (*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0 { for j = 0; j < i; j++ { Xsqlite3DbFree(tls, db, (*Column)(unsafe.Pointer(aCol+uintptr(j)*32)).FzName) @@ -160616,8 +160616,8 @@ end_of_recursive_query: // The sqlite3CodeSubselect will have added the LIMIT 1 clause in tht case. // Since the limit is exactly 1, we only need to evalutes the left-most VALUES. func multiSelectValues(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:134671:12: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var nRow int32 = 1 var rc int32 = 0 @@ -160692,18 +160692,18 @@ func hasAnchor(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:134708:12: */ // Notice that because of the way SQLite parses compound SELECTs, the // individual selects always group from left to right. func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:134744:12: */ - bp := tls.Alloc(160) - defer tls.Free(160) + bp := tls.Alloc(144) + defer tls.Free(144) var rc int32 // Success code from a subroutine var pPrior uintptr // Another SELECT immediately to our left var v uintptr // Generate code to this VDBE - // var dest SelectDest at bp+32, 40 + // var dest SelectDest at bp+16, 40 // Alternative data destination var pDelete uintptr // Chain of simple selects to delete var db uintptr var addr int32 - // var nLimit int32 at bp+72, 4 + // var nLimit int32 at bp+56, 4 var iCont int32 var iBreak int32 @@ -160713,7 +160713,7 @@ func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 var priorOp int32 // The SRT_ operation to apply to prior selects var pLimit uintptr // Saved values of p->nLimit var addr1 int32 - // var uniondest SelectDest at bp+80, 40 + // var uniondest SelectDest at bp+64, 40 var tab1 int32 var tab2 int32 @@ -160722,7 +160722,7 @@ func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 var iStart1 int32 var pLimit1 uintptr var addr2 int32 - // var intersectdest SelectDest at bp+120, 40 + // var intersectdest SelectDest at bp+104, 40 var r1 int32 var addr3 int32 @@ -160740,18 +160740,18 @@ func multiSelect(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 db = (*Parse)(unsafe.Pointer(pParse)).Fdb pPrior = (*Select)(unsafe.Pointer(p)).FpPrior - *(*SelectDest)(unsafe.Pointer(bp + 32 /* dest */)) = *(*SelectDest)(unsafe.Pointer(pDest)) + *(*SelectDest)(unsafe.Pointer(bp + 16 /* dest */)) = *(*SelectDest)(unsafe.Pointer(pDest)) v = Xsqlite3GetVdbe(tls, pParse) // The VDBE already created by calling function // Create the destination temporary table if necessary - if !(int32((*SelectDest)(unsafe.Pointer(bp+32 /* &dest */)).FeDest) == SRT_EphemTab) { + if !(int32((*SelectDest)(unsafe.Pointer(bp+16 /* &dest */)).FeDest) == SRT_EphemTab) { goto __1 } - Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*SelectDest)(unsafe.Pointer(bp+32 /* &dest */)).FiSDParm, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr) - (*SelectDest)(unsafe.Pointer(bp + 32 /* &dest */)).FeDest = U8(SRT_Table) + Xsqlite3VdbeAddOp2(tls, v, OP_OpenEphemeral, (*SelectDest)(unsafe.Pointer(bp+16 /* &dest */)).FiSDParm, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpEList)).FnExpr) + (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FeDest = U8(SRT_Table) __1: ; @@ -160759,7 +160759,7 @@ __1: if !(((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_MultiValue)) != 0) { goto __2 } - rc = multiSelectValues(tls, pParse, p, bp+32 /* &dest */) + rc = multiSelectValues(tls, pParse, p, bp+16 /* &dest */) if !(rc >= 0) { goto __3 } @@ -160776,7 +160776,7 @@ __2: if !((((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Recursive)) != U32(0)) && (hasAnchor(tls, p) != 0)) { goto __4 } - generateWithRecursiveQuery(tls, pParse, p, bp+32 /* &dest */) + generateWithRecursiveQuery(tls, pParse, p, bp+16 /* &dest */) goto __5 __4: @@ -160810,13 +160810,13 @@ __8: goto __9 __10: addr = 0 - *(*int32)(unsafe.Pointer(bp + 72 /* nLimit */)) = 0 // Initialize to suppress harmless compiler warning + *(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)) = 0 // Initialize to suppress harmless compiler warning (*Select)(unsafe.Pointer(pPrior)).FiLimit = (*Select)(unsafe.Pointer(p)).FiLimit (*Select)(unsafe.Pointer(pPrior)).FiOffset = (*Select)(unsafe.Pointer(p)).FiOffset (*Select)(unsafe.Pointer(pPrior)).FpLimit = (*Select)(unsafe.Pointer(p)).FpLimit - rc = Xsqlite3Select(tls, pParse, pPrior, bp+32 /* &dest */) + rc = Xsqlite3Select(tls, pParse, pPrior, bp+16 /* &dest */) (*Select)(unsafe.Pointer(pPrior)).FpLimit = uintptr(0) if !(rc != 0) { goto __14 @@ -160843,17 +160843,17 @@ __15: ; Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18478 /* "UNION ALL" */, 0) - rc = Xsqlite3Select(tls, pParse, p, bp+32 /* &dest */) + rc = Xsqlite3Select(tls, pParse, p, bp+16 /* &dest */) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEstAdd(tls, (*Select)(unsafe.Pointer(p)).FnSelectRow, (*Select)(unsafe.Pointer(pPrior)).FnSelectRow) if !(((((*Select)(unsafe.Pointer(p)).FpLimit != 0) && - (Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpLimit)).FpLeft, bp+72 /* &nLimit */) != 0)) && - (*(*int32)(unsafe.Pointer(bp + 72 /* nLimit */)) > 0)) && (int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32(Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 72 /* nLimit */))))))) { + (Xsqlite3ExprIsInteger(tls, (*Expr)(unsafe.Pointer((*Select)(unsafe.Pointer(p)).FpLimit)).FpLeft, bp+56 /* &nLimit */) != 0)) && + (*(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)) > 0)) && (int32((*Select)(unsafe.Pointer(p)).FnSelectRow) > int32(Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 56 /* nLimit */))))))) { goto __17 } - (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 72 /* nLimit */)))) + (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3LogEst(tls, U64(*(*int32)(unsafe.Pointer(bp + 56 /* nLimit */)))) __17: ; if !(addr != 0) { @@ -160869,13 +160869,13 @@ __12: // Cursor number of the temp table holding result op = U8(0) priorOp = SRT_Union - if !(int32((*SelectDest)(unsafe.Pointer(bp+32 /* &dest */)).FeDest) == priorOp) { + if !(int32((*SelectDest)(unsafe.Pointer(bp+16 /* &dest */)).FeDest) == priorOp) { goto __19 } // We can reuse a temporary table generated by a SELECT to our // right. // Not allowed on leftward elements - unionTab = (*SelectDest)(unsafe.Pointer(bp + 32 /* &dest */)).FiSDParm + unionTab = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FiSDParm goto __20 __19: // We will need to create our own temporary table to hold the @@ -160892,9 +160892,9 @@ __20: // Code the SELECT statements to our left - Xsqlite3SelectDestInit(tls, bp+80 /* &uniondest */, priorOp, unionTab) + Xsqlite3SelectDestInit(tls, bp+64 /* &uniondest */, priorOp, unionTab) - rc = Xsqlite3Select(tls, pParse, pPrior, bp+80 /* &uniondest */) + rc = Xsqlite3Select(tls, pParse, pPrior, bp+64 /* &uniondest */) if !(rc != 0) { goto __21 } @@ -160916,10 +160916,10 @@ __23: (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) pLimit = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) - (*SelectDest)(unsafe.Pointer(bp + 80 /* &uniondest */)).FeDest = op + (*SelectDest)(unsafe.Pointer(bp + 64 /* &uniondest */)).FeDest = op Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18722 /* "%s USING TEMP B-..." */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) - rc = Xsqlite3Select(tls, pParse, p, bp+80 /* &uniondest */) + rc = Xsqlite3Select(tls, pParse, p, bp+64 /* &uniondest */) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior @@ -160938,7 +160938,7 @@ __24: // Convert the data in the temporary table into whatever form // it is that we currently need. - if !((int32((*SelectDest)(unsafe.Pointer(bp+32 /* &dest */)).FeDest) != priorOp) && (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0)) { + if !((int32((*SelectDest)(unsafe.Pointer(bp+16 /* &dest */)).FeDest) != priorOp) && (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0)) { goto __25 } iBreak = Xsqlite3VdbeMakeLabel(tls, pParse) @@ -160947,7 +160947,7 @@ __24: Xsqlite3VdbeAddOp2(tls, v, OP_Rewind, unionTab, iBreak) iStart = Xsqlite3VdbeCurrentAddr(tls, v) selectInnerLoop(tls, pParse, p, unionTab, - uintptr(0), uintptr(0), bp+32 /* &dest */, iCont, iBreak) + uintptr(0), uintptr(0), bp+16 /* &dest */, iCont, iBreak) Xsqlite3VdbeResolveLabel(tls, v, iCont) Xsqlite3VdbeAddOp2(tls, v, OP_Next, unionTab, iStart) Xsqlite3VdbeResolveLabel(tls, v, iBreak) @@ -160971,9 +160971,9 @@ __13: *(*U32)(unsafe.Pointer(findRightmost(tls, p) + 4 /* &.selFlags */)) |= (U32(SF_UsesEphemeral)) // Code the SELECTs to our left into temporary table "tab1". - Xsqlite3SelectDestInit(tls, bp+120 /* &intersectdest */, SRT_Union, tab1) + Xsqlite3SelectDestInit(tls, bp+104 /* &intersectdest */, SRT_Union, tab1) - rc = Xsqlite3Select(tls, pParse, pPrior, bp+120 /* &intersectdest */) + rc = Xsqlite3Select(tls, pParse, pPrior, bp+104 /* &intersectdest */) if !(rc != 0) { goto __26 } @@ -160988,10 +160988,10 @@ __26: (*Select)(unsafe.Pointer(p)).FpPrior = uintptr(0) pLimit1 = (*Select)(unsafe.Pointer(p)).FpLimit (*Select)(unsafe.Pointer(p)).FpLimit = uintptr(0) - (*SelectDest)(unsafe.Pointer(bp + 120 /* &intersectdest */)).FiSDParm = tab2 - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18722 /* "%s USING TEMP B-..." */, libc.VaList(bp+16, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) + (*SelectDest)(unsafe.Pointer(bp + 104 /* &intersectdest */)).FiSDParm = tab2 + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18722 /* "%s USING TEMP B-..." */, libc.VaList(bp+8, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) - rc = Xsqlite3Select(tls, pParse, p, bp+120 /* &intersectdest */) + rc = Xsqlite3Select(tls, pParse, p, bp+104 /* &intersectdest */) pDelete = (*Select)(unsafe.Pointer(p)).FpPrior (*Select)(unsafe.Pointer(p)).FpPrior = pPrior @@ -161023,7 +161023,7 @@ __28: Xsqlite3ReleaseTempReg(tls, pParse, r1) selectInnerLoop(tls, pParse, p, tab1, - uintptr(0), uintptr(0), bp+32 /* &dest */, iCont1, iBreak1) + uintptr(0), uintptr(0), bp+16 /* &dest */, iCont1, iBreak1) Xsqlite3VdbeResolveLabel(tls, v, iCont1) Xsqlite3VdbeAddOp2(tls, v, OP_Next, tab1, iStart1) Xsqlite3VdbeResolveLabel(tls, v, iBreak1) @@ -161137,8 +161137,8 @@ __31: ; multi_select_end: - (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 32 /* &dest */)).FiSdst - (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = (*SelectDest)(unsafe.Pointer(bp + 32 /* &dest */)).FnSdst + (*SelectDest)(unsafe.Pointer(pDest)).FiSdst = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FiSdst + (*SelectDest)(unsafe.Pointer(pDest)).FnSdst = (*SelectDest)(unsafe.Pointer(bp + 16 /* &dest */)).FnSdst Xsqlite3SelectDelete(tls, db, pDelete) return rc } @@ -161146,8 +161146,8 @@ multi_select_end: // Error message for when two or more terms of a compound select have different // size result sets. func Xsqlite3SelectWrongNumTermsError(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:135095:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) if ((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Values)) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+18743 /* "all VALUES must ..." */, 0) @@ -161373,16 +161373,16 @@ func generateOutputSubroutine(tls *libc.TLS, pParse uintptr, p uintptr, pIn uint // until all data is exhausted then jump to the "end" labe. AltB, AeqB, // and AgtB jump to either L2 or to one of EofA or EofB. func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:135333:12: */ - bp := tls.Alloc(96) - defer tls.Free(96) + bp := tls.Alloc(88) + defer tls.Free(88) var i int32 var j int32 // Loop counters var pPrior uintptr // Another SELECT immediately to our left var v uintptr // Generate code to this VDBE - // var destA SelectDest at bp+16, 40 + // var destA SelectDest at bp+8, 40 // Destination for coroutine A - // var destB SelectDest at bp+56, 40 + // var destB SelectDest at bp+48, 40 // Destination for coroutine B var regAddrA int32 // Address register for select-A coroutine var regAddrB int32 // Address register for select-B coroutine @@ -161561,8 +161561,8 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) regAddrB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regOutA = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) regOutB = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) - Xsqlite3SelectDestInit(tls, bp+16 /* &destA */, SRT_Coroutine, regAddrA) - Xsqlite3SelectDestInit(tls, bp+56 /* &destB */, SRT_Coroutine, regAddrB) + Xsqlite3SelectDestInit(tls, bp+8 /* &destA */, SRT_Coroutine, regAddrA) + Xsqlite3SelectDestInit(tls, bp+48 /* &destB */, SRT_Coroutine, regAddrB) Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18871 /* "MERGE (%s)" */, libc.VaList(bp, Xsqlite3SelectOpName(tls, int32((*Select)(unsafe.Pointer(p)).Fop)))) @@ -161573,7 +161573,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*Select)(unsafe.Pointer(pPrior)).FiLimit = regLimitA Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18882 /* "LEFT" */, 0) - Xsqlite3Select(tls, pParse, pPrior, bp+16 /* &destA */) + Xsqlite3Select(tls, pParse, pPrior, bp+8 /* &destA */) Xsqlite3VdbeEndCoroutine(tls, v, regAddrA) Xsqlite3VdbeJumpHere(tls, v, addr1) @@ -161587,7 +161587,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) (*Select)(unsafe.Pointer(p)).FiLimit = regLimitB (*Select)(unsafe.Pointer(p)).FiOffset = 0 Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+18887 /* "RIGHT" */, 0) - Xsqlite3Select(tls, pParse, p, bp+56 /* &destB */) + Xsqlite3Select(tls, pParse, p, bp+48 /* &destB */) (*Select)(unsafe.Pointer(p)).FiLimit = savedLimit (*Select)(unsafe.Pointer(p)).FiOffset = savedOffset Xsqlite3VdbeEndCoroutine(tls, v, regAddrB) @@ -161596,7 +161596,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // select as the next output row of the compound select. addrOutA = generateOutputSubroutine(tls, pParse, - p, bp+16 /* &destA */, pDest, regOutA, + p, bp+8 /* &destA */, pDest, regOutA, regPrev, pKeyDup, labelEnd) // Generate a subroutine that outputs the current row of the B @@ -161604,7 +161604,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) if (op == TK_ALL) || (op == TK_UNION) { addrOutB = generateOutputSubroutine(tls, pParse, - p, bp+56 /* &destB */, pDest, regOutB, + p, bp+48 /* &destB */, pDest, regOutB, regPrev, pKeyDup, labelEnd) } Xsqlite3KeyInfoUnref(tls, pKeyDup) @@ -161671,7 +161671,7 @@ func multiSelectOrderBy(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) // Implement the main merge loop Xsqlite3VdbeResolveLabel(tls, v, labelCmpr) Xsqlite3VdbeAddOp4(tls, v, OP_Permutation, 0, 0, 0, aPermute, -15) - Xsqlite3VdbeAddOp4(tls, v, OP_Compare, (*SelectDest)(unsafe.Pointer(bp+16 /* &destA */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+56 /* &destB */)).FiSdst, nOrderBy, + Xsqlite3VdbeAddOp4(tls, v, OP_Compare, (*SelectDest)(unsafe.Pointer(bp+8 /* &destA */)).FiSdst, (*SelectDest)(unsafe.Pointer(bp+48 /* &destB */)).FiSdst, nOrderBy, pKeyMerge, -9) Xsqlite3VdbeChangeP5(tls, v, uint16(OPFLAG_PERMUTE)) Xsqlite3VdbeAddOp3(tls, v, OP_Jump, addrAltB, addrAeqB, addrAgtB) @@ -163060,8 +163060,8 @@ func isSimpleCount(tls *libc.TLS, p uintptr, pAggInfo uintptr) uintptr { /* sqli // SQLITE_ERROR and leave an error in pParse. Otherwise, populate // pFrom->pIndex and return SQLITE_OK. func Xsqlite3IndexedByLookup(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:137011:20: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pTab uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpTab var zIndexedBy uintptr = *(*uintptr)(unsafe.Pointer(pFrom + 96 /* &.u1 */)) @@ -163177,8 +163177,8 @@ func convertCompoundSelectToSubquery(tls *libc.TLS, pWalker uintptr, p uintptr) // arguments. If it does, leave an error message in pParse and return // non-zero, since pFrom is not allowed to be a table-valued function. func cannotBeFunction(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:137117:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) if (uint32(int32(*(*uint16)(unsafe.Pointer(pFrom + 60 /* &.fg */ + 4 /* &.isTabFunc */)) & 0x4 >> 2))) != 0 { Xsqlite3ErrorMsg(tls, pParse, ts+18911 /* "'%s' is not a fu..." */, libc.VaList(bp, (*SrcItem)(unsafe.Pointer(pFrom)).FzName)) @@ -163264,11 +163264,11 @@ func Xsqlite3WithPush(tls *libc.TLS, pParse uintptr, pWith uintptr, bFree U8) ui // Return 1 if a match is found. // Return 2 if an error condition is detected. func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom uintptr) int32 { /* sqlite3.c:137206:12: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(48) + defer tls.Free(48) var pCte uintptr // Matched CTE (or NULL if no match) - // var pWith uintptr at bp+64, 8 + // var pWith uintptr at bp+40, 8 // The matching WITH if (*Parse)(unsafe.Pointer(pParse)).FpWith == uintptr(0) { @@ -163292,7 +163292,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom // (2) This is the first term in the FROM clause of an UPDATE. return 0 } - pCte = searchWith(tls, (*Parse)(unsafe.Pointer(pParse)).FpWith, pFrom, bp+64 /* &pWith */) + pCte = searchWith(tls, (*Parse)(unsafe.Pointer(pParse)).FpWith, pFrom, bp+40 /* &pWith */) if pCte != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var pTab uintptr @@ -163369,7 +163369,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom libc.SetBitFieldPtr16Uint32(pItem+60 /* &.fg */ +4 /* &.isRecursive */, uint32(1), 5, 0x20) if ((*Select)(unsafe.Pointer(pRecTerm)).FselFlags & U32(SF_Recursive)) != 0 { Xsqlite3ErrorMsg(tls, pParse, - ts+18934 /* "multiple referen..." */, libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName)) + ts+18934 /* "multiple referen..." */, libc.VaList(bp+8, (*Cte)(unsafe.Pointer(pCte)).FzName)) return 2 } *(*U32)(unsafe.Pointer(pRecTerm + 4 /* &.selFlags */)) |= (U32(SF_Recursive)) @@ -163387,7 +163387,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom (*Cte)(unsafe.Pointer(pCte)).FzCteErr = ts + 18977 /* "circular referen..." */ pSavedWith = (*Parse)(unsafe.Pointer(pParse)).FpWith - (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 64 /* pWith */)) + (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 40 /* pWith */)) if ((*Select)(unsafe.Pointer(pSel)).FselFlags & U32(SF_Recursive)) != 0 { var rc int32 @@ -163404,7 +163404,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom return 2 } } - (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 64 /* pWith */)) + (*Parse)(unsafe.Pointer(pParse)).FpWith = *(*uintptr)(unsafe.Pointer(bp + 40 /* pWith */)) for pLeft = pSel; (*Select)(unsafe.Pointer(pLeft)).FpPrior != 0; pLeft = (*Select)(unsafe.Pointer(pLeft)).FpPrior { } @@ -163412,7 +163412,7 @@ func resolveFromTermToCte(tls *libc.TLS, pParse uintptr, pWalker uintptr, pFrom if (*Cte)(unsafe.Pointer(pCte)).FpCols != 0 { if (pEList != 0) && ((*ExprList)(unsafe.Pointer(pEList)).FnExpr != (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr) { Xsqlite3ErrorMsg(tls, pParse, ts+19000, /* "table %s has %d ..." */ - libc.VaList(bp+32, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) + libc.VaList(bp+16, (*Cte)(unsafe.Pointer(pCte)).FzName, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, (*ExprList)(unsafe.Pointer((*Cte)(unsafe.Pointer(pCte)).FpCols)).FnExpr)) (*Parse)(unsafe.Pointer(pParse)).FpWith = pSavedWith return 2 } @@ -163458,8 +163458,8 @@ func Xsqlite3SelectPopWith(tls *libc.TLS, pWalker uintptr, p uintptr) { /* sqlit // SQLITE_OK is returned. Otherwise, if an OOM error is encountered, // SQLITE_NOMEM. func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 { /* sqlite3.c:137405:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pSel uintptr = (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect var pTab uintptr @@ -163512,8 +163512,8 @@ func Xsqlite3ExpandSubquery(tls *libc.TLS, pParse uintptr, pFrom uintptr) int32 // and TABLE.* to be every column in TABLE. // func selectExpander(tls *libc.TLS, pWalker uintptr, p uintptr) int32 { /* sqlite3.c:137457:12: */ - bp := tls.Alloc(136) - defer tls.Free(136) + bp := tls.Alloc(88) + defer tls.Free(88) var pParse uintptr = (*Walker)(unsafe.Pointer(pWalker)).FpParse var i int32 @@ -163619,7 +163619,7 @@ __1: (((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_EnableView)) == uint64(0))) && ((*Table)(unsafe.Pointer(pTab)).FpSchema != (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+1*32)).FpSchema) { Xsqlite3ErrorMsg(tls, pParse, ts+19161, /* "access to view \"..." */ - libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) + libc.VaList(bp+8, (*Table)(unsafe.Pointer(pTab)).FzName)) } if ((((*Table)(unsafe.Pointer(pTab)).FnModuleArg != 0) && @@ -163627,7 +163627,7 @@ __1: ((*Table)(unsafe.Pointer(pTab)).FpVTable != uintptr(0))) && (int32((*VTable)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FpVTable)).FeVtabRisk) > (libc.Bool32(((*Sqlite3)(unsafe.Pointer(db)).Fflags & uint64(SQLITE_TrustedSchema)) != uint64(0)))) { Xsqlite3ErrorMsg(tls, pParse, ts+19192, /* "unsafe use of vi..." */ - libc.VaList(bp+32, (*Table)(unsafe.Pointer(pTab)).FzName)) + libc.VaList(bp+16, (*Table)(unsafe.Pointer(pTab)).FzName)) } (*SrcItem)(unsafe.Pointer(pFrom)).FpSelect = Xsqlite3SelectDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FpSelect, 0) nCol = (*Table)(unsafe.Pointer(pTab)).FnCol @@ -163748,7 +163748,7 @@ __3: var zName uintptr = (*Column)(unsafe.Pointer((*Table)(unsafe.Pointer(pTab)).FaCol + uintptr(j)*32)).FzName var zColname uintptr // The computed column name var zToFree uintptr // Malloced string that needs to be freed - // var sColname Token at bp+120, 16 + // var sColname Token at bp+72, 16 // Computed column name as a token if ((zTName != 0) && (pSub != 0)) && @@ -163790,15 +163790,15 @@ __3: pExpr = Xsqlite3PExpr(tls, pParse, TK_DOT, pLeft, pExpr) } if longNames != 0 { - zColname = Xsqlite3MPrintf(tls, db, ts+12147 /* "%s.%s" */, libc.VaList(bp+48, zTabName, zName)) + zColname = Xsqlite3MPrintf(tls, db, ts+12147 /* "%s.%s" */, libc.VaList(bp+24, zTabName, zName)) zToFree = zColname } } else { pExpr = pRight } pNew = Xsqlite3ExprListAppend(tls, pParse, pNew, pExpr) - Xsqlite3TokenInit(tls, bp+120 /* &sColname */, zColname) - Xsqlite3ExprListSetName(tls, pParse, pNew, bp+120 /* &sColname */, 0) + Xsqlite3TokenInit(tls, bp+72 /* &sColname */, zColname) + Xsqlite3ExprListSetName(tls, pParse, pNew, bp+72 /* &sColname */, 0) if ((pNew != 0) && (((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_NestedFrom)) != U32(0))) && !(int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) { var pX uintptr = ((pNew + 8 /* &.a */) + uintptr(((*ExprList)(unsafe.Pointer(pNew)).FnExpr-1))*32) Xsqlite3DbFree(tls, db, (*ExprList_item)(unsafe.Pointer(pX)).FzEName) @@ -163807,7 +163807,7 @@ __3: } else { (*ExprList_item)(unsafe.Pointer(pX)).FzEName = Xsqlite3MPrintf(tls, db, ts+19227, /* "%s.%s.%s" */ - libc.VaList(bp+72, zSchemaName, zTabName, zColname)) + libc.VaList(bp+40, zSchemaName, zTabName, zColname)) } libc.SetBitFieldPtr8Uint32(pX+20 /* &.eEName */, uint32(ENAME_TAB), 0, 0x3) @@ -163826,7 +163826,7 @@ __3: ; if !(tableSeen != 0) { if zTName != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+19236 /* "no such table: %..." */, libc.VaList(bp+104, zTName)) + Xsqlite3ErrorMsg(tls, pParse, ts+19236 /* "no such table: %..." */, libc.VaList(bp+64, zTName)) } else { Xsqlite3ErrorMsg(tls, pParse, ts+19254 /* "no tables specif..." */, 0) } @@ -164000,8 +164000,8 @@ func Xsqlite3SelectPrep(tls *libc.TLS, pParse uintptr, p uintptr, pOuterNC uintp // routine generates code that stores NULLs in all of those memory // cells. func resetAccumulator(tls *libc.TLS, pParse uintptr, pAggInfo uintptr) { /* sqlite3.c:137894:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe var i int32 @@ -164227,8 +164227,8 @@ __9: // Add a single OP_Explain instruction to the VDBE to explain a simple // count(*) query ("SELECT count(*) FROM pTab"). func explainSimpleCount(tls *libc.TLS, pParse uintptr, pTab uintptr, pIdx uintptr) { /* sqlite3.c:138061:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) if int32((*Parse)(unsafe.Pointer(pParse)).Fexplain) == 2 { var bCover int32 = (libc.Bool32((pIdx != uintptr(0)) && ((((*Table)(unsafe.Pointer((pTab))).FtabFlags & U32(TF_WithoutRowid)) == U32(0)) || !((int32(*(*uint16)(unsafe.Pointer((pIdx) + 100 /* &.idxType */)) & 0x3 >> 0)) == SQLITE_IDXTYPE_PRIMARYKEY)))) @@ -164373,8 +164373,8 @@ func agginfoFree(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:138181:13: // This routine does NOT free the Select structure passed in. The // calling function needs to do that. func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int32 { /* sqlite3.c:138287:20: */ - bp := tls.Alloc(248) - defer tls.Free(248) + bp := tls.Alloc(216) + defer tls.Free(216) var i int32 var j int32 // Loop counters @@ -164388,13 +164388,13 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pHaving uintptr // The HAVING clause. May be NULL var pAggInfo uintptr // Aggregate information var rc int32 // Value to return from this function - // var sDistinct DistinctCtx at bp+168, 12 + // var sDistinct DistinctCtx at bp+136, 12 // Info on how to code the DISTINCT keyword - // var sSort SortCtx at bp+80, 48 + // var sSort SortCtx at bp+48, 48 // Info on how to code the ORDER BY clause var iEnd int32 // Address of the end of the query var db uintptr // The database connection - // var pMinMaxOrderBy uintptr at bp+240, 8 + // var pMinMaxOrderBy uintptr at bp+208, 8 // Added ORDER BY for min/max queries var minMaxFlag U8 var p1 uintptr @@ -164419,7 +164419,7 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var retAddr int32 var pItem1 uintptr var pPrior uintptr - // var dest SelectDest at bp+128, 40 + // var dest SelectDest at bp+96, 40 var pSub1 uintptr var zSavedAuthContext uintptr @@ -164486,7 +164486,7 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int var pTab1 uintptr // This case when there exist aggregate functions or a GROUP BY clause // or both - // var sNC NameContext at bp+184, 56 + // var sNC NameContext at bp+152, 56 // Name context for processing aggregate information var iAMem int32 // First Mem address for storing current GROUP BY var iBMem int32 // First Mem address for previous GROUP BY @@ -164502,7 +164502,7 @@ func Xsqlite3Select(tls *libc.TLS, pParse uintptr, p uintptr, pDest uintptr) int pEList = uintptr(0) pAggInfo = uintptr(0) rc = 1 - *(*uintptr)(unsafe.Pointer(bp + 240 /* pMinMaxOrderBy */)) = uintptr(0) // Flag for min/max queries + *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */)) = uintptr(0) // Flag for min/max queries db = (*Parse)(unsafe.Pointer(pParse)).Fdb v = Xsqlite3GetVdbe(tls, pParse) @@ -164602,8 +164602,8 @@ __12: ; pTabList = (*Select)(unsafe.Pointer(p)).FpSrc isAgg = (libc.Bool32(((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Aggregate)) != U32(0))) - libc.Xmemset(tls, bp+80 /* &sSort */, 0, uint64(unsafe.Sizeof(SortCtx{}))) - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy + libc.Xmemset(tls, bp+48 /* &sSort */, 0, uint64(unsafe.Sizeof(SortCtx{}))) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy // Try to do various optimizations (flattening subqueries, and strength // reduction of join operators) in the FROM clause up into the main query @@ -164647,7 +164647,7 @@ __17: goto __18 } Xsqlite3ErrorMsg(tls, pParse, ts+19478, /* "expected %d colu..." */ - libc.VaList(bp+16, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) + libc.VaList(bp+8, int32((*Table)(unsafe.Pointer(pTab)).FnCol), (*Table)(unsafe.Pointer(pTab)).FzName, (*ExprList)(unsafe.Pointer((*Select)(unsafe.Pointer(pSub)).FpEList)).FnExpr)) goto select_end __18: ; @@ -164716,7 +164716,7 @@ __23: if !(!((int32((*SelectDest)(unsafe.Pointer(pDest)).FeDest)) <= SRT_Fifo)) { goto __24 } - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = (*Select)(unsafe.Pointer(p)).FpOrderBy __24: ; goto __14 @@ -164851,12 +164851,12 @@ __35: Xsqlite3VdbeAddOp3(tls, v, OP_InitCoroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn, 0, addrTop) (*SrcItem)(unsafe.Pointer(pItem1)).FaddrFillSub = addrTop - Xsqlite3SelectDestInit(tls, bp+128 /* &dest */, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19518 /* "CO-ROUTINE %!S" */, libc.VaList(bp+48, pItem1)) - Xsqlite3Select(tls, pParse, pSub1, bp+128 /* &dest */) + Xsqlite3SelectDestInit(tls, bp+96 /* &dest */, SRT_Coroutine, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19518 /* "CO-ROUTINE %!S" */, libc.VaList(bp+32, pItem1)) + Xsqlite3Select(tls, pParse, pSub1, bp+96 /* &dest */) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow libc.SetBitFieldPtr16Uint32(pItem1+60 /* &.fg */ +4 /* &.viaCoroutine */, uint32(1), 4, 0x10) - (*SrcItem)(unsafe.Pointer(pItem1)).FregResult = (*SelectDest)(unsafe.Pointer(bp + 128 /* &dest */)).FiSdst + (*SrcItem)(unsafe.Pointer(pItem1)).FregResult = (*SelectDest)(unsafe.Pointer(bp + 96 /* &dest */)).FiSdst Xsqlite3VdbeEndCoroutine(tls, v, (*SrcItem)(unsafe.Pointer(pItem1)).FregReturn) Xsqlite3VdbeJumpHere(tls, v, (addrTop - 1)) Xsqlite3ClearTempRegCache(tls, pParse) @@ -164913,9 +164913,9 @@ __44: ; __45: ; - Xsqlite3SelectDestInit(tls, bp+128 /* &dest */, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) - Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19533 /* "MATERIALIZE %!S" */, libc.VaList(bp+64, pItem1)) - Xsqlite3Select(tls, pParse, pSub1, bp+128 /* &dest */) + Xsqlite3SelectDestInit(tls, bp+96 /* &dest */, SRT_EphemTab, (*SrcItem)(unsafe.Pointer(pItem1)).FiCursor) + Xsqlite3VdbeExplain(tls, pParse, uint8(1), ts+19533 /* "MATERIALIZE %!S" */, libc.VaList(bp+40, pItem1)) + Xsqlite3Select(tls, pParse, pSub1, bp+96 /* &dest */) (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pItem1)).FpTab)).FnRowLogEst = (*Select)(unsafe.Pointer(pSub1)).FnSelectRow if !(onceAddr != 0) { goto __46 @@ -164965,7 +164965,7 @@ __31: pWhere = (*Select)(unsafe.Pointer(p)).FpWhere pGroupBy = (*Select)(unsafe.Pointer(p)).FpGroupBy pHaving = (*Select)(unsafe.Pointer(p)).FpHaving - (*DistinctCtx)(unsafe.Pointer(bp + 168 /* &sDistinct */)).FisTnct = (U8(libc.Bool32(((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Distinct)) != U32(0)))) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FisTnct = (U8(libc.Bool32(((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Distinct)) != U32(0)))) // If the query is DISTINCT with an ORDER BY but is not an aggregate, and // if the select-list is the same as the ORDER BY list, then this query @@ -164982,7 +164982,7 @@ __31: // written the query must use a temp-table for at least one of the ORDER // BY and DISTINCT, and an index or separate temp-table for the other. if !(((((*Select)(unsafe.Pointer(p)).FselFlags & (U32(SF_Distinct | SF_Aggregate))) == U32(SF_Distinct)) && - (Xsqlite3ExprListCompare(tls, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy, pEList, -1) == 0)) && + (Xsqlite3ExprListCompare(tls, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy, pEList, -1) == 0)) && ((*Select)(unsafe.Pointer(p)).FpWin == uintptr(0))) { goto __49 } @@ -165003,18 +165003,18 @@ __49: // changed to an OP_Noop once we figure out that the sorting index is // not needed. The sSort.addrSortIndex variable is used to facilitate // that change. - if !((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy != 0) { + if !((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy != 0) { goto __50 } pKeyInfo = Xsqlite3KeyInfoFromExprList(tls, - pParse, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy, 0, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FiECursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FaddrSortIndex = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, - (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FiECursor, (((*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy)).FnExpr + 1) + (*ExprList)(unsafe.Pointer(pEList)).FnExpr), 0, + pParse, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy, 0, (*ExprList)(unsafe.Pointer(pEList)).FnExpr) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FiECursor = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FaddrSortIndex = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, + (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FiECursor, (((*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy)).FnExpr + 1) + (*ExprList)(unsafe.Pointer(pEList)).FnExpr), 0, pKeyInfo, -9) goto __51 __50: - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FaddrSortIndex = -1 + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FaddrSortIndex = -1 __51: ; @@ -165035,11 +165035,11 @@ __52: __53: ; computeLimitRegisters(tls, pParse, p, iEnd) - if !(((*Select)(unsafe.Pointer(p)).FiLimit == 0) && ((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FaddrSortIndex >= 0)) { + if !(((*Select)(unsafe.Pointer(p)).FiLimit == 0) && ((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex >= 0)) { goto __54 } - Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FaddrSortIndex, uint8(OP_SorterOpen)) - *(*U8)(unsafe.Pointer(bp + 80 /* &sSort */ + 36 /* &.sortFlags */)) |= U8((SORTFLAG_UseSorter)) + Xsqlite3VdbeChangeOpcode(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex, uint8(OP_SorterOpen)) + *(*U8)(unsafe.Pointer(bp + 48 /* &sSort */ + 36 /* &.sortFlags */)) |= U8((SORTFLAG_UseSorter)) __54: ; @@ -165047,16 +165047,16 @@ __54: if !(((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Distinct)) != 0) { goto __55 } - (*DistinctCtx)(unsafe.Pointer(bp + 168 /* &sDistinct */)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) - (*DistinctCtx)(unsafe.Pointer(bp + 168 /* &sDistinct */)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, - (*DistinctCtx)(unsafe.Pointer(bp+168 /* &sDistinct */)).FtabTnct, 0, 0, + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FtabTnct = libc.PostIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnTab, 1) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FaddrTnct = Xsqlite3VdbeAddOp4(tls, v, OP_OpenEphemeral, + (*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FtabTnct, 0, 0, Xsqlite3KeyInfoFromExprList(tls, pParse, (*Select)(unsafe.Pointer(p)).FpEList, 0, 0), -9) Xsqlite3VdbeChangeP5(tls, v, uint16(BTREE_UNORDERED)) - (*DistinctCtx)(unsafe.Pointer(bp + 168 /* &sDistinct */)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FeTnctType = U8(WHERE_DISTINCT_UNORDERED) goto __56 __55: - (*DistinctCtx)(unsafe.Pointer(bp + 168 /* &sDistinct */)).FeTnctType = U8(WHERE_DISTINCT_NOOP) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FeTnctType = U8(WHERE_DISTINCT_NOOP) __56: ; @@ -165065,7 +165065,7 @@ __56: } // No aggregate functions and no GROUP BY clause wctrlFlags = (U16((func() uint32 { - if (*DistinctCtx)(unsafe.Pointer(bp+168 /* &sDistinct */)).FisTnct != 0 { + if (*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FisTnct != 0 { return uint32(WHERE_WANT_DISTINCT) } return uint32(0) @@ -165081,7 +165081,7 @@ __59: // Begin the database scan. - pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy, + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy, (*Select)(unsafe.Pointer(p)).FpEList, wctrlFlags, int32((*Select)(unsafe.Pointer(p)).FnSelectRow)) if !(pWInfo == uintptr(0)) { goto __60 @@ -165095,21 +165095,21 @@ __60: (*Select)(unsafe.Pointer(p)).FnSelectRow = Xsqlite3WhereOutputRowCount(tls, pWInfo) __61: ; - if !(((*DistinctCtx)(unsafe.Pointer(bp+168 /* &sDistinct */)).FisTnct != 0) && (Xsqlite3WhereIsDistinct(tls, pWInfo) != 0)) { + if !(((*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FisTnct != 0) && (Xsqlite3WhereIsDistinct(tls, pWInfo) != 0)) { goto __62 } - (*DistinctCtx)(unsafe.Pointer(bp + 168 /* &sDistinct */)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) + (*DistinctCtx)(unsafe.Pointer(bp + 136 /* &sDistinct */)).FeTnctType = U8(Xsqlite3WhereIsDistinct(tls, pWInfo)) __62: ; - if !((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy != 0) { + if !((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy != 0) { goto __63 } - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) - if !((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy)).FnExpr) { + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FnOBSat = Xsqlite3WhereIsOrdered(tls, pWInfo) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FlabelOBLopt = Xsqlite3WhereOrderByLimitOptLabel(tls, pWInfo) + if !((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FnOBSat == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy)).FnExpr) { goto __64 } - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FpOrderBy = uintptr(0) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0) __64: ; __63: @@ -165118,10 +165118,10 @@ __63: // If sorting index that was created by a prior OP_OpenEphemeral // instruction ended up not being needed, then change the OP_OpenEphemeral // into an OP_Noop. - if !(((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FaddrSortIndex >= 0) && ((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy == uintptr(0))) { + if !(((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex >= 0) && ((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy == uintptr(0))) { goto __65 } - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FaddrSortIndex) + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex) __65: ; @@ -165138,8 +165138,8 @@ __65: Xsqlite3VdbeAddOp2(tls, v, OP_Goto, 0, iBreak) Xsqlite3VdbeResolveLabel(tls, v, addrGosub) - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FlabelOBLopt = 0 - selectInnerLoop(tls, pParse, p, -1, bp+80 /* &sSort */, bp+168 /* &sDistinct */, pDest, iCont, iBreak) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FlabelOBLopt = 0 + selectInnerLoop(tls, pParse, p, -1, bp+48 /* &sSort */, bp+136 /* &sDistinct */, pDest, iCont, iBreak) Xsqlite3VdbeResolveLabel(tls, v, iCont) Xsqlite3VdbeAddOp1(tls, v, OP_Return, regGosub) @@ -165148,7 +165148,7 @@ __65: __66: // Use the standard inner loop. - selectInnerLoop(tls, pParse, p, -1, bp+80 /* &sSort */, bp+168 /* &sDistinct */, pDest, + selectInnerLoop(tls, pParse, p, -1, bp+48 /* &sSort */, bp+136 /* &sDistinct */, pDest, Xsqlite3WhereContinueLabel(tls, pWInfo), Xsqlite3WhereBreakLabel(tls, pWInfo)) @@ -165215,7 +165215,7 @@ __76: // but not actually sorted. Either way, record the fact that the // ORDER BY and GROUP BY clauses are the same by setting the orderByGrp // variable. - if !(((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy != 0) && ((*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy)).FnExpr)) { + if !(((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy != 0) && ((*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr == (*ExprList)(unsafe.Pointer((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy)).FnExpr)) { goto __77 } // The GROUP BY processing doesn't care whether rows are delivered in @@ -165228,7 +165228,7 @@ __78: if !(ii < (*ExprList)(unsafe.Pointer(pGroupBy)).FnExpr) { goto __80 } - sortFlags = (U8(int32((*ExprList_item)(unsafe.Pointer(((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy+8 /* &.a */)+uintptr(ii)*32)).FsortFlags) & KEYINFO_ORDER_DESC)) + sortFlags = (U8(int32((*ExprList_item)(unsafe.Pointer(((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy+8 /* &.a */)+uintptr(ii)*32)).FsortFlags) & KEYINFO_ORDER_DESC)) (*ExprList_item)(unsafe.Pointer((pGroupBy + 8 /* &.a */) + uintptr(ii)*32)).FsortFlags = sortFlags goto __79 __79: @@ -165237,7 +165237,7 @@ __79: goto __80 __80: ; - if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy, -1) == 0) { + if !(Xsqlite3ExprListCompare(tls, pGroupBy, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy, -1) == 0) { goto __81 } orderByGrp = 1 @@ -165276,10 +165276,10 @@ __82: __83: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FselId = (*Select)(unsafe.Pointer(p)).FselId - libc.Xmemset(tls, bp+184 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 184 /* &sNC */)).FpParse = pParse - (*NameContext)(unsafe.Pointer(bp + 184 /* &sNC */)).FpSrcList = pTabList - *(*uintptr)(unsafe.Pointer(bp + 184 /* &sNC */ + 16 /* &.uNC */)) = pAggInfo + libc.Xmemset(tls, bp+152 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 152 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 152 /* &sNC */)).FpSrcList = pTabList + *(*uintptr)(unsafe.Pointer(bp + 152 /* &sNC */ + 16 /* &.uNC */)) = pAggInfo (*AggInfo)(unsafe.Pointer(pAggInfo)).FmnReg = ((*Parse)(unsafe.Pointer(pParse)).FnMem + 1) (*AggInfo)(unsafe.Pointer(pAggInfo)).FnSortingColumn = func() int32 { @@ -165289,8 +165289,8 @@ __83: return 0 }() (*AggInfo)(unsafe.Pointer(pAggInfo)).FpGroupBy = pGroupBy - Xsqlite3ExprAnalyzeAggList(tls, bp+184 /* &sNC */, pEList) - Xsqlite3ExprAnalyzeAggList(tls, bp+184 /* &sNC */, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy) + Xsqlite3ExprAnalyzeAggList(tls, bp+152 /* &sNC */, pEList) + Xsqlite3ExprAnalyzeAggList(tls, bp+152 /* &sNC */, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy) if !(pHaving != 0) { goto __84 } @@ -165302,14 +165302,14 @@ __83: pWhere = (*Select)(unsafe.Pointer(p)).FpWhere __85: ; - Xsqlite3ExprAnalyzeAggregates(tls, bp+184 /* &sNC */, pHaving) + Xsqlite3ExprAnalyzeAggregates(tls, bp+152 /* &sNC */, pHaving) __84: ; (*AggInfo)(unsafe.Pointer(pAggInfo)).FnAccumulator = (*AggInfo)(unsafe.Pointer(pAggInfo)).FnColumn if !((((*Select)(unsafe.Pointer(p)).FpGroupBy == uintptr(0)) && ((*Select)(unsafe.Pointer(p)).FpHaving == uintptr(0))) && ((*AggInfo)(unsafe.Pointer(pAggInfo)).FnFunc == 1)) { goto __86 } - minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+240 /* &pMinMaxOrderBy */) + minMaxFlag = minMaxQuery(tls, db, (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc)).FpFExpr, bp+208 /* &pMinMaxOrderBy */) goto __87 __86: minMaxFlag = U8(WHERE_ORDERBY_NORMAL) @@ -165322,16 +165322,16 @@ __88: } pExpr = (*AggInfo_func)(unsafe.Pointer((*AggInfo)(unsafe.Pointer(pAggInfo)).FaFunc + uintptr(i)*32)).FpFExpr - *(*int32)(unsafe.Pointer(bp + 184 /* &sNC */ + 40 /* &.ncFlags */)) |= (NC_InAggFunc) - Xsqlite3ExprAnalyzeAggList(tls, bp+184 /* &sNC */, *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))) + *(*int32)(unsafe.Pointer(bp + 152 /* &sNC */ + 40 /* &.ncFlags */)) |= (NC_InAggFunc) + Xsqlite3ExprAnalyzeAggList(tls, bp+152 /* &sNC */, *(*uintptr)(unsafe.Pointer(pExpr + 32 /* &.x */))) if !(((*Expr)(unsafe.Pointer((pExpr))).Fflags & (U32(EP_WinFunc))) != U32(0)) { goto __91 } - Xsqlite3ExprAnalyzeAggregates(tls, bp+184 /* &sNC */, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)))).FpFilter) + Xsqlite3ExprAnalyzeAggregates(tls, bp+152 /* &sNC */, (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(pExpr + 64 /* &.y */)))).FpFilter) __91: ; - *(*int32)(unsafe.Pointer(bp + 184 /* &sNC */ + 40 /* &.ncFlags */)) &= (libc.CplInt32(NC_InAggFunc)) + *(*int32)(unsafe.Pointer(bp + 152 /* &sNC */ + 40 /* &.ncFlags */)) &= (libc.CplInt32(NC_InAggFunc)) goto __89 __89: i++ @@ -165433,7 +165433,7 @@ __97: explainTempTable(tls, pParse, func() uintptr { - if ((*DistinctCtx)(unsafe.Pointer(bp+168 /* &sDistinct */)).FisTnct != 0) && (((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Distinct)) == U32(0)) { + if ((*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FisTnct != 0) && (((*Select)(unsafe.Pointer(p)).FselFlags & U32(SF_Distinct)) == U32(0)) { return ts + 19549 /* "DISTINCT" */ } return ts + 19558 /* "GROUP BY" */ @@ -165514,8 +165514,8 @@ __98: ((groupBySort != 0) || (Xsqlite3WhereIsSorted(tls, pWInfo) != 0))) { goto __107 } - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FpOrderBy = uintptr(0) - Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FaddrSortIndex) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0) + Xsqlite3VdbeChangeToNoop(tls, v, (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FaddrSortIndex) __107: ; @@ -165617,8 +165617,8 @@ __115: Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) finalizeAggFunctions(tls, pParse, pAggInfo) Xsqlite3ExprIfFalse(tls, pParse, pHaving, (addrOutputRow + 1), SQLITE_JUMPIFNULL) - selectInnerLoop(tls, pParse, p, -1, bp+80, /* &sSort */ - bp+168 /* &sDistinct */, pDest, + selectInnerLoop(tls, pParse, p, -1, bp+48, /* &sSort */ + bp+136 /* &sDistinct */, pDest, (addrOutputRow + 1), addrSetAbort) Xsqlite3VdbeAddOp1(tls, v, OP_Return, regOutputRow) @@ -165797,7 +165797,7 @@ __128: // WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX and pMinMaxOrderBy will // be an appropriate ORDER BY expression for the optimization. - pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 240 /* pMinMaxOrderBy */)), + pWInfo = Xsqlite3WhereBegin(tls, pParse, pTabList, pWhere, *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */)), pDistinct1, (uint16(int32(minMaxFlag) | int32(distFlag1))), 0) if !(pWInfo == uintptr(0)) { goto __136 @@ -165834,7 +165834,7 @@ __139: __118: ; - (*SortCtx)(unsafe.Pointer(bp + 80 /* &sSort */)).FpOrderBy = uintptr(0) + (*SortCtx)(unsafe.Pointer(bp + 48 /* &sSort */)).FpOrderBy = uintptr(0) Xsqlite3ExprIfFalse(tls, pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL) selectInnerLoop(tls, pParse, p, -1, uintptr(0), uintptr(0), pDest, addrEnd, addrEnd) @@ -165845,7 +165845,7 @@ __94: __58: ; // endif aggregate query - if !(int32((*DistinctCtx)(unsafe.Pointer(bp+168 /* &sDistinct */)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { + if !(int32((*DistinctCtx)(unsafe.Pointer(bp+136 /* &sDistinct */)).FeTnctType) == WHERE_DISTINCT_UNORDERED) { goto __140 } explainTempTable(tls, pParse, ts+19549 /* "DISTINCT" */) @@ -165854,18 +165854,18 @@ __140: // If there is an ORDER BY clause, then we need to sort the results // and send them to the callback one by one. - if !((*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FpOrderBy != 0) { + if !((*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FpOrderBy != 0) { goto __141 } explainTempTable(tls, pParse, func() uintptr { - if (*SortCtx)(unsafe.Pointer(bp+80 /* &sSort */)).FnOBSat > 0 { + if (*SortCtx)(unsafe.Pointer(bp+48 /* &sSort */)).FnOBSat > 0 { return ts + 19567 /* "RIGHT PART OF OR..." */ } return ts + 19590 /* "ORDER BY" */ }()) - generateSortTail(tls, pParse, p, bp+80 /* &sSort */, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) + generateSortTail(tls, pParse, p, bp+48 /* &sSort */, (*ExprList)(unsafe.Pointer(pEList)).FnExpr, pDest) __141: ; @@ -165881,7 +165881,7 @@ __141: select_end: ; *(*int32)(unsafe.Pointer(pParse + 48 /* &.nErr */)) += (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed)) - Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 240 /* pMinMaxOrderBy */))) + Xsqlite3ExprListDelete(tls, db, *(*uintptr)(unsafe.Pointer(bp + 208 /* pMinMaxOrderBy */))) Xsqlite3VdbeExplainPop(tls, pParse) return rc @@ -165948,8 +165948,8 @@ type TabResult = TabResult1 /* sqlite3.c:139506:3 */ // is to fill in the TabResult structure appropriately, allocating new // memory as necessary. func sqlite3_get_table_cb(tls *libc.TLS, pArg uintptr, nCol int32, argv uintptr, colv uintptr) int32 { /* sqlite3.c:139513:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var p uintptr // Result accumulator var need int32 // Slots needed in p->azResult[] @@ -166079,11 +166079,11 @@ malloc_failed: // Instead, the entire table should be passed to sqlite3_free_table() when // the calling procedure is finished using it. func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintptr, pnRow uintptr, pnColumn uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:139587:16: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) var rc int32 - // var res TabResult at bp+16, 40 + // var res TabResult at bp+8, 40 *(*uintptr)(unsafe.Pointer(pazResult)) = uintptr(0) if pnColumn != 0 { @@ -166095,56 +166095,56 @@ func Xsqlite3_get_table(tls *libc.TLS, db uintptr, zSql uintptr, pazResult uintp if pzErrMsg != 0 { *(*uintptr)(unsafe.Pointer(pzErrMsg)) = uintptr(0) } - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FzErrMsg = uintptr(0) - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnRow = U32(0) - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnColumn = U32(0) - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnData = U32(1) - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnAlloc = U32(20) - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).Frc = SQLITE_OK - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FazResult = Xsqlite3_malloc64(tls, (uint64(unsafe.Sizeof(uintptr(0))) * uint64((*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FnAlloc))) - if (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FazResult == uintptr(0) { + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FzErrMsg = uintptr(0) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnRow = U32(0) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnColumn = U32(0) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnData = U32(1) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnAlloc = U32(20) + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).Frc = SQLITE_OK + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult = Xsqlite3_malloc64(tls, (uint64(unsafe.Sizeof(uintptr(0))) * uint64((*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FnAlloc))) + if (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult == uintptr(0) { (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_NOMEM return SQLITE_NOMEM } - *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FazResult)) = uintptr(0) + *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult)) = uintptr(0) rc = Xsqlite3_exec(tls, db, zSql, *(*uintptr)(unsafe.Pointer(&struct { f func(*libc.TLS, uintptr, int32, uintptr, uintptr) int32 - }{sqlite3_get_table_cb})), bp+16 /* &res */, pzErrMsg) + }{sqlite3_get_table_cb})), bp+8 /* &res */, pzErrMsg) - *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FazResult)) = uintptr(int64((*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnData)) + *(*uintptr)(unsafe.Pointer((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult)) = uintptr(int64((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnData)) if (rc & 0xff) == SQLITE_ABORT { - Xsqlite3_free_table(tls, ((*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FazResult + 1*8)) - if (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FzErrMsg != 0 { + Xsqlite3_free_table(tls, ((*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult + 1*8)) + if (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg != 0 { if pzErrMsg != 0 { Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(pzErrMsg))) - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FzErrMsg)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg)) } - Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FzErrMsg) + Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg) } - (*Sqlite3)(unsafe.Pointer(db)).FerrCode = (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).Frc // Assume 32-bit assignment is atomic - return (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).Frc + (*Sqlite3)(unsafe.Pointer(db)).FerrCode = (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).Frc // Assume 32-bit assignment is atomic + return (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).Frc } - Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FzErrMsg) + Xsqlite3_free(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FzErrMsg) if rc != SQLITE_OK { - Xsqlite3_free_table(tls, ((*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FazResult + 1*8)) + Xsqlite3_free_table(tls, ((*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult + 1*8)) return rc } - if (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FnAlloc > (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FnData { + if (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FnAlloc > (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FnData { var azNew uintptr - azNew = Xsqlite3Realloc(tls, (*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FazResult, (uint64(unsafe.Sizeof(uintptr(0))) * uint64((*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FnData))) + azNew = Xsqlite3Realloc(tls, (*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult, (uint64(unsafe.Sizeof(uintptr(0))) * uint64((*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FnData))) if azNew == uintptr(0) { - Xsqlite3_free_table(tls, ((*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FazResult + 1*8)) + Xsqlite3_free_table(tls, ((*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult + 1*8)) (*Sqlite3)(unsafe.Pointer(db)).FerrCode = SQLITE_NOMEM return SQLITE_NOMEM } - (*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FazResult = azNew + (*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FazResult = azNew } - *(*uintptr)(unsafe.Pointer(pazResult)) = ((*TabResult)(unsafe.Pointer(bp+16 /* &res */)).FazResult + 1*8) + *(*uintptr)(unsafe.Pointer(pazResult)) = ((*TabResult)(unsafe.Pointer(bp+8 /* &res */)).FazResult + 1*8) if pnColumn != 0 { - *(*int32)(unsafe.Pointer(pnColumn)) = int32((*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnColumn) + *(*int32)(unsafe.Pointer(pnColumn)) = int32((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnColumn) } if pnRow != 0 { - *(*int32)(unsafe.Pointer(pnRow)) = int32((*TabResult)(unsafe.Pointer(bp + 16 /* &res */)).FnRow) + *(*int32)(unsafe.Pointer(pnRow)) = int32((*TabResult)(unsafe.Pointer(bp + 8 /* &res */)).FnRow) } return rc } @@ -166249,17 +166249,17 @@ func Xsqlite3TriggerList(tls *libc.TLS, pParse uintptr, pTab uintptr) uintptr { // sqlite3FinishTrigger() function is called to complete the trigger // construction process. func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 uintptr, tr_tm int32, op int32, pColumns uintptr, pTableName uintptr, pWhen uintptr, isTemp int32, noErr int32) { /* sqlite3.c:139778:21: */ - bp := tls.Alloc(160) - defer tls.Free(160) + bp := tls.Alloc(136) + defer tls.Free(136) var pTrigger uintptr // The new trigger var pTab uintptr // Table that the trigger fires off of var zName uintptr // Name of the trigger var db uintptr // The database connection var iDb int32 // The database to store the trigger in - // var pName uintptr at bp+56, 8 + // var pName uintptr at bp+32, 8 // The unqualified db name - // var sFix DbFixer at bp+64, 96 + // var sFix DbFixer at bp+40, 96 var iTabDb int32 var code int32 @@ -166283,11 +166283,11 @@ func Xsqlite3BeginTrigger(tls *libc.TLS, pParse uintptr, pName1 uintptr, pName2 __3: ; iDb = 1 - *(*uintptr)(unsafe.Pointer(bp + 56 /* pName */)) = pName1 + *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)) = pName1 goto __2 __1: // Figure out the db that the trigger will be created in - iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+56 /* &pName */) + iDb = Xsqlite3TwoPartName(tls, pParse, pName1, pName2, bp+32 /* &pName */) if !(iDb < 0) { goto __4 } @@ -166339,8 +166339,8 @@ __7: __8: ; - Xsqlite3FixInit(tls, bp+64 /* &sFix */, pParse, iDb, ts+19710 /* "trigger" */, *(*uintptr)(unsafe.Pointer(bp + 56 /* pName */))) - if !(Xsqlite3FixSrcList(tls, bp+64 /* &sFix */, pTableName) != 0) { + Xsqlite3FixInit(tls, bp+40 /* &sFix */, pParse, iDb, ts+19710 /* "trigger" */, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) + if !(Xsqlite3FixSrcList(tls, bp+40 /* &sFix */, pTableName) != 0) { goto __9 } goto trigger_cleanup @@ -166364,7 +166364,7 @@ __11: // Check that the trigger name is not reserved and that no trigger of the // specified name exists - zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 56 /* pName */))) + zName = Xsqlite3NameFromToken(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */))) if !(zName == uintptr(0)) { goto __12 } @@ -166388,7 +166388,7 @@ __13: if !(!(noErr != 0)) { goto __16 } - Xsqlite3ErrorMsg(tls, pParse, ts+19759 /* "trigger %T alrea..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 56 /* pName */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+19759 /* "trigger %T alrea..." */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* pName */)))) goto __17 __16: ; @@ -166416,7 +166416,7 @@ __18: goto __19 } Xsqlite3ErrorMsg(tls, pParse, ts+19823, /* "cannot create %s..." */ - libc.VaList(bp+16, func() uintptr { + libc.VaList(bp+8, func() uintptr { if tr_tm == TK_BEFORE { return ts + 19860 /* "BEFORE" */ } @@ -166429,7 +166429,7 @@ __19: goto __20 } Xsqlite3ErrorMsg(tls, pParse, - ts+19873 /* "cannot create IN..." */, libc.VaList(bp+40, pTableName+8 /* &.a */)) + ts+19873 /* "cannot create IN..." */, libc.VaList(bp+24, pTableName+8 /* &.a */)) goto trigger_orphan_error __20: ; @@ -166556,16 +166556,16 @@ __31: // This routine is called after all of the trigger actions have been parsed // in order to complete the process of building the trigger. func Xsqlite3FinishTrigger(tls *libc.TLS, pParse uintptr, pStepList uintptr, pAll uintptr) { /* sqlite3.c:139985:21: */ - bp := tls.Alloc(168) - defer tls.Free(168) + bp := tls.Alloc(152) + defer tls.Free(152) var pTrig uintptr // Trigger being finished var zName uintptr // Name of trigger var db uintptr // The database - // var sFix DbFixer at bp+72, 96 + // var sFix DbFixer at bp+56, 96 // Fixer object var iDb int32 // Database containing the trigger - // var nameToken Token at bp+56, 16 + // var nameToken Token at bp+40, 16 var v uintptr var z uintptr @@ -166594,10 +166594,10 @@ __2: goto __2 __3: ; - Xsqlite3TokenInit(tls, bp+56 /* &nameToken */, (*Trigger)(unsafe.Pointer(pTrig)).FzName) - Xsqlite3FixInit(tls, bp+72 /* &sFix */, pParse, iDb, ts+19710 /* "trigger" */, bp+56 /* &nameToken */) - if !((Xsqlite3FixTriggerStep(tls, bp+72 /* &sFix */, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0) || - (Xsqlite3FixExpr(tls, bp+72 /* &sFix */, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0)) { + Xsqlite3TokenInit(tls, bp+40 /* &nameToken */, (*Trigger)(unsafe.Pointer(pTrig)).FzName) + Xsqlite3FixInit(tls, bp+56 /* &sFix */, pParse, iDb, ts+19710 /* "trigger" */, bp+40 /* &nameToken */) + if !((Xsqlite3FixTriggerStep(tls, bp+56 /* &sFix */, (*Trigger)(unsafe.Pointer(pTrig)).Fstep_list) != 0) || + (Xsqlite3FixExpr(tls, bp+56 /* &sFix */, (*Trigger)(unsafe.Pointer(pTrig)).FpWhen) != 0)) { goto __4 } goto triggerfinish_cleanup @@ -166638,7 +166638,7 @@ __8: Xsqlite3DbFree(tls, db, z) Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, - Xsqlite3MPrintf(tls, db, ts+19994 /* "type='trigger' A..." */, libc.VaList(bp+40, zName)), uint16(0)) + Xsqlite3MPrintf(tls, db, ts+19994 /* "type='trigger' A..." */, libc.VaList(bp+32, zName)), uint16(0)) __7: ; __6: @@ -166839,8 +166839,8 @@ func Xsqlite3DeleteTrigger(tls *libc.TLS, db uintptr, pTrigger uintptr) { /* sql // instead of the trigger name. // func Xsqlite3DropTrigger(tls *libc.TLS, pParse uintptr, pName uintptr, noErr int32) { /* sqlite3.c:140273:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pTrigger uintptr var i int32 @@ -166928,8 +166928,8 @@ func tableOfTrigger(tls *libc.TLS, pTrigger uintptr) uintptr { /* sqlite3.c:1403 // Drop a trigger given a pointer to that trigger. func Xsqlite3DropTriggerPtr(tls *libc.TLS, pParse uintptr, pTrigger uintptr) { /* sqlite3.c:140323:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pTable uintptr var v uintptr @@ -167017,8 +167017,8 @@ func checkColumnOverlap(tls *libc.TLS, pIdList uintptr, pEList uintptr) int32 { // performed on the table, and, if that operation is an UPDATE, if at // least one of the columns in pChanges is being modified. func Xsqlite3TriggersExist(tls *libc.TLS, pParse uintptr, pTab uintptr, op int32, pChanges uintptr, pMask uintptr) uintptr { /* sqlite3.c:140410:24: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var mask int32 var pList uintptr @@ -167292,8 +167292,8 @@ func codeReturningTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab // Generate VDBE code for the statements inside the body of a single // trigger. func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf int32) int32 { /* sqlite3.c:140645:12: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) var pStep uintptr var v uintptr = (*Parse)(unsafe.Pointer(pParse)).FpVdbe @@ -167360,11 +167360,11 @@ func codeTriggerProgram(tls *libc.TLS, pParse uintptr, pStepList uintptr, orconf } default: { - // var sDest SelectDest at bp+16, 40 + // var sDest SelectDest at bp+8, 40 var pSelect uintptr = Xsqlite3SelectDup(tls, db, (*TriggerStep)(unsafe.Pointer(pStep)).FpSelect, 0) - Xsqlite3SelectDestInit(tls, bp+16 /* &sDest */, SRT_Discard, 0) - Xsqlite3Select(tls, pParse, pSelect, bp+16 /* &sDest */) + Xsqlite3SelectDestInit(tls, bp+8 /* &sDest */, SRT_Discard, 0) + Xsqlite3Select(tls, pParse, pSelect, bp+8 /* &sDest */) Xsqlite3SelectDelete(tls, db, pSelect) break @@ -167392,8 +167392,8 @@ func transferParseError(tls *libc.TLS, pTo uintptr, pFrom uintptr) { /* sqlite3. // Create and populate a new TriggerPrg object with a sub-program // implementing trigger pTrigger with ON CONFLICT policy orconf. func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintptr, orconf int32) uintptr { /* sqlite3.c:140765:19: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(64) + defer tls.Free(64) var pTop uintptr = func() uintptr { if (*Parse)(unsafe.Pointer(pParse)).FpToplevel != 0 { @@ -167405,7 +167405,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt var pPrg uintptr // Value to return var pWhen uintptr = uintptr(0) // Duplicate of trigger WHEN expression var v uintptr // Temporary VM - // var sNC NameContext at bp+16, 56 + // var sNC NameContext at bp+8, 56 // Name context for sub-vdbe var pProgram uintptr = uintptr(0) // Sub-vdbe for trigger program var pSubParse uintptr // Parse context for sub-vdbe @@ -167436,8 +167436,8 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if !(pSubParse != 0) { return uintptr(0) } - libc.Xmemset(tls, bp+16 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpParse = pSubParse + libc.Xmemset(tls, bp+8 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 8 /* &sNC */)).FpParse = pSubParse (*Parse)(unsafe.Pointer(pSubParse)).Fdb = db (*Parse)(unsafe.Pointer(pSubParse)).FpTriggerTab = pTab (*Parse)(unsafe.Pointer(pSubParse)).FpToplevel = pTop @@ -167460,7 +167460,7 @@ func codeRowTrigger(tls *libc.TLS, pParse uintptr, pTrigger uintptr, pTab uintpt if (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen != 0 { pWhen = Xsqlite3ExprDup(tls, db, (*Trigger)(unsafe.Pointer(pTrigger)).FpWhen, 0) if (int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) == 0) && - (SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+16 /* &sNC */, pWhen)) { + (SQLITE_OK == Xsqlite3ResolveExprNames(tls, bp+8 /* &sNC */, pWhen)) { iEndTrigger = Xsqlite3VdbeMakeLabel(tls, pSubParse) Xsqlite3ExprIfFalse(tls, pSubParse, pWhen, iEndTrigger, SQLITE_JUMPIFNULL) } @@ -167878,8 +167878,8 @@ func updateFromSelect(tls *libc.TLS, pParse uintptr, iEph int32, pPk uintptr, pC // \_______________________/ // pTabList func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges uintptr, pWhere uintptr, onError int32, pOrderBy uintptr, pLimit uintptr, pUpsert uintptr) { /* sqlite3.c:141372:21: */ - bp := tls.Alloc(124) - defer tls.Free(124) + bp := tls.Alloc(108) + defer tls.Free(108) var i int32 var j int32 @@ -167906,9 +167906,9 @@ func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui var chngKey U8 // Either chngPk or chngRowid var pRowidExpr uintptr // Expression defining the new record number var iRowidExpr int32 // Index of "rowid=" (or IPK) assignment in pChanges - // var sContext AuthContext at bp+32, 16 + // var sContext AuthContext at bp+16, 16 // The authorization context - // var sNC NameContext at bp+56, 56 + // var sNC NameContext at bp+40, 56 // The name-context to resolve expressions in var iDb int32 // Database containing the table being updated var eOnePass int32 // ONEPASS_XXX value from where.c @@ -167919,17 +167919,17 @@ func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui var isView int32 // True when updating a view (INSTEAD OF trigger) var pTrigger uintptr // List of triggers on pTab, if required - // var tmask int32 at bp+48, 4 + // var tmask int32 at bp+32, 4 // Mask of TRIGGER_BEFORE|TRIGGER_AFTER var newmask int32 // Mask of NEW.* columns accessed by BEFORE triggers var iEph int32 // Ephemeral table holding all primary key values var nKey int32 // Number of elements in regKey for WITHOUT ROWID - // var aiCurOnePass [2]int32 at bp+112, 8 + // var aiCurOnePass [2]int32 at bp+96, 8 // The write cursors opened by WHERE_ONEPASS var addrOpen int32 // Address of OP_OpenEphemeral var iPk int32 // First of nPk cells holding PRIMARY KEY value var nPk I16 // Number of components of the PRIMARY KEY - // var bReplace int32 at bp+120, 4 + // var bReplace int32 at bp+104, 4 // True if REPLACE conflict resolution might happen var bFinishSeek int32 // The OP_FinishSeek opcode is needed var nChangeFrom int32 // If there is a FROM, pChanges->nExpr, else 0 @@ -167963,7 +167963,7 @@ func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui addrOpen = 0 iPk = 0 nPk = int16(0) - *(*int32)(unsafe.Pointer(bp + 120 /* bReplace */)) = 0 + *(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) = 0 bFinishSeek = 1 nChangeFrom = 0 regRowCount = 0 @@ -167974,7 +167974,7 @@ func Xsqlite3Update(tls *libc.TLS, pParse uintptr, pTabList uintptr, pChanges ui regRowSet = 0 regKey = 0 // composite PRIMARY KEY value - libc.Xmemset(tls, bp+32 /* &sContext */, 0, uint64(unsafe.Sizeof(AuthContext{}))) + libc.Xmemset(tls, bp+16 /* &sContext */, 0, uint64(unsafe.Sizeof(AuthContext{}))) db = (*Parse)(unsafe.Pointer(pParse)).Fdb if !(((*Parse)(unsafe.Pointer(pParse)).FnErr != 0) || ((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed != 0)) { goto __1 @@ -167995,7 +167995,7 @@ __2: // Figure out if we have any triggers and if the table being // updated is a view. - pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_UPDATE, pChanges, bp+48 /* &tmask */) + pTrigger = Xsqlite3TriggersExist(tls, pParse, pTab, TK_UPDATE, pChanges, bp+32 /* &tmask */) isView = (libc.Bool32((*Table)(unsafe.Pointer(pTab)).FpSelect != uintptr(0))) // If there was a FROM clause, set nChangeFrom to the number of expressions @@ -168014,7 +168014,7 @@ __2: goto update_cleanup __3: ; - if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 48 /* tmask */))) != 0) { + if !(Xsqlite3IsReadOnly(tls, pParse, pTab, *(*int32)(unsafe.Pointer(bp + 32 /* tmask */))) != 0) { goto __4 } goto update_cleanup @@ -168093,11 +168093,11 @@ __13: ; // Initialize the name-context - libc.Xmemset(tls, bp+56 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 56 /* &sNC */)).FpParse = pParse - (*NameContext)(unsafe.Pointer(bp + 56 /* &sNC */)).FpSrcList = pTabList - *(*uintptr)(unsafe.Pointer(bp + 56 /* &sNC */ + 16 /* &.uNC */)) = pUpsert - (*NameContext)(unsafe.Pointer(bp + 56 /* &sNC */)).FncFlags = NC_UUpsert + libc.Xmemset(tls, bp+40 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 40 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 40 /* &sNC */)).FpSrcList = pTabList + *(*uintptr)(unsafe.Pointer(bp + 40 /* &sNC */ + 16 /* &.uNC */)) = pUpsert + (*NameContext)(unsafe.Pointer(bp + 40 /* &sNC */)).FncFlags = NC_UUpsert // Begin generating code. v = Xsqlite3GetVdbe(tls, pParse) @@ -168121,7 +168121,7 @@ __15: } // If this is an UPDATE with a FROM clause, do not resolve expressions // here. The call to sqlite3Select() below will do that. - if !((nChangeFrom == 0) && (Xsqlite3ResolveExprNames(tls, bp+56 /* &sNC */, (*ExprList_item)(unsafe.Pointer((pChanges+8 /* &.a */)+uintptr(i)*32)).FpExpr) != 0)) { + if !((nChangeFrom == 0) && (Xsqlite3ResolveExprNames(tls, bp+40 /* &sNC */, (*ExprList_item)(unsafe.Pointer((pChanges+8 /* &.a */)+uintptr(i)*32)).FpExpr) != 0)) { goto __18 } goto update_cleanup @@ -168186,7 +168186,7 @@ __21: iRowidExpr = i goto __30 __29: - Xsqlite3ErrorMsg(tls, pParse, ts+20259 /* "no such column: ..." */, libc.VaList(bp+16, (*ExprList_item)(unsafe.Pointer((pChanges+8 /* &.a */)+uintptr(i)*32)).FzEName)) + Xsqlite3ErrorMsg(tls, pParse, ts+20259 /* "no such column: ..." */, libc.VaList(bp+8, (*ExprList_item)(unsafe.Pointer((pChanges+8 /* &.a */)+uintptr(i)*32)).FzEName)) (*Parse)(unsafe.Pointer(pParse)).FcheckSchema = U8(1) goto update_cleanup __30: @@ -168301,7 +168301,7 @@ __34: if !(onError == OE_Replace) { goto __44 } - *(*int32)(unsafe.Pointer(bp + 120 /* bReplace */)) = 1 + *(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) = 1 __44: ; nAllIdx = 0 @@ -168332,7 +168332,7 @@ __50: if !((onError == OE_Default) && (int32((*Index)(unsafe.Pointer(pIdx)).FonError) == OE_Replace)) { goto __54 } - *(*int32)(unsafe.Pointer(bp + 120 /* bReplace */)) = 1 + *(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) = 1 __54: ; goto __52 @@ -168363,7 +168363,7 @@ __46: __47: ; *(*int32)(unsafe.Pointer(aRegIdx + uintptr(nAllIdx)*4)) = libc.PreIncInt32(&(*Parse)(unsafe.Pointer(pParse)).FnMem, 1) // Register storing the table record - if !(*(*int32)(unsafe.Pointer(bp + 120 /* bReplace */)) != 0) { + if !(*(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) != 0) { goto __56 } // If REPLACE conflict resolution might be invoked, open cursors on all @@ -168414,7 +168414,7 @@ __58: if !(isView != 0) { goto __61 } - Xsqlite3AuthContextPush(tls, pParse, bp+32 /* &sContext */, (*Table)(unsafe.Pointer(pTab)).FzName) + Xsqlite3AuthContextPush(tls, pParse, bp+16 /* &sContext */, (*Table)(unsafe.Pointer(pTab)).FzName) __61: ; @@ -168432,7 +168432,7 @@ __62: // Resolve the column names in all the expressions in the // WHERE clause. - if !((nChangeFrom == 0) && (Xsqlite3ResolveExprNames(tls, bp+56 /* &sNC */, pWhere) != 0)) { + if !((nChangeFrom == 0) && (Xsqlite3ResolveExprNames(tls, bp+40 /* &sNC */, pWhere) != 0)) { goto __63 } goto update_cleanup @@ -168562,7 +168562,7 @@ __76: // things might disturb a cursor being used to scan through the table // or index, causing a single-pass approach to malfunction. flags = WHERE_ONEPASS_DESIRED - if !((((!(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && !(pTrigger != 0)) && !(hasFK != 0)) && !(chngKey != 0)) && !(*(*int32)(unsafe.Pointer(bp + 120 /* bReplace */)) != 0)) { + if !((((!(int32((*Parse)(unsafe.Pointer(pParse)).Fnested) != 0) && !(pTrigger != 0)) && !(hasFK != 0)) && !(chngKey != 0)) && !(*(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) != 0)) { goto __78 } flags = flags | (WHERE_ONEPASS_MULTIROW) @@ -168586,7 +168586,7 @@ __79: // Fall back to ONEPASS_OFF if where.c has selected a ONEPASS_MULTI // strategy that uses an index for which one or more columns are being // updated. - eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+112 /* &aiCurOnePass[0] */) + eOnePass = Xsqlite3WhereOkOnePass(tls, pWInfo, bp+96 /* &aiCurOnePass[0] */) bFinishSeek = Xsqlite3WhereUsesDeferredSeek(tls, pWInfo) if !(eOnePass != ONEPASS_SINGLE) { goto __80 @@ -168595,7 +168595,7 @@ __79: if !(eOnePass == ONEPASS_MULTI) { goto __81 } - iCur = *(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */ + 1*4)) + iCur = *(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) if !(((iCur >= 0) && (iCur != iDataCur)) && (*(*U8)(unsafe.Pointer(aToOpen + uintptr((iCur - iBaseCur)))) != 0)) { goto __82 } @@ -168696,22 +168696,22 @@ __95: if !(eOnePass != ONEPASS_OFF) { goto __97 } - if !(*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */)) >= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */)) >= 0) { goto __98 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */)) - iBaseCur)))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */)) - iBaseCur)))) = U8(0) __98: ; - if !(*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */ + 1*4)) >= 0) { + if !(*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) >= 0) { goto __99 } - *(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */ + 1*4)) - iBaseCur)))) = U8(0) + *(*U8)(unsafe.Pointer(aToOpen + uintptr((*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) - iBaseCur)))) = U8(0) __99: ; __97: ; - if !((eOnePass == ONEPASS_MULTI) && ((nIdx - (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */ + 1*4)) >= 0))) > 0)) { + if !((eOnePass == ONEPASS_MULTI) && ((nIdx - (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) >= 0))) > 0)) { goto __100 } addrOnce = Xsqlite3VdbeAddOp0(tls, v, OP_Once) @@ -168732,8 +168732,8 @@ __96: if !(eOnePass != ONEPASS_OFF) { goto __102 } - if !((*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */)) != iDataCur) && - (*(*int32)(unsafe.Pointer(bp + 112 /* &aiCurOnePass[0] */ + 1*4)) != iDataCur)) { + if !((*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */)) != iDataCur) && + (*(*int32)(unsafe.Pointer(bp + 96 /* &aiCurOnePass[0] */ + 1*4)) != iDataCur)) { goto __104 } @@ -168946,7 +168946,7 @@ __137: ; goto __135 __134: - if !(((0 == (*(*int32)(unsafe.Pointer(bp + 48 /* tmask */)) & TRIGGER_BEFORE)) || (i > 31)) || ((uint32(newmask) & (uint32((uint32(1))) << (i))) != 0)) { + if !(((0 == (*(*int32)(unsafe.Pointer(bp + 32 /* tmask */)) & TRIGGER_BEFORE)) || (i > 31)) || ((uint32(newmask) & (uint32((uint32(1))) << (i))) != 0)) { goto __138 } // This branch loads the value of a column that will not be changed @@ -168985,7 +168985,7 @@ __140: // Fire any BEFORE UPDATE triggers. This happens before constraints are // verified. One could argue that this is wrong. - if !((*(*int32)(unsafe.Pointer(bp + 48 /* tmask */)) & TRIGGER_BEFORE) != 0) { + if !((*(*int32)(unsafe.Pointer(bp + 32 /* tmask */)) & TRIGGER_BEFORE) != 0) { goto __141 } Xsqlite3TableAffinity(tls, v, pTab, regNew) @@ -169071,13 +169071,13 @@ __141: // Do constraint checks. Xsqlite3GenerateConstraintChecks(tls, pParse, pTab, aRegIdx, iDataCur, iIdxCur, - regNewRowid, regOldRowid, chngKey, uint8(onError), labelContinue, bp+120, /* &bReplace */ + regNewRowid, regOldRowid, chngKey, uint8(onError), labelContinue, bp+104, /* &bReplace */ aXRef, uintptr(0)) // If REPLACE conflict handling may have been used, or if the PK of the // row is changing, then the GenerateConstraintChecks() above may have // moved cursor iDataCur. Reseek it. - if !((*(*int32)(unsafe.Pointer(bp + 120 /* bReplace */)) != 0) || (chngKey != 0)) { + if !((*(*int32)(unsafe.Pointer(bp + 104 /* bReplace */)) != 0) || (chngKey != 0)) { goto __154 } if !(pPk != 0) { @@ -169233,7 +169233,7 @@ __169: ; update_cleanup: - Xsqlite3AuthContextPop(tls, bp+32 /* &sContext */) + Xsqlite3AuthContextPop(tls, bp+16 /* &sContext */) Xsqlite3DbFree(tls, db, aXRef) // Also frees aRegIdx[] and aToOpen[] Xsqlite3SrcListDelete(tls, db, pTabList) Xsqlite3ExprListDelete(tls, db, pChanges) @@ -169496,8 +169496,8 @@ func Xsqlite3UpsertNew(tls *libc.TLS, db uintptr, pTarget uintptr, pTargetWhere // Return SQLITE_OK if everything works, or an error code is something // is wrong. func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr, pUpsert uintptr) int32 { /* sqlite3.c:142514:20: */ - bp := tls.Alloc(248) - defer tls.Free(248) + bp := tls.Alloc(232) + defer tls.Free(232) var pTab uintptr // That table into which we are inserting var rc int32 // Result code @@ -169505,28 +169505,28 @@ func Xsqlite3UpsertAnalyzeTarget(tls *libc.TLS, pParse uintptr, pTabList uintptr var pIdx uintptr // One of the indexes of pTab var pTarget uintptr // The conflict-target clause var pTerm uintptr // One term of the conflict-target clause - // var sNC NameContext at bp+32, 56 + // var sNC NameContext at bp+16, 56 // Context for resolving symbolic names - // var sCol [2]Expr at bp+88, 144 + // var sCol [2]Expr at bp+72, 144 // Index column converted into an Expr var nClause int32 = 0 // Counter of ON CONFLICT clauses // Resolve all symbolic names in the conflict-target clause, which // includes both the list of columns and the optional partial-index // WHERE clause. - libc.Xmemset(tls, bp+32 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) - (*NameContext)(unsafe.Pointer(bp + 32 /* &sNC */)).FpParse = pParse - (*NameContext)(unsafe.Pointer(bp + 32 /* &sNC */)).FpSrcList = pTabList + libc.Xmemset(tls, bp+16 /* &sNC */, 0, uint64(unsafe.Sizeof(NameContext{}))) + (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpParse = pParse + (*NameContext)(unsafe.Pointer(bp + 16 /* &sNC */)).FpSrcList = pTabList __1: if !((pUpsert != 0) && ((*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget != 0)) { goto __3 } { - rc = Xsqlite3ResolveExprListNames(tls, bp+32 /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) + rc = Xsqlite3ResolveExprListNames(tls, bp+16 /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTarget) if rc != 0 { return rc } - rc = Xsqlite3ResolveExprNames(tls, bp+32 /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) + rc = Xsqlite3ResolveExprNames(tls, bp+16 /* &sNC */, (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertTargetWhere) if rc != 0 { return rc } @@ -169549,11 +169549,11 @@ __1: // operator and sCol[1] will be the TK_COLUMN operator. Code below // will populate the specific collation and column number values // prior to comparing against the conflict-target expression. - libc.Xmemset(tls, bp+88 /* &sCol[0] */, 0, uint64(unsafe.Sizeof([2]Expr{}))) - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */)).Fop = U8(TK_COLLATE) - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */)).FpLeft = (bp + 88 /* &sCol */ + 1*72) - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */ + 1*72)).Fop = U8(TK_COLUMN) - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */ + 1*72)).FiTable = (*SrcItem)(unsafe.Pointer((pTabList + 8 /* &.a */))).FiCursor + libc.Xmemset(tls, bp+72 /* &sCol[0] */, 0, uint64(unsafe.Sizeof([2]Expr{}))) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */)).Fop = U8(TK_COLLATE) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */)).FpLeft = (bp + 72 /* &sCol */ + 1*72) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */ + 1*72)).Fop = U8(TK_COLUMN) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */ + 1*72)).FiTable = (*SrcItem)(unsafe.Pointer((pTabList + 8 /* &.a */))).FiCursor // Check for matches against other indexes for pIdx = (*Table)(unsafe.Pointer(pTab)).FpIndex; pIdx != 0; pIdx = (*Index)(unsafe.Pointer(pIdx)).FpNext { @@ -169578,18 +169578,18 @@ __1: nn = int32((*Index)(unsafe.Pointer(pIdx)).FnKeyCol) for ii = 0; ii < nn; ii++ { var pExpr uintptr - *(*uintptr)(unsafe.Pointer(bp + 88 /* &sCol */ + 8 /* &.u */)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(ii)*8)) + *(*uintptr)(unsafe.Pointer(bp + 72 /* &sCol */ + 8 /* &.u */)) = *(*uintptr)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FazColl + uintptr(ii)*8)) if int32(*(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2))) == (-2) { pExpr = (*ExprList_item)(unsafe.Pointer(((*Index)(unsafe.Pointer(pIdx)).FaColExpr + 8 /* &.a */) + uintptr(ii)*32)).FpExpr if int32((*Expr)(unsafe.Pointer(pExpr)).Fop) != TK_COLLATE { - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */)).FpLeft = pExpr - pExpr = (bp + 88 /* &sCol */) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */)).FpLeft = pExpr + pExpr = (bp + 72 /* &sCol */) } } else { - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */)).FpLeft = (bp + 88 /* &sCol */ + 1*72) - (*Expr)(unsafe.Pointer(bp + 88 /* &sCol */ + 1*72)).FiColumn = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2)) - pExpr = (bp + 88 /* &sCol */) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */)).FpLeft = (bp + 72 /* &sCol */ + 1*72) + (*Expr)(unsafe.Pointer(bp + 72 /* &sCol */ + 1*72)).FiColumn = *(*I16)(unsafe.Pointer((*Index)(unsafe.Pointer(pIdx)).FaiColumn + uintptr(ii)*2)) + pExpr = (bp + 72 /* &sCol */) } for jj = 0; jj < nn; jj++ { if Xsqlite3ExprCompare(tls, pParse, (*ExprList_item)(unsafe.Pointer((pTarget+8 /* &.a */)+uintptr(jj)*32)).FpExpr, pExpr, iCursor) < 2 { @@ -169610,15 +169610,15 @@ __1: break } if (*Upsert)(unsafe.Pointer(pUpsert)).FpUpsertIdx == uintptr(0) { - // var zWhich [16]int8 at bp+232, 16 + // var zWhich [16]int8 at bp+216, 16 if (nClause == 0) && ((*Upsert)(unsafe.Pointer(pUpsert)).FpNextUpsert == uintptr(0)) { - *(*int8)(unsafe.Pointer(bp + 232 /* &zWhich[0] */)) = int8(0) + *(*int8)(unsafe.Pointer(bp + 216 /* &zWhich[0] */)) = int8(0) } else { - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+232 /* &zWhich[0] */, ts+20291 /* "%r " */, libc.VaList(bp, (nClause+1))) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([16]int8{})), bp+216 /* &zWhich[0] */, ts+20291 /* "%r " */, libc.VaList(bp, (nClause+1))) } Xsqlite3ErrorMsg(tls, pParse, - ts+20295 /* "%sON CONFLICT cl..." */, libc.VaList(bp+16, bp+232 /* &zWhich[0] */)) + ts+20295 /* "%sON CONFLICT cl..." */, libc.VaList(bp+8, bp+216 /* &zWhich[0] */)) return SQLITE_ERROR } @@ -169897,8 +169897,8 @@ build_vacuum_end: // This routine implements the OP_Vacuum opcode of the VDBE. func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, pOut uintptr) int32 { /* sqlite3.c:142885:36: */ - bp := tls.Alloc(92) - defer tls.Free(92) + bp := tls.Alloc(52) + defer tls.Free(52) var rc int32 // Return code from service routines var pMain uintptr // The database being vacuumed @@ -169916,9 +169916,9 @@ func Xsqlite3RunVacuum(tls *libc.TLS, pzErrMsg uintptr, db uintptr, iDb int32, p var zDbMain uintptr // Schema name of database to vacuum var zOut uintptr var id uintptr - // var sz I64 at bp+80, 8 + // var sz I64 at bp+40, 8 - // var meta U32 at bp+88, 4 + // var meta U32 at bp+48, 4 var i int32 rc = SQLITE_OK @@ -170006,8 +170006,8 @@ __6: goto __7 } id = Xsqlite3PagerFile(tls, Xsqlite3BtreePager(tls, pTemp)) - *(*I64)(unsafe.Pointer(bp + 80 /* sz */)) = int64(0) - if !(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != uintptr(0)) && ((Xsqlite3OsFileSize(tls, id, bp+80 /* &sz */) != SQLITE_OK) || (*(*I64)(unsafe.Pointer(bp + 80 /* sz */)) > int64(0)))) { + *(*I64)(unsafe.Pointer(bp + 40 /* sz */)) = int64(0) + if !(((*Sqlite3_file)(unsafe.Pointer(id)).FpMethods != uintptr(0)) && ((Xsqlite3OsFileSize(tls, id, bp+40 /* &sz */) != SQLITE_OK) || (*(*I64)(unsafe.Pointer(bp + 40 /* sz */)) > int64(0)))) { goto __8 } rc = SQLITE_ERROR @@ -170079,7 +170079,7 @@ __12: rc = execSqlF(tls, db, pzErrMsg, ts+20527, /* "SELECT sql FROM ..." */ - libc.VaList(bp+16, zDbMain)) + libc.VaList(bp+8, zDbMain)) if !(rc != SQLITE_OK) { goto __13 } @@ -170089,7 +170089,7 @@ __13: rc = execSqlF(tls, db, pzErrMsg, ts+20635, /* "SELECT sql FROM ..." */ - libc.VaList(bp+32, zDbMain)) + libc.VaList(bp+16, zDbMain)) if !(rc != SQLITE_OK) { goto __14 } @@ -170104,7 +170104,7 @@ __14: rc = execSqlF(tls, db, pzErrMsg, ts+20689, /* "SELECT'INSERT IN..." */ - libc.VaList(bp+48, zDbMain)) + libc.VaList(bp+24, zDbMain)) *(*U32)(unsafe.Pointer(db + 44 /* &.mDbFlags */)) &= (libc.Uint32FromInt32(libc.CplInt32(DBFLAG_Vacuum))) if !(rc != SQLITE_OK) { @@ -170121,7 +170121,7 @@ __15: rc = execSqlF(tls, db, pzErrMsg, ts+20840, /* "INSERT INTO vacu..." */ - libc.VaList(bp+64, zDbMain)) + libc.VaList(bp+32, zDbMain)) if !(rc != 0) { goto __16 } @@ -170144,8 +170144,8 @@ __17: } // GetMeta() and UpdateMeta() cannot fail in this context because // we already have page 1 loaded into cache and marked dirty. - Xsqlite3BtreeGetMeta(tls, pMain, int32(aCopy[i]), bp+88 /* &meta */) - rc = Xsqlite3BtreeUpdateMeta(tls, pTemp, int32(aCopy[i]), (*(*U32)(unsafe.Pointer(bp + 88 /* meta */)) + U32(aCopy[(i+1)]))) + Xsqlite3BtreeGetMeta(tls, pMain, int32(aCopy[i]), bp+48 /* &meta */) + rc = Xsqlite3BtreeUpdateMeta(tls, pTemp, int32(aCopy[i]), (*(*U32)(unsafe.Pointer(bp + 48 /* meta */)) + U32(aCopy[(i+1)]))) if !(rc != SQLITE_OK) { goto __20 } @@ -170493,8 +170493,8 @@ func Xsqlite3VtabClear(tls *libc.TLS, db uintptr, p uintptr) { /* sqlite3.c:1434 // string will be freed automatically when the table is // deleted. func addModuleArgument(tls *libc.TLS, pParse uintptr, pTable uintptr, zArg uintptr) { /* sqlite3.c:143503:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var nBytes Sqlite3_int64 = (Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * (uint64(2 + (*Table)(unsafe.Pointer(pTable)).FnModuleArg)))) var azModuleArg uintptr @@ -170561,8 +170561,8 @@ func addArgumentToVtab(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:143574:13: // The parser calls this routine after the CREATE VIRTUAL TABLE statement // has been completely parsed. func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* sqlite3.c:143587:21: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(64) + defer tls.Free(64) var pTab uintptr = (*Parse)(unsafe.Pointer(pParse)).FpNewTable // The table being constructed var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection @@ -170607,7 +170607,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3NestedParse(tls, pParse, ts+20994, /* "UPDATE %Q.sqlite..." */ - libc.VaList(bp+16, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, + libc.VaList(bp+8, (*Db)(unsafe.Pointer((*Sqlite3)(unsafe.Pointer(db)).FaDb+uintptr(iDb)*32)).FzDbSName, (*Table)(unsafe.Pointer(pTab)).FzName, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt, @@ -170616,7 +170616,7 @@ func Xsqlite3VtabFinishParse(tls *libc.TLS, pParse uintptr, pEnd uintptr) { /* s Xsqlite3ChangeCookie(tls, pParse, iDb) Xsqlite3VdbeAddOp0(tls, v, OP_Expire) - zWhere = Xsqlite3MPrintf(tls, db, ts+21093 /* "name=%Q AND sql=..." */, libc.VaList(bp+64, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) + zWhere = Xsqlite3MPrintf(tls, db, ts+21093 /* "name=%Q AND sql=..." */, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName, zStmt)) Xsqlite3VdbeAddParseSchemaOp(tls, v, iDb, zWhere, uint16(0)) Xsqlite3DbFree(tls, db, zStmt) @@ -170663,16 +170663,16 @@ func Xsqlite3VtabArgExtend(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite // pointer to the function to invoke is passed as the fourth parameter // to this procedure. func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, xConstruct uintptr, pzErr uintptr) int32 { /* sqlite3.c:143699:12: */ - bp := tls.Alloc(104) - defer tls.Free(104) + bp := tls.Alloc(72) + defer tls.Free(72) - // var sCtx VtabCtx at bp+64, 32 + // var sCtx VtabCtx at bp+32, 32 var pVTable uintptr var rc int32 var azArg uintptr = (*Table)(unsafe.Pointer(pTab)).FazModuleArg var nArg int32 = (*Table)(unsafe.Pointer(pTab)).FnModuleArg - *(*uintptr)(unsafe.Pointer(bp + 96 /* zErr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) var zModuleName uintptr var iDb int32 var pCtx uintptr @@ -170706,23 +170706,23 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // Invoke the virtual table constructor - (*VtabCtx)(unsafe.Pointer(bp + 64 /* &sCtx */)).FpTab = pTab - (*VtabCtx)(unsafe.Pointer(bp + 64 /* &sCtx */)).FpVTable = pVTable - (*VtabCtx)(unsafe.Pointer(bp + 64 /* &sCtx */)).FpPrior = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx - (*VtabCtx)(unsafe.Pointer(bp + 64 /* &sCtx */)).FbDeclared = 0 - (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = bp + 64 /* &sCtx */ - rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xConstruct)))(tls, db, (*Module)(unsafe.Pointer(pMod)).FpAux, nArg, azArg, (pVTable + 16 /* &.pVtab */), bp+96 /* &zErr */) - (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = (*VtabCtx)(unsafe.Pointer(bp + 64 /* &sCtx */)).FpPrior + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpTab = pTab + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpVTable = pVTable + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpPrior = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx + (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FbDeclared = 0 + (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = bp + 32 /* &sCtx */ + rc = (*(*func(*libc.TLS, uintptr, uintptr, int32, uintptr, uintptr, uintptr) int32)(unsafe.Pointer(&xConstruct)))(tls, db, (*Module)(unsafe.Pointer(pMod)).FpAux, nArg, azArg, (pVTable + 16 /* &.pVtab */), bp+64 /* &zErr */) + (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx = (*VtabCtx)(unsafe.Pointer(bp + 32 /* &sCtx */)).FpPrior if rc == SQLITE_NOMEM { Xsqlite3OomFault(tls, db) } if SQLITE_OK != rc { - if *(*uintptr)(unsafe.Pointer(bp + 96 /* zErr */)) == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21154 /* "vtable construct..." */, libc.VaList(bp+16, zModuleName)) + if *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+21154 /* "vtable construct..." */, libc.VaList(bp+8, zModuleName)) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3630 /* "%s" */, libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 96 /* zErr */)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* zErr */))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, ts+3630 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } Xsqlite3DbFree(tls, db, pVTable) } else if (*VTable)(unsafe.Pointer(pVTable)).FpVtab != 0 { @@ -170732,9 +170732,9 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, (*Sqlite3_vtab)(unsafe.Pointer((*VTable)(unsafe.Pointer(pVTable)).FpVtab)).FpModule = (*Module)(unsafe.Pointer(pMod)).FpModule (*Module)(unsafe.Pointer(pMod)).FnRefModule++ (*VTable)(unsafe.Pointer(pVTable)).FnRef = 1 - if (*VtabCtx)(unsafe.Pointer(bp+64 /* &sCtx */)).FbDeclared == 0 { + if (*VtabCtx)(unsafe.Pointer(bp+32 /* &sCtx */)).FbDeclared == 0 { var zFormat uintptr = ts + 21184 /* "vtable construct..." */ - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+48, (*Table)(unsafe.Pointer(pTab)).FzName)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3MPrintf(tls, db, zFormat, libc.VaList(bp+24, (*Table)(unsafe.Pointer(pTab)).FzName)) Xsqlite3VtabUnlock(tls, pVTable) rc = SQLITE_ERROR } else { @@ -170795,8 +170795,8 @@ func vtabCallConstructor(tls *libc.TLS, db uintptr, pTab uintptr, pMod uintptr, // // This call is a no-op if table pTab is not a virtual table. func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 { /* sqlite3.c:143832:20: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb var zMod uintptr @@ -170816,13 +170816,13 @@ func Xsqlite3VtabCallConnect(tls *libc.TLS, pParse uintptr, pTab uintptr) int32 Xsqlite3ErrorMsg(tls, pParse, ts+21230 /* "no such module: ..." */, libc.VaList(bp, zModule)) rc = SQLITE_ERROR } else { - *(*uintptr)(unsafe.Pointer(bp + 32 /* zErr */)) = uintptr(0) - rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+32 /* &zErr */) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer((*Module)(unsafe.Pointer(pMod)).FpModule)).FxConnect, bp+16 /* &zErr */) if rc != SQLITE_OK { - Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 32 /* zErr */)))) + Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))) (*Parse)(unsafe.Pointer(pParse)).Frc = rc } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 32 /* zErr */))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))) } return rc @@ -170863,8 +170863,8 @@ func addToVTrans(tls *libc.TLS, db uintptr, pVTab uintptr) { /* sqlite3.c:143890 // description of the error and an SQLITE_XXX error code is returned. // In this case the caller must call sqlite3DbFree(db, ) on *pzErr. func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, pzErr uintptr) int32 { /* sqlite3.c:143904:20: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = SQLITE_OK var pTab uintptr @@ -170903,14 +170903,14 @@ func Xsqlite3VtabCallCreate(tls *libc.TLS, db uintptr, iDb int32, zTab uintptr, // valid to call this function from within the xCreate() or xConnect() of a // virtual table module. func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int32 { /* sqlite3.c:143945:16: */ - bp := tls.Alloc(432) - defer tls.Free(432) + bp := tls.Alloc(424) + defer tls.Free(424) var pCtx uintptr var rc int32 = SQLITE_OK var pTab uintptr - *(*uintptr)(unsafe.Pointer(bp + 424 /* zErr */)) = uintptr(0) - // var sParse Parse at bp+16, 408 + *(*uintptr)(unsafe.Pointer(bp + 416 /* zErr */)) = uintptr(0) + // var sParse Parse at bp+8, 408 Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) pCtx = (*Sqlite3)(unsafe.Pointer(db)).FpVtabCtx @@ -170921,17 +170921,17 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 } pTab = (*VtabCtx)(unsafe.Pointer(pCtx)).FpTab - libc.Xmemset(tls, bp+16 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{}))) - (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FeParseMode = U8(PARSE_MODE_DECLARE_VTAB) - (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).Fdb = db - (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FnQueryLoop = U32(1) - if ((((SQLITE_OK == Xsqlite3RunParser(tls, bp+16 /* &sParse */, zCreateTable, bp+424 /* &zErr */)) && - ((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpNewTable != 0)) && + libc.Xmemset(tls, bp+8 /* &sParse */, 0, uint64(unsafe.Sizeof(Parse{}))) + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FeParseMode = U8(PARSE_MODE_DECLARE_VTAB) + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).Fdb = db + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FnQueryLoop = U32(1) + if ((((SQLITE_OK == Xsqlite3RunParser(tls, bp+8 /* &sParse */, zCreateTable, bp+416 /* &zErr */)) && + ((*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpNewTable != 0)) && !(int32((*Sqlite3)(unsafe.Pointer(db)).FmallocFailed) != 0)) && - !(int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpNewTable)).FpSelect) != 0)) && - !((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpNewTable)).FnModuleArg != 0) { + !(int32((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpNewTable)).FpSelect) != 0)) && + !((*Table)(unsafe.Pointer((*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpNewTable)).FnModuleArg != 0) { if !(int32((*Table)(unsafe.Pointer(pTab)).FaCol) != 0) { - var pNew uintptr = (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FpNewTable + var pNew uintptr = (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FpNewTable var pIdx uintptr (*Table)(unsafe.Pointer(pTab)).FaCol = (*Table)(unsafe.Pointer(pNew)).FaCol (*Table)(unsafe.Pointer(pTab)).FnNVCol = libc.AssignPtrInt16(pTab+70 /* &.nCol */, (*Table)(unsafe.Pointer(pNew)).FnCol) @@ -170957,21 +170957,21 @@ func Xsqlite3_declare_vtab(tls *libc.TLS, db uintptr, zCreateTable uintptr) int3 (*VtabCtx)(unsafe.Pointer(pCtx)).FbDeclared = 1 } else { Xsqlite3ErrorWithMsg(tls, db, SQLITE_ERROR, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 424 /* zErr */)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 416 /* zErr */)) != 0 { return ts + 3630 /* "%s" */ } return uintptr(0) - }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErr */)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 424 /* zErr */))) + }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 416 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 416 /* zErr */))) rc = SQLITE_ERROR } - (*Parse)(unsafe.Pointer(bp + 16 /* &sParse */)).FeParseMode = U8(PARSE_MODE_NORMAL) + (*Parse)(unsafe.Pointer(bp + 8 /* &sParse */)).FeParseMode = U8(PARSE_MODE_NORMAL) - if (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe != 0 { - Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpVdbe) + if (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpVdbe != 0 { + Xsqlite3VdbeFinalize(tls, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpVdbe) } - Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(bp+16 /* &sParse */)).FpNewTable) - Xsqlite3ParserReset(tls, bp+16 /* &sParse */) + Xsqlite3DeleteTable(tls, db, (*Parse)(unsafe.Pointer(bp+8 /* &sParse */)).FpNewTable) + Xsqlite3ParserReset(tls, bp+8 /* &sParse */) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) @@ -171296,12 +171296,12 @@ func Xsqlite3VtabMakeWritable(tls *libc.TLS, pParse uintptr, pTab uintptr) { /* // Any virtual table module for which xConnect and xCreate are the same // method can have an eponymous virtual table instance. func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) int32 { /* sqlite3.c:144353:20: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pModule uintptr = (*Module)(unsafe.Pointer(pMod)).FpModule var pTab uintptr - *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)) = uintptr(0) var rc int32 var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb if (*Module)(unsafe.Pointer(pMod)).FpEpoTab != 0 { @@ -171328,10 +171328,10 @@ func Xsqlite3VtabEponymousTableInit(tls *libc.TLS, pParse uintptr, pMod uintptr) addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) addModuleArgument(tls, pParse, pTab, uintptr(0)) addModuleArgument(tls, pParse, pTab, Xsqlite3DbStrDup(tls, db, (*Table)(unsafe.Pointer(pTab)).FzName)) - rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+16 /* &zErr */) + rc = vtabCallConstructor(tls, db, pTab, pMod, (*Sqlite3_module)(unsafe.Pointer(pModule)).FxConnect, bp+8 /* &zErr */) if rc != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErr */))) + Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 8 /* zErr */))) Xsqlite3VtabEponymousTableClear(tls, db, pMod) return 0 } @@ -171824,8 +171824,8 @@ func explainAppendTerm(tls *libc.TLS, pStr uintptr, pIdx uintptr, nTerm int32, i // // "a=? AND b>?" func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3.c:145171:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pIndex uintptr = *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ + 8 /* &.pIndex */)) var nEq U16 = *(*U16)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.btree */ /* &.nEq */)) @@ -171869,8 +171869,8 @@ func explainIndexRange(tls *libc.TLS, pStr uintptr, pLoop uintptr) { /* sqlite3. // If an OP_Explain opcode is added to the VM, its address is returned. // Otherwise, if no OP_Explain is coded, zero is returned. func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr, pLevel uintptr, wctrlFlags U16) int32 { /* sqlite3.c:145205:20: */ - bp := tls.Alloc(212) - defer tls.Free(212) + bp := tls.Alloc(180) + defer tls.Free(180) var ret int32 = 0 if int32((*Parse)(unsafe.Pointer((func() uintptr { @@ -171886,9 +171886,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr var pLoop uintptr // The controlling WhereLoop object var flags U32 // Flags that describe this loop var zMsg uintptr // Text to add to EQP output - // var str StrAccum at bp+80, 32 + // var str StrAccum at bp+48, 32 // EQP output string - // var zBuf [100]int8 at bp+112, 100 + // var zBuf [100]int8 at bp+80, 100 // Initial space for EQP output string pLoop = (*WhereLevel)(unsafe.Pointer(pLevel)).FpWLoop @@ -171901,9 +171901,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr (((flags & U32(WHERE_VIRTUALTABLE)) == U32(0)) && (int32(*(*U16)(unsafe.Pointer((pLoop + 24 /* &.u */ /* &.btree */) /* &.nEq */))) > 0))) || ((int32(wctrlFlags) & (WHERE_ORDERBY_MIN | WHERE_ORDERBY_MAX)) != 0))) - Xsqlite3StrAccumInit(tls, bp+80 /* &str */, db, bp+112 /* &zBuf[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) - (*StrAccum)(unsafe.Pointer(bp + 80 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) - Xsqlite3_str_appendf(tls, bp+80 /* &str */, ts+21284 /* "%s %S" */, libc.VaList(bp, func() uintptr { + Xsqlite3StrAccumInit(tls, bp+48 /* &str */, db, bp+80 /* &zBuf[0] */, int32(unsafe.Sizeof([100]int8{})), SQLITE_MAX_LENGTH) + (*StrAccum)(unsafe.Pointer(bp + 48 /* &str */)).FprintfFlags = U8(SQLITE_PRINTF_INTERNAL) + Xsqlite3_str_appendf(tls, bp+48 /* &str */, ts+21284 /* "%s %S" */, libc.VaList(bp, func() uintptr { if isSearch != 0 { return ts + 21290 /* "SEARCH" */ } @@ -171929,9 +171929,9 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr zFmt = ts + 21378 /* "INDEX %s" */ } if zFmt != 0 { - Xsqlite3_str_append(tls, bp+80 /* &str */, ts+21387 /* " USING " */, 7) - Xsqlite3_str_appendf(tls, bp+80 /* &str */, zFmt, libc.VaList(bp+24, (*Index)(unsafe.Pointer(pIdx)).FzName)) - explainIndexRange(tls, bp+80 /* &str */, pLoop) + Xsqlite3_str_append(tls, bp+48 /* &str */, ts+21387 /* " USING " */, 7) + Xsqlite3_str_appendf(tls, bp+48 /* &str */, zFmt, libc.VaList(bp+16, (*Index)(unsafe.Pointer(pIdx)).FzName)) + explainIndexRange(tls, bp+48 /* &str */, pLoop) } } else if ((flags & U32(WHERE_IPK)) != U32(0)) && ((flags & U32(WHERE_CONSTRAINT)) != U32(0)) { var zRangeOp uintptr @@ -171945,13 +171945,13 @@ func Xsqlite3WhereExplainOneScan(tls *libc.TLS, pParse uintptr, pTabList uintptr zRangeOp = ts + 21282 /* "<" */ } - Xsqlite3_str_appendf(tls, bp+80, /* &str */ - ts+21411 /* " USING INTEGER P..." */, libc.VaList(bp+40, zRangeOp)) + Xsqlite3_str_appendf(tls, bp+48, /* &str */ + ts+21411 /* " USING INTEGER P..." */, libc.VaList(bp+24, zRangeOp)) } else if (flags & U32(WHERE_VIRTUALTABLE)) != U32(0) { - Xsqlite3_str_appendf(tls, bp+80 /* &str */, ts+21449, /* " VIRTUAL TABLE I..." */ - libc.VaList(bp+56, *(*int32)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ /* &.idxNum */)), *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ + 8 /* &.idxStr */)))) + Xsqlite3_str_appendf(tls, bp+48 /* &str */, ts+21449, /* " VIRTUAL TABLE I..." */ + libc.VaList(bp+32, *(*int32)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ /* &.idxNum */)), *(*uintptr)(unsafe.Pointer(pLoop + 24 /* &.u */ /* &.vtab */ + 8 /* &.idxStr */)))) } - zMsg = Xsqlite3StrAccumFinish(tls, bp+80 /* &str */) + zMsg = Xsqlite3StrAccumFinish(tls, bp+48 /* &str */) ret = Xsqlite3VdbeAddOp4(tls, v, OP_Explain, Xsqlite3VdbeCurrentAddr(tls, v), (*Parse)(unsafe.Pointer(pParse)).FaddrExplain, 0, zMsg, -7) @@ -172711,8 +172711,8 @@ __3: // Generate code for the start of the iLevel-th loop in the WHERE clause // implementation described by pWInfo. func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWInfo uintptr, iLevel int32, pLevel uintptr, notReady Bitmask) Bitmask { /* sqlite3.c:146382:24: */ - bp := tls.Alloc(104) - defer tls.Free(104) + bp := tls.Alloc(96) + defer tls.Free(96) var j int32 var k int32 // Loop counters @@ -172922,13 +172922,13 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI if pStart != 0 { var pX uintptr // The expression that defines the start bound var r1 int32 - // var rTemp int32 at bp+20, 4 + // var rTemp int32 at bp+12, 4 // Registers for holding the start boundary var op int32 // Cursor seek operation // The following constant maps TK_xx codes into corresponding // seek opcodes. It depends on a particular ordering of TK_xx - *(*[4]U8)(unsafe.Pointer(bp + 16 /* aMoveOp */)) = [4]U8{ + *(*[4]U8)(unsafe.Pointer(bp + 8 /* aMoveOp */)) = [4]U8{ /* TK_GT */ U8(OP_SeekGT), /* TK_LE */ U8(OP_SeekLE), /* TK_LT */ U8(OP_SeekLT), @@ -172942,19 +172942,19 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // transitive constraints if Xsqlite3ExprIsVector(tls, (*Expr)(unsafe.Pointer(pX)).FpRight) != 0 { - r1 = libc.AssignPtrInt32(bp+20 /* rTemp */, Xsqlite3GetTempReg(tls, pParse)) + r1 = libc.AssignPtrInt32(bp+12 /* rTemp */, Xsqlite3GetTempReg(tls, pParse)) codeExprOrVector(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, r1, 1) - op = int32(*(*U8)(unsafe.Pointer(bp + 16 /* &aMoveOp[0] */ + uintptr(((((int32((*Expr)(unsafe.Pointer(pX)).Fop) - TK_GT) - 1) & 0x3) | 0x1))))) + op = int32(*(*U8)(unsafe.Pointer(bp + 8 /* &aMoveOp[0] */ + uintptr(((((int32((*Expr)(unsafe.Pointer(pX)).Fop) - TK_GT) - 1) & 0x3) | 0x1))))) } else { - r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, bp+20 /* &rTemp */) + r1 = Xsqlite3ExprCodeTemp(tls, pParse, (*Expr)(unsafe.Pointer(pX)).FpRight, bp+12 /* &rTemp */) disableTerm(tls, pLevel, pStart) - op = int32(*(*U8)(unsafe.Pointer(bp + 16 /* &aMoveOp[0] */ + uintptr((int32((*Expr)(unsafe.Pointer(pX)).Fop) - TK_GT))))) + op = int32(*(*U8)(unsafe.Pointer(bp + 8 /* &aMoveOp[0] */ + uintptr((int32((*Expr)(unsafe.Pointer(pX)).Fop) - TK_GT))))) } Xsqlite3VdbeAddOp3(tls, v, op, iCur, addrBrk, r1) - Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 20 /* rTemp */))) + Xsqlite3ReleaseTempReg(tls, pParse, *(*int32)(unsafe.Pointer(bp + 12 /* rTemp */))) } else { Xsqlite3VdbeAddOp2(tls, v, func() int32 { if bRev != 0 { @@ -173021,7 +173021,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI var iIdxCur int32 // The VDBE cursor for the index var nExtraReg int32 = 0 // Number of extra registers needed var op int32 // Instruction opcode - // var zStartAff uintptr at bp+24, 8 + // var zStartAff uintptr at bp+16, 8 // Affinity for start of range constraint var zEndAff uintptr = uintptr(0) // Affinity for end of range constraint var bSeekPastNull U8 = U8(0) // True to seek past initial nulls @@ -173115,10 +173115,10 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI // and store the values of those terms in an array of registers // starting at regBase. - regBase = codeAllEqualityTerms(tls, pParse, pLevel, bRev, nExtraReg, bp+24 /* &zStartAff */) + regBase = codeAllEqualityTerms(tls, pParse, pLevel, bRev, nExtraReg, bp+16 /* &zStartAff */) - if (*(*uintptr)(unsafe.Pointer(bp + 24 /* zStartAff */)) != 0) && (nTop != 0) { - zEndAff = Xsqlite3DbStrDup(tls, db, (*(*uintptr)(unsafe.Pointer(bp + 24 /* zStartAff */)) + uintptr(nEq))) + if (*(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */)) != 0) && (nTop != 0) { + zEndAff = Xsqlite3DbStrDup(tls, db, (*(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */)) + uintptr(nEq))) } addrNxt = func() int32 { if regBignull != 0 { @@ -173142,8 +173142,8 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI Xsqlite3VdbeAddOp2(tls, v, OP_IsNull, (regBase + int32(nEq)), addrNxt) } - if *(*uintptr)(unsafe.Pointer(bp + 24 /* zStartAff */)) != 0 { - updateRangeAffinityStr(tls, pRight, int32(nBtm), (*(*uintptr)(unsafe.Pointer(bp + 24 /* zStartAff */)) + uintptr(nEq))) + if *(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */)) != 0 { + updateRangeAffinityStr(tls, pRight, int32(nBtm), (*(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */)) + uintptr(nEq))) } nConstraint = nConstraint + (int32(nBtm)) @@ -173163,7 +173163,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI start_constraints = 1 nConstraint++ } - codeApplyAffinity(tls, pParse, regBase, (nConstraint - int32(bSeekPastNull)), *(*uintptr)(unsafe.Pointer(bp + 24 /* zStartAff */))) + codeApplyAffinity(tls, pParse, regBase, (nConstraint - int32(bSeekPastNull)), *(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */))) if (int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip) > 0) && (nConstraint == int32((*WhereLoop)(unsafe.Pointer(pLoop)).FnSkip)) { // The skip-scan logic inside the call to codeAllEqualityConstraints() // above has already left the cursor sitting on the correct row, @@ -173234,7 +173234,7 @@ func Xsqlite3WhereCodeOneLoopStart(tls *libc.TLS, pParse uintptr, v uintptr, pWI } nConstraint++ } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zStartAff */))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 16 /* zStartAff */))) Xsqlite3DbFree(tls, db, zEndAff) // Top of the loop body @@ -173774,7 +173774,7 @@ __4: } { var pE uintptr - // var sEAlt Expr at bp+32, 72 + // var sEAlt Expr at bp+24, 72 var pAlt uintptr if (int32((*WhereTerm)(unsafe.Pointer(pTerm)).FwtFlags) & (TERM_VIRTUAL | TERM_CODED)) != 0 { @@ -173808,9 +173808,9 @@ __4: goto __5 } - *(*Expr)(unsafe.Pointer(bp + 32 /* sEAlt */)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) - (*Expr)(unsafe.Pointer(bp + 32 /* &sEAlt */)).FpLeft = (*Expr)(unsafe.Pointer(pE)).FpLeft - Xsqlite3ExprIfFalse(tls, pParse, bp+32 /* &sEAlt */, addrCont, SQLITE_JUMPIFNULL) + *(*Expr)(unsafe.Pointer(bp + 24 /* sEAlt */)) = *(*Expr)(unsafe.Pointer((*WhereTerm)(unsafe.Pointer(pAlt)).FpExpr)) + (*Expr)(unsafe.Pointer(bp + 24 /* &sEAlt */)).FpLeft = (*Expr)(unsafe.Pointer(pE)).FpLeft + Xsqlite3ExprIfFalse(tls, pParse, bp+24 /* &sEAlt */, addrCont, SQLITE_JUMPIFNULL) *(*U16)(unsafe.Pointer(pAlt + 18 /* &.wtFlags */)) |= U16((TERM_CODED)) } @@ -175431,8 +175431,8 @@ func Xsqlite3WhereExprAnalyze(tls *libc.TLS, pTabList uintptr, pWC uintptr) { /* // Each function argument translates into an equality constraint against // a HIDDEN column in the table. func Xsqlite3WhereTabFuncArgs(tls *libc.TLS, pParse uintptr, pItem uintptr, pWC uintptr) { /* sqlite3.c:149188:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pTab uintptr var j int32 @@ -176195,8 +176195,8 @@ func termCanDriveIndex(tls *libc.TLS, pTerm uintptr, pSrc uintptr, notReady Bitm // and to set up the WhereLevel object pLevel so that the code generator // makes use of the automatic index. func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc uintptr, notReady Bitmask, pLevel uintptr) { /* sqlite3.c:149971:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var nKeyCol int32 // Number of columns in the constructed index var pTerm uintptr // A single term of the WHERE clause @@ -176212,7 +176212,7 @@ func constructAutomaticIndex(tls *libc.TLS, pParse uintptr, pWC uintptr, pSrc ui var mxBitCol int32 // Maximum column in pSrc->colUsed var pColl uintptr // Collating sequence to on a column var pLoop uintptr // The Loop object - // var zNotUsed uintptr at bp+24, 8 + // var zNotUsed uintptr at bp+16, 8 // Extra space on the end of pIdx var idxCols Bitmask // Bitmap of columns used for indexing var extraCols Bitmask // Bitmap of additional columns @@ -176351,7 +176351,7 @@ __13: ; // Construct the Index object to describe this index - pIdx = Xsqlite3AllocateIndexObject(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (int16(nKeyCol + 1)), 0, bp+24 /* &zNotUsed */) + pIdx = Xsqlite3AllocateIndexObject(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (int16(nKeyCol + 1)), 0, bp+16 /* &zNotUsed */) if !(pIdx == uintptr(0)) { goto __14 } @@ -176707,8 +176707,8 @@ __6: // caller to eventually free p->idxStr if p->needToFreeIdxStr indicates // that this is required. func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 { /* sqlite3.c:150333:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var pVtab uintptr = (*VTable)(unsafe.Pointer(Xsqlite3GetVTable(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, pTab))).FpVtab var rc int32 @@ -176721,7 +176721,7 @@ func vtabBestIndex(tls *libc.TLS, pParse uintptr, pTab uintptr, p uintptr) int32 } else if !(int32((*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) != 0) { Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp, Xsqlite3ErrStr(tls, rc))) } else { - Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp+16, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) + Xsqlite3ErrorMsg(tls, pParse, ts+3630 /* "%s" */, libc.VaList(bp+8, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg)) } } Xsqlite3_free(tls, (*Sqlite3_vtab)(unsafe.Pointer(pVtab)).FzErrMsg) @@ -178682,8 +178682,8 @@ __3: // Output parameter *pbIn is set to true if the plan added to pBuilder // uses one or more WO_IN terms, or false otherwise. func whereLoopAddVirtualOne(tls *libc.TLS, pBuilder uintptr, mPrereq Bitmask, mUsable Bitmask, mExclude U16, pIdxInfo uintptr, mNoOmit U16, pbIn uintptr) int32 { /* sqlite3.c:152472:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var pWC uintptr = (*WhereLoopBuilder)(unsafe.Pointer(pBuilder)).FpWC var pIdxCons uintptr @@ -178819,7 +178819,7 @@ __6: if *(*uintptr)(unsafe.Pointer((*WhereLoop)(unsafe.Pointer(pNew)).FaLTerm + uintptr(i)*8)) == uintptr(0) { // The non-zero argvIdx values must be contiguous. Raise an // error if they are not - Xsqlite3ErrorMsg(tls, pParse, ts+21628 /* "%s.xBestIndex ma..." */, libc.VaList(bp+16, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) + Xsqlite3ErrorMsg(tls, pParse, ts+21628 /* "%s.xBestIndex ma..." */, libc.VaList(bp+8, (*Table)(unsafe.Pointer((*SrcItem)(unsafe.Pointer(pSrc)).FpTab)).FzName)) return SQLITE_ERROR } @@ -180279,15 +180279,15 @@ func exprIsDeterministic(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:153907:1 // be used to compute the appropriate cursor depending on which index is // used. func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere uintptr, pOrderBy uintptr, pResultSet uintptr, wctrlFlags U16, iAuxArg int32) uintptr { /* sqlite3.c:154027:26: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(72) + defer tls.Free(72) var nByteWInfo int32 // Num. bytes allocated for WhereInfo struct var nTabList int32 // Number of elements in pTabList var pWInfo uintptr // Will become the return value of this function var v uintptr // The virtual database engine var notReady Bitmask // Cursors that are not yet positioned - // var sWLB WhereLoopBuilder at bp+16, 64 + // var sWLB WhereLoopBuilder at bp+8, 64 // The WhereLoop builder var pMaskSet uintptr // The expression mask set var pLevel uintptr // A single level in pWInfo->a[] @@ -180331,7 +180331,7 @@ func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere // Variable initialization db = (*Parse)(unsafe.Pointer(pParse)).Fdb - libc.Xmemset(tls, bp+16 /* &sWLB */, 0, uint64(unsafe.Sizeof(WhereLoopBuilder{}))) + libc.Xmemset(tls, bp+8 /* &sWLB */, 0, uint64(unsafe.Sizeof(WhereLoopBuilder{}))) // An ORDER/GROUP BY clause of more than 63 terms cannot be optimized @@ -180341,7 +180341,7 @@ func Xsqlite3WhereBegin(tls *libc.TLS, pParse uintptr, pTabList uintptr, pWhere pOrderBy = uintptr(0) __1: ; - (*WhereLoopBuilder)(unsafe.Pointer(bp + 16 /* &sWLB */)).FpOrderBy = pOrderBy + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpOrderBy = pOrderBy // Disable the DISTINCT optimization if SQLITE_DistinctOpt is set via // sqlite3_test_ctrl(SQLITE_TESTCTRL_OPTIMIZATIONS,...) @@ -180405,11 +180405,11 @@ __4: libc.Xmemset(tls, (pWInfo + 856 /* &.a */), 0, (uint64(unsafe.Sizeof(WhereLoop{})) + (uint64(nTabList) * uint64(unsafe.Sizeof(WhereLevel{}))))) // ONEPASS defaults to OFF pMaskSet = (pWInfo + 592 /* &.sMaskSet */) - (*WhereLoopBuilder)(unsafe.Pointer(bp + 16 /* &sWLB */)).FpWInfo = pWInfo - (*WhereLoopBuilder)(unsafe.Pointer(bp + 16 /* &sWLB */)).FpWC = (pWInfo + 104 /* &.sWC */) - (*WhereLoopBuilder)(unsafe.Pointer(bp + 16 /* &sWLB */)).FpNew = ((pWInfo) + uintptr(nByteWInfo)) + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpWInfo = pWInfo + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpWC = (pWInfo + 104 /* &.sWC */) + (*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpNew = ((pWInfo) + uintptr(nByteWInfo)) - whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpNew) + whereLoopInit(tls, (*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpNew) // Split the WHERE clause into separate subexpressions where each // subexpression is separated by an AND operator. @@ -180485,10 +180485,10 @@ __12: // FROM ... WHERE (SELECT random())>0; -- eval random() once overall ii = 0 __13: - if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpWC)).FnTerm) { + if !(ii < (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpWC)).FnTerm) { goto __15 } - pT = ((*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpWC)).Fa + uintptr(ii)*56) + pT = ((*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpWC)).Fa + uintptr(ii)*56) if !((int32((*WhereTerm)(unsafe.Pointer(pT)).FwtFlags) & TERM_VIRTUAL) != 0) { goto __16 } @@ -180535,10 +180535,10 @@ __18: // Construct the WhereLoop objects - if !((nTabList != 1) || (whereShortCut(tls, bp+16 /* &sWLB */) == 0)) { + if !((nTabList != 1) || (whereShortCut(tls, bp+8 /* &sWLB */) == 0)) { goto __22 } - rc = whereLoopAddAll(tls, bp+16 /* &sWLB */) + rc = whereLoopAddAll(tls, bp+8 /* &sWLB */) if !(rc != 0) { goto __23 } @@ -180551,7 +180551,7 @@ __23: // changed based on STAT4 information while computing subsequent loops, // then we need to rerun the whole loop building process so that all // loops will be built using the revised truthProb values. - if !((int32((*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FbldFlags2) & SQLITE_BLDF2_2NDPASS) != 0) { + if !((int32((*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FbldFlags2) & SQLITE_BLDF2_2NDPASS) != 0) { goto __24 } @@ -180565,7 +180565,7 @@ __25: goto __25 __26: ; - rc = whereLoopAddAll(tls, bp+16 /* &sWLB */) + rc = whereLoopAddAll(tls, bp+8 /* &sWLB */) if !(rc != 0) { goto __27 } @@ -180645,10 +180645,10 @@ __32: goto __33 } tabUsed = Xsqlite3WhereExprListUsage(tls, pMaskSet, pResultSet) - if !((*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpOrderBy != 0) { + if !((*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpOrderBy != 0) { goto __34 } - tabUsed = tabUsed | (Xsqlite3WhereExprListUsage(tls, pMaskSet, (*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpOrderBy)) + tabUsed = tabUsed | (Xsqlite3WhereExprListUsage(tls, pMaskSet, (*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpOrderBy)) __34: ; i = (int32((*WhereInfo)(unsafe.Pointer(pWInfo)).FnLevel) - 1) @@ -180677,8 +180677,8 @@ __39: goto __36 __40: ; - pEnd = ((*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+16 /* &sWLB */)).FpWC)).FnTerm)*56) - pTerm = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp + 16 /* &sWLB */)).FpWC)).Fa + pEnd = ((*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpWC)).Fa + uintptr((*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp+8 /* &sWLB */)).FpWC)).FnTerm)*56) + pTerm = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpWC)).Fa __41: if !(pTerm < pEnd) { goto __43 @@ -180710,7 +180710,7 @@ __46: ; notReady = notReady & (^(*WhereLoop)(unsafe.Pointer(pLoop)).FmaskSelf) - pTerm = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp + 16 /* &sWLB */)).FpWC)).Fa + pTerm = (*WhereClause)(unsafe.Pointer((*WhereLoopBuilder)(unsafe.Pointer(bp + 8 /* &sWLB */)).FpWC)).Fa __47: if !(pTerm < pEnd) { goto __49 @@ -181878,8 +181878,8 @@ var aWindowFuncs = [15]FuncDef{ {FnArg: int8(3), FfuncFlags: (U32((SQLITE_UTF8 | SQLITE_FUNC_WINDOW) | 0)), FxSFunc: 0, FxFinalize: 0, FxValue: 0, FxInverse: 0, FzName: 0}} /* sqlite3.c:155522:18 */ func windowFind(tls *libc.TLS, pParse uintptr, pList uintptr, zName uintptr) uintptr { /* sqlite3.c:155542:15: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var p uintptr for p = pList; p != 0; p = (*Window)(unsafe.Pointer(p)).FpNextWin { @@ -182197,8 +182197,8 @@ func sqlite3WindowExtraAggFuncDepth(tls *libc.TLS, pWalker uintptr, pExpr uintpt } func disallowAggregatesInOrderByCb(tls *libc.TLS, pWalker uintptr, pExpr uintptr) int32 { /* sqlite3.c:155855:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) if (int32((*Expr)(unsafe.Pointer(pExpr)).Fop) == TK_AGG_FUNCTION) && ((*Expr)(unsafe.Pointer(pExpr)).FpAggInfo == uintptr(0)) { Xsqlite3ErrorMsg(tls, (*Walker)(unsafe.Pointer(pWalker)).FpParse, @@ -182528,8 +182528,8 @@ func Xsqlite3WindowAssemble(tls *libc.TLS, pParse uintptr, pWin uintptr, pPartit // either updates *pWin according to the base specification, or else // leaves an error in pParse. func Xsqlite3WindowChain(tls *libc.TLS, pParse uintptr, pWin uintptr, pList uintptr) { /* sqlite3.c:156179:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Window)(unsafe.Pointer(pWin)).FzBase != 0 { var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb @@ -184345,8 +184345,8 @@ func disableLookaside(tls *libc.TLS, pParse uintptr) { /* sqlite3.c:158076:13: * // all elements in the list. And make sure list length does not exceed // SQLITE_LIMIT_COMPOUND_SELECT. func parserDoubleLinkSelect(tls *libc.TLS, pParse uintptr, p uintptr) { /* sqlite3.c:158109:15: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Select)(unsafe.Pointer(p)).FpPrior != 0 { var pNext uintptr = uintptr(0) @@ -184449,8 +184449,8 @@ func binaryToUnaryIfNull(tls *libc.TLS, pParse uintptr, pY uintptr, pA uintptr, // a COLLATE clause or an ASC or DESC keyword, except ignore the // error while parsing a legacy schema. func parserAddExprIdListTerm(tls *libc.TLS, pParse uintptr, pPrior uintptr, pIdToken uintptr, hasCollate int32, sortOrder int32) uintptr { /* sqlite3.c:158204:19: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var p uintptr = Xsqlite3ExprListAppend(tls, pParse, pPrior, uintptr(0)) if ((hasCollate != 0) || (sortOrder != -1)) && @@ -186526,8 +186526,8 @@ var yyRuleInfoNRhs = [398]int8{ // only called from one place, optimizing compilers will in-line it, which // means that the extra parameters have no performance impact. func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead int32, yyLookaheadToken Token, pParse uintptr) uint16 { /* sqlite3.c:161518:21: */ - bp := tls.Alloc(144) - defer tls.Free(144) + bp := tls.Alloc(128) + defer tls.Free(128) var yygoto int32 // The next state var yyact uint16 // The next action @@ -186547,7 +186547,7 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // #line <lineno> <thisfile> // break; //********* Begin reduce actions ********************************************* - // var yylhsminor YYMINORTYPE at bp+96, 16 + // var yylhsminor YYMINORTYPE at bp+80, 16 case uint32(0): /* explain ::= EXPLAIN */ { @@ -186959,8 +186959,8 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(82): /* cmd ::= select */ { - *(*SelectDest)(unsafe.Pointer(bp + 40 /* dest */)) = SelectDest{FeDest: U8(SRT_Output)} - Xsqlite3Select(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), bp+40 /* &dest */) + *(*SelectDest)(unsafe.Pointer(bp + 24 /* dest */)) = SelectDest{FeDest: U8(SRT_Output)} + Xsqlite3Select(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), bp+24 /* &dest */) Xsqlite3SelectDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } break @@ -186989,11 +186989,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in var pLhs uintptr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) if (pRhs != 0) && ((*Select)(unsafe.Pointer(pRhs)).FpPrior != 0) { var pFrom uintptr - // var x Token at bp+80, 16 + // var x Token at bp+64, 16 - (*Token)(unsafe.Pointer(bp + 80 /* &x */)).Fn = uint32(0) + (*Token)(unsafe.Pointer(bp + 64 /* &x */)).Fn = uint32(0) parserDoubleLinkSelect(tls, pParse, pRhs) - pFrom = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp+80 /* &x */, pRhs, uintptr(0), uintptr(0)) + pFrom = Xsqlite3SrcListAppendFromTerm(tls, pParse, uintptr(0), uintptr(0), uintptr(0), bp+64 /* &x */, pRhs, uintptr(0), uintptr(0)) pRhs = Xsqlite3SelectNew(tls, pParse, uintptr(0), pFrom, uintptr(0), uintptr(0), uintptr(0), uintptr(0), uint32(0), uintptr(0)) } if pRhs != 0 { @@ -187199,21 +187199,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(113): /* fullname ::= nm */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), (yymsp + 8 /* &.minor */ /* &.yy0 */), uintptr(0)) - if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) != 0) { - Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + 8 /* &.a */))).FzName, (yymsp + 8 /* &.minor */ /* &.yy0 */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), (yymsp + 8 /* &.minor */ /* &.yy0 */), uintptr(0)) + if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) != 0) { + Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) + 8 /* &.a */))).FzName, (yymsp + 8 /* &.minor */ /* &.yy0 */)) } } - *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(114): /* fullname ::= nm DOT nm */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), (yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy0 */), (yymsp + 8 /* &.minor */ /* &.yy0 */)) - if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) != 0) { - Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + 8 /* &.a */))).FzName, (yymsp + 8 /* &.minor */ /* &.yy0 */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3SrcListAppend(tls, pParse, uintptr(0), (yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy0 */), (yymsp + 8 /* &.minor */ /* &.yy0 */)) + if (int32((*Parse)(unsafe.Pointer(pParse)).FeParseMode) >= PARSE_MODE_RENAME) && (*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) != 0) { + Xsqlite3RenameTokenMap(tls, pParse, (*SrcItem)(unsafe.Pointer((*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) + 8 /* &.a */))).FzName, (yymsp + 8 /* &.minor */ /* &.yy0 */)) } } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(115): /* xfullname ::= nm */ { @@ -187418,10 +187418,10 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(158): /* setlist ::= nm EQ expr */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) - Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)), (yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy0 */), 1) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprListAppend(tls, pParse, uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + Xsqlite3ExprListSetName(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)), (yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy0 */), 1) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(159): /* setlist ::= LP idlist RP EQ expr */ { @@ -187509,9 +187509,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3RenameTokenMap(tls, pParse, temp2, (yymsp + 8 /* &.minor */ /* &.yy0 */)) Xsqlite3RenameTokenMap(tls, pParse, temp1, (yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy0 */)) } - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp2) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp2) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(179): /* expr ::= nm DOT nm DOT nm */ { @@ -187523,9 +187523,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in Xsqlite3RenameTokenMap(tls, pParse, temp3, (yymsp + 8 /* &.minor */ /* &.yy0 */)) Xsqlite3RenameTokenMap(tls, pParse, temp2, (yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */ /* &.yy0 */)) } - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp4) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3PExpr(tls, pParse, TK_DOT, temp1, temp4) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(180): fallthrough // term ::= NULL|FLOAT|BLOB @@ -187536,9 +187536,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(182): /* term ::= INTEGER */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, (yymsp + 8 /* &.minor */ /* &.yy0 */), 1) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprAlloc(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, TK_INTEGER, (yymsp + 8 /* &.minor */ /* &.yy0 */), 1) } - *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(183): /* expr ::= VARIABLE */ { @@ -187550,15 +187550,15 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // When doing a nested parse, one can include terms in an expression // that look like this: #1 #2 ... These terms refer to registers // in the virtual machine. #N is the N-th register. - *(*Token)(unsafe.Pointer(bp + 112 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)) //A-overwrites-X + *(*Token)(unsafe.Pointer(bp + 96 /* t */)) = *(*Token)(unsafe.Pointer(yymsp + 8 /* &.minor */)) //A-overwrites-X if int32((*Parse)(unsafe.Pointer(pParse)).Fnested) == 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22654 /* "near \"%T\": synta..." */, libc.VaList(bp+24, bp+112 /* &t */)) + Xsqlite3ErrorMsg(tls, pParse, ts+22654 /* "near \"%T\": synta..." */, libc.VaList(bp+16, bp+96 /* &t */)) *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = uintptr(0) } else { *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = Xsqlite3PExpr(tls, pParse, TK_REGISTER, uintptr(0), uintptr(0)) if *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) != 0 { - Xsqlite3GetInt32(tls, ((*Token)(unsafe.Pointer(bp+112 /* &t */)).Fz + 1), (*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + 44 /* &.iTable */)) + Xsqlite3GetInt32(tls, ((*Token)(unsafe.Pointer(bp+96 /* &t */)).Fz + 1), (*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + 44 /* &.iTable */)) } } } @@ -187577,35 +187577,35 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(186): /* expr ::= ID|INDEXED LP distinct exprlist RP */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(187): /* expr ::= ID|INDEXED LP STAR RP */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), (yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */ /* &.yy0 */), 0) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), (yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */ /* &.yy0 */), 0) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(188): /* expr ::= ID|INDEXED LP distinct exprlist RP filter_over */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */ /* &.yy0 */), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */))) - Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */ /* &.yy0 */), *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */))) + Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(189): /* expr ::= ID|INDEXED LP STAR RP filter_over */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), 0) - Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), 0) + Xsqlite3WindowAttach(tls, pParse, *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(190): /* term ::= CTIME_KW */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), (yymsp + 8 /* &.minor */ /* &.yy0 */), 0) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3ExprFunction(tls, pParse, uintptr(0), (yymsp + 8 /* &.minor */ /* &.yy0 */), 0) } - *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(191): /* expr ::= LP nexprlist COMMA expr RP */ { @@ -187955,11 +187955,11 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(253): /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */ { - // var all Token at bp+128, 16 + // var all Token at bp+112, 16 - (*Token)(unsafe.Pointer(bp + 128 /* &all */)).Fz = (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)).Fz - (*Token)(unsafe.Pointer(bp + 128 /* &all */)).Fn = (uint32((int32((int64((*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz) - int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */)).Fz)) / 1))) + (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fn) - Xsqlite3FinishTrigger(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), bp+128 /* &all */) + (*Token)(unsafe.Pointer(bp + 112 /* &all */)).Fz = (*Token)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)).Fz + (*Token)(unsafe.Pointer(bp + 112 /* &all */)).Fn = (uint32((int32((int64((*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fz) - int64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */)).Fz)) / 1))) + (*Token)(unsafe.Pointer(yymsp+8 /* &.minor */)).Fn) + Xsqlite3FinishTrigger(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), bp+112 /* &all */) } break case uint32(254): /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */ @@ -188053,27 +188053,27 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(268): /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist from where_opt scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3TriggerUpdateStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */))), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-8)*24+8 /* &.minor */)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerUpdateStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */))), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-8)*24+8 /* &.minor */)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-8)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(269): /* trigger_cmd ::= scanpt insert_cmd INTO trnm idlist_opt select upsert scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3TriggerInsertStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) //yylhsminor.yy157-overwrites-yymsp[-6].minor.yy376 + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerInsertStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), uint8(*(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-6)*24 + 8 /* &.minor */))), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) //yylhsminor.yy157-overwrites-yymsp[-6].minor.yy376 } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-7)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(270): /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3TriggerDeleteStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-5)*24+8 /* &.minor */)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerDeleteStep(tls, pParse, (yymsp + libc.UintptrFromInt32(-3)*24 + 8 /* &.minor */ /* &.yy0 */), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-5)*24+8 /* &.minor */)).Fz, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(271): /* trigger_cmd ::= scanpt select scanpt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) /*yylhsminor.yy157-overwrites-yymsp[-1].minor.yy81*/ + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3TriggerSelectStep(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) /*yylhsminor.yy157-overwrites-yymsp[-1].minor.yy81*/ } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(272): /* expr ::= RAISE LP IGNORE RP */ { @@ -188231,27 +188231,27 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(306): /* windowdefn_list ::= windowdefn */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) } - *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(307): /* windowdefn_list ::= windowdefn_list COMMA windowdefn */ { Xsqlite3WindowChain(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */))) (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)))).FpNextWin = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(308): /* windowdefn ::= nm AS LP window RP */ { if *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) != 0 { (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)))).FzName = Xsqlite3DbStrNDup(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, (*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*24+8 /* &.minor */)).Fz, uint64((*Token)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-4)*24+8 /* &.minor */)).Fn)) } - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(309): /* window ::= PARTITION BY nexprlist orderby_opt frame_opt */ { @@ -188260,9 +188260,9 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(310): /* window ::= nm PARTITION BY nexprlist orderby_opt frame_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */ /* &.yy0 */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */ /* &.yy0 */)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(311): /* window ::= ORDER BY sortlist frame_opt */ { @@ -188271,23 +188271,23 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(312): /* window ::= nm ORDER BY sortlist frame_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), uintptr(0), *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)), (yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */ /* &.yy0 */)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-4)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(313): fallthrough // window ::= frame_opt case uint32(332): /* filter_over ::= over_clause */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) } - *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(314): /* window ::= nm frame_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), uintptr(0), uintptr(0), (yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy0 */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3WindowAssemble(tls, pParse, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)), uintptr(0), uintptr(0), (yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */ /* &.yy0 */)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(315): /* frame_opt ::= */ { @@ -188296,23 +188296,23 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in break case uint32(316): /* frame_opt ::= range_or_rows frame_bound_s frame_exclude_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FpExpr, TK_CURRENT, uintptr(0), *(*U8)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FpExpr, TK_CURRENT, uintptr(0), *(*U8)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-2)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(317): /* frame_opt ::= range_or_rows BETWEEN frame_bound_s AND frame_bound_e frame_exclude_opt */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */)).FpExpr, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FpExpr, *(*U8)(unsafe.Pointer(yymsp + 8 /* &.minor */))) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3WindowAlloc(tls, pParse, *(*int32)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)), (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-3)*24+8 /* &.minor */)).FpExpr, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FeType, (*FrameBound)(unsafe.Pointer(yymsp+libc.UintptrFromInt32(-1)*24+8 /* &.minor */)).FpExpr, *(*U8)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-5)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(319): fallthrough // frame_bound_s ::= frame_bound case uint32(321): /* frame_bound_e ::= frame_bound */ { - *(*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = *(*FrameBound)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + *(*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*FrameBound)(unsafe.Pointer(yymsp + 8 /* &.minor */)) } - *(*FrameBound)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*FrameBound)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(320): fallthrough // frame_bound_s ::= UNBOUNDED PRECEDING @@ -188320,17 +188320,17 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in fallthrough case uint32(324): /* frame_bound ::= CURRENT ROW */ { - (*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24)).Fmajor) - (*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)).FpExpr = uintptr(0) + (*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24)).Fmajor) + (*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)).FpExpr = uintptr(0) } - *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(323): /* frame_bound ::= expr PRECEDING|FOLLOWING */ { - (*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) - (*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)).FpExpr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) + (*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)).FeType = int32((*YyStackEntry)(unsafe.Pointer(yymsp)).Fmajor) + (*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)).FpExpr = *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) } - *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*FrameBound)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*FrameBound)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*FrameBound)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(325): /* frame_exclude_opt ::= */ { @@ -188366,21 +188366,21 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */))) } - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) } - *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + libc.UintptrFromInt32(-1)*24 + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(333): /* filter_over ::= filter_clause */ { - *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) - if *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) != 0 { - (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)))).FeFrmType = U8(TK_FILTER) - (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) = Xsqlite3DbMallocZero(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, uint64(unsafe.Sizeof(Window{}))) + if *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) != 0 { + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)))).FeFrmType = U8(TK_FILTER) + (*Window)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)))).FpFilter = *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) } else { Xsqlite3ExprDelete(tls, (*Parse)(unsafe.Pointer(pParse)).Fdb, *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */))) } } - *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 96 /* &yylhsminor */)) + *(*uintptr)(unsafe.Pointer(yymsp + 8 /* &.minor */)) = *(*uintptr)(unsafe.Pointer(bp + 80 /* &yylhsminor */)) break case uint32(334): /* over_clause ::= OVER LP window RP */ { @@ -188488,16 +188488,16 @@ func yy_reduce(tls *libc.TLS, yypParser uintptr, yyruleno uint32, yyLookahead in // The following code executes when a syntax error first occurs. func yy_syntax_error(tls *libc.TLS, yypParser uintptr, yymajor int32, yyminor Token) { /* sqlite3.c:163044:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) - *(*Token)(unsafe.Pointer(bp + 16)) = yyminor + bp := tls.Alloc(24) + defer tls.Free(24) + *(*Token)(unsafe.Pointer(bp + 8)) = yyminor var pParse uintptr = (*YyParser)(unsafe.Pointer(yypParser)).FpParse //*********** Begin %syntax_error code *************************************** _ = yymajor // Silence some compiler warnings - if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 16 /* &yyminor */)).Fz)) != 0 { - Xsqlite3ErrorMsg(tls, pParse, ts+22654 /* "near \"%T\": synta..." */, libc.VaList(bp, bp+16 /* &yyminor */)) + if *(*int8)(unsafe.Pointer((*Token)(unsafe.Pointer(bp + 8 /* &yyminor */)).Fz)) != 0 { + Xsqlite3ErrorMsg(tls, pParse, ts+22654 /* "near \"%T\": synta..." */, libc.VaList(bp, bp+8 /* &yyminor */)) } else { Xsqlite3ErrorMsg(tls, pParse, ts+22942 /* "incomplete input" */, 0) } @@ -189642,18 +189642,18 @@ func Xsqlite3GetToken(tls *libc.TLS, z uintptr, tokenType uintptr) int32 { /* sq // memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that // error message. func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:164392:20: */ - bp := tls.Alloc(2492) - defer tls.Free(2492) + bp := tls.Alloc(2468) + defer tls.Free(2468) var nErr int32 = 0 // Number of errors encountered var pEngine uintptr // The LEMON-generated LALR(1) parser var n int32 = 0 // Length of the next token token - // var tokenType int32 at bp+2488, 4 + // var tokenType int32 at bp+2464, 4 // type of the next token var lastTokenParsed int32 = -1 // type of the previous token var db uintptr = (*Parse)(unsafe.Pointer(pParse)).Fdb // The database connection var mxSqlLen int32 // Max length of an SQL string - // var sEngine YyParser at bp+64, 2424 + // var sEngine YyParser at bp+40, 2424 // Space to hold the Lemon-generated Parser object mxSqlLen = *(*int32)(unsafe.Pointer((db + 128 /* &.aLimit */) + 1*4)) @@ -189663,25 +189663,25 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_OK (*Parse)(unsafe.Pointer(pParse)).FzTail = zSql - pEngine = bp + 64 /* &sEngine */ + pEngine = bp + 40 /* &sEngine */ Xsqlite3ParserInit(tls, pEngine, pParse) (*Parse)(unsafe.Pointer(pParse)).FpParentParse = (*Sqlite3)(unsafe.Pointer(db)).FpParse (*Sqlite3)(unsafe.Pointer(db)).FpParse = pParse for 1 != 0 { - n = Xsqlite3GetToken(tls, zSql, bp+2488 /* &tokenType */) + n = Xsqlite3GetToken(tls, zSql, bp+2464 /* &tokenType */) mxSqlLen = mxSqlLen - (n) if mxSqlLen < 0 { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_TOOBIG break } - if *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) >= TK_WINDOW { + if *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) >= TK_WINDOW { if libc.AtomicLoadNInt32((db+400 /* &.u1 */ /* &.isInterrupted */), 0) != 0 { (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_INTERRUPT break } - if *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) == TK_SPACE { + if *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) == TK_SPACE { zSql += uintptr(n) continue } @@ -189689,22 +189689,22 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin // Upon reaching the end of input, call the parser two more times // with tokens TK_SEMI and 0, in that order. if lastTokenParsed == TK_SEMI { - *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) = 0 + *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) = 0 } else if lastTokenParsed == 0 { break } else { - *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) = TK_SEMI + *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) = TK_SEMI } n = 0 - } else if *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) == TK_WINDOW { + } else if *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) == TK_WINDOW { - *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) = analyzeWindowKeyword(tls, (zSql + 6)) - } else if *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) == TK_OVER { + *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) = analyzeWindowKeyword(tls, (zSql + 6)) + } else if *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) == TK_OVER { - *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) = analyzeOverKeyword(tls, (zSql + 4), lastTokenParsed) - } else if *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) == TK_FILTER { + *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) = analyzeOverKeyword(tls, (zSql + 4), lastTokenParsed) + } else if *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) == TK_FILTER { - *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) = analyzeFilterKeyword(tls, (zSql + 6), lastTokenParsed) + *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) = analyzeFilterKeyword(tls, (zSql + 6), lastTokenParsed) } else { Xsqlite3ErrorMsg(tls, pParse, ts+22959 /* "unrecognized tok..." */, libc.VaList(bp, n, zSql)) break @@ -189712,8 +189712,8 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin } (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fz = zSql (*Parse)(unsafe.Pointer(pParse)).FsLastToken.Fn = uint32(n) - Xsqlite3Parser(tls, pEngine, *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)), (*Parse)(unsafe.Pointer(pParse)).FsLastToken) - lastTokenParsed = *(*int32)(unsafe.Pointer(bp + 2488 /* tokenType */)) + Xsqlite3Parser(tls, pEngine, *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)), (*Parse)(unsafe.Pointer(pParse)).FsLastToken) + lastTokenParsed = *(*int32)(unsafe.Pointer(bp + 2464 /* tokenType */)) zSql += uintptr(n) if (*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK { @@ -189726,13 +189726,13 @@ func Xsqlite3RunParser(tls *libc.TLS, pParse uintptr, zSql uintptr, pzErrMsg uin (*Parse)(unsafe.Pointer(pParse)).Frc = SQLITE_NOMEM } if (((*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_OK) && ((*Parse)(unsafe.Pointer(pParse)).Frc != SQLITE_DONE)) && ((*Parse)(unsafe.Pointer(pParse)).FzErrMsg == uintptr(0)) { - (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3630 /* "%s" */, libc.VaList(bp+24, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) + (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = Xsqlite3MPrintf(tls, db, ts+3630 /* "%s" */, libc.VaList(bp+16, Xsqlite3ErrStr(tls, (*Parse)(unsafe.Pointer(pParse)).Frc))) } if (*Parse)(unsafe.Pointer(pParse)).FzErrMsg != 0 { *(*uintptr)(unsafe.Pointer(pzErrMsg)) = (*Parse)(unsafe.Pointer(pParse)).FzErrMsg Xsqlite3_log(tls, (*Parse)(unsafe.Pointer(pParse)).Frc, ts+22986, /* "%s in \"%s\"" */ - libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(pzErrMsg)), (*Parse)(unsafe.Pointer(pParse)).FzTail)) + libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(pzErrMsg)), (*Parse)(unsafe.Pointer(pParse)).FzTail)) (*Parse)(unsafe.Pointer(pParse)).FzErrMsg = uintptr(0) nErr++ } @@ -191577,8 +191577,8 @@ func Xsqlite3_create_function16(tls *libc.TLS, db uintptr, zFunctionName uintptr // for name resolution but are actually overloaded by the xFindFunction // method of virtual tables. func sqlite3InvalidFunction(tls *libc.TLS, context uintptr, NotUsed int32, NotUsed2 uintptr) { /* sqlite3.c:167136:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var zName uintptr = Xsqlite3_user_data(tls, context) var zErr uintptr @@ -191779,8 +191779,8 @@ func Xsqlite3_wal_hook(tls *libc.TLS, db uintptr, xCallback uintptr, pArg uintpt // Checkpoint database zDb. func Xsqlite3_wal_checkpoint_v2(tls *libc.TLS, db uintptr, zDb uintptr, eMode int32, pnLog uintptr, pnCkpt uintptr) int32 { /* sqlite3.c:167449:16: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 // Return code var iDb int32 // Schema to checkpoint @@ -192137,8 +192137,8 @@ func Xsqlite3_limit(tls *libc.TLS, db uintptr, limitId int32, newLimit int32) in // message. It is the responsibility of the caller to eventually release // this buffer by calling sqlite3_free(). func Xsqlite3ParseUri(tls *libc.TLS, zDefaultVfs uintptr, zUri uintptr, pFlags uintptr, ppVfs uintptr, pzFile uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:167922:20: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(56) + defer tls.Free(56) var rc int32 var flags uint32 @@ -192402,7 +192402,7 @@ __36: if !(mode == 0) { goto __38 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23924 /* "no such %s mode:..." */, libc.VaList(bp+24, zModeType, zVal)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23924 /* "no such %s mode:..." */, libc.VaList(bp+16, zModeType, zVal)) rc = SQLITE_ERROR goto parse_uri_out __38: @@ -192411,7 +192411,7 @@ __38: goto __39 } *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23944, /* "%s mode not allo..." */ - libc.VaList(bp+48, zModeType, zVal)) + libc.VaList(bp+32, zModeType, zVal)) rc = SQLITE_PERM goto parse_uri_out __39: @@ -192453,7 +192453,7 @@ __2: if !(*(*uintptr)(unsafe.Pointer(ppVfs)) == uintptr(0)) { goto __42 } - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23968 /* "no such vfs: %s" */, libc.VaList(bp+72, zVfs)) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+23968 /* "no such vfs: %s" */, libc.VaList(bp+48, zVfs)) rc = SQLITE_ERROR __42: ; @@ -192508,20 +192508,20 @@ func uriParameter(tls *libc.TLS, zFilename uintptr, zParam uintptr) uintptr { /* // sqlite3_open() and sqlite3_open16(). The database filename "zFilename" // is UTF-8 encoded. func openDatabase(tls *libc.TLS, zFilename uintptr, ppDb uintptr, flags uint32, zVfs uintptr) int32 { /* sqlite3.c:168177:12: */ - bp := tls.Alloc(40) - defer tls.Free(40) - *(*uint32)(unsafe.Pointer(bp + 16)) = flags + bp := tls.Alloc(32) + defer tls.Free(32) + *(*uint32)(unsafe.Pointer(bp + 8)) = flags var db uintptr // Store allocated handle here var rc int32 // Return code var isThreadsafe int32 // True for threadsafe connections - // var zOpen uintptr at bp+24, 8 + // var zOpen uintptr at bp+16, 8 // Filename argument to pass to BtreeOpen() - // var zErrMsg uintptr at bp+32, 8 + // var zErrMsg uintptr at bp+24, 8 // Error message from sqlite3ParseUri() var i int32 - *(*uintptr)(unsafe.Pointer(bp + 24 /* zOpen */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 32 /* zErrMsg */)) = uintptr(0) // Loop counter + *(*uintptr)(unsafe.Pointer(bp + 16 /* zOpen */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = uintptr(0) // Loop counter *(*uintptr)(unsafe.Pointer(ppDb)) = uintptr(0) rc = Xsqlite3_initialize(tls) @@ -192538,13 +192538,13 @@ __1: isThreadsafe = 0 goto __3 __2: - if !((*(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) & uint32(SQLITE_OPEN_NOMUTEX)) != 0) { + if !((*(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) & uint32(SQLITE_OPEN_NOMUTEX)) != 0) { goto __4 } isThreadsafe = 0 goto __5 __4: - if !((*(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) & uint32(SQLITE_OPEN_FULLMUTEX)) != 0) { + if !((*(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) & uint32(SQLITE_OPEN_FULLMUTEX)) != 0) { goto __6 } isThreadsafe = 1 @@ -192558,16 +192558,16 @@ __5: __3: ; - if !((*(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) & uint32(SQLITE_OPEN_PRIVATECACHE)) != 0) { + if !((*(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) & uint32(SQLITE_OPEN_PRIVATECACHE)) != 0) { goto __8 } - *(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) &= libc.Uint32FromInt32(libc.CplInt32(SQLITE_OPEN_SHAREDCACHE)) + *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) &= libc.Uint32FromInt32(libc.CplInt32(SQLITE_OPEN_SHAREDCACHE)) goto __9 __8: if !(Xsqlite3Config.FsharedCacheEnabled != 0) { goto __10 } - *(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) |= uint32(SQLITE_OPEN_SHAREDCACHE) + *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) |= uint32(SQLITE_OPEN_SHAREDCACHE) __10: ; __9: @@ -192581,7 +192581,7 @@ __9: // SQLITE_OPEN_READWRITE, SQLITE_OPEN_CREATE, SQLITE_OPEN_SHAREDCACHE, // SQLITE_OPEN_PRIVATECACHE, and some reserved bits. Silently mask // off all other flags. - *(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) &= libc.Uint32FromInt32(libc.CplInt32((((((((((((SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB) | SQLITE_OPEN_TRANSIENT_DB) | SQLITE_OPEN_MAIN_JOURNAL) | SQLITE_OPEN_TEMP_JOURNAL) | SQLITE_OPEN_SUBJOURNAL) | SQLITE_OPEN_SUPER_JOURNAL) | SQLITE_OPEN_NOMUTEX) | SQLITE_OPEN_FULLMUTEX) | SQLITE_OPEN_WAL))) + *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) &= libc.Uint32FromInt32(libc.CplInt32((((((((((((SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_EXCLUSIVE) | SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB) | SQLITE_OPEN_TRANSIENT_DB) | SQLITE_OPEN_MAIN_JOURNAL) | SQLITE_OPEN_TEMP_JOURNAL) | SQLITE_OPEN_SUBJOURNAL) | SQLITE_OPEN_SUPER_JOURNAL) | SQLITE_OPEN_NOMUTEX) | SQLITE_OPEN_FULLMUTEX) | SQLITE_OPEN_WAL))) // Allocate the sqlite data structure db = Xsqlite3MallocZero(tls, uint64(unsafe.Sizeof(Sqlite3{}))) @@ -192691,18 +192691,18 @@ __15: // 1: SQLITE_OPEN_READONLY // 2: SQLITE_OPEN_READWRITE // 6: SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE - (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = *(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) + (*Sqlite3)(unsafe.Pointer(db)).FopenFlags = *(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) // READONLY // READWRITE // READWRITE | CREATE - if !(((int32(1) << (*(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) & uint32(7))) & 0x46) == 0) { + if !(((int32(1) << (*(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) & uint32(7))) & 0x46) == 0) { goto __16 } rc = Xsqlite3MisuseError(tls, 168382) // IMP: R-18321-05872 goto __17 __16: - rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+16 /* &flags */, (db /* &.pVfs */), bp+24 /* &zOpen */, bp+32 /* &zErrMsg */) + rc = Xsqlite3ParseUri(tls, zVfs, zFilename, bp+8 /* &flags */, (db /* &.pVfs */), bp+16 /* &zOpen */, bp+24 /* &zErrMsg */) __17: ; if !(rc != SQLITE_OK) { @@ -192715,19 +192715,19 @@ __17: __19: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 32 /* zErrMsg */)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) != 0 { return ts + 3630 /* "%s" */ } return uintptr(0) - }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 32 /* zErrMsg */)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* zErrMsg */))) + }(), libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) goto opendb_out __18: ; // Open the backend database driver - rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, *(*uintptr)(unsafe.Pointer(bp + 24 /* zOpen */)), db, ((*Sqlite3)(unsafe.Pointer(db)).FaDb + 8 /* &.pBt */), 0, - (int32(*(*uint32)(unsafe.Pointer(bp + 16 /* flags */)) | uint32(SQLITE_OPEN_MAIN_DB)))) + rc = Xsqlite3BtreeOpen(tls, (*Sqlite3)(unsafe.Pointer(db)).FpVfs, *(*uintptr)(unsafe.Pointer(bp + 16 /* zOpen */)), db, ((*Sqlite3)(unsafe.Pointer(db)).FaDb + 8 /* &.pBt */), 0, + (int32(*(*uint32)(unsafe.Pointer(bp + 8 /* flags */)) | uint32(SQLITE_OPEN_MAIN_DB)))) if !(rc != SQLITE_OK) { goto __20 } @@ -192848,7 +192848,7 @@ __33: __32: ; *(*uintptr)(unsafe.Pointer(ppDb)) = db - Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* zOpen */))) + Xsqlite3_free_filename(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zOpen */))) return (rc & 0xff) } @@ -192974,8 +192974,8 @@ func Xsqlite3_get_autocommit(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:168 // 2. Invoke sqlite3_log() to provide the source code location where // a low-level error is first detected. func Xsqlite3ReportError(tls *libc.TLS, iErr int32, lineno int32, zType uintptr) int32 { /* sqlite3.c:168706:20: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) Xsqlite3_log(tls, iErr, ts+24018, /* "%s at line %d of..." */ libc.VaList(bp, zType, lineno, (uintptr(20)+Xsqlite3_sourceid(tls)))) @@ -193008,11 +193008,11 @@ func Xsqlite3_thread_cleanup(tls *libc.TLS) { /* sqlite3.c:168750:17: */ // Return meta information about a specific column of a database table. // See comment in sqlite3.h (sqlite.h.in) for details. func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, zTableName uintptr, zColumnName uintptr, pzDataType uintptr, pzCollSeq uintptr, pNotNull uintptr, pPrimaryKey uintptr, pAutoinc uintptr) int32 { /* sqlite3.c:168758:16: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) var rc int32 - // var zErrMsg uintptr at bp+40, 8 + // var zErrMsg uintptr at bp+24, 8 var pTab uintptr var pCol uintptr @@ -193022,7 +193022,7 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, var notnull int32 var primarykey int32 var autoinc int32 - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrMsg */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = uintptr(0) pTab = uintptr(0) pCol = uintptr(0) iCol = 0 @@ -193035,7 +193035,7 @@ func Xsqlite3_table_column_metadata(tls *libc.TLS, db uintptr, zDbName uintptr, // Ensure the database schema has been loaded Xsqlite3_mutex_enter(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) Xsqlite3BtreeEnterAll(tls, db) - rc = Xsqlite3Init(tls, db, bp+40 /* &zErrMsg */) + rc = Xsqlite3Init(tls, db, bp+24 /* &zErrMsg */) if !(SQLITE_OK != rc) { goto __1 } @@ -193172,19 +193172,19 @@ __19: if !((SQLITE_OK == rc) && !(pTab != 0)) { goto __20 } - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrMsg */))) - *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24087 /* "no such table co..." */, libc.VaList(bp, zTableName, + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) + *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) = Xsqlite3MPrintf(tls, db, ts+24087 /* "no such table co..." */, libc.VaList(bp, zTableName, zColumnName)) rc = SQLITE_ERROR __20: ; Xsqlite3ErrorWithMsg(tls, db, rc, func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrMsg */)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)) != 0 { return ts + 3630 /* "%s" */ } return uintptr(0) - }(), libc.VaList(bp+24, *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrMsg */)))) - Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 40 /* zErrMsg */))) + }(), libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */)))) + Xsqlite3DbFree(tls, db, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrMsg */))) rc = Xsqlite3ApiExit(tls, db, rc) Xsqlite3_mutex_leave(tls, (*Sqlite3)(unsafe.Pointer(db)).Fmutex) return rc @@ -196284,8 +196284,8 @@ func jsonLookupAppend(tls *libc.TLS, pParse uintptr, zPath uintptr, pApnd uintpt // Return the text of a syntax error message on a JSON path. Space is // obtained from sqlite3_malloc(). func jsonPathSyntaxError(tls *libc.TLS, zErr uintptr) uintptr { /* sqlite3.c:190925:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) return Xsqlite3_mprintf(tls, ts+24224 /* "JSON path error ..." */, libc.VaList(bp, zErr)) } @@ -196351,8 +196351,8 @@ __5: // Report the wrong number of arguments for json_insert(), json_replace() // or json_set(). func jsonWrongNumArgs(tls *libc.TLS, pCtx uintptr, zFuncName uintptr) { /* sqlite3.c:190976:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var zMsg uintptr = Xsqlite3_mprintf(tls, ts+24250, /* "json_%s() needs ..." */ libc.VaList(bp, zFuncName)) @@ -197258,8 +197258,8 @@ func jsonEachNext(tls *libc.TLS, cur uintptr) int32 { /* sqlite3.c:191797:12: */ // Append the name of the path for element i to pStr func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sqlite3.c:191838:13: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var pNode uintptr var pUp uintptr @@ -197280,14 +197280,14 @@ func jsonEachComputePath(tls *libc.TLS, p uintptr, pStr uintptr, i U32) { /* sql pNode -= 16 } - jsonPrintf(tls, (int32((*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1))), pStr, ts+24483 /* ".%.*s" */, libc.VaList(bp+16, ((*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))+uintptr(1)))) + jsonPrintf(tls, (int32((*JsonNode)(unsafe.Pointer(pNode)).Fn + U32(1))), pStr, ts+24483 /* ".%.*s" */, libc.VaList(bp+8, ((*JsonNode)(unsafe.Pointer(pNode)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pNode + 8 /* &.u */))+uintptr(1)))) } } // Return the value of a column func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* sqlite3.c:191865:12: */ - bp := tls.Alloc(312) - defer tls.Free(312) + bp := tls.Alloc(296) + defer tls.Free(296) var p uintptr = cur var pThis uintptr = ((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaNode + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*16) @@ -197361,35 +197361,35 @@ func jsonEachColumn(tls *libc.TLS, cur uintptr, ctx uintptr, i int32) int32 { /* } case JEACH_FULLKEY: { - // var x JsonString at bp+40, 136 + // var x JsonString at bp+24, 136 - jsonInit(tls, bp+40 /* &x */, ctx) + jsonInit(tls, bp+24 /* &x */, ctx) if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { - jsonEachComputePath(tls, p, bp+40 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).Fi) + jsonEachComputePath(tls, p, bp+24 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).Fi) } else { if (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot != 0 { - jsonAppendRaw(tls, bp+40 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, uint32(int32(libc.Xstrlen(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot)))) + jsonAppendRaw(tls, bp+24 /* &x */, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot, uint32(int32(libc.Xstrlen(tls, (*JsonEachCursor)(unsafe.Pointer(p)).FzRoot)))) } else { - jsonAppendChar(tls, bp+40 /* &x */, int8('$')) + jsonAppendChar(tls, bp+24 /* &x */, int8('$')) } if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_ARRAY { - jsonPrintf(tls, 30, bp+40 /* &x */, ts+24478 /* "[%d]" */, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) + jsonPrintf(tls, 30, bp+24 /* &x */, ts+24478 /* "[%d]" */, libc.VaList(bp, (*JsonEachCursor)(unsafe.Pointer(p)).FiRowid)) } else if int32((*JsonEachCursor)(unsafe.Pointer(p)).FeType) == JSON_OBJECT { - jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+40 /* &x */, ts+24483 /* ".%.*s" */, libc.VaList(bp+16, ((*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pThis + 8 /* &.u */))+uintptr(1)))) + jsonPrintf(tls, int32((*JsonNode)(unsafe.Pointer(pThis)).Fn), bp+24 /* &x */, ts+24483 /* ".%.*s" */, libc.VaList(bp+8, ((*JsonNode)(unsafe.Pointer(pThis)).Fn-U32(2)), (*(*uintptr)(unsafe.Pointer(pThis + 8 /* &.u */))+uintptr(1)))) } } - jsonResult(tls, bp+40 /* &x */) + jsonResult(tls, bp+24 /* &x */) break } case JEACH_PATH: { if (*JsonEachCursor)(unsafe.Pointer(p)).FbRecursive != 0 { - // var x JsonString at bp+176, 136 + // var x JsonString at bp+160, 136 - jsonInit(tls, bp+176 /* &x */, ctx) - jsonEachComputePath(tls, p, bp+176 /* &x */, *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4))) - jsonResult(tls, bp+176 /* &x */) + jsonInit(tls, bp+160 /* &x */, ctx) + jsonEachComputePath(tls, p, bp+160 /* &x */, *(*U32)(unsafe.Pointer((*JsonEachCursor)(unsafe.Pointer(p)).FsParse.FaUp + uintptr((*JsonEachCursor)(unsafe.Pointer(p)).Fi)*4))) + jsonResult(tls, bp+160 /* &x */) break } @@ -198019,8 +198019,8 @@ func nodeInParentChain(tls *libc.TLS, pNode uintptr, pParent uintptr) int32 { /* // Obtain a reference to an r-tree node. func nodeAcquire(tls *libc.TLS, pRtree uintptr, iNode I64, pParent uintptr, ppNode uintptr) int32 { /* sqlite3.c:192953:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = SQLITE_OK var pNode uintptr = uintptr(0) @@ -198299,8 +198299,8 @@ func rtreeDisconnect(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:193300:1 // Rtree virtual table module xDestroy method. func rtreeDestroy(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:193308:12: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) var pRtree uintptr = pVtab var rc int32 @@ -199236,8 +199236,8 @@ func rtreeFilter(tls *libc.TLS, pVtabCursor uintptr, idxNum int32, idxStr uintpt // to which the constraint applies. The leftmost coordinate column // is 'a', the second from the left 'b' etc. func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sqlite3.c:194235:12: */ - bp := tls.Alloc(57) - defer tls.Free(57) + bp := tls.Alloc(49) + defer tls.Free(49) var pRtree uintptr = tab var rc int32 = SQLITE_OK @@ -199246,9 +199246,9 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql var nRow I64 // Estimated rows returned by this scan var iIdx int32 = 0 - // var zIdxStr [41]int8 at bp+16, 41 + // var zIdxStr [41]int8 at bp+8, 41 - libc.Xmemset(tls, bp+16 /* &zIdxStr[0] */, 0, uint64(unsafe.Sizeof([41]int8{}))) + libc.Xmemset(tls, bp+8 /* &zIdxStr[0] */, 0, uint64(unsafe.Sizeof([41]int8{}))) // Check if there exists a MATCH constraint - even an unusable one. If there // is, do not consider the lookup-by-rowid plan as using such a plan would @@ -199320,8 +199320,8 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql break } if op != 0 { - *(*int8)(unsafe.Pointer(bp + 16 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8(op) - *(*int8)(unsafe.Pointer(bp + 16 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = (int8(((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1) + '0')) + *(*int8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = int8(op) + *(*int8)(unsafe.Pointer(bp + 8 /* &zIdxStr[0] */ + uintptr(libc.PostIncInt32(&iIdx, 1)))) = (int8(((*sqlite3_index_constraint)(unsafe.Pointer(p)).FiColumn - 1) + '0')) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).FargvIndex = (iIdx / 2) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FaConstraintUsage + uintptr(ii)*8)).Fomit = uint8(1) } @@ -199330,7 +199330,7 @@ func rtreeBestIndex(tls *libc.TLS, tab uintptr, pIdxInfo uintptr) int32 { /* sql (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FidxNum = 2 (*Sqlite3_index_info)(unsafe.Pointer(pIdxInfo)).FneedToFreeIdxStr = 1 - if (iIdx > 0) && (uintptr(0) == (libc.AssignPtrUintptr(pIdxInfo+48 /* &.idxStr */, Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, bp+16 /* &zIdxStr[0] */))))) { + if (iIdx > 0) && (uintptr(0) == (libc.AssignPtrUintptr(pIdxInfo+48 /* &.idxStr */, Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, bp+8 /* &zIdxStr[0] */))))) { return SQLITE_NOMEM } @@ -200583,16 +200583,16 @@ func rtreeValueUp(tls *libc.TLS, v uintptr) RtreeValue { /* sqlite3.c:195393:19: // // If an OOM occurs, SQLITE_NOMEM is returned instead of SQLITE_CONSTRAINT. func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* sqlite3.c:195416:12: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(64) + defer tls.Free(64) - *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)) = uintptr(0) var zSql uintptr var rc int32 zSql = Xsqlite3_mprintf(tls, ts+24803 /* "SELECT * FROM %Q..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) if zSql != 0 { - rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+80 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, (*Rtree)(unsafe.Pointer(pRtree)).Fdb, zSql, -1, bp+56 /* &pStmt */, uintptr(0)) } else { rc = SQLITE_NOMEM } @@ -200600,18 +200600,18 @@ func rtreeConstraintError(tls *libc.TLS, pRtree uintptr, iCol int32) int32 { /* if rc == SQLITE_OK { if iCol == 0 { - var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), 0) + var zCol uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), 0) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24823 /* "UNIQUE constrain..." */, libc.VaList(bp+24, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) + ts+24823 /* "UNIQUE constrain..." */, libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol)) } else { - var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), iCol) - var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */)), (iCol + 1)) + var zCol1 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), iCol) + var zCol2 uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)), (iCol + 1)) (*Rtree)(unsafe.Pointer(pRtree)).Fbase.FzErrMsg = Xsqlite3_mprintf(tls, - ts+24855 /* "rtree constraint..." */, libc.VaList(bp+48, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) + ts+24855 /* "rtree constraint..." */, libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzName, zCol1, zCol2)) } } - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))) return func() int32 { if rc == SQLITE_OK { return SQLITE_CONSTRAINT @@ -200868,8 +200868,8 @@ func rtreeEndTransaction(tls *libc.TLS, pVtab uintptr) int32 { /* sqlite3.c:1956 // The xRename method for rtree module virtual tables. func rtreeRename(tls *libc.TLS, pVtab uintptr, zNewName uintptr) int32 { /* sqlite3.c:195623:12: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(72) + defer tls.Free(72) var pRtree uintptr = pVtab var rc int32 = SQLITE_NOMEM @@ -200910,12 +200910,12 @@ func rtreeSavepoint(tls *libc.TLS, pVtab uintptr, iSavepoint int32) int32 { /* s // of the number of rows in the virtual table. If possible, this is based // on sqlite_stat1 data. Otherwise, use RTREE_DEFAULT_ROWEST. func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlite3.c:195671:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var zFmt uintptr = ts + 25037 /* "SELECT stat FROM..." */ var zSql uintptr - // var p uintptr at bp+24, 8 + // var p uintptr at bp+16, 8 var rc int32 var nRow I64 = int64(0) @@ -200933,12 +200933,12 @@ func rtreeQueryStat1(tls *libc.TLS, db uintptr, pRtree uintptr) int32 { /* sqlit if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { - rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+24 /* &p */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zSql, -1, bp+16 /* &p */, uintptr(0)) if rc == SQLITE_OK { - if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* p */))) == SQLITE_ROW { - nRow = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* p */)), 0) + if Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) == SQLITE_ROW { + nRow = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */)), 0) } - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* p */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* p */))) } else if rc != SQLITE_NOMEM { rc = SQLITE_OK } @@ -201002,11 +201002,11 @@ var rtreeModule = Sqlite3_module{ } /* sqlite3.c:195726:23 */ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefix uintptr, isCreate int32) int32 { /* sqlite3.c:195753:12: */ - bp := tls.Alloc(312) - defer tls.Free(312) + bp := tls.Alloc(232) + defer tls.Free(232) var rc int32 = SQLITE_OK - // var appStmt [8]uintptr at bp+248, 64 + // var appStmt [8]uintptr at bp+168, 64 var i int32 var f int32 = (SQLITE_PREPARE_PERSISTENT | SQLITE_PREPARE_NO_VTAB) @@ -201021,17 +201021,17 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi ts+25098, /* "CREATE TABLE \"%w..." */ libc.VaList(bp, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { - Xsqlite3_str_appendf(tls, p, ts+25160 /* ",a%d" */, libc.VaList(bp+24, ii)) + Xsqlite3_str_appendf(tls, p, ts+25160 /* ",a%d" */, libc.VaList(bp+16, ii)) } Xsqlite3_str_appendf(tls, p, ts+25165, /* ");CREATE TABLE \"..." */ - libc.VaList(bp+40, zDb, zPrefix)) + libc.VaList(bp+24, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, ts+25229, /* "CREATE TABLE \"%w..." */ - libc.VaList(bp+64, zDb, zPrefix)) + libc.VaList(bp+40, zDb, zPrefix)) Xsqlite3_str_appendf(tls, p, ts+25299, /* "INSERT INTO \"%w\"..." */ - libc.VaList(bp+88, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) + libc.VaList(bp+56, zDb, zPrefix, (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize)) zCreate = Xsqlite3_str_finish(tls, p) if !(zCreate != 0) { return SQLITE_NOMEM @@ -201043,14 +201043,14 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi } } - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */)) = (pRtree + 120 /* &.pWriteNode */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 1*8)) = (pRtree + 128 /* &.pDeleteNode */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 2*8)) = (pRtree + 136 /* &.pReadRowid */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 3*8)) = (pRtree + 144 /* &.pWriteRowid */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 4*8)) = (pRtree + 152 /* &.pDeleteRowid */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 5*8)) = (pRtree + 160 /* &.pReadParent */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 6*8)) = (pRtree + 168 /* &.pWriteParent */) - *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + 7*8)) = (pRtree + 176 /* &.pDeleteParent */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */)) = (pRtree + 120 /* &.pWriteNode */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 1*8)) = (pRtree + 128 /* &.pDeleteNode */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 2*8)) = (pRtree + 136 /* &.pReadRowid */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 3*8)) = (pRtree + 144 /* &.pWriteRowid */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 4*8)) = (pRtree + 152 /* &.pDeleteRowid */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 5*8)) = (pRtree + 160 /* &.pReadParent */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 6*8)) = (pRtree + 168 /* &.pWriteParent */) + *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + 7*8)) = (pRtree + 176 /* &.pDeleteParent */) rc = rtreeQueryStat1(tls, db, pRtree) for i = 0; (i < N_STATEMENT) && (rc == SQLITE_OK); i++ { @@ -201063,9 +201063,9 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi // if there are auxiliary columns zFormat = ts + 25348 /* "INSERT INTO\"%w\"...." */ } - zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+120, zDb, zPrefix)) + zSql = Xsqlite3_mprintf(tls, zFormat, libc.VaList(bp+80, zDb, zPrefix)) if zSql != 0 { - rc = Xsqlite3_prepare_v3(tls, db, zSql, -1, uint32(f), *(*uintptr)(unsafe.Pointer(bp + 248 /* &appStmt[0] */ + uintptr(i)*8)), uintptr(0)) + rc = Xsqlite3_prepare_v3(tls, db, zSql, -1, uint32(f), *(*uintptr)(unsafe.Pointer(bp + 168 /* &appStmt[0] */ + uintptr(i)*8)), uintptr(0)) } else { rc = SQLITE_NOMEM } @@ -201074,22 +201074,22 @@ func rtreeSqlInit(tls *libc.TLS, pRtree uintptr, db uintptr, zDb uintptr, zPrefi if (*Rtree)(unsafe.Pointer(pRtree)).FnAux != 0 { (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql = Xsqlite3_mprintf(tls, ts+25456, /* "SELECT * FROM \"%..." */ - libc.VaList(bp+144, zDb, zPrefix)) + libc.VaList(bp+96, zDb, zPrefix)) if (*Rtree)(unsafe.Pointer(pRtree)).FzReadAuxSql == uintptr(0) { rc = SQLITE_NOMEM } else { var p uintptr = Xsqlite3_str_new(tls, db) var ii int32 var zSql uintptr - Xsqlite3_str_appendf(tls, p, ts+25501 /* "UPDATE \"%w\".\"%w_..." */, libc.VaList(bp+168, zDb, zPrefix)) + Xsqlite3_str_appendf(tls, p, ts+25501 /* "UPDATE \"%w\".\"%w_..." */, libc.VaList(bp+112, zDb, zPrefix)) for ii = 0; ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux); ii++ { if ii != 0 { Xsqlite3_str_append(tls, p, ts+12899 /* "," */, 1) } if ii < int32((*Rtree)(unsafe.Pointer(pRtree)).FnAuxNotNull) { - Xsqlite3_str_appendf(tls, p, ts+25528 /* "a%d=coalesce(?%d..." */, libc.VaList(bp+192, ii, (ii+2), ii)) + Xsqlite3_str_appendf(tls, p, ts+25528 /* "a%d=coalesce(?%d..." */, libc.VaList(bp+128, ii, (ii+2), ii)) } else { - Xsqlite3_str_appendf(tls, p, ts+25550 /* "a%d=?%d" */, libc.VaList(bp+224, ii, (ii+2))) + Xsqlite3_str_appendf(tls, p, ts+25550 /* "a%d=?%d" */, libc.VaList(bp+152, ii, (ii+2))) } } Xsqlite3_str_appendf(tls, p, ts+25558 /* " WHERE rowid=?1" */, 0) @@ -201159,35 +201159,35 @@ func getIntFromStmt(tls *libc.TLS, db uintptr, zSql uintptr, piVal uintptr) int3 // database page-size is so large that more than RTREE_MAXCELLS entries // would fit in a single node, use a smaller node-size. func getNodeSize(tls *libc.TLS, db uintptr, pRtree uintptr, isCreate int32, pzErr uintptr) int32 { /* sqlite3.c:195913:12: */ - bp := tls.Alloc(92) - defer tls.Free(92) + bp := tls.Alloc(52) + defer tls.Free(52) var rc int32 var zSql uintptr if isCreate != 0 { - *(*int32)(unsafe.Pointer(bp + 88 /* iPageSize */)) = 0 + *(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) = 0 zSql = Xsqlite3_mprintf(tls, ts+25983 /* "PRAGMA %Q.page_s..." */, libc.VaList(bp, (*Rtree)(unsafe.Pointer(pRtree)).FzDb)) - rc = getIntFromStmt(tls, db, zSql, bp+88 /* &iPageSize */) + rc = getIntFromStmt(tls, db, zSql, bp+48 /* &iPageSize */) if rc == SQLITE_OK { - (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = (*(*int32)(unsafe.Pointer(bp + 88 /* iPageSize */)) - 64) + (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = (*(*int32)(unsafe.Pointer(bp + 48 /* iPageSize */)) - 64) if (4 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * RTREE_MAXCELLS)) < (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize { (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize = (4 + (int32((*Rtree)(unsafe.Pointer(pRtree)).FnBytesPerCell) * RTREE_MAXCELLS)) } } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+8, Xsqlite3_errmsg(tls, db))) } } else { zSql = Xsqlite3_mprintf(tls, ts+26003, /* "SELECT length(da..." */ - libc.VaList(bp+32, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + libc.VaList(bp+16, (*Rtree)(unsafe.Pointer(pRtree)).FzDb, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) rc = getIntFromStmt(tls, db, zSql, (pRtree + 32 /* &.iNodeSize */)) if rc != SQLITE_OK { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+56, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) } else if (*Rtree)(unsafe.Pointer(pRtree)).FiNodeSize < (512 - 64) { rc = (SQLITE_CORRUPT | (int32(1) << 8)) *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+26060, /* "undersize RTree ..." */ - libc.VaList(bp+72, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) + libc.VaList(bp+40, (*Rtree)(unsafe.Pointer(pRtree)).FzName)) } } @@ -201212,8 +201212,8 @@ func rtreeTokenLength(tls *libc.TLS, z uintptr) int32 { /* sqlite3.c:195956:12: // argv[2] -> table name // argv[...] -> column names... func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:195970:12: */ - bp := tls.Alloc(208) - defer tls.Free(208) + bp := tls.Alloc(136) + defer tls.Free(136) var rc int32 var pRtree uintptr @@ -201224,7 +201224,7 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr var zSql uintptr var ii int32 var iErr int32 - // var aErrMsg [5]uintptr at bp+168, 40 + // var aErrMsg [5]uintptr at bp+96, 40 var zArg uintptr rc = SQLITE_OK @@ -201235,7 +201235,7 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr return RTREE_COORD_REAL32 }() ii = 4 - *(*[5]uintptr)(unsafe.Pointer(bp + 168 /* aErrMsg */)) = [5]uintptr{ + *(*[5]uintptr)(unsafe.Pointer(bp + 96 /* aErrMsg */)) = [5]uintptr{ uintptr(0), // 0 ts + 26095, /* "Wrong number of ..." */ // 1 ts + 26138, /* "Too few columns ..." */ // 2 @@ -201247,12 +201247,12 @@ func rtreeInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr if !((argc < 6) || (argc > (RTREE_MAX_AUX_COLUMN + 3))) { goto __1 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 168 /* &aErrMsg[0] */ + uintptr((2+(libc.Bool32(argc >= 6))))*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr((2+(libc.Bool32(argc >= 6))))*8)))) return SQLITE_ERROR __1: ; - Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_CONSTRAINT_SUPPORT, libc.VaList(bp+16, 1)) + Xsqlite3_vtab_config(tls, db, SQLITE_VTAB_CONSTRAINT_SUPPORT, libc.VaList(bp+8, 1)) // Allocate the sqlite3_vtab structure nDb = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(argv + 1*8)))) @@ -201278,7 +201278,7 @@ __2: // the r-tree table schema. pSql = Xsqlite3_str_new(tls, db) Xsqlite3_str_appendf(tls, pSql, ts+26246, /* "CREATE TABLE x(%..." */ - libc.VaList(bp+32, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) + libc.VaList(bp+16, rtreeTokenLength(tls, *(*uintptr)(unsafe.Pointer(argv + 3*8))), *(*uintptr)(unsafe.Pointer(argv + 3*8)))) ii = 4 __3: if !(ii < argc) { @@ -201289,7 +201289,7 @@ __3: goto __6 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+26270 /* ",%.*s" */, libc.VaList(bp+56, rtreeTokenLength(tls, (zArg+uintptr(1))), (zArg+uintptr(1)))) + Xsqlite3_str_appendf(tls, pSql, ts+26270 /* ",%.*s" */, libc.VaList(bp+32, rtreeTokenLength(tls, (zArg+uintptr(1))), (zArg+uintptr(1)))) goto __7 __6: if !(int32((*Rtree)(unsafe.Pointer(pRtree)).FnAux) > 0) { @@ -201300,7 +201300,7 @@ __6: __8: (*Rtree)(unsafe.Pointer(pRtree)).FnDim2++ Xsqlite3_str_appendf(tls, pSql, azFormat[eCoordType], - libc.VaList(bp+80, rtreeTokenLength(tls, zArg), zArg)) + libc.VaList(bp+48, rtreeTokenLength(tls, zArg), zArg)) __9: ; __7: @@ -201323,14 +201323,14 @@ __10: if !(ii < argc) { goto __12 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+104, *(*uintptr)(unsafe.Pointer(bp + 168 /* &aErrMsg[0] */ + 4*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + 4*8)))) rc = SQLITE_ERROR goto __13 __12: if !(SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql)))) { goto __14 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+120, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+72, Xsqlite3_errmsg(tls, db))) __14: ; __13: @@ -201373,7 +201373,7 @@ __17: if !(iErr != 0) { goto __22 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+136, *(*uintptr)(unsafe.Pointer(bp + 168 /* &aErrMsg[0] */ + uintptr(iErr)*8)))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+80, *(*uintptr)(unsafe.Pointer(bp + 96 /* &aErrMsg[0] */ + uintptr(iErr)*8)))) goto rtreeInit_fail __22: ; @@ -201391,7 +201391,7 @@ __23: if !(rc != 0) { goto __24 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+152, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+88, Xsqlite3_errmsg(tls, db))) goto rtreeInit_fail __24: ; @@ -201428,12 +201428,12 @@ var azFormat = [2]uintptr{ts + 26279 /* ",%.*s REAL" */, ts + 26290 /* ",%.*s IN // list, containing the 8-byte rowid/pageno followed by the // <num-dimension>*2 coordinates. func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlite3.c:196107:13: */ - bp := tls.Alloc(1088) - defer tls.Free(1088) + bp := tls.Alloc(1072) + defer tls.Free(1072) - // var node RtreeNode at bp+32, 40 + // var node RtreeNode at bp+16, 40 - // var tree Rtree at bp+72, 968 + // var tree Rtree at bp+56, 968 var ii int32 var nData int32 @@ -201441,36 +201441,36 @@ func rtreenode(tls *libc.TLS, ctx uintptr, nArg int32, apArg uintptr) { /* sqlit var pOut uintptr _ = nArg - libc.Xmemset(tls, bp+32 /* &node */, 0, uint64(unsafe.Sizeof(RtreeNode{}))) - libc.Xmemset(tls, bp+72 /* &tree */, 0, uint64(unsafe.Sizeof(Rtree{}))) - (*Rtree)(unsafe.Pointer(bp + 72 /* &tree */)).FnDim = U8(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apArg)))) - if (int32((*Rtree)(unsafe.Pointer(bp+72 /* &tree */)).FnDim) < 1) || (int32((*Rtree)(unsafe.Pointer(bp+72 /* &tree */)).FnDim) > 5) { + libc.Xmemset(tls, bp+16 /* &node */, 0, uint64(unsafe.Sizeof(RtreeNode{}))) + libc.Xmemset(tls, bp+56 /* &tree */, 0, uint64(unsafe.Sizeof(Rtree{}))) + (*Rtree)(unsafe.Pointer(bp + 56 /* &tree */)).FnDim = U8(Xsqlite3_value_int(tls, *(*uintptr)(unsafe.Pointer(apArg)))) + if (int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim) < 1) || (int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim) > 5) { return } - (*Rtree)(unsafe.Pointer(bp + 72 /* &tree */)).FnDim2 = (U8(int32((*Rtree)(unsafe.Pointer(bp+72 /* &tree */)).FnDim) * 2)) - (*Rtree)(unsafe.Pointer(bp + 72 /* &tree */)).FnBytesPerCell = (U8(8 + (8 * int32((*Rtree)(unsafe.Pointer(bp+72 /* &tree */)).FnDim)))) - (*RtreeNode)(unsafe.Pointer(bp + 32 /* &node */)).FzData = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) + (*Rtree)(unsafe.Pointer(bp + 56 /* &tree */)).FnDim2 = (U8(int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim) * 2)) + (*Rtree)(unsafe.Pointer(bp + 56 /* &tree */)).FnBytesPerCell = (U8(8 + (8 * int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim)))) + (*RtreeNode)(unsafe.Pointer(bp + 16 /* &node */)).FzData = Xsqlite3_value_blob(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) nData = Xsqlite3_value_bytes(tls, *(*uintptr)(unsafe.Pointer(apArg + 1*8))) if nData < 4 { return } - if nData < (readInt16(tls, ((*RtreeNode)(unsafe.Pointer((bp+32 /* &node */))).FzData+2)) * int32((*Rtree)(unsafe.Pointer(bp+72 /* &tree */)).FnBytesPerCell)) { + if nData < (readInt16(tls, ((*RtreeNode)(unsafe.Pointer((bp+16 /* &node */))).FzData+2)) * int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnBytesPerCell)) { return } pOut = Xsqlite3_str_new(tls, uintptr(0)) - for ii = 0; ii < readInt16(tls, ((*RtreeNode)(unsafe.Pointer((bp+32 /* &node */))).FzData+2)); ii++ { - // var cell RtreeCell at bp+1040, 48 + for ii = 0; ii < readInt16(tls, ((*RtreeNode)(unsafe.Pointer((bp+16 /* &node */))).FzData+2)); ii++ { + // var cell RtreeCell at bp+1024, 48 var jj int32 - nodeGetCell(tls, bp+72 /* &tree */, bp+32 /* &node */, ii, bp+1040 /* &cell */) + nodeGetCell(tls, bp+56 /* &tree */, bp+16 /* &node */, ii, bp+1024 /* &cell */) if ii > 0 { Xsqlite3_str_append(tls, pOut, ts+11014 /* " " */, 1) } - Xsqlite3_str_appendf(tls, pOut, ts+26300 /* "{%lld" */, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1040 /* &cell */)).FiRowid)) - for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+72 /* &tree */)).FnDim2); jj++ { - Xsqlite3_str_appendf(tls, pOut, ts+26306 /* " %g" */, libc.VaList(bp+16, float64(*(*RtreeValue)(unsafe.Pointer((bp + 1040 /* &cell */ + 8 /* &.aCoord */) + uintptr(jj)*4))))) + Xsqlite3_str_appendf(tls, pOut, ts+26300 /* "{%lld" */, libc.VaList(bp, (*RtreeCell)(unsafe.Pointer(bp+1024 /* &cell */)).FiRowid)) + for jj = 0; jj < int32((*Rtree)(unsafe.Pointer(bp+56 /* &tree */)).FnDim2); jj++ { + Xsqlite3_str_appendf(tls, pOut, ts+26306 /* " %g" */, libc.VaList(bp+8, float64(*(*RtreeValue)(unsafe.Pointer((bp + 1024 /* &cell */ + 8 /* &.aCoord */) + uintptr(jj)*4))))) } Xsqlite3_str_append(tls, pOut, ts+26310 /* "}" */, 1) } @@ -201569,8 +201569,8 @@ func rtreeCheckPrepare(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) // style format string and arguments. This function formats the string and // appends it to the report being accumuated in pCheck. func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr) { /* sqlite3.c:196243:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var ap Va_list _ = ap @@ -201609,8 +201609,8 @@ func rtreeCheckAppendMsg(tls *libc.TLS, pCheck uintptr, zFmt uintptr, va uintptr // in the RtreeCheck object. The final value of *pnNode is undefined in // this case. func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) uintptr { /* sqlite3.c:196277:11: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(24) + defer tls.Free(24) var pRet uintptr = uintptr(0) // Return value @@ -201635,7 +201635,7 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) } rtreeCheckReset(tls, pCheck, (*RtreeCheck)(unsafe.Pointer(pCheck)).FpGetNode) if ((*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK) && (pRet == uintptr(0)) { - rtreeCheckAppendMsg(tls, pCheck, ts+26397 /* "Node %lld missin..." */, libc.VaList(bp+24, iNode)) + rtreeCheckAppendMsg(tls, pCheck, ts+26397 /* "Node %lld missin..." */, libc.VaList(bp+16, iNode)) } } @@ -201653,19 +201653,19 @@ func rtreeCheckGetNode(tls *libc.TLS, pCheck uintptr, iNode I64, pnNode uintptr) // IPK value iKey and the second column set to iVal. // func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVal I64) { /* sqlite3.c:196321:13: */ - bp := tls.Alloc(120) - defer tls.Free(120) + bp := tls.Alloc(96) + defer tls.Free(96) var rc int32 var pStmt uintptr - *(*[2]uintptr)(unsafe.Pointer(bp + 104 /* azSql */)) = [2]uintptr{ + *(*[2]uintptr)(unsafe.Pointer(bp + 80 /* azSql */)) = [2]uintptr{ ts + 26429, /* "SELECT parentnod..." */ ts + 26483, /* "SELECT nodeno FR..." */ } if *(*uintptr)(unsafe.Pointer((pCheck + 40 /* &.aCheckMapping */) + uintptr(bLeaf)*8)) == uintptr(0) { *(*uintptr)(unsafe.Pointer((pCheck + 40 /* &.aCheckMapping */) + uintptr(bLeaf)*8)) = rtreeCheckPrepare(tls, pCheck, - *(*uintptr)(unsafe.Pointer(bp + 104 /* &azSql[0] */ + uintptr(bLeaf)*8)), libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) + *(*uintptr)(unsafe.Pointer(bp + 80 /* &azSql[0] */ + uintptr(bLeaf)*8)), libc.VaList(bp, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzDb, (*RtreeCheck)(unsafe.Pointer(pCheck)).FzTab)) } if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc != SQLITE_OK { return @@ -201676,7 +201676,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa rc = Xsqlite3_step(tls, pStmt) if rc == SQLITE_DONE { rtreeCheckAppendMsg(tls, pCheck, ts+26531, /* "Mapping (%lld ->..." */ - libc.VaList(bp+24, iKey, iVal, func() uintptr { + libc.VaList(bp+16, iKey, iVal, func() uintptr { if bLeaf != 0 { return ts + 26576 /* "%_rowid" */ } @@ -201687,7 +201687,7 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa if ii != iVal { rtreeCheckAppendMsg(tls, pCheck, ts+26593, /* "Found (%lld -> %..." */ - libc.VaList(bp+56, iKey, ii, func() uintptr { + libc.VaList(bp+40, iKey, ii, func() uintptr { if bLeaf != 0 { return ts + 26576 /* "%_rowid" */ } @@ -201709,52 +201709,52 @@ func rtreeCheckMapping(tls *libc.TLS, pCheck uintptr, bLeaf int32, iKey I64, iVa // sets of coordinates are mutually consistent and an error message added // to the RtreeCheck object if they are not. func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, pCell uintptr, pParent uintptr) { /* sqlite3.c:196373:13: */ - bp := tls.Alloc(80) - defer tls.Free(80) + bp := tls.Alloc(64) + defer tls.Free(64) - // var c1 RtreeCoord at bp+64, 4 + // var c1 RtreeCoord at bp+48, 4 - // var c2 RtreeCoord at bp+68, 4 + // var c2 RtreeCoord at bp+52, 4 - // var p1 RtreeCoord at bp+72, 4 + // var p1 RtreeCoord at bp+56, 4 - // var p2 RtreeCoord at bp+76, 4 + // var p2 RtreeCoord at bp+60, 4 var i int32 for i = 0; i < (*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim; i++ { - readCoord(tls, (pCell + uintptr(((4 * 2) * i))), bp+64 /* &c1 */) - readCoord(tls, (pCell + uintptr((4 * ((2 * i) + 1)))), bp+68 /* &c2 */) + readCoord(tls, (pCell + uintptr(((4 * 2) * i))), bp+48 /* &c1 */) + readCoord(tls, (pCell + uintptr((4 * ((2 * i) + 1)))), bp+52 /* &c2 */) // printf("%e, %e\n", c1.u.f, c2.u.f); if func() int32 { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { - return (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 64 /* &c1 */)) > *(*int32)(unsafe.Pointer(bp + 68 /* &c2 */)))) + return (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 48 /* &c1 */)) > *(*int32)(unsafe.Pointer(bp + 52 /* &c2 */)))) } - return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 64 /* &c1 */)) > *(*RtreeValue)(unsafe.Pointer(bp + 68 /* &c2 */)))) + return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48 /* &c1 */)) > *(*RtreeValue)(unsafe.Pointer(bp + 52 /* &c2 */)))) }() != 0 { rtreeCheckAppendMsg(tls, pCheck, ts+26651 /* "Dimension %d of ..." */, libc.VaList(bp, i, iCell, iNode)) } if pParent != 0 { - readCoord(tls, (pParent + uintptr(((4 * 2) * i))), bp+72 /* &p1 */) - readCoord(tls, (pParent + uintptr((4 * ((2 * i) + 1)))), bp+76 /* &p2 */) + readCoord(tls, (pParent + uintptr(((4 * 2) * i))), bp+56 /* &p1 */) + readCoord(tls, (pParent + uintptr((4 * ((2 * i) + 1)))), bp+60 /* &p2 */) if (func() int32 { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { - return (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 64 /* &c1 */)) < *(*int32)(unsafe.Pointer(bp + 72 /* &p1 */)))) + return (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 48 /* &c1 */)) < *(*int32)(unsafe.Pointer(bp + 56 /* &p1 */)))) } - return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 64 /* &c1 */)) < *(*RtreeValue)(unsafe.Pointer(bp + 72 /* &p1 */)))) + return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 48 /* &c1 */)) < *(*RtreeValue)(unsafe.Pointer(bp + 56 /* &p1 */)))) }() != 0) || (func() int32 { if (*RtreeCheck)(unsafe.Pointer(pCheck)).FbInt != 0 { - return (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 68 /* &c2 */)) > *(*int32)(unsafe.Pointer(bp + 76 /* &p2 */)))) + return (libc.Bool32(*(*int32)(unsafe.Pointer(bp + 52 /* &c2 */)) > *(*int32)(unsafe.Pointer(bp + 60 /* &p2 */)))) } - return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 68 /* &c2 */)) > *(*RtreeValue)(unsafe.Pointer(bp + 76 /* &p2 */)))) + return (libc.Bool32(*(*RtreeValue)(unsafe.Pointer(bp + 52 /* &c2 */)) > *(*RtreeValue)(unsafe.Pointer(bp + 60 /* &p2 */)))) }() != 0) { rtreeCheckAppendMsg(tls, pCheck, - ts+26699 /* "Dimension %d of ..." */, libc.VaList(bp+32, i, iCell, iNode)) + ts+26699 /* "Dimension %d of ..." */, libc.VaList(bp+24, i, iCell, iNode)) } } } @@ -201767,33 +201767,33 @@ func rtreeCheckCellCoord(tls *libc.TLS, pCheck uintptr, iNode I64, iCell int32, // If any problems are discovered, an error message is appended to the // report accumulated in the RtreeCheck object. func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr, iNode I64) { /* sqlite3.c:196419:13: */ - bp := tls.Alloc(76) - defer tls.Free(76) + bp := tls.Alloc(52) + defer tls.Free(52) var aNode uintptr = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 72 /* nNode */)) = 0 + *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) = 0 - aNode = rtreeCheckGetNode(tls, pCheck, iNode, bp+72 /* &nNode */) + aNode = rtreeCheckGetNode(tls, pCheck, iNode, bp+48 /* &nNode */) if aNode != 0 { - if *(*int32)(unsafe.Pointer(bp + 72 /* nNode */)) < 4 { + if *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) < 4 { rtreeCheckAppendMsg(tls, pCheck, - ts+26766 /* "Node %lld is too..." */, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 72 /* nNode */)))) + ts+26766 /* "Node %lld is too..." */, libc.VaList(bp, iNode, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { var nCell int32 // Number of cells on page var i int32 // Used to iterate through cells if aParent == uintptr(0) { iDepth = readInt16(tls, aNode) if iDepth > RTREE_MAX_DEPTH { - rtreeCheckAppendMsg(tls, pCheck, ts+26800 /* "Rtree depth out ..." */, libc.VaList(bp+24, iDepth)) + rtreeCheckAppendMsg(tls, pCheck, ts+26800 /* "Rtree depth out ..." */, libc.VaList(bp+16, iDepth)) Xsqlite3_free(tls, aNode) return } } nCell = readInt16(tls, (aNode + 2)) - if (4 + (nCell * (8 + (((*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim * 2) * 4)))) > *(*int32)(unsafe.Pointer(bp + 72 /* nNode */)) { + if (4 + (nCell * (8 + (((*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim * 2) * 4)))) > *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)) { rtreeCheckAppendMsg(tls, pCheck, ts+26830, /* "Node %lld is too..." */ - libc.VaList(bp+40, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 72 /* nNode */)))) + libc.VaList(bp+24, iNode, nCell, *(*int32)(unsafe.Pointer(bp + 48 /* nNode */)))) } else { for i = 0; i < nCell; i++ { var pCell uintptr = (aNode + uintptr((4 + (i * (8 + (((*RtreeCheck)(unsafe.Pointer(pCheck)).FnDim * 2) * 4)))))) @@ -201821,8 +201821,8 @@ func rtreeCheckNode(tls *libc.TLS, pCheck uintptr, iDepth int32, aParent uintptr // an error message to the report in the RtreeCheck object indicated // by the first argument. func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { /* sqlite3.c:196482:13: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(48) + defer tls.Free(48) if (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc == SQLITE_OK { var pCount uintptr @@ -201833,7 +201833,7 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { var nActual I64 = Xsqlite3_column_int64(tls, pCount, 0) if nActual != nExpect { rtreeCheckAppendMsg(tls, pCheck, - ts+26916 /* "Wrong number of ..." */, libc.VaList(bp+32, zTbl, nExpect, nActual)) + ts+26916 /* "Wrong number of ..." */, libc.VaList(bp+24, zTbl, nExpect, nActual)) } } (*RtreeCheck)(unsafe.Pointer(pCheck)).Frc = Xsqlite3_finalize(tls, pCount) @@ -201844,78 +201844,78 @@ func rtreeCheckCount(tls *libc.TLS, pCheck uintptr, zTbl uintptr, nExpect I64) { // This function does the bulk of the work for the rtree integrity-check. // It is called by rtreecheck(), which is the SQL function implementation. func rtreeCheckTable(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, pzReport uintptr) int32 { /* sqlite3.c:196506:12: */ - bp := tls.Alloc(136) - defer tls.Free(136) + bp := tls.Alloc(120) + defer tls.Free(120) - // var check RtreeCheck at bp+48, 88 + // var check RtreeCheck at bp+32, 88 // Common context for various routines var pStmt uintptr = uintptr(0) // Used to find column count of rtree table var bEnd int32 = 0 // True if transaction should be closed var nAux int32 = 0 // Number of extra columns. // Initialize the context object - libc.Xmemset(tls, bp+48 /* &check */, 0, uint64(unsafe.Sizeof(RtreeCheck{}))) - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).Fdb = db - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).FzDb = zDb - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).FzTab = zTab + libc.Xmemset(tls, bp+32 /* &check */, 0, uint64(unsafe.Sizeof(RtreeCheck{}))) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Fdb = db + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzDb = zDb + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzTab = zTab // If there is not already an open transaction, open one now. This is // to ensure that the queries run as part of this integrity-check operate // on a consistent snapshot. if Xsqlite3_get_autocommit(tls, db) != 0 { - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14580 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = Xsqlite3_exec(tls, db, ts+14580 /* "BEGIN" */, uintptr(0), uintptr(0), uintptr(0)) bEnd = 1 } // Find the number of auxiliary columns - if (*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).Frc == SQLITE_OK { - pStmt = rtreeCheckPrepare(tls, bp+48 /* &check */, ts+26983 /* "SELECT * FROM %Q..." */, libc.VaList(bp, zDb, zTab)) + if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).Frc == SQLITE_OK { + pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+26983 /* "SELECT * FROM %Q..." */, libc.VaList(bp, zDb, zTab)) if pStmt != 0 { nAux = (Xsqlite3_column_count(tls, pStmt) - 2) Xsqlite3_finalize(tls, pStmt) } - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).Frc = SQLITE_OK + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = SQLITE_OK } // Find number of dimensions in the rtree table. - pStmt = rtreeCheckPrepare(tls, bp+48 /* &check */, ts+24803 /* "SELECT * FROM %Q..." */, libc.VaList(bp+24, zDb, zTab)) + pStmt = rtreeCheckPrepare(tls, bp+32 /* &check */, ts+24803 /* "SELECT * FROM %Q..." */, libc.VaList(bp+16, zDb, zTab)) if pStmt != 0 { var rc int32 - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).FnDim = (((Xsqlite3_column_count(tls, pStmt) - 1) - nAux) / 2) - if (*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).FnDim < 1 { - rtreeCheckAppendMsg(tls, bp+48 /* &check */, ts+27011 /* "Schema corrupt o..." */, 0) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FnDim = (((Xsqlite3_column_count(tls, pStmt) - 1) - nAux) / 2) + if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnDim < 1 { + rtreeCheckAppendMsg(tls, bp+32 /* &check */, ts+27011 /* "Schema corrupt o..." */, 0) } else if SQLITE_ROW == Xsqlite3_step(tls, pStmt) { - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).FbInt = (libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER)) + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FbInt = (libc.Bool32(Xsqlite3_column_type(tls, pStmt, 1) == SQLITE_INTEGER)) } rc = Xsqlite3_finalize(tls, pStmt) if rc != SQLITE_CORRUPT { - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).Frc = rc + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } } // Do the actual integrity-check - if (*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).FnDim >= 1 { - if (*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).Frc == SQLITE_OK { - rtreeCheckNode(tls, bp+48 /* &check */, 0, uintptr(0), int64(1)) + if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnDim >= 1 { + if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).Frc == SQLITE_OK { + rtreeCheckNode(tls, bp+32 /* &check */, 0, uintptr(0), int64(1)) } - rtreeCheckCount(tls, bp+48 /* &check */, ts+27042 /* "_rowid" */, int64((*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).FnLeaf)) - rtreeCheckCount(tls, bp+48 /* &check */, ts+27049 /* "_parent" */, int64((*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).FnNonLeaf)) + rtreeCheckCount(tls, bp+32 /* &check */, ts+27042 /* "_rowid" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnLeaf)) + rtreeCheckCount(tls, bp+32 /* &check */, ts+27049 /* "_parent" */, int64((*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FnNonLeaf)) } // Finalize SQL statements used by the integrity-check - Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).FpGetNode) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer((bp + 48 /* &check */ + 40 /* &.aCheckMapping */)))) - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer((bp + 48 /* &check */ + 40 /* &.aCheckMapping */) + 1*8))) + Xsqlite3_finalize(tls, (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).FpGetNode) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer((bp + 32 /* &check */ + 40 /* &.aCheckMapping */)))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer((bp + 32 /* &check */ + 40 /* &.aCheckMapping */) + 1*8))) // If one was opened, close the transaction if bEnd != 0 { var rc int32 = Xsqlite3_exec(tls, db, ts+27057 /* "END" */, uintptr(0), uintptr(0), uintptr(0)) - if (*RtreeCheck)(unsafe.Pointer(bp+48 /* &check */)).Frc == SQLITE_OK { - (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).Frc = rc + if (*RtreeCheck)(unsafe.Pointer(bp+32 /* &check */)).Frc == SQLITE_OK { + (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc = rc } } - *(*uintptr)(unsafe.Pointer(pzReport)) = (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).FzReport - return (*RtreeCheck)(unsafe.Pointer(bp + 48 /* &check */)).Frc + *(*uintptr)(unsafe.Pointer(pzReport)) = (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).FzReport + return (*RtreeCheck)(unsafe.Pointer(bp + 32 /* &check */)).Frc } // Usage: @@ -202402,8 +202402,8 @@ func geopolyBlobFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Interpret X as a polygon and render it as a JSON array // of coordinates. Or, if X is not a valid polygon, return NULL. func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197024:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) var p uintptr = geopolyFuncParam(tls, context, *(*uintptr)(unsafe.Pointer(argv)), uintptr(0)) if p != 0 { @@ -202414,7 +202414,7 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { for i = 0; i < (*GeoPoly)(unsafe.Pointer(p)).FnVertex; i++ { Xsqlite3_str_appendf(tls, x, ts+27114 /* "[%!g,%!g]," */, libc.VaList(bp, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr(((i)*2))*4))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr((((i)*2)+1))*4))))) } - Xsqlite3_str_appendf(tls, x, ts+27125 /* "[%!g,%!g]]" */, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */)))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27125 /* "[%!g,%!g]]" */, libc.VaList(bp+16, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */)))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + 1*4))))) Xsqlite3_result_text(tls, context, Xsqlite3_str_finish(tls, x), -1, *(*uintptr)(unsafe.Pointer(&struct{ f func(*libc.TLS, uintptr) }{Xsqlite3_free}))) Xsqlite3_free(tls, p) } @@ -202425,8 +202425,8 @@ func geopolyJsonFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { // Interpret X as a polygon and render it as a SVG <polyline>. // Additional arguments are added as attributes to the <polyline>. func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:197050:13: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(48) + defer tls.Free(48) var p uintptr if argc < 1 { @@ -202443,11 +202443,11 @@ func geopolySvgFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { Xsqlite3_str_appendf(tls, x, ts+27154 /* "%c%g,%g" */, libc.VaList(bp, int32(cSep), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr(((i)*2))*4))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + uintptr((((i)*2)+1))*4))))) cSep = int8(' ') } - Xsqlite3_str_appendf(tls, x, ts+27162 /* " %g,%g'" */, libc.VaList(bp+32, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */)))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + 1*4))))) + Xsqlite3_str_appendf(tls, x, ts+27162 /* " %g,%g'" */, libc.VaList(bp+24, float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */)))), float64(*(*GeoCoord)(unsafe.Pointer((p + 8 /* &.a */) + 1*4))))) for i = 1; i < argc; i++ { var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(argv + uintptr(i)*8))) if (z != 0) && (*(*int8)(unsafe.Pointer(z)) != 0) { - Xsqlite3_str_appendf(tls, x, ts+27170 /* " %s" */, libc.VaList(bp+56, z)) + Xsqlite3_str_appendf(tls, x, ts+27170 /* " %s" */, libc.VaList(bp+40, z)) } } Xsqlite3_str_appendf(tls, x, ts+27174 /* "></polyline>" */, 0) @@ -203427,8 +203427,8 @@ func geopolyDebugFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr) // argv[2] -> table name // argv[...] -> column names... func geopolyInit(tls *libc.TLS, db uintptr, pAux uintptr, argc int32, argv uintptr, ppVtab uintptr, pzErr uintptr, isCreate int32) int32 { /* sqlite3.c:197867:12: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(32) + defer tls.Free(32) var rc int32 var pRtree uintptr @@ -203475,7 +203475,7 @@ __2: goto __4 } (*Rtree)(unsafe.Pointer(pRtree)).FnAux++ - Xsqlite3_str_appendf(tls, pSql, ts+27209 /* ",%s" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) + Xsqlite3_str_appendf(tls, pSql, ts+27209 /* ",%s" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(argv + uintptr(ii)*8)))) goto __3 __3: ii++ @@ -203494,7 +203494,7 @@ __5: if !(SQLITE_OK != (libc.AssignInt32(&rc, Xsqlite3_declare_vtab(tls, db, zSql)))) { goto __7 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+32, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+16, Xsqlite3_errmsg(tls, db))) __7: ; __6: @@ -203520,7 +203520,7 @@ __9: if !(rc != 0) { goto __10 } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+48, Xsqlite3_errmsg(tls, db))) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+24, Xsqlite3_errmsg(tls, db))) goto geopolyInit_fail __10: ; @@ -205578,8 +205578,8 @@ func rbuFossilDeltaFunc(tls *libc.TLS, context uintptr, argc int32, argv uintptr // point to a buffer containing an error message. It is the responsibility // of the caller to (eventually) free this buffer using sqlite3_free(). func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg uintptr, zSql uintptr) int32 { /* sqlite3.c:200791:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = Xsqlite3_prepare_v2(tls, db, zSql, -1, ppStmt, uintptr(0)) if rc != SQLITE_OK { @@ -205596,8 +205596,8 @@ func prepareAndCollectError(tls *libc.TLS, db uintptr, ppStmt uintptr, pzErrmsg // containing an error message. It is the responsibility of the caller // to eventually free this buffer using sqlite3_free(). func resetAndCollectError(tls *libc.TLS, pStmt uintptr, pzErrmsg uintptr) int32 { /* sqlite3.c:200813:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = Xsqlite3_reset(tls, pStmt) if rc != SQLITE_OK { @@ -205808,8 +205808,8 @@ func rbuTargetNameFunc(tls *libc.TLS, pCtx uintptr, argc int32, argv uintptr) { // left in the RBU handle passed as the first argument. A copy of the // error code is returned. func rbuObjIterFirst(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:201042:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 libc.Xmemset(tls, pIter, 0, uint64(unsafe.Sizeof(RbuObjIter{}))) @@ -205958,8 +205958,8 @@ func rbuStrndup(tls *libc.TLS, zStr uintptr, pRc uintptr) uintptr { /* sqlite3.c // rbu handle error code is not already set, set the error code and error // message accordingly. func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:201199:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var db uintptr = Xsqlite3_db_handle(tls, pStmt) var rc int32 = Xsqlite3_finalize(tls, pStmt) @@ -206008,45 +206008,45 @@ func rbuFinalize(tls *libc.TLS, p uintptr, pStmt uintptr) { /* sqlite3.c:201199: // return RBU_PK_NONE // } func rbuTableType(tls *libc.TLS, p uintptr, zTab uintptr, peType uintptr, piTnum uintptr, piPk uintptr) { /* sqlite3.c:201247:13: */ - bp := tls.Alloc(96) - defer tls.Free(96) + bp := tls.Alloc(64) + defer tls.Free(64) // 0) SELECT count(*) FROM sqlite_schema where name=%Q AND IsVirtual(%Q) // 1) PRAGMA index_list = ? // 2) SELECT count(*) FROM sqlite_schema where name=%Q // 3) PRAGMA table_info = ? - // var aStmt [4]uintptr at bp+64, 32 + // var aStmt [4]uintptr at bp+32, 32 var zOrig uintptr var zIdx uintptr var i uint32 - *(*[4]uintptr)(unsafe.Pointer(bp + 64 /* aStmt */)) = [4]uintptr{uintptr(0), uintptr(0), uintptr(0), uintptr(0)} + *(*[4]uintptr)(unsafe.Pointer(bp + 32 /* aStmt */)) = [4]uintptr{uintptr(0), uintptr(0), uintptr(0), uintptr(0)} *(*int32)(unsafe.Pointer(peType)) = RBU_PK_NOTABLE *(*int32)(unsafe.Pointer(piPk)) = 0 - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 64 /* &aStmt */), (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */), (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28019 /* "SELECT (sql LIKE..." */, libc.VaList(bp, zTab))) - if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK) || (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */))) != SQLITE_ROW)) { + if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != SQLITE_OK) || (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */))) != SQLITE_ROW)) { goto __1 } // Either an error, or no such table. goto rbuTableType_end __1: ; - if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */)), 0) != 0) { + if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */)), 0) != 0) { goto __2 } *(*int32)(unsafe.Pointer(peType)) = RBU_PK_VTAB // virtual table goto rbuTableType_end __2: ; - *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */)), 1) + *(*int32)(unsafe.Pointer(piTnum)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */)), 1) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 64 /* &aStmt */ + 1*8), (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+28100 /* "PRAGMA index_lis..." */, libc.VaList(bp+16, zTab))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + 1*8), (p + 64 /* &.zErrmsg */), + Xsqlite3_mprintf(tls, ts+28100 /* "PRAGMA index_lis..." */, libc.VaList(bp+8, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0) { goto __3 } @@ -206054,24 +206054,24 @@ __2: __3: ; __4: - if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 1*8))) == SQLITE_ROW) { + if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 1*8))) == SQLITE_ROW) { goto __5 } - zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 1*8)), 3) - zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 1*8)), 1) + zOrig = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 1*8)), 3) + zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 1*8)), 1) if !(((zOrig != 0) && (zIdx != 0)) && (int32(*(*U8)(unsafe.Pointer(zOrig))) == 'p')) { goto __6 } - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 64 /* &aStmt */ + 2*8), (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + 2*8), (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, - ts+28121 /* "SELECT rootpage ..." */, libc.VaList(bp+32, zIdx))) + ts+28121 /* "SELECT rootpage ..." */, libc.VaList(bp+16, zIdx))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __7 } - if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 2*8))) == SQLITE_ROW) { + if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 2*8))) == SQLITE_ROW) { goto __8 } - *(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 2*8)), 0) + *(*int32)(unsafe.Pointer(piPk)) = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 2*8)), 0) *(*int32)(unsafe.Pointer(peType)) = RBU_PK_EXTERNAL goto __9 __8: @@ -206087,16 +206087,16 @@ __6: __5: ; - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 64 /* &aStmt */ + 3*8), (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+28172 /* "PRAGMA table_inf..." */, libc.VaList(bp+48, zTab))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (bp + 32 /* &aStmt */ + 3*8), (p + 64 /* &.zErrmsg */), + Xsqlite3_mprintf(tls, ts+28172 /* "PRAGMA table_inf..." */, libc.VaList(bp+24, zTab))) if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __10 } __11: - if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 3*8))) == SQLITE_ROW) { + if !(Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 3*8))) == SQLITE_ROW) { goto __12 } - if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + 3*8)), 5) > 0) { + if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + 3*8)), 5) > 0) { goto __13 } *(*int32)(unsafe.Pointer(peType)) = RBU_PK_IPK // explicit IPK column @@ -206116,7 +206116,7 @@ __14: if !(uint64(i) < (uint64(unsafe.Sizeof([4]uintptr{})) / uint64(unsafe.Sizeof(uintptr(0))))) { goto __16 } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* &aStmt[0] */ + uintptr(i)*8))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 32 /* &aStmt[0] */ + uintptr(i)*8))) goto __15 __15: i++ @@ -206128,33 +206128,33 @@ __16: // This is a helper function for rbuObjIterCacheTableInfo(). It populates // the pIter->abIndexed[] array. func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:201331:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) - *(*uintptr)(unsafe.Pointer(bp + 32 /* pList */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)) = uintptr(0) var bIndex int32 = 0 if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { libc.Xmemcpy(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, (*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk, (uint64(unsafe.Sizeof(U8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+32 /* &pList */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+16 /* &pList */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28193 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex = 0 - for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pList */)))) { - var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pList */)), 1) - var bPartial int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pList */)), 4) - *(*uintptr)(unsafe.Pointer(bp + 40 /* pXInfo */)) = uintptr(0) + for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)))) { + var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)), 1) + var bPartial int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */)), 4) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)) = uintptr(0) if zIdx == uintptr(0) { break } if bPartial != 0 { libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, (uint64(unsafe.Sizeof(U8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))) } - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+40 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp+16, zIdx))) - for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pXInfo */)))) { - var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pXInfo */)), 1) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+24 /* &pXInfo */, (p + 64 /* &.zErrmsg */), + Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx))) + for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)))) { + var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */)), 1) if iCid >= 0 { *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed + uintptr(iCid))) = U8(1) } @@ -206162,7 +206162,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq libc.Xmemset(tls, (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed, 0x01, (uint64(unsafe.Sizeof(U8(0))) * uint64((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol))) } } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 40 /* pXInfo */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pXInfo */))) bIndex = 1 (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex++ } @@ -206172,7 +206172,7 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq (*RbuObjIter)(unsafe.Pointer(pIter)).FnIndex-- } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 32 /* pList */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* pList */))) if bIndex == 0 { (*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed = uintptr(0) } @@ -206186,20 +206186,20 @@ func rbuObjIterCacheIndexedCols(tls *libc.TLS, p uintptr, pIter uintptr) { /* sq // an error does occur, an error code and error message are also left in // the RBU handle. func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { /* sqlite3.c:201385:12: */ - bp := tls.Alloc(112) - defer tls.Free(112) + bp := tls.Alloc(72) + defer tls.Free(72) if (*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol == uintptr(0) { - *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) var nCol int32 = 0 var i int32 // for() loop iterator variable var bRbuRowid int32 = 0 // If input table has column "rbu_rowid" var iOrder int32 = 0 - *(*int32)(unsafe.Pointer(bp + 96 /* iTnum */)) = 0 + *(*int32)(unsafe.Pointer(bp + 56 /* iTnum */)) = 0 // Figure out the type of table this step will deal with. - rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, (pIter + 72 /* &.eType */), bp+96 /* &iTnum */, (pIter + 108 /* &.iPkTnum */)) + rbuTableType(tls, p, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, (pIter + 72 /* &.eType */), bp+56 /* &iTnum */, (pIter + 108 /* &.iPkTnum */)) if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NOTABLE) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+19236 /* "no such table: %..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl)) @@ -206208,20 +206208,20 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / return (*Sqlite3rbu)(unsafe.Pointer(p)).Frc } if (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx == uintptr(0) { - (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum = *(*int32)(unsafe.Pointer(bp + 96 /* iTnum */)) + (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum = *(*int32)(unsafe.Pointer(bp + 56 /* iTnum */)) } // Populate the azTblCol[] and nTblCol variables based on the columns // of the input table. Ignore any input table columns that begin with // "rbu_". - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+104 /* &pStmt */, (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+28250 /* "SELECT * FROM '%..." */, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+64 /* &pStmt */, (p + 64 /* &.zErrmsg */), + Xsqlite3_mprintf(tls, ts+28250 /* "SELECT * FROM '%..." */, libc.VaList(bp+8, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl))) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */))) + nCol = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuAllocateIterArrays(tls, p, pIter, nCol) } for i = 0; ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (i < nCol); i++ { - var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)), i) + var zName uintptr = Xsqlite3_column_name(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), i) if Xsqlite3_strnicmp(tls, ts+28269 /* "rbu_" */, zName, 4) != 0 { var zCopy uintptr = rbuStrndup(tls, zName, (p + 56 /* &.rc */)) *(*int32)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaiSrcOrder + uintptr((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol)*4)) = (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol @@ -206230,15 +206230,15 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / bRbuRowid = 1 } } - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */))) - *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)) = uintptr(0) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)) = uintptr(0) if (((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0)) && (bRbuRowid != (libc.Bool32(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE)))) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, - ts+28284 /* "table %q %s rbu_..." */, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + ts+28284 /* "table %q %s rbu_..." */, libc.VaList(bp+16, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if bRbuRowid != 0 { return ts + 28313 /* "may not have" */ @@ -206251,11 +206251,11 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // present in the input table. Populate the abTblPk[], azTblType[] and // aiTblOrder[] arrays at the same time. if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+104 /* &pStmt */, (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+28335 /* "PRAGMA table_inf..." */, libc.VaList(bp+56, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64 /* &pStmt */, (p + 64 /* &.zErrmsg */), + Xsqlite3_mprintf(tls, ts+28335 /* "PRAGMA table_inf..." */, libc.VaList(bp+32, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) } - for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)))) { - var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)), 1) + for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)))) { + var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 1) if zName == uintptr(0) { break } // An OOM - finalize() below returns S_NOMEM @@ -206267,11 +206267,11 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / if i == (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+28357, /* "column missing f..." */ - libc.VaList(bp+72, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) + libc.VaList(bp+40, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zName)) } else { - var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)), 5) - var bNotNull int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)), 3) - var zType uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */)), 2) + var iPk int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 5) + var bNotNull int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 3) + var zType uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */)), 2) if i != iOrder { { @@ -206296,7 +206296,7 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / } } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pStmt */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pStmt */))) rbuObjIterCacheIndexedCols(tls, p, pIter) } @@ -206308,8 +206308,8 @@ func rbuObjIterCacheTableInfo(tls *libc.TLS, p uintptr, pIter uintptr) int32 { / // string containing some SQL clause or list based on one or more of the // column names currently stored in the pIter->azTblCol[] array. func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201495:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var zList uintptr = uintptr(0) var zSep uintptr = ts + 755 /* "" */ @@ -206327,8 +206327,8 @@ func rbuObjIterGetCollist(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* // zPre. After each column name, add the zPost text. Use zSeparator as // the separator text (usually ", "). func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, zSeparator uintptr, zPost uintptr) uintptr { /* sqlite3.c:201516:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) var iPk int32 = 1 var zRet uintptr = uintptr(0) @@ -206369,35 +206369,35 @@ func rbuObjIterGetPkList(tls *libc.TLS, p uintptr, pIter uintptr, zPre uintptr, // Instead of "?" placeholders, the actual WHERE clauses created by // this function contain literal SQL values. func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, zWrite uintptr) uintptr { /* sqlite3.c:201561:13: */ - bp := tls.Alloc(112) - defer tls.Free(112) + bp := tls.Alloc(80) + defer tls.Free(80) - *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)) = uintptr(0) var zRet uintptr = uintptr(0) if bRowid != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+104 /* &pMax */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28406 /* "SELECT max(_rowi..." */, libc.VaList(bp, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) - if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */)))) { - var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28438 /* " WHERE _rowid_ >..." */, libc.VaList(bp+24, iMax)) + if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))) { + var iMax Sqlite3_int64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) + zRet = rbuMPrintf(tls, p, ts+28438 /* " WHERE _rowid_ >..." */, libc.VaList(bp+16, iMax)) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } else { var zOrder uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+755 /* "" */, ts+14691 /* ", " */, ts+28461 /* " DESC" */) var zSelect uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+28467 /* "quote(" */, ts+28474 /* "||','||" */, ts+5428 /* ")" */) var zList uintptr = rbuObjIterGetPkList(tls, p, pIter, ts+755 /* "" */, ts+14691 /* ", " */, ts+755 /* "" */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+104 /* &pMax */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+72 /* &pMax */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28482, /* "SELECT %s FROM \"..." */ - libc.VaList(bp+40, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) - if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */)))) { - var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */)), 0) - zRet = rbuMPrintf(tls, p, ts+28524 /* " WHERE (%s) > (%..." */, libc.VaList(bp+80, zList, zVal)) + libc.VaList(bp+24, zSelect, zWrite, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) + if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)))) { + var zVal uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */)), 0) + zRet = rbuMPrintf(tls, p, ts+28524 /* " WHERE (%s) > (%..." */, libc.VaList(bp+56, zList, zVal)) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 104 /* pMax */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 72 /* pMax */))) } Xsqlite3_free(tls, zOrder) @@ -206428,8 +206428,8 @@ func rbuVacuumTableStart(tls *libc.TLS, p uintptr, pIter uintptr, bRowid int32, // the caller has to use an OFFSET clause to extract only the required // rows from the sourct table, just as it does for an RBU update operation. func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201628:6: */ - bp := tls.Alloc(248) - defer tls.Free(248) + bp := tls.Alloc(192) + defer tls.Free(192) var zOrder uintptr var zLhs uintptr @@ -206439,14 +206439,14 @@ func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* var bFailed int32 var zSep uintptr var iCol int32 - // var pXInfo uintptr at bp+232, 8 + // var pXInfo uintptr at bp+176, 8 var i int32 var iCid int32 var zCollate uintptr var zCol uintptr var zQuoted uintptr - // var pSel uintptr at bp+240, 8 + // var pSel uintptr at bp+184, 8 zOrder = uintptr(0) zLhs = uintptr(0) zSelect = uintptr(0) @@ -206455,17 +206455,17 @@ func XrbuVacuumIndexStart(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* bFailed = 0 zSep = ts + 755 /* "" */ iCol = 0 - *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+232 /* &pXInfo */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) __1: - if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */))))) { + if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))))) { goto __2 } - iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 1) - zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 4) - if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 3) != 0) { + iCid = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) + zCollate = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) + if !(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) != 0) { goto __3 } bFailed = 1 @@ -206505,17 +206505,17 @@ __5: ; zLhs = rbuMPrintf(tls, p, ts+28552, /* "%z%s \"%w\" COLLAT..." */ - libc.VaList(bp+16, zLhs, zSep, zCol, zCollate)) + libc.VaList(bp+8, zLhs, zSep, zCol, zCollate)) zOrder = rbuMPrintf(tls, p, ts+28573, /* "%z%s \"rbu_imp_%d..." */ - libc.VaList(bp+56, zOrder, zSep, iCol, zCol, zCollate)) + libc.VaList(bp+40, zOrder, zSep, iCol, zCol, zCollate)) zSelect = rbuMPrintf(tls, p, ts+28609, /* "%z%s quote(\"rbu_..." */ - libc.VaList(bp+104, zSelect, zSep, iCol, zCol)) + libc.VaList(bp+80, zSelect, zSep, iCol, zCol)) zSep = ts + 14691 /* ", " */ iCol++ goto __1 __2: ; - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) if !(bFailed != 0) { goto __11 } @@ -206526,12 +206526,12 @@ __11: if !((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { goto __12 } - *(*uintptr)(unsafe.Pointer(bp + 240 /* pSel */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+240 /* &pSel */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+184 /* &pSel */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28636, /* "SELECT %s FROM \"..." */ - libc.VaList(bp+144, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) - if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 240 /* pSel */))))) { + libc.VaList(bp+112, zSelect, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zOrder))) + if !(((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */))))) { goto __13 } zSep = ts + 755 /* "" */ @@ -206540,7 +206540,7 @@ __14: if !(iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol) { goto __16 } - zQuoted = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 240 /* pSel */)), iCol) + zQuoted = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */)), iCol) if !(zQuoted == uintptr(0)) { goto __17 } @@ -206556,7 +206556,7 @@ __19: ; __18: ; - zVector = rbuMPrintf(tls, p, ts+28684 /* "%z%s%s" */, libc.VaList(bp+176, zVector, zSep, zQuoted)) + zVector = rbuMPrintf(tls, p, ts+28684 /* "%z%s%s" */, libc.VaList(bp+136, zVector, zSep, zQuoted)) zSep = ts + 14691 /* ", " */ goto __15 __15: @@ -206569,12 +206569,12 @@ __16: if !(!(bFailed != 0)) { goto __20 } - zRet = rbuMPrintf(tls, p, ts+28691 /* "(%s) > (%s)" */, libc.VaList(bp+208, zLhs, zVector)) + zRet = rbuMPrintf(tls, p, ts+28691 /* "(%s) > (%s)" */, libc.VaList(bp+160, zLhs, zVector)) __20: ; __13: ; - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 240 /* pSel */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 184 /* pSel */))) __12: ; @@ -206609,8 +206609,8 @@ index_start_out: // pzImposterPk: ... // pzWhere: ... func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterCols uintptr, pzImposterPk uintptr, pzWhere uintptr, pnBind uintptr) uintptr { /* sqlite3.c:201743:13: */ - bp := tls.Alloc(256) - defer tls.Free(256) + bp := tls.Alloc(208) + defer tls.Free(208) var rc int32 = (*Sqlite3rbu)(unsafe.Pointer(p)).Frc // Error code var rc2 int32 // sqlite3_finalize() return code @@ -206621,24 +206621,24 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC var nBind int32 = 0 // Value to return via *pnBind var zCom uintptr = ts + 755 /* "" */ // Set to ", " later on var zAnd uintptr = ts + 755 /* "" */ // Set to " AND " later on - *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = ? + *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = ? if rc == SQLITE_OK { - rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+248 /* &pXInfo */, (p + 64 /* &.zErrmsg */), + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+200 /* &pXInfo */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzIdx))) } - for (rc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)))) { - var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)), 1) - var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)), 3) - var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)), 4) + for (rc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)))) { + var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 1) + var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 3) + var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 4) var zCol uintptr = uintptr(0) var zType uintptr if iCid == -2 { - var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)), 0) - zRet = Xsqlite3_mprintf(tls, ts+28703 /* "%z%s(%.*s) COLLA..." */, libc.VaList(bp+16, zRet, zCom, + var iSeq int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 0) + zRet = Xsqlite3_mprintf(tls, ts+28703 /* "%z%s(%.*s) COLLA..." */, libc.VaList(bp+8, zRet, zCom, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FnSpan, (*RbuSpan)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FaIdxCol+uintptr(iSeq)*16)).FzSpan, zCollate)) zType = ts + 755 /* "" */ } else { @@ -206661,10 +206661,10 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC zCol = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCid)*8)) zType = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)) } - zRet = Xsqlite3_mprintf(tls, ts+28725 /* "%z%s\"%w\" COLLATE..." */, libc.VaList(bp+64, zRet, zCom, zCol, zCollate)) + zRet = Xsqlite3_mprintf(tls, ts+28725 /* "%z%s\"%w\" COLLATE..." */, libc.VaList(bp+48, zRet, zCom, zCol, zCollate)) } - if ((*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0) || (Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */)), 5) != 0) { + if ((*RbuObjIter)(unsafe.Pointer(pIter)).FbUnique == 0) || (Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */)), 5) != 0) { var zOrder uintptr = func() uintptr { if bDesc != 0 { return ts + 28461 /* " DESC" */ @@ -206672,12 +206672,12 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC return ts + 755 /* "" */ }() zImpPK = Xsqlite3_mprintf(tls, ts+28745, /* "%z%s\"rbu_imp_%d%..." */ - libc.VaList(bp+104, zImpPK, zCom, nBind, zCol, zOrder)) + libc.VaList(bp+80, zImpPK, zCom, nBind, zCol, zOrder)) } zImpCols = Xsqlite3_mprintf(tls, ts+28766, /* "%z%s\"rbu_imp_%d%..." */ - libc.VaList(bp+152, zImpCols, zCom, nBind, zCol, zType, zCollate)) + libc.VaList(bp+120, zImpCols, zCom, nBind, zCol, zType, zCollate)) zWhere = Xsqlite3_mprintf(tls, - ts+28799 /* "%z%s\"rbu_imp_%d%..." */, libc.VaList(bp+208, zWhere, zAnd, nBind, zCol)) + ts+28799 /* "%z%s\"rbu_imp_%d%..." */, libc.VaList(bp+168, zWhere, zAnd, nBind, zCol)) if (((zRet == uintptr(0)) || (zImpPK == uintptr(0))) || (zImpCols == uintptr(0))) || (zWhere == uintptr(0)) { rc = SQLITE_NOMEM } @@ -206686,7 +206686,7 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC nBind++ } - rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 248 /* pXInfo */))) + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* pXInfo */))) if rc == SQLITE_OK { rc = rc2 } @@ -206720,8 +206720,8 @@ func rbuObjIterGetIndexCols(tls *libc.TLS, p uintptr, pIter uintptr, pzImposterC // For tables with implicit rowids - RBU_PK_EXTERNAL and RBU_PK_NONE, append // the text ", old._rowid_" to the returned value. func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) uintptr { /* sqlite3.c:201855:13: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(64) + defer tls.Free(64) var zList uintptr = uintptr(0) if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) { @@ -206732,7 +206732,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) zList = Xsqlite3_mprintf(tls, ts+28823 /* "%z%s%s.\"%w\"" */, libc.VaList(bp, zList, zS, zObj, zCol)) } else { - zList = Xsqlite3_mprintf(tls, ts+28835 /* "%z%sNULL" */, libc.VaList(bp+40, zList, zS)) + zList = Xsqlite3_mprintf(tls, ts+28835 /* "%z%sNULL" */, libc.VaList(bp+32, zList, zS)) } zS = ts + 14691 /* ", " */ if zList == uintptr(0) { @@ -206743,7 +206743,7 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // For a table with implicit rowids, append "old._rowid_" to the list. if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { - zList = rbuMPrintf(tls, p, ts+28844 /* "%z, %s._rowid_" */, libc.VaList(bp+64, zList, zObj)) + zList = rbuMPrintf(tls, p, ts+28844 /* "%z, %s._rowid_" */, libc.VaList(bp+48, zList, zObj)) } } return zList @@ -206758,8 +206758,8 @@ func rbuObjIterGetOldlist(tls *libc.TLS, p uintptr, pIter uintptr, zObj uintptr) // // "b = ?1 AND c = ?2" func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:201896:13: */ - bp := tls.Alloc(112) - defer tls.Free(112) + bp := tls.Alloc(80) + defer tls.Free(80) var zList uintptr = uintptr(0) if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_VTAB) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { @@ -206769,12 +206769,12 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq var i int32 for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { - zList = rbuMPrintf(tls, p, ts+28873 /* "%z%sc%d=?%d" */, libc.VaList(bp+16, zList, zSep, i, (i+1))) + zList = rbuMPrintf(tls, p, ts+28873 /* "%z%sc%d=?%d" */, libc.VaList(bp+8, zList, zSep, i, (i+1))) zSep = ts + 21256 /* " AND " */ } } zList = rbuMPrintf(tls, p, - ts+28885 /* "_rowid_ = (SELEC..." */, libc.VaList(bp+56, zList)) + ts+28885 /* "_rowid_ = (SELEC..." */, libc.VaList(bp+40, zList)) } else { var zSep uintptr = ts + 755 /* "" */ @@ -206782,7 +206782,7 @@ func rbuObjIterGetWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sq for i = 0; i < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol; i++ { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(i))) != 0 { var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)) - zList = rbuMPrintf(tls, p, ts+28935 /* "%z%s\"%w\"=?%d" */, libc.VaList(bp+72, zList, zSep, zCol, (i+1))) + zList = rbuMPrintf(tls, p, ts+28935 /* "%z%s\"%w\"=?%d" */, libc.VaList(bp+48, zList, zSep, zCol, (i+1))) zSep = ts + 21256 /* " AND " */ } } @@ -206816,8 +206816,8 @@ func rbuBadControlError(tls *libc.TLS, p uintptr) { /* sqlite3.c:201937:13: */ // when this function is called, NULL is returned immediately, without // attempting the allocation or modifying the stored error code. func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr) uintptr { /* sqlite3.c:201960:13: */ - bp := tls.Alloc(136) - defer tls.Free(136) + bp := tls.Alloc(112) + defer tls.Free(112) var zList uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { @@ -206835,11 +206835,11 @@ func rbuObjIterGetSetlist(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr zSep = ts + 14691 /* ", " */ } else if int32(c) == 'd' { zList = rbuMPrintf(tls, p, ts+28974, /* "%z%s\"%w\"=rbu_del..." */ - libc.VaList(bp+40, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) + libc.VaList(bp+32, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) zSep = ts + 14691 /* ", " */ } else if int32(c) == 'f' { zList = rbuMPrintf(tls, p, ts+29004, /* "%z%s\"%w\"=rbu_fos..." */ - libc.VaList(bp+88, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) + libc.VaList(bp+72, zList, zSep, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(i)*8)), (i+1))) zSep = ts + 14691 /* ", " */ } } @@ -206892,47 +206892,47 @@ func rbuObjIterGetBindlist(tls *libc.TLS, p uintptr, nBind int32) uintptr { /* s // // PRIMARY KEY("b", "a" DESC) func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sqlite3.c:202041:13: */ - bp := tls.Alloc(104) - defer tls.Free(104) + bp := tls.Alloc(72) + defer tls.Free(72) var z uintptr = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var zSep uintptr = ts + 29041 /* "PRIMARY KEY(" */ - *(*uintptr)(unsafe.Pointer(bp + 88 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) - *(*uintptr)(unsafe.Pointer(bp + 96 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = <pk-index> + *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)) = uintptr(0) // PRAGMA index_list = (pIter->zTbl) + *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)) = uintptr(0) // PRAGMA index_xinfo = <pk-index> - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+88 /* &pXList */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+56 /* &pXList */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28193 /* "PRAGMA main.inde..." */, libc.VaList(bp, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl))) - for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pXList */)))) { - var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pXList */)), 3) + for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)))) { + var zOrig uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 3) if (zOrig != 0) && (libc.Xstrcmp(tls, zOrig, ts+16035 /* "pk" */) == 0) { - var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* pXList */)), 1) + var zIdx uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */)), 1) if zIdx != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+96 /* &pXInfo */, (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp+16, zIdx))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+64 /* &pXInfo */, (p + 64 /* &.zErrmsg */), + Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp+8, zIdx))) } break } } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 88 /* pXList */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 56 /* pXList */))) - for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pXInfo */)))) { - if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pXInfo */)), 5) != 0 { + for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)))) { + if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 5) != 0 { // int iCid = sqlite3_column_int(pXInfo, 0); - var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pXInfo */)), 2) + var zCol uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 2) var zDesc uintptr - if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pXInfo */)), 3) != 0 { + if Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */)), 3) != 0 { zDesc = ts + 28461 /* " DESC" */ } else { zDesc = ts + 755 /* "" */ } - z = rbuMPrintf(tls, p, ts+29054 /* "%z%s\"%w\"%s" */, libc.VaList(bp+32, z, zSep, zCol, zDesc)) + z = rbuMPrintf(tls, p, ts+29054 /* "%z%s\"%w\"%s" */, libc.VaList(bp+16, z, zSep, zCol, zDesc)) zSep = ts + 14691 /* ", " */ } } - z = rbuMPrintf(tls, p, ts+29065 /* "%z)" */, libc.VaList(bp+72, z)) - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 96 /* pXInfo */))) + z = rbuMPrintf(tls, p, ts+29065 /* "%z)" */, libc.VaList(bp+48, z)) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 64 /* pXInfo */))) } return z } @@ -206955,14 +206955,14 @@ func rbuWithoutRowidPK(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { /* sql // CREATE TABLE rbu_imposter2(c1 TEXT, c2 REAL, id INTEGER) WITHOUT ROWID; // func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:202100:13: */ - bp := tls.Alloc(240) - defer tls.Free(240) + bp := tls.Alloc(184) + defer tls.Free(184) if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) { var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiPkTnum // Root page of PK index - *(*uintptr)(unsafe.Pointer(bp + 224 /* pQuery */)) = uintptr(0) // SELECT name ... WHERE rootpage = $tnum + *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)) = uintptr(0) // SELECT name ... WHERE rootpage = $tnum var zIdx uintptr = uintptr(0) // Name of PK index - *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)) = uintptr(0) // PRAGMA main.index_xinfo = $zIdx + *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)) = uintptr(0) // PRAGMA main.index_xinfo = $zIdx var zComma uintptr = ts + 755 /* "" */ var zCols uintptr = uintptr(0) // Used to build up list of table cols var zPk uintptr = uintptr(0) // Used to build up table PK declaration @@ -206970,29 +206970,29 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // Figure out the name of the primary key index for the current table. // This is needed for the argument to "PRAGMA index_xinfo". Set // zIdx to point to a nul-terminated string containing this name. - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+224 /* &pQuery */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+168 /* &pQuery */, (p + 64 /* &.zErrmsg */), ts+29069 /* "SELECT name FROM..." */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* pQuery */)), 1, tnum) - if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* pQuery */))) { - zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 224 /* pQuery */)), 0) + Xsqlite3_bind_int(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 1, tnum) + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) { + zIdx = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */)), 0) } } if zIdx != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+232 /* &pXInfo */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, bp+176 /* &pXInfo */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+28221 /* "PRAGMA main.inde..." */, libc.VaList(bp, zIdx))) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 224 /* pQuery */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 168 /* pQuery */))) - for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)))) { - var bKey int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 5) + for ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)))) { + var bKey int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 5) if bKey != 0 { - var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 1) - var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 3) - var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */)), 4) - zCols = rbuMPrintf(tls, p, ts+29119 /* "%z%sc%d %s COLLA..." */, libc.VaList(bp+16, zCols, zComma, + var iCid int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 1) + var bDesc int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 3) + var zCollate uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */)), 4) + zCols = rbuMPrintf(tls, p, ts+29119 /* "%z%sc%d %s COLLA..." */, libc.VaList(bp+8, zCols, zComma, iCid, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCid)*8)), zCollate)) - zPk = rbuMPrintf(tls, p, ts+29141 /* "%z%sc%d%s" */, libc.VaList(bp+64, zPk, zComma, iCid, func() uintptr { + zPk = rbuMPrintf(tls, p, ts+29141 /* "%z%sc%d%s" */, libc.VaList(bp+48, zPk, zComma, iCid, func() uintptr { if bDesc != 0 { return ts + 28461 /* " DESC" */ } @@ -207001,14 +207001,14 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit zComma = ts + 14691 /* ", " */ } } - zCols = rbuMPrintf(tls, p, ts+29151 /* "%z, id INTEGER" */, libc.VaList(bp+104, zCols)) - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 232 /* pXInfo */))) + zCols = rbuMPrintf(tls, p, ts+29151 /* "%z, id INTEGER" */, libc.VaList(bp+80, zCols)) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 176 /* pXInfo */))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+120, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+88, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29166, /* "CREATE TABLE rbu..." */ - libc.VaList(bp+160, zCols, zPk)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+184, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 0)) + libc.VaList(bp+120, zCols, zPk)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+136, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 0)) } } @@ -207031,8 +207031,8 @@ func rbuCreateImposterTable2(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlit // collation sequences. For tables that do not have an external PRIMARY // KEY, it also means the same PRIMARY KEY declaration. func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite3.c:202174:13: */ - bp := tls.Alloc(248) - defer tls.Free(248) + bp := tls.Alloc(200) + defer tls.Free(200) if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType != RBU_PK_VTAB) { var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum @@ -207044,10 +207044,10 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite for iCol = 0; ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (iCol < (*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol); iCol++ { var zPk uintptr = ts + 755 /* "" */ var zCol uintptr = *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblCol + uintptr(iCol)*8)) - *(*uintptr)(unsafe.Pointer(bp + 240 /* zColl */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)) = uintptr(0) (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_table_column_metadata(tls, - (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+240 /* &zColl */, uintptr(0), uintptr(0), uintptr(0)) + (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zCol, uintptr(0), bp+192 /* &zColl */, uintptr(0), uintptr(0), uintptr(0)) if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_IPK) && (*(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabTblPk + uintptr(iCol))) != 0) { // If the target table column is an "INTEGER PRIMARY KEY", add @@ -207055,7 +207055,7 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite zPk = ts + 29228 /* "PRIMARY KEY " */ } zSql = rbuMPrintf(tls, p, ts+29241, /* "%z%s\"%w\" %s %sCO..." */ - libc.VaList(bp+40, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 240 /* zColl */)), + libc.VaList(bp+32, zSql, zComma, zCol, *(*uintptr)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FazTblType + uintptr(iCol)*8)), zPk, *(*uintptr)(unsafe.Pointer(bp + 192 /* zColl */)), func() uintptr { if *(*U8)(unsafe.Pointer((*RbuObjIter)(unsafe.Pointer(pIter)).FabNotNull + uintptr(iCol))) != 0 { return ts + 29268 /* " NOT NULL" */ @@ -207068,20 +207068,20 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { var zPk uintptr = rbuWithoutRowidPK(tls, p, pIter) if zPk != 0 { - zSql = rbuMPrintf(tls, p, ts+29278 /* "%z, %z" */, libc.VaList(bp+104, zSql, zPk)) + zSql = rbuMPrintf(tls, p, ts+29278 /* "%z, %z" */, libc.VaList(bp+88, zSql, zPk)) } } - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+128, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+104, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29285, /* "CREATE TABLE \"rb..." */ - libc.VaList(bp+168, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, + libc.VaList(bp+136, (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl, zSql, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_WITHOUT_ROWID { return ts + 29317 /* " WITHOUT ROWID" */ } return ts + 755 /* "" */ }())) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+200, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 0)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+160, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 0)) } } @@ -207095,8 +207095,8 @@ func rbuCreateImposterTable(tls *libc.TLS, p uintptr, pIter uintptr) { /* sqlite // (for the rbu_rowid column) if the target table is an implicit IPK or // virtual table. func rbuObjIterPrepareTmpInsert(tls *libc.TLS, p uintptr, pIter uintptr, zCollist uintptr, zRbuRowid uintptr) { /* sqlite3.c:202230:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) var bRbuRowid int32 = (libc.Bool32(((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE))) var zBind uintptr = rbuObjIterGetBindlist(tls, p, (((*RbuObjIter)(unsafe.Pointer(pIter)).FnTblCol + 1) + bRbuRowid)) @@ -207240,8 +207240,8 @@ func rbuObjIterGetIndexWhere(tls *libc.TLS, p uintptr, pIter uintptr) uintptr { // target database object currently indicated by the iterator passed // as the second argument are available. func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32) int32 { /* sqlite3.c:202378:12: */ - bp := tls.Alloc(756) - defer tls.Free(756) + bp := tls.Alloc(628) + defer tls.Free(628) if ((*RbuObjIter)(unsafe.Pointer(pIter)).FpSelect == uintptr(0)) && (rbuObjIterCacheTableInfo(tls, p, pIter) == SQLITE_OK) { var tnum int32 = (*RbuObjIter)(unsafe.Pointer(pIter)).FiTnum @@ -207259,39 +207259,39 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if zIdx != 0 { var zTbl uintptr = (*RbuObjIter)(unsafe.Pointer(pIter)).FzTbl - *(*uintptr)(unsafe.Pointer(bp + 728 /* zImposterCols */)) = uintptr(0) // Columns for imposter table - *(*uintptr)(unsafe.Pointer(bp + 736 /* zImposterPK */)) = uintptr(0) // Primary key declaration for imposter - *(*uintptr)(unsafe.Pointer(bp + 744 /* zWhere */)) = uintptr(0) // WHERE clause on PK columns + *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)) = uintptr(0) // Columns for imposter table + *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)) = uintptr(0) // Primary key declaration for imposter + *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */)) = uintptr(0) // WHERE clause on PK columns var zBind uintptr = uintptr(0) var zPart uintptr = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 752 /* nBind */)) = 0 + *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)) = 0 zPart = rbuObjIterGetIndexWhere(tls, p, pIter) zCollist = rbuObjIterGetIndexCols(tls, - p, pIter, bp+728 /* &zImposterCols */, bp+736 /* &zImposterPK */, bp+744 /* &zWhere */, bp+752 /* &nBind */) - zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 752 /* nBind */))) + p, pIter, bp+600 /* &zImposterCols */, bp+608 /* &zImposterPK */, bp+616 /* &zWhere */, bp+624 /* &nBind */) + zBind = rbuObjIterGetBindlist(tls, p, *(*int32)(unsafe.Pointer(bp + 624 /* nBind */))) // Create the imposter table used to write to this index. - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 1)) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+56, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 1, tnum)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+8, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 1)) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+40, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 1, tnum)) rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+29475, /* "CREATE TABLE \"rb..." */ - libc.VaList(bp+96, zTbl, *(*uintptr)(unsafe.Pointer(bp + 728 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 736 /* zImposterPK */)))) - Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+128, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 0)) + libc.VaList(bp+72, zTbl, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */)), *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */)))) + Xsqlite3_test_control(tls, SQLITE_TESTCTRL_IMPOSTER, libc.VaList(bp+96, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */, 0, 0)) // Create the statement to insert index entries - (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 752 /* nBind */)) + (*RbuObjIter)(unsafe.Pointer(pIter)).FnCol = *(*int32)(unsafe.Pointer(bp + 624 /* nBind */)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 136 /* &.pInsert */), (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+29540 /* "INSERT INTO \"rbu..." */, libc.VaList(bp+168, zTbl, zBind))) + Xsqlite3_mprintf(tls, ts+29540 /* "INSERT INTO \"rbu..." */, libc.VaList(bp+128, zTbl, zBind))) } // And to delete index entries if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 144 /* &.pDelete */), (p + 64 /* &.zErrmsg */), - Xsqlite3_mprintf(tls, ts+29576 /* "DELETE FROM \"rbu..." */, libc.VaList(bp+192, zTbl, *(*uintptr)(unsafe.Pointer(bp + 744 /* zWhere */))))) + Xsqlite3_mprintf(tls, ts+29576 /* "DELETE FROM \"rbu..." */, libc.VaList(bp+144, zTbl, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))))) } // Create the SELECT statement to read keys in sorted order @@ -207309,7 +207309,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 zSql = Xsqlite3_mprintf(tls, ts+29610, /* "SELECT %s, 0 AS ..." */ - libc.VaList(bp+216, zCollist, + libc.VaList(bp+160, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { @@ -207328,13 +207328,13 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } else if ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL) || ((*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_NONE) { zSql = Xsqlite3_mprintf(tls, ts+29681, /* "SELECT %s, rbu_c..." */ - libc.VaList(bp+280, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, + libc.VaList(bp+216, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, zLimit)) } else { zSql = Xsqlite3_mprintf(tls, ts+29742, /* "SELECT %s, rbu_c..." */ - libc.VaList(bp+336, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, + libc.VaList(bp+264, zCollist, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, zCollist, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, zPart, func() uintptr { @@ -207352,9 +207352,9 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 } } - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 728 /* zImposterCols */))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 736 /* zImposterPK */))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 744 /* zWhere */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 600 /* zImposterCols */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 608 /* zImposterPK */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 616 /* zWhere */))) Xsqlite3_free(tls, zBind) Xsqlite3_free(tls, zPart) } else { @@ -207387,7 +207387,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 136 /* &.pInsert */), pz, Xsqlite3_mprintf(tls, ts+29910, /* "INSERT INTO \"%s%..." */ - libc.VaList(bp+424, zWrite, zTbl, zCollist, func() uintptr { + libc.VaList(bp+344, zWrite, zTbl, zCollist, func() uintptr { if bRbuRowid != 0 { return ts + 29946 /* ", _rowid_" */ } @@ -207401,7 +207401,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, (pIter + 144 /* &.pDelete */), pz, Xsqlite3_mprintf(tls, - ts+29956 /* "DELETE FROM \"%s%..." */, libc.VaList(bp+472, zWrite, zTbl, zWhere))) + ts+29956 /* "DELETE FROM \"%s%..." */, libc.VaList(bp+384, zWrite, zTbl, zWhere))) } if ((libc.Bool32((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0))) == 0) && ((*RbuObjIter)(unsafe.Pointer(pIter)).FabIndexed != 0) { @@ -207413,7 +207413,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // Create the rbu_tmp_xxx table and the triggers to populate it. rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, - ts+29996 /* "CREATE TABLE IF ..." */, libc.VaList(bp+504, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { + ts+29996 /* "CREATE TABLE IF ..." */, libc.VaList(bp+408, p+48 /* &.zStateDb */, (*RbuObjIter)(unsafe.Pointer(pIter)).FzDataTbl, func() uintptr { if (*RbuObjIter)(unsafe.Pointer(pIter)).FeType == RBU_PK_EXTERNAL { return ts + 30072 /* ", 0 AS rbu_rowid" */ } @@ -207423,7 +207423,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30089, /* "CREATE TEMP TRIG..." */ - libc.VaList(bp+544, zWrite, zTbl, zOldlist, + libc.VaList(bp+440, zWrite, zTbl, zOldlist, zWrite, zTbl, zOldlist, zWrite, zTbl, zNewlist)) @@ -207431,7 +207431,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30388, /* "CREATE TEMP TRIG..." */ - libc.VaList(bp+624, zWrite, zTbl, zNewlist)) + libc.VaList(bp+512, zWrite, zTbl, zNewlist)) } rbuObjIterPrepareTmpInsert(tls, p, pIter, zCollist, zRbuRowid) @@ -207469,7 +207469,7 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, (pIter + 128 /* &.pSelect */), pz, Xsqlite3_mprintf(tls, ts+30508, /* "SELECT %s,%s rbu..." */ - libc.VaList(bp+656, zCollist, + libc.VaList(bp+536, zCollist, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { return ts + 30556 /* "0 AS " */ @@ -207515,8 +207515,8 @@ func rbuObjIterPrepareAll(tls *libc.TLS, p uintptr, pIter uintptr, nOffset int32 // If the zMask string does not specify any columns to update, then this // is not an error. Output variable *ppStmt is set to NULL in this case. func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, ppStmt uintptr) int32 { /* sqlite3.c:202645:12: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(32) + defer tls.Free(32) var pp uintptr var pUp uintptr = uintptr(0) @@ -207581,25 +207581,25 @@ func rbuGetUpdateStmt(tls *libc.TLS, p uintptr, pIter uintptr, zMask uintptr, pp } func rbuOpenDbhandle(tls *libc.TLS, p uintptr, zName uintptr, bUseVfs int32) uintptr { /* sqlite3.c:202713:16: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) - *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var flags int32 = ((SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE) | SQLITE_OPEN_URI) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp+16 /* &db */, flags, func() uintptr { + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3_open_v2(tls, zName, bp+8 /* &db */, flags, func() uintptr { if bUseVfs != 0 { return (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName } return uintptr(0) }()) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc != 0 { - (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */))))) - Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* db */))) - *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)) = uintptr(0) + (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))))) + Xsqlite3_close(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* db */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) = uintptr(0) } } - return *(*uintptr)(unsafe.Pointer(bp + 16 /* db */)) + return *(*uintptr)(unsafe.Pointer(bp + 8 /* db */)) } // Free an RbuState object allocated by rbuLoadState(). @@ -207620,12 +207620,12 @@ func rbuFreeState(tls *libc.TLS, p uintptr) { /* sqlite3.c:202734:13: */ // If an error occurs, leave an error code and message in the rbu handle // and return NULL. func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:202752:17: */ - bp := tls.Alloc(28) - defer tls.Free(28) + bp := tls.Alloc(20) + defer tls.Free(20) var pRet uintptr = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) - // var rc int32 at bp+24, 4 + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) + // var rc int32 at bp+16, 4 var rc2 int32 @@ -207634,12 +207634,12 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:202752:17: */ return uintptr(0) } - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+16 /* &pStmt */, (p + 64 /* &.zErrmsg */), + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+8 /* &pStmt */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+30592 /* "SELECT k, v FROM..." */, libc.VaList(bp, p+48 /* &.zStateDb */))) - for (*(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)))) { - switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) { + for (*(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)))) { + switch Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) { case RBU_STATE_STAGE: - (*RbuState)(unsafe.Pointer(pRet)).FeStage = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + (*RbuState)(unsafe.Pointer(pRet)).FeStage = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) if (((*RbuState)(unsafe.Pointer(pRet)).FeStage != RBU_STAGE_OAL) && ((*RbuState)(unsafe.Pointer(pRet)).FeStage != RBU_STAGE_MOVE)) && ((*RbuState)(unsafe.Pointer(pRet)).FeStage != RBU_STAGE_CKPT) { @@ -207648,60 +207648,60 @@ func rbuLoadState(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:202752:17: */ break case RBU_STATE_TBL: - (*RbuState)(unsafe.Pointer(pRet)).FzTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1), bp+24 /* &rc */) + (*RbuState)(unsafe.Pointer(pRet)).FzTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16 /* &rc */) break case RBU_STATE_IDX: - (*RbuState)(unsafe.Pointer(pRet)).FzIdx = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1), bp+24 /* &rc */) + (*RbuState)(unsafe.Pointer(pRet)).FzIdx = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16 /* &rc */) break case RBU_STATE_ROW: - (*RbuState)(unsafe.Pointer(pRet)).FnRow = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + (*RbuState)(unsafe.Pointer(pRet)).FnRow = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) break case RBU_STATE_PROGRESS: - (*RbuState)(unsafe.Pointer(pRet)).FnProgress = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + (*RbuState)(unsafe.Pointer(pRet)).FnProgress = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) break case RBU_STATE_CKPT: - (*RbuState)(unsafe.Pointer(pRet)).FiWalCksum = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + (*RbuState)(unsafe.Pointer(pRet)).FiWalCksum = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) break case RBU_STATE_COOKIE: - (*RbuState)(unsafe.Pointer(pRet)).FiCookie = U32(Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1)) + (*RbuState)(unsafe.Pointer(pRet)).FiCookie = U32(Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1)) break case RBU_STATE_OALSZ: - (*RbuState)(unsafe.Pointer(pRet)).FiOalSz = I64(U32(Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1))) + (*RbuState)(unsafe.Pointer(pRet)).FiOalSz = I64(U32(Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1))) break case RBU_STATE_PHASEONESTEP: - (*RbuState)(unsafe.Pointer(pRet)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + (*RbuState)(unsafe.Pointer(pRet)).FnPhaseOneStep = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1) break case RBU_STATE_DATATBL: - (*RbuState)(unsafe.Pointer(pRet)).FzDataTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1), bp+24 /* &rc */) + (*RbuState)(unsafe.Pointer(pRet)).FzDataTbl = rbuStrndup(tls, Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 1), bp+16 /* &rc */) break default: - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_CORRUPT + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_CORRUPT break } } - rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) - if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = rc2 + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = rc2 } - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) return pRet } // Open the database handle and attach the RBU database as "rbu". If an // error occurs, leave an error code and message in the RBU handle. func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:202829:13: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(56) + defer tls.Free(56) // Open the RBU database (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu = rbuOpenDbhandle(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FzRbu, 1) @@ -207717,14 +207717,14 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:2 // If using separate RBU and state databases, attach the state database to // the RBU db handle now. if (*Sqlite3rbu)(unsafe.Pointer(p)).FzState != 0 { - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30649 /* "ATTACH %Q AS sta..." */, libc.VaList(bp+24, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30649 /* "ATTACH %Q AS sta..." */, libc.VaList(bp+16, (*Sqlite3rbu)(unsafe.Pointer(p)).FzState)) libc.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+13549 /* "stat" */, uint64(4)) } else { libc.Xmemcpy(tls, p+48 /* &.zStateDb */, ts+6820 /* "main" */, uint64(4)) } // If it has not already been created, create the rbu_state table - rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30667 /* "CREATE TABLE IF ..." */, libc.VaList(bp+40, p+48 /* &.zStateDb */)) + rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+30667 /* "CREATE TABLE IF ..." */, libc.VaList(bp+24, p+48 /* &.zStateDb */)) if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && ((*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0)) { var bOpen int32 = 0 @@ -207781,7 +207781,7 @@ func rbuOpenDatabase(tls *libc.TLS, p uintptr, pbRetry uintptr) { /* sqlite3.c:2 } zTarget = Xsqlite3_mprintf(tls, ts+30765, /* "file:%s-vactmp?r..." */ - libc.VaList(bp+56, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6820 /* "main" */), + libc.VaList(bp+32, Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6820 /* "main" */), func() uintptr { if zExtra == uintptr(0) { return ts + 755 /* "" */ @@ -208065,8 +208065,8 @@ func rbuLockDatabase(tls *libc.TLS, p uintptr) { /* sqlite3.c:203202:13: */ // If an error occurs, leave an error code and error message in the rbu // handle. func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:203242:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var zBase uintptr = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+6820 /* "main" */) var zMove uintptr = zBase @@ -208077,7 +208077,7 @@ func rbuMoveOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:203242:13: */ zMove = Xsqlite3_db_filename(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, ts+6820 /* "main" */) } zOal = Xsqlite3_mprintf(tls, ts+30928 /* "%s-oal" */, libc.VaList(bp, zMove)) - zWal = Xsqlite3_mprintf(tls, ts+30935 /* "%s-wal" */, libc.VaList(bp+16, zMove)) + zWal = Xsqlite3_mprintf(tls, ts+30935 /* "%s-wal" */, libc.VaList(bp+8, zMove)) if (zWal == uintptr(0)) || (zOal == uintptr(0)) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_NOMEM @@ -208321,8 +208321,8 @@ func rbuStep(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203472:12: */ // opened by p->dbMain to one more than the schema cookie of the main // db opened by p->dbRbu. func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:203537:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var dbread uintptr = func() uintptr { @@ -208332,9 +208332,9 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:203537:13: */ return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain }() var iCookie int32 = 1000000 - // var pStmt uintptr at bp+16, 8 + // var pStmt uintptr at bp+8, 8 - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+16 /* &pStmt */, (p + 64 /* &.zErrmsg */), + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareAndCollectError(tls, dbread, bp+8 /* &pStmt */, (p + 64 /* &.zErrmsg */), ts+30942 /* "PRAGMA schema_ve..." */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { // Coverage: it may be that this sqlite3_step() cannot fail. There @@ -208342,10 +208342,10 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:203537:13: */ // throw an SQLITE_SCHEMA exception. The only database page the // statement reads is page 1, which is guaranteed to be in the cache. // And no memory allocations are required. - if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) { - iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) { + iCookie = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) } if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+30964 /* "PRAGMA schema_ve..." */, libc.VaList(bp, (iCookie+1))) @@ -208357,11 +208357,11 @@ func rbuIncrSchemaCookie(tls *libc.TLS, p uintptr) { /* sqlite3.c:203537:13: */ // value stored in the RBU_STATE_STAGE column is eStage. All other values // are determined by inspecting the rbu handle passed as the first argument. func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:203568:13: */ - bp := tls.Alloc(184) - defer tls.Free(184) + bp := tls.Alloc(176) + defer tls.Free(176) if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) || ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_DONE) { - *(*uintptr)(unsafe.Pointer(bp + 176 /* pInsert */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */)) = uintptr(0) var pFd uintptr = func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { return (*Sqlite3rbu)(unsafe.Pointer(p)).FpRbuFd @@ -208370,7 +208370,7 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:203568: }() var rc int32 - rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+176 /* &pInsert */, (p + 64 /* &.zErrmsg */), + rc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+168 /* &pInsert */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+30991, /* "INSERT OR REPLAC..." */ @@ -208387,8 +208387,8 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:203568: RBU_STATE_DATATBL, (*Sqlite3rbu)(unsafe.Pointer(p)).Fobjiter.FzDataTbl))) if rc == SQLITE_OK { - Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pInsert */))) - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* pInsert */))) + Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 168 /* pInsert */))) } if rc != SQLITE_OK { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rc @@ -208412,18 +208412,18 @@ func rbuSaveState(tls *libc.TLS, p uintptr, eStage int32) { /* sqlite3.c:203568: // In short, it copies the value of the specified PRAGMA setting from // dbRbu to dbMain. func rbuCopyPragma(tls *libc.TLS, p uintptr, zPragma uintptr) { /* sqlite3.c:203629:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - *(*uintptr)(unsafe.Pointer(bp + 40 /* pPragma */)) = uintptr(0) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+40 /* &pPragma */, (p + 64 /* &.zErrmsg */), + *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)) = uintptr(0) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = prepareFreeAndCollectError(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbRbu, bp+24 /* &pPragma */, (p + 64 /* &.zErrmsg */), Xsqlite3_mprintf(tls, ts+31149 /* "PRAGMA main.%s" */, libc.VaList(bp, zPragma))) - if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pPragma */)))) { + if ((*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)))) { (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = rbuMPrintfExec(tls, p, (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain, ts+31164, /* "PRAGMA main.%s =..." */ - libc.VaList(bp+16, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pPragma */)), 0))) + libc.VaList(bp+8, zPragma, Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */)), 0))) } - rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 40 /* pPragma */))) + rbuFinalize(tls, p, *(*uintptr)(unsafe.Pointer(bp + 24 /* pPragma */))) } } @@ -208481,8 +208481,8 @@ func rbuCreateTargetSchema(tls *libc.TLS, p uintptr) { /* sqlite3.c:203649:13: * // Step the RBU object. func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203701:16: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) if p != 0 { switch (*Sqlite3rbu)(unsafe.Pointer(p)).FeStage { @@ -208566,11 +208566,11 @@ func Xsqlite3rbu_step(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:203701:16: // Update nBackfill if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - // var ptr uintptr at bp+24, 8 + // var ptr uintptr at bp+16, 8 - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+24 /* &ptr */) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = (*(*func(*libc.TLS, uintptr, int32, int32, int32, uintptr) int32)(unsafe.Pointer(((*Sqlite3_file)(unsafe.Pointer(pDb)).FpMethods + 104 /* &.xShmMap */))))(tls, pDb, 0, (32 * 1024), 0, bp+16 /* &ptr */) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 24 /* ptr */)) + 24*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame + *(*U32)(unsafe.Pointer((libc.AtomicLoadPUintptr(bp + 16 /* ptr */)) + 24*4)) = (*Sqlite3rbu)(unsafe.Pointer(p)).FiMaxFrame } } @@ -208668,8 +208668,8 @@ func rbuSetupOal(tls *libc.TLS, p uintptr, pState uintptr) { /* sqlite3.c:203846 // target database in the file-system, delete it. If an error occurs, // leave an error code and error message in the rbu handle. func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:203879:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var zOal uintptr = rbuMPrintf(tls, p, ts+30928 /* "%s-oal" */, libc.VaList(bp, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget)) if zOal != 0 { @@ -208685,18 +208685,18 @@ func rbuDeleteOalFile(tls *libc.TLS, p uintptr) { /* sqlite3.c:203879:13: */ // specified a URI with a vfs=? option in place of a target database // file name. func rbuCreateVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:203895:13: */ - bp := tls.Alloc(84) - defer tls.Free(84) + bp := tls.Alloc(76) + defer tls.Free(76) - // var rnd int32 at bp+16, 4 + // var rnd int32 at bp+8, 4 - // var zRnd [64]int8 at bp+20, 64 + // var zRnd [64]int8 at bp+12, 64 - Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+16 /* &rnd */) - Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+20 /* &zRnd[0] */, ts+31504 /* "rbu_vfs_%d" */, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 16 /* rnd */)))) - (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+20 /* &zRnd[0] */, uintptr(0)) + Xsqlite3_randomness(tls, int32(unsafe.Sizeof(int32(0))), bp+8 /* &rnd */) + Xsqlite3_snprintf(tls, int32(unsafe.Sizeof([64]int8{})), bp+12 /* &zRnd[0] */, ts+31504 /* "rbu_vfs_%d" */, libc.VaList(bp, *(*int32)(unsafe.Pointer(bp + 8 /* rnd */)))) + (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = Xsqlite3rbu_create_vfs(tls, bp+12 /* &zRnd[0] */, uintptr(0)) if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { - var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+20 /* &zRnd[0] */) + var pVfs uintptr = Xsqlite3_vfs_find(tls, bp+12 /* &zRnd[0] */) (*Sqlite3rbu)(unsafe.Pointer(p)).FzVfsName = (*Sqlite3_vfs)(unsafe.Pointer(pVfs)).FzName (*Rbu_vfs)(unsafe.Pointer(pVfs)).FpRbu = p @@ -208716,12 +208716,12 @@ func rbuDeleteVfs(tls *libc.TLS, p uintptr) { /* sqlite3.c:203915:13: */ // name of a table expected to appear in the target database. It returns // the number of auxilliary indexes on the table. func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { /* sqlite3.c:203927:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var p uintptr = Xsqlite3_user_data(tls, pCtx) - *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrmsg */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)) = uintptr(0) var rc int32 var db uintptr = func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { @@ -208730,17 +208730,17 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / return (*Sqlite3rbu)(unsafe.Pointer(p)).FdbMain }() - rc = prepareFreeAndCollectError(tls, db, bp+16 /* &pStmt */, bp+24, /* &zErrmsg */ + rc = prepareFreeAndCollectError(tls, db, bp+8 /* &pStmt */, bp+16, /* &zErrmsg */ Xsqlite3_mprintf(tls, ts+31515 /* "SELECT count(*) ..." */, libc.VaList(bp, Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal)))))) if rc != SQLITE_OK { - Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrmsg */)), -1) + Xsqlite3_result_error(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */)), -1) } else { var nIndex int32 = 0 - if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) { - nIndex = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 0) + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) { + nIndex = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */)), 0) } - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pStmt */))) if rc == SQLITE_OK { Xsqlite3_result_int(tls, pCtx, nIndex) } else { @@ -208748,7 +208748,7 @@ func rbuIndexCntFunc(tls *libc.TLS, pCtx uintptr, nVal int32, apVal uintptr) { / } } - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* zErrmsg */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* zErrmsg */))) } // If the RBU database contains the rbu_count table, use it to initialize @@ -208807,8 +208807,8 @@ func rbuInitPhaseOneSteps(tls *libc.TLS, p uintptr) { /* sqlite3.c:203977:13: */ } func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) uintptr { /* sqlite3.c:204018:19: */ - bp := tls.Alloc(36) - defer tls.Free(36) + bp := tls.Alloc(20) + defer tls.Free(20) var p uintptr var nTarget Size_t @@ -208831,7 +208831,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // Open the target, RBU and state databases if (*Sqlite3rbu)(unsafe.Pointer(p)).Frc == SQLITE_OK { var pCsr uintptr = (p + 1*392) - *(*int32)(unsafe.Pointer(bp + 32 /* bRetry */)) = 0 + *(*int32)(unsafe.Pointer(bp + 16 /* bRetry */)) = 0 if zTarget != 0 { (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget = pCsr libc.Xmemcpy(tls, (*Sqlite3rbu)(unsafe.Pointer(p)).FzTarget, zTarget, (nTarget + uint64(1))) @@ -208851,8 +208851,8 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // If this is the case, it will have been checkpointed and deleted // when the handle was closed and a second attempt to open the // database may succeed. - rbuOpenDatabase(tls, p, bp+32 /* &bRetry */) - if *(*int32)(unsafe.Pointer(bp + 32 /* bRetry */)) != 0 { + rbuOpenDatabase(tls, p, bp+16 /* &bRetry */) + if *(*int32)(unsafe.Pointer(bp + 16 /* bRetry */)) != 0 { rbuOpenDatabase(tls, p, uintptr(0)) } } @@ -208901,7 +208901,7 @@ func openRbuHandle(tls *libc.TLS, zTarget uintptr, zRbu uintptr, zState uintptr) // page 1 of the database file. (*Sqlite3rbu)(unsafe.Pointer(p)).Frc = SQLITE_BUSY (*Sqlite3rbu)(unsafe.Pointer(p)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31764, /* "database modifie..." */ - libc.VaList(bp+16, func() uintptr { + libc.VaList(bp+8, func() uintptr { if (*Sqlite3rbu)(unsafe.Pointer((p))).FzTarget == uintptr(0) { return ts + 31796 /* "vacuum" */ } @@ -209580,8 +209580,8 @@ func rbuVfsCheckReservedLock(tls *libc.TLS, pFile uintptr, pResOut uintptr) int3 // File control method. For custom operations on an rbuVfs-file. func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int32 { /* sqlite3.c:204822:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var p uintptr = pFile var xControl uintptr = (*sqlite3_io_methods)(unsafe.Pointer((*Sqlite3_file)(unsafe.Pointer((*Rbu_file)(unsafe.Pointer(p)).FpReal)).FpMethods)).FxFileControl @@ -209598,8 +209598,8 @@ func rbuVfsFileControl(tls *libc.TLS, pFile uintptr, op int32, pArg uintptr) int if rc == SQLITE_NOTFOUND { // Now search for a zipvfs instance lower down in the VFS stack. If // one is found, this is an error. - *(*uintptr)(unsafe.Pointer(bp + 24 /* dummy */)) = uintptr(0) - rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+24 /* &dummy */) + *(*uintptr)(unsafe.Pointer(bp + 16 /* dummy */)) = uintptr(0) + rc = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xControl)))(tls, (*Rbu_file)(unsafe.Pointer(p)).FpReal, SQLITE_FCNTL_ZIPVFS, bp+16 /* &dummy */) if rc == SQLITE_OK { rc = SQLITE_ERROR (*Sqlite3rbu)(unsafe.Pointer(pRbu)).FzErrmsg = Xsqlite3_mprintf(tls, ts+31885 /* "rbu/zipvfs setup..." */, 0) @@ -210919,11 +210919,11 @@ func sessionGrowHash(tls *libc.TLS, pSession uintptr, bPatchset int32, pTab uint // All returned buffers are part of the same single allocation, which must // be freed using sqlite3_free() by the caller func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, zThis uintptr, pnCol uintptr, pzTab uintptr, pazCol uintptr, pabPK uintptr) int32 { /* sqlite3.c:207635:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var zPragma uintptr - // var pStmt uintptr at bp+24, 8 + // var pStmt uintptr at bp+16, 8 var rc int32 var nByte Sqlite3_int64 @@ -210954,18 +210954,18 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, return SQLITE_NOMEM } - rc = Xsqlite3_prepare_v2(tls, db, zPragma, -1, bp+24 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare_v2(tls, db, zPragma, -1, bp+16 /* &pStmt */, uintptr(0)) Xsqlite3_free(tls, zPragma) if rc != SQLITE_OK { return rc } nByte = (Sqlite3_int64(nThis + 1)) - for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) { - nByte = nByte + (Sqlite3_int64(Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1))) + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) { + nByte = nByte + (Sqlite3_int64(Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1))) nDbCol++ } - rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) if rc == SQLITE_OK { nByte = Sqlite3_int64(uint64(nByte) + (uint64(nDbCol) * ((uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(U8(0)))) + uint64(1)))) @@ -210986,19 +210986,19 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, } i = 0 - for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) { - var nName int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1) - var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1) + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) { + var nName int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) + var zName uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 1) if zName == uintptr(0) { break } libc.Xmemcpy(tls, pAlloc, zName, (uint64(nName + 1))) *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)) = pAlloc pAlloc += (uintptr(nName + 1)) - *(*U8)(unsafe.Pointer(abPK + uintptr(i))) = U8(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 5)) + *(*U8)(unsafe.Pointer(abPK + uintptr(i))) = U8(Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */)), 5)) i++ } - rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) + rc = Xsqlite3_reset(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) } @@ -211017,7 +211017,7 @@ func sessionTableInfo(tls *libc.TLS, pSession uintptr, db uintptr, zDb uintptr, } sessionFree(tls, pSession, azCol) } - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pStmt */))) return rc } @@ -211657,8 +211657,8 @@ func sessionDiffHooks(tls *libc.TLS, pSession uintptr, pDiffCtx uintptr) { /* sq } func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:208219:13: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(64) + defer tls.Free(64) var i int32 var zSep uintptr = ts + 755 /* "" */ @@ -211679,8 +211679,8 @@ func sessionExprComparePK(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, } func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTab uintptr, azCol uintptr, abPK uintptr) uintptr { /* sqlite3.c:208242:13: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(64) + defer tls.Free(64) var i int32 var zSep uintptr = ts + 755 /* "" */ @@ -211709,8 +211709,8 @@ func sessionExprCompareOther(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintp } func sessionSelectFindNew(tls *libc.TLS, nCol int32, zDb1 uintptr, zDb2 uintptr, zTbl uintptr, zExpr uintptr) uintptr { /* sqlite3.c:208273:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) var zRet uintptr = Xsqlite3_mprintf(tls, @@ -211748,8 +211748,8 @@ func sessionDiffFindNew(tls *libc.TLS, op int32, pSession uintptr, pTab uintptr, } func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFrom uintptr, zExpr uintptr) int32 { /* sqlite3.c:208320:12: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(56) + defer tls.Free(56) var rc int32 = SQLITE_OK @@ -211764,18 +211764,18 @@ func sessionDiffFindModified(tls *libc.TLS, pSession uintptr, pTab uintptr, zFro if zStmt == uintptr(0) { rc = SQLITE_NOMEM } else { - // var pStmt uintptr at bp+56, 8 + // var pStmt uintptr at bp+48, 8 - rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp+56 /* &pStmt */, uintptr(0)) + rc = Xsqlite3_prepare(tls, (*Sqlite3_session)(unsafe.Pointer(pSession)).Fdb, zStmt, -1, bp+48 /* &pStmt */, uintptr(0)) if rc == SQLITE_OK { var pDiffCtx uintptr = (*Sqlite3_session)(unsafe.Pointer(pSession)).Fhook.FpCtx - (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */)) + (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */)) (*SessionDiffCtx)(unsafe.Pointer(pDiffCtx)).FnOldOff = (*SessionTable)(unsafe.Pointer(pTab)).FnCol - for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))) { + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */))) { sessionPreupdateOneChange(tls, SQLITE_UPDATE, pSession, pTab) } - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* pStmt */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* pStmt */))) } Xsqlite3_free(tls, zStmt) } @@ -212234,13 +212234,13 @@ func sessionAppendStr(tls *libc.TLS, p uintptr, zStr uintptr, pRc uintptr) { /* // If an OOM condition is encountered, set *pRc to SQLITE_NOMEM before // returning. func sessionAppendInteger(tls *libc.TLS, p uintptr, iVal int32, pRc uintptr) { /* sqlite3.c:208751:13: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(32) + defer tls.Free(32) - // var aBuf [24]int8 at bp+16, 24 + // var aBuf [24]int8 at bp+8, 24 - Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([24]int8{})) - uint64(1))), bp+16 /* &aBuf[0] */, ts+5451 /* "%d" */, libc.VaList(bp, iVal)) - sessionAppendStr(tls, p, bp+16 /* &aBuf[0] */, pRc) + Xsqlite3_snprintf(tls, (int32(uint64(unsafe.Sizeof([24]int8{})) - uint64(1))), bp+8 /* &aBuf[0] */, ts+5451 /* "%d" */, libc.VaList(bp, iVal)) + sessionAppendStr(tls, p, bp+8 /* &aBuf[0] */, pRc) } // This function is a no-op if *pRc is other than SQLITE_OK when it is @@ -212495,10 +212495,10 @@ func sessionAppendDelete(tls *libc.TLS, pBuf uintptr, bPatchset int32, p uintptr // // SELECT * FROM zDb.zTab WHERE pk1 = ? AND pk2 = ? AND ... func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCol int32, azCol uintptr, abPK uintptr, ppStmt uintptr) int32 { /* sqlite3.c:209011:12: */ - bp := tls.Alloc(36) - defer tls.Free(36) + bp := tls.Alloc(28) + defer tls.Free(28) - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK var zSql uintptr = uintptr(0) var nSql int32 = -1 @@ -212507,36 +212507,36 @@ func sessionSelectStmt(tls *libc.TLS, db uintptr, zDb uintptr, zTab uintptr, nCo ts+32318 /* "SELECT tbl, ?2, ..." */, libc.VaList(bp, zDb)) if zSql == uintptr(0) { - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_NOMEM + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_NOMEM } } else { var i int32 var zSep uintptr = ts + 755 /* "" */ - *(*SessionBuffer)(unsafe.Pointer(bp + 16 /* buf */)) = SessionBuffer{} + *(*SessionBuffer)(unsafe.Pointer(bp + 8 /* buf */)) = SessionBuffer{} - sessionAppendStr(tls, bp+16 /* &buf */, ts+32428 /* "SELECT * FROM " */, bp+32 /* &rc */) - sessionAppendIdent(tls, bp+16 /* &buf */, zDb, bp+32 /* &rc */) - sessionAppendStr(tls, bp+16 /* &buf */, ts+768 /* "." */, bp+32 /* &rc */) - sessionAppendIdent(tls, bp+16 /* &buf */, zTab, bp+32 /* &rc */) - sessionAppendStr(tls, bp+16 /* &buf */, ts+32443 /* " WHERE " */, bp+32 /* &rc */) + sessionAppendStr(tls, bp+8 /* &buf */, ts+32428 /* "SELECT * FROM " */, bp+24 /* &rc */) + sessionAppendIdent(tls, bp+8 /* &buf */, zDb, bp+24 /* &rc */) + sessionAppendStr(tls, bp+8 /* &buf */, ts+768 /* "." */, bp+24 /* &rc */) + sessionAppendIdent(tls, bp+8 /* &buf */, zTab, bp+24 /* &rc */) + sessionAppendStr(tls, bp+8 /* &buf */, ts+32443 /* " WHERE " */, bp+24 /* &rc */) for i = 0; i < nCol; i++ { if *(*U8)(unsafe.Pointer(abPK + uintptr(i))) != 0 { - sessionAppendStr(tls, bp+16 /* &buf */, zSep, bp+32 /* &rc */) - sessionAppendIdent(tls, bp+16 /* &buf */, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+32 /* &rc */) - sessionAppendStr(tls, bp+16 /* &buf */, ts+32451 /* " IS ?" */, bp+32 /* &rc */) - sessionAppendInteger(tls, bp+16 /* &buf */, (i + 1), bp+32 /* &rc */) + sessionAppendStr(tls, bp+8 /* &buf */, zSep, bp+24 /* &rc */) + sessionAppendIdent(tls, bp+8 /* &buf */, *(*uintptr)(unsafe.Pointer(azCol + uintptr(i)*8)), bp+24 /* &rc */) + sessionAppendStr(tls, bp+8 /* &buf */, ts+32451 /* " IS ?" */, bp+24 /* &rc */) + sessionAppendInteger(tls, bp+8 /* &buf */, (i + 1), bp+24 /* &rc */) zSep = ts + 21256 /* " AND " */ } } - zSql = (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &buf */)).FaBuf - nSql = (*SessionBuffer)(unsafe.Pointer(bp + 16 /* &buf */)).FnBuf + zSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FaBuf + nSql = (*SessionBuffer)(unsafe.Pointer(bp + 8 /* &buf */)).FnBuf } - if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_prepare_v2(tls, db, zSql, nSql, ppStmt, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = Xsqlite3_prepare_v2(tls, db, zSql, nSql, ppStmt, uintptr(0)) } Xsqlite3_free(tls, zSql) - return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } // Bind the PRIMARY KEY values from the change passed in argument pChange @@ -214745,21 +214745,21 @@ func sessionRetryConstraints(tls *libc.TLS, db uintptr, bPatchset int32, zTab ui // conflict handler callback is invoked to resolve any conflicts encountered // while applying the change. func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uintptr, xConflict uintptr, pCtx uintptr, ppRebase uintptr, pnRebase uintptr, flags int32) int32 { /* sqlite3.c:211241:12: */ - bp := tls.Alloc(400) - defer tls.Free(400) + bp := tls.Alloc(368) + defer tls.Free(368) var schemaMismatch int32 = 0 var rc int32 = SQLITE_OK // Return code - *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)) = uintptr(0) // Name of current table + *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) = uintptr(0) // Name of current table var nTab int32 = 0 // Result of sqlite3Strlen30(zTab) - // var sApply SessionApplyCtx at bp+80, 128 + // var sApply SessionApplyCtx at bp+48, 128 // changeset_apply() context object var bPatchset int32 (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).Fin.FbNoDiscard = 1 - libc.Xmemset(tls, bp+80 /* &sApply */, 0, uint64(unsafe.Sizeof(SessionApplyCtx{}))) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbRebase = (U8(libc.Bool32((ppRebase != 0) && (pnRebase != 0)))) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETAPPLY_INVERT) != 0))) + libc.Xmemset(tls, bp+48 /* &sApply */, 0, uint64(unsafe.Sizeof(SessionApplyCtx{}))) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebase = (U8(libc.Bool32((ppRebase != 0) && (pnRebase != 0)))) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbInvertConstraints = libc.BoolInt32(!(!((flags & SQLITE_CHANGESETAPPLY_INVERT) != 0))) Xsqlite3_mutex_enter(tls, Xsqlite3_db_mutex(tls, db)) if (flags & SQLITE_CHANGESETAPPLY_NOSAVEPOINT) == 0 { rc = Xsqlite3_exec(tls, db, ts+32955 /* "SAVEPOINT change..." */, uintptr(0), uintptr(0), uintptr(0)) @@ -214768,99 +214768,99 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin rc = Xsqlite3_exec(tls, db, ts+32981 /* "PRAGMA defer_for..." */, uintptr(0), uintptr(0), uintptr(0)) } for (rc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3changeset_next(tls, pIter)) { - // var nCol int32 at bp+216, 4 + // var nCol int32 at bp+184, 4 - // var op int32 at bp+220, 4 + // var op int32 at bp+188, 4 - // var zNew uintptr at bp+208, 8 + // var zNew uintptr at bp+176, 8 - Xsqlite3changeset_op(tls, pIter, bp+208 /* &zNew */, bp+216 /* &nCol */, bp+220 /* &op */, uintptr(0)) + Xsqlite3changeset_op(tls, pIter, bp+176 /* &zNew */, bp+184 /* &nCol */, bp+188 /* &op */, uintptr(0)) - if (*(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)) == uintptr(0)) || (Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(bp + 208 /* zNew */)), *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), (nTab+1)) != 0) { - // var abPK uintptr at bp+224, 8 + if (*(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) == uintptr(0)) || (Xsqlite3_strnicmp(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)), *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (nTab+1)) != 0) { + // var abPK uintptr at bp+192, 8 rc = sessionRetryConstraints(tls, - db, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), bp+80 /* &sApply */, xConflict, pCtx) + db, (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */, xConflict, pCtx) if rc != SQLITE_OK { break } - sessionUpdateFree(tls, bp+80 /* &sApply */) - Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FazCol) // cast works around VC++ bug - Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FpDelete) - Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FpInsert) - Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FpSelect) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).Fdb = db - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FpDelete = uintptr(0) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FpInsert = uintptr(0) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FpSelect = uintptr(0) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FnCol = 0 - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FazCol = uintptr(0) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FabPK = uintptr(0) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbStat1 = 0 - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbDeferConstraints = 1 - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbRebaseStarted = U8(0) - libc.Xmemset(tls, (bp + 80 /* &sApply */ + 88 /* &.constraints */), 0, uint64(unsafe.Sizeof(SessionBuffer{}))) + sessionUpdateFree(tls, bp+48 /* &sApply */) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Fdb = db + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpDelete = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpInsert = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FpSelect = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = 0 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FazCol = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FabPK = uintptr(0) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 0 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbDeferConstraints = 1 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbRebaseStarted = U8(0) + libc.Xmemset(tls, (bp + 48 /* &sApply */ + 88 /* &.constraints */), 0, uint64(unsafe.Sizeof(SessionBuffer{}))) // If an xFilter() callback was specified, invoke it now. If the // xFilter callback returns zero, skip this table. If it returns // non-zero, proceed. - schemaMismatch = (libc.Bool32((xFilter != 0) && (0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&xFilter)))(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 208 /* zNew */)))))) + schemaMismatch = (libc.Bool32((xFilter != 0) && (0 == (*(*func(*libc.TLS, uintptr, uintptr) int32)(unsafe.Pointer(&xFilter)))(tls, pCtx, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)))))) if schemaMismatch != 0 { - *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 208 /* zNew */)))) - if *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)) == uintptr(0) { + *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)))) + if *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) == uintptr(0) { rc = SQLITE_NOMEM break } - nTab = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)))) - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FazCol = *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)) + nTab = int32(libc.Xstrlen(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FazCol = *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)) } else { var nMinCol int32 = 0 var i int32 - Xsqlite3changeset_pk(tls, pIter, bp+224 /* &abPK */, uintptr(0)) + Xsqlite3changeset_pk(tls, pIter, bp+192 /* &abPK */, uintptr(0)) rc = sessionTableInfo(tls, uintptr(0), - db, ts+6820 /* "main" */, *(*uintptr)(unsafe.Pointer(bp + 208 /* zNew */)), (bp + 80 /* &sApply */ + 32 /* &.nCol */), bp+232 /* &zTab */, (bp + 80 /* &sApply */ + 40 /* &.azCol */), (bp + 80 /* &sApply */ + 48 /* &.abPK */)) + db, ts+6820 /* "main" */, *(*uintptr)(unsafe.Pointer(bp + 176 /* zNew */)), (bp + 48 /* &sApply */ + 32 /* &.nCol */), bp+200 /* &zTab */, (bp + 48 /* &sApply */ + 40 /* &.azCol */), (bp + 48 /* &sApply */ + 48 /* &.abPK */)) if rc != SQLITE_OK { break } - for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FnCol; i++ { - if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FabPK + uintptr(i))) != 0 { + for i = 0; i < (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol; i++ { + if *(*U8)(unsafe.Pointer((*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FabPK + uintptr(i))) != 0 { nMinCol = (i + 1) } } - if (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FnCol == 0 { + if (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol == 0 { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33011 /* "sqlite3changeset..." */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)))) - } else if (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FnCol < *(*int32)(unsafe.Pointer(bp + 216 /* nCol */)) { + ts+33011 /* "sqlite3changeset..." */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) + } else if (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol < *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, ts+33055, /* "sqlite3changeset..." */ - libc.VaList(bp+32, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 216 /* nCol */)))) - } else if (*(*int32)(unsafe.Pointer(bp + 216 /* nCol */)) < nMinCol) || (libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 224 /* abPK */)), uint64(*(*int32)(unsafe.Pointer(bp + 216 /* nCol */)))) != 0) { + libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FnCol, *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) + } else if (*(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) < nMinCol) || (libc.Xmemcmp(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FabPK, *(*uintptr)(unsafe.Pointer(bp + 192 /* abPK */)), uint64(*(*int32)(unsafe.Pointer(bp + 184 /* nCol */)))) != 0) { schemaMismatch = 1 Xsqlite3_log(tls, SQLITE_SCHEMA, - ts+33126 /* "sqlite3changeset..." */, libc.VaList(bp+64, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)))) + ts+33126 /* "sqlite3changeset..." */, libc.VaList(bp+40, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)))) } else { - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 216 /* nCol */)) - if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), ts+11434 /* "sqlite_stat1" */) { - if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+80 /* &sApply */)) != 0 { + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FnCol = *(*int32)(unsafe.Pointer(bp + 184 /* nCol */)) + if 0 == Xsqlite3_stricmp(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), ts+11434 /* "sqlite_stat1" */) { + if libc.AssignInt32(&rc, sessionStat1Sql(tls, db, bp+48 /* &sApply */)) != 0 { break } - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbStat1 = 1 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 1 } else { - if ((libc.AssignInt32(&rc, sessionSelectRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), bp+80 /* &sApply */)) != 0) || - (libc.AssignInt32(&rc, sessionDeleteRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), bp+80 /* &sApply */)) != 0)) || - (libc.AssignInt32(&rc, sessionInsertRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), bp+80 /* &sApply */)) != 0) { + if ((libc.AssignInt32(&rc, sessionSelectRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */)) != 0) || + (libc.AssignInt32(&rc, sessionDeleteRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */)) != 0)) || + (libc.AssignInt32(&rc, sessionInsertRow(tls, db, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */)) != 0) { break } - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).FbStat1 = 0 + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).FbStat1 = 0 } } - nTab = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */))) + nTab = Xsqlite3Strlen30(tls, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */))) } } @@ -214870,7 +214870,7 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin continue } - rc = sessionApplyOneWithRetry(tls, db, pIter, bp+80 /* &sApply */, xConflict, pCtx) + rc = sessionApplyOneWithRetry(tls, db, pIter, bp+48 /* &sApply */, xConflict, pCtx) } bPatchset = (*Sqlite3_changeset_iter)(unsafe.Pointer(pIter)).FbPatchset @@ -214881,22 +214881,22 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } if rc == SQLITE_OK { - rc = sessionRetryConstraints(tls, db, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 232 /* zTab */)), bp+80 /* &sApply */, xConflict, pCtx) + rc = sessionRetryConstraints(tls, db, bPatchset, *(*uintptr)(unsafe.Pointer(bp + 200 /* zTab */)), bp+48 /* &sApply */, xConflict, pCtx) } if rc == SQLITE_OK { - // var nFk int32 at bp+240, 4 + // var nFk int32 at bp+208, 4 - // var notUsed int32 at bp+244, 4 + // var notUsed int32 at bp+212, 4 - Xsqlite3_db_status(tls, db, SQLITE_DBSTATUS_DEFERRED_FKS, bp+240 /* &nFk */, bp+244 /* ¬Used */, 0) - if *(*int32)(unsafe.Pointer(bp + 240 /* nFk */)) != 0 { + Xsqlite3_db_status(tls, db, SQLITE_DBSTATUS_DEFERRED_FKS, bp+208 /* &nFk */, bp+212 /* ¬Used */, 0) + if *(*int32)(unsafe.Pointer(bp + 208 /* nFk */)) != 0 { var res int32 = SQLITE_CHANGESET_ABORT - // var sIter Sqlite3_changeset_iter at bp+248, 152 + // var sIter Sqlite3_changeset_iter at bp+216, 152 - libc.Xmemset(tls, bp+248 /* &sIter */, 0, uint64(unsafe.Sizeof(Sqlite3_changeset_iter{}))) - (*Sqlite3_changeset_iter)(unsafe.Pointer(bp + 248 /* &sIter */)).FnCol = *(*int32)(unsafe.Pointer(bp + 240 /* nFk */)) - res = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xConflict)))(tls, pCtx, SQLITE_CHANGESET_FOREIGN_KEY, bp+248 /* &sIter */) + libc.Xmemset(tls, bp+216 /* &sIter */, 0, uint64(unsafe.Sizeof(Sqlite3_changeset_iter{}))) + (*Sqlite3_changeset_iter)(unsafe.Pointer(bp + 216 /* &sIter */)).FnCol = *(*int32)(unsafe.Pointer(bp + 208 /* nFk */)) + res = (*(*func(*libc.TLS, uintptr, int32, uintptr) int32)(unsafe.Pointer(&xConflict)))(tls, pCtx, SQLITE_CHANGESET_FOREIGN_KEY, bp+216 /* &sIter */) if res != SQLITE_CHANGESET_OMIT { rc = SQLITE_CONSTRAINT } @@ -214913,18 +214913,18 @@ func sessionChangesetApply(tls *libc.TLS, db uintptr, pIter uintptr, xFilter uin } } - if ((rc == SQLITE_OK) && (bPatchset == 0)) && ((*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FbRebase != 0) { - *(*uintptr)(unsafe.Pointer(ppRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).Frebase.FaBuf - *(*int32)(unsafe.Pointer(pnRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).Frebase.FnBuf - (*SessionApplyCtx)(unsafe.Pointer(bp + 80 /* &sApply */)).Frebase.FaBuf = uintptr(0) + if ((rc == SQLITE_OK) && (bPatchset == 0)) && ((*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FbRebase != 0) { + *(*uintptr)(unsafe.Pointer(ppRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf + *(*int32)(unsafe.Pointer(pnRebase)) = (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FnBuf + (*SessionApplyCtx)(unsafe.Pointer(bp + 48 /* &sApply */)).Frebase.FaBuf = uintptr(0) } - sessionUpdateFree(tls, bp+80 /* &sApply */) - Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FpInsert) - Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FpDelete) - Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FpSelect) - Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).FazCol) // cast works around VC++ bug - Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).Fconstraints.FaBuf) - Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+80 /* &sApply */)).Frebase.FaBuf) + sessionUpdateFree(tls, bp+48 /* &sApply */) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpInsert) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpDelete) + Xsqlite3_finalize(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FpSelect) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).FazCol) // cast works around VC++ bug + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).Fconstraints.FaBuf) + Xsqlite3_free(tls, (*SessionApplyCtx)(unsafe.Pointer(bp+48 /* &sApply */)).Frebase.FaBuf) Xsqlite3_mutex_leave(tls, Xsqlite3_db_mutex(tls, db)) return rc } @@ -216990,8 +216990,8 @@ func fts5yy_reduce(tls *libc.TLS, fts5yypParser uintptr, fts5yyruleno uint32, ft // The following code executes when a syntax error first occurs. func fts5yy_syntax_error(tls *libc.TLS, fts5yypParser uintptr, fts5yymajor int32, fts5yyminor Fts5Token) { /* sqlite3.c:215056:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pParse uintptr = (*Fts5yyParser)(unsafe.Pointer(fts5yypParser)).FpParse @@ -217263,8 +217263,8 @@ type HighlightContext = HighlightContext1 /* sqlite3.c:215457:33 */ // called, it is a no-op. If an error (i.e. an OOM condition) is encountered, // *pRc is set to an error code before returning. func fts5HighlightAppend(tls *libc.TLS, pRc uintptr, p uintptr, z uintptr, n int32) { /* sqlite3.c:215480:13: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) if (*(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK) && (z != 0) { if n < 0 { @@ -218554,19 +218554,19 @@ func fts5ConfigSetEnum(tls *libc.TLS, aEnum uintptr, zEnum uintptr, peVal uintpt // may be left in *pzErr. It is the responsibility of the caller to // eventually free any such error message using sqlite3_free(). func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCmd uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:216705:12: */ - bp := tls.Alloc(136) - defer tls.Free(136) + bp := tls.Alloc(112) + defer tls.Free(112) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK var nCmd int32 = int32(libc.Xstrlen(tls, zCmd)) if Xsqlite3_strnicmp(tls, ts+33455 /* "prefix" */, zCmd, nCmd) == 0 { var nByte int32 = (int32(uint64(unsafe.Sizeof(int32(0))) * uint64(FTS5_MAX_PREFIX_INDEXES))) var p uintptr var bFirst int32 = 1 if (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix == uintptr(0) { - (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, int64(nByte)) - if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) != 0 { - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FaPrefix = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, int64(nByte)) + if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != 0 { + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } } @@ -218587,14 +218587,14 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if (int32(*(*int8)(unsafe.Pointer(p))) < '0') || (int32(*(*int8)(unsafe.Pointer(p))) > '9') { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33462 /* "malformed prefix..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } if (*Fts5Config)(unsafe.Pointer(pConfig)).FnPrefix == FTS5_MAX_PREFIX_INDEXES { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33493 /* "too many prefix ..." */, libc.VaList(bp, FTS5_MAX_PREFIX_INDEXES)) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -218605,7 +218605,7 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm if (nPre <= 0) || (nPre >= 1000) { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33526 /* "prefix length ou..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR break } @@ -218614,20 +218614,20 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm bFirst = 0 } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } if Xsqlite3_strnicmp(tls, ts+33563 /* "tokenize" */, zCmd, nCmd) == 0 { var p uintptr = zArg var nArg Sqlite3_int64 = (Sqlite3_int64(libc.Xstrlen(tls, zArg) + uint64(1))) - var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, (int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nArg)))) - var pDel uintptr = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, (nArg * int64(2))) + var azArg uintptr = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, (int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64(nArg)))) + var pDel uintptr = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, (nArg * int64(2))) var pSpace uintptr = pDel if (azArg != 0) && (pSpace != 0) { if (*Fts5Config)(unsafe.Pointer(pConfig)).FpTok != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33572 /* "multiple tokeniz..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { for nArg = int64(0); (p != 0) && (*(*int8)(unsafe.Pointer(p)) != 0); nArg++ { var p2 uintptr = fts5ConfigSkipWhitespace(tls, p) @@ -218646,9 +218646,9 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm } if p == uintptr(0) { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33605 /* "parse error in t..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = sqlite3Fts5GetTokenizer(tls, pGlobal, azArg, int32(nArg), pConfig, pzErr) } @@ -218657,59 +218657,59 @@ func fts5ConfigParseSpecial(tls *libc.TLS, pGlobal uintptr, pConfig uintptr, zCm Xsqlite3_free(tls, azArg) Xsqlite3_free(tls, pDel) - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } if Xsqlite3_strnicmp(tls, ts+33639 /* "content" */, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33647 /* "multiple content..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if *(*int8)(unsafe.Pointer(zArg)) != 0 { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_EXTERNAL - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+64 /* &rc */, ts+33679 /* "%Q.%Q" */, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContent = sqlite3Fts5Mprintf(tls, bp+40 /* &rc */, ts+33679 /* "%Q.%Q" */, libc.VaList(bp+8, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, zArg)) } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FeContent = FTS5_CONTENT_NONE } } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } if Xsqlite3_strnicmp(tls, ts+33685 /* "content_rowid" */, zCmd, nCmd) == 0 { if (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33699 /* "multiple content..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { - (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+64 /* &rc */, zArg, -1) + (*Fts5Config)(unsafe.Pointer(pConfig)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, zArg, -1) } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } if Xsqlite3_strnicmp(tls, ts+33737 /* "columnsize" */, zCmd, nCmd) == 0 { if ((int32(*(*int8)(unsafe.Pointer(zArg))) != '0') && (int32(*(*int8)(unsafe.Pointer(zArg))) != '1')) || (int32(*(*int8)(unsafe.Pointer(zArg + 1))) != 0) { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33748 /* "malformed column..." */, 0) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { (*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize = (libc.Bool32(int32(*(*int8)(unsafe.Pointer(zArg))) == '1')) } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } if Xsqlite3_strnicmp(tls, ts+5551 /* "detail" */, zCmd, nCmd) == 0 { - *(*[4]Fts5Enum)(unsafe.Pointer(bp + 72 /* aDetail */)) = [4]Fts5Enum{ + *(*[4]Fts5Enum)(unsafe.Pointer(bp + 48 /* aDetail */)) = [4]Fts5Enum{ {FzName: ts + 17207 /* "none" */, FeVal: FTS5_DETAIL_NONE}, {FzName: ts + 17212 /* "full" */}, {FzName: ts + 33783 /* "columns" */, FeVal: FTS5_DETAIL_COLUMNS}, {}, } - if libc.AssignPtrInt32(bp+64 /* rc */, fts5ConfigSetEnum(tls, bp+72 /* &aDetail[0] */, zArg, (pConfig+92 /* &.eDetail */))) != 0 { + if libc.AssignPtrInt32(bp+40 /* rc */, fts5ConfigSetEnum(tls, bp+48 /* &aDetail[0] */, zArg, (pConfig+92 /* &.eDetail */))) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33791 /* "malformed detail..." */, 0) } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33822 /* "unrecognized opt..." */, libc.VaList(bp+40, nCmd, zCmd)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33822 /* "unrecognized opt..." */, libc.VaList(bp+24, nCmd, zCmd)) return SQLITE_ERROR } @@ -218769,8 +218769,8 @@ func fts5ConfigGobbleWord(tls *libc.TLS, pRc uintptr, zIn uintptr, pzOut uintptr } func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, pzErr uintptr) int32 { /* sqlite3.c:216929:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var rc int32 = SQLITE_OK if (0 == Xsqlite3_stricmp(tls, zCol, ts+21876 /* "rank" */)) || @@ -218781,7 +218781,7 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, if 0 == Xsqlite3_stricmp(tls, zArg, ts+33880 /* "unindexed" */) { *(*U8)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FabUnindexed + uintptr((*Fts5Config)(unsafe.Pointer(p)).FnCol))) = U8(1) } else { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33890 /* "unrecognized col..." */, libc.VaList(bp+16, zArg)) + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33890 /* "unrecognized col..." */, libc.VaList(bp+8, zArg)) rc = SQLITE_ERROR } } @@ -218792,26 +218792,26 @@ func fts5ConfigParseColumn(tls *libc.TLS, p uintptr, zCol uintptr, zArg uintptr, // Populate the Fts5Config.zContentExprlist string. func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:216957:12: */ - bp := tls.Alloc(72) - defer tls.Free(72) + bp := tls.Alloc(48) + defer tls.Free(48) var i int32 - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK - *(*Fts5Buffer)(unsafe.Pointer(bp + 56 /* buf */)) = Fts5Buffer{} + *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK + *(*Fts5Buffer)(unsafe.Pointer(bp + 32 /* buf */)) = Fts5Buffer{} - sqlite3Fts5BufferAppendPrintf(tls, bp+48 /* &rc */, bp+56 /* &buf */, ts+33921 /* "T.%Q" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+33921 /* "T.%Q" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(p)).FzContentRowid)) if (*Fts5Config)(unsafe.Pointer(p)).FeContent != FTS5_CONTENT_NONE { for i = 0; i < (*Fts5Config)(unsafe.Pointer(p)).FnCol; i++ { if (*Fts5Config)(unsafe.Pointer(p)).FeContent == FTS5_CONTENT_EXTERNAL { - sqlite3Fts5BufferAppendPrintf(tls, bp+48 /* &rc */, bp+56 /* &buf */, ts+33926 /* ", T.%Q" */, libc.VaList(bp+16, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) + sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+33926 /* ", T.%Q" */, libc.VaList(bp+8, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(p)).FazCol + uintptr(i)*8)))) } else { - sqlite3Fts5BufferAppendPrintf(tls, bp+48 /* &rc */, bp+56 /* &buf */, ts+33933 /* ", T.c%d" */, libc.VaList(bp+32, i)) + sqlite3Fts5BufferAppendPrintf(tls, bp+24 /* &rc */, bp+32 /* &buf */, ts+33933 /* ", T.c%d" */, libc.VaList(bp+16, i)) } } } - (*Fts5Config)(unsafe.Pointer(p)).FzContentExprlist = (*Fts5Buffer)(unsafe.Pointer(bp + 56 /* &buf */)).Fp - return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) + (*Fts5Config)(unsafe.Pointer(p)).FzContentExprlist = (*Fts5Buffer)(unsafe.Pointer(bp + 32 /* &buf */)).Fp + return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) } // Arguments nArg/azArg contain the string arguments passed to the xCreate @@ -218825,10 +218825,10 @@ func fts5ConfigMakeExprlist(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:21695 // *pzErr. It is the responsibility of the caller to eventually free any // such error message using sqlite3_free(). func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int32, azArg uintptr, ppOut uintptr, pzErr uintptr) int32 { /* sqlite3.c:216990:12: */ - bp := tls.Alloc(100) - defer tls.Free(100) + bp := tls.Alloc(76) + defer tls.Free(76) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK // Return code + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_OK // Return code var pRet uintptr // New object to return var i int32 var nByte Sqlite3_int64 @@ -218842,81 +218842,81 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int (*Fts5Config)(unsafe.Pointer(pRet)).FiCookie = -1 nByte = (Sqlite3_int64(uint64(nArg) * (uint64(unsafe.Sizeof(uintptr(0))) + uint64(unsafe.Sizeof(U8(0)))))) - (*Fts5Config)(unsafe.Pointer(pRet)).FazCol = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, nByte) + (*Fts5Config)(unsafe.Pointer(pRet)).FazCol = sqlite3Fts5MallocZero(tls, bp+40 /* &rc */, nByte) (*Fts5Config)(unsafe.Pointer(pRet)).FabUnindexed = func() uintptr { if (*Fts5Config)(unsafe.Pointer(pRet)).FazCol != 0 { return ((*Fts5Config)(unsafe.Pointer(pRet)).FazCol + uintptr(nArg)*8) } return uintptr(0) }() - (*Fts5Config)(unsafe.Pointer(pRet)).FzDb = sqlite3Fts5Strndup(tls, bp+64 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 1*8)), -1) - (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+64 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzDb = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 1*8)), -1) + (*Fts5Config)(unsafe.Pointer(pRet)).FzName = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, *(*uintptr)(unsafe.Pointer(azArg + 2*8)), -1) (*Fts5Config)(unsafe.Pointer(pRet)).FbColumnsize = 1 (*Fts5Config)(unsafe.Pointer(pRet)).FeDetail = FTS5_DETAIL_FULL - if (*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK) && (Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+21876 /* "rank" */) == 0) { + if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && (Xsqlite3_stricmp(tls, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, ts+21876 /* "rank" */) == 0) { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33941 /* "reserved fts5 ta..." */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pRet)).FzName)) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } - for i = 3; (*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK) && (i < nArg); i++ { + for i = 3; (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && (i < nArg); i++ { var zOrig uintptr = *(*uintptr)(unsafe.Pointer(azArg + uintptr(i)*8)) var z uintptr - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOne */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 88 /* zTwo */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)) = uintptr(0) var bOption int32 = 0 - *(*int32)(unsafe.Pointer(bp + 80 /* bMustBeCol */)) = 0 + *(*int32)(unsafe.Pointer(bp + 56 /* bMustBeCol */)) = 0 - z = fts5ConfigGobbleWord(tls, bp+64 /* &rc */, zOrig, bp+72 /* &zOne */, bp+80 /* &bMustBeCol */) + z = fts5ConfigGobbleWord(tls, bp+40 /* &rc */, zOrig, bp+48 /* &zOne */, bp+56 /* &bMustBeCol */) z = fts5ConfigSkipWhitespace(tls, z) if (z != 0) && (int32(*(*int8)(unsafe.Pointer(z))) == '=') { bOption = 1 z++ - if *(*int32)(unsafe.Pointer(bp + 80 /* bMustBeCol */)) != 0 { + if *(*int32)(unsafe.Pointer(bp + 56 /* bMustBeCol */)) != 0 { z = uintptr(0) } } z = fts5ConfigSkipWhitespace(tls, z) if (z != 0) && (*(*int8)(unsafe.Pointer(z)) != 0) { - // var bDummy int32 at bp+96, 4 + // var bDummy int32 at bp+72, 4 - z = fts5ConfigGobbleWord(tls, bp+64 /* &rc */, z, bp+88 /* &zTwo */, bp+96 /* &bDummy */) + z = fts5ConfigGobbleWord(tls, bp+40 /* &rc */, z, bp+64 /* &zTwo */, bp+72 /* &bDummy */) if (z != 0) && (*(*int8)(unsafe.Pointer(z)) != 0) { z = uintptr(0) } } - if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK { if z == uintptr(0) { - *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33970 /* "parse error in \"..." */, libc.VaList(bp+16, zOrig)) - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR + *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+33970 /* "parse error in \"..." */, libc.VaList(bp+8, zOrig)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = SQLITE_ERROR } else { if bOption != 0 { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = fts5ConfigParseSpecial(tls, pGlobal, pRet, *(*uintptr)(unsafe.Pointer(bp + 72 /* zOne */)), func() uintptr { - if *(*uintptr)(unsafe.Pointer(bp + 88 /* zTwo */)) != 0 { - return *(*uintptr)(unsafe.Pointer(bp + 88 /* zTwo */)) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigParseSpecial(tls, pGlobal, pRet, *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)), func() uintptr { + if *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)) != 0 { + return *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)) } return ts + 755 /* "" */ }(), pzErr) } else { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = fts5ConfigParseColumn(tls, pRet, *(*uintptr)(unsafe.Pointer(bp + 72 /* zOne */)), *(*uintptr)(unsafe.Pointer(bp + 88 /* zTwo */)), pzErr) - *(*uintptr)(unsafe.Pointer(bp + 72 /* zOne */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigParseColumn(tls, pRet, *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)), *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */)), pzErr) + *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */)) = uintptr(0) } } } - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* zOne */))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 88 /* zTwo */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 48 /* zOne */))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zTwo */))) } // If a tokenizer= option was successfully parsed, the tokenizer has // already been allocated. Otherwise, allocate an instance of the default // tokenizer (unicode61) now. - if (*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FpTok == uintptr(0)) { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = fts5ConfigDefaultTokenizer(tls, pGlobal, pRet) + if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FpTok == uintptr(0)) { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigDefaultTokenizer(tls, pGlobal, pRet) } // If no zContent option was specified, fill in the default values. - if (*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FzContent == uintptr(0)) { + if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FzContent == uintptr(0)) { var zTail uintptr = uintptr(0) if (*Fts5Config)(unsafe.Pointer(pRet)).FeContent == FTS5_CONTENT_NORMAL { @@ -218927,24 +218927,24 @@ func sqlite3Fts5ConfigParse(tls *libc.TLS, pGlobal uintptr, db uintptr, nArg int if zTail != 0 { (*Fts5Config)(unsafe.Pointer(pRet)).FzContent = sqlite3Fts5Mprintf(tls, - bp+64 /* &rc */, ts+33998 /* "%Q.'%q_%s'" */, libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) + bp+40 /* &rc */, ts+33998 /* "%Q.'%q_%s'" */, libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pRet)).FzDb, (*Fts5Config)(unsafe.Pointer(pRet)).FzName, zTail)) } } - if (*(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0)) { - (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+64 /* &rc */, ts+16125 /* "rowid" */, -1) + if (*(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid == uintptr(0)) { + (*Fts5Config)(unsafe.Pointer(pRet)).FzContentRowid = sqlite3Fts5Strndup(tls, bp+40 /* &rc */, ts+16125 /* "rowid" */, -1) } // Formulate the zContentExprlist text - if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = fts5ConfigMakeExprlist(tls, pRet) + if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) = fts5ConfigMakeExprlist(tls, pRet) } - if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) != SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) != SQLITE_OK { sqlite3Fts5ConfigFree(tls, pRet) *(*uintptr)(unsafe.Pointer(ppOut)) = uintptr(0) } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 40 /* rc */)) } // Free the configuration object passed as the only argument. @@ -218974,14 +218974,14 @@ func sqlite3Fts5ConfigFree(tls *libc.TLS, pConfig uintptr) { /* sqlite3.c:217109 // object passed as the only argument. Return SQLITE_OK if successful, or // an SQLite error code if an error occurs. func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:217136:12: */ - bp := tls.Alloc(68) - defer tls.Free(68) + bp := tls.Alloc(52) + defer tls.Free(52) var i int32 - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK var zSql uintptr - zSql = sqlite3Fts5Mprintf(tls, bp+64 /* &rc */, ts+34009 /* "CREATE TABLE x(" */, 0) + zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+34009 /* "CREATE TABLE x(" */, 0) for i = 0; (zSql != 0) && (i < (*Fts5Config)(unsafe.Pointer(pConfig)).FnCol); i++ { var zSep uintptr = func() uintptr { if i == 0 { @@ -218989,17 +218989,17 @@ func sqlite3Fts5ConfigDeclareVtab(tls *libc.TLS, pConfig uintptr) int32 { /* sql } return ts + 14691 /* ", " */ }() - zSql = sqlite3Fts5Mprintf(tls, bp+64 /* &rc */, ts+34025 /* "%z%s%Q" */, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) + zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+34025 /* "%z%s%Q" */, libc.VaList(bp, zSql, zSep, *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FazCol + uintptr(i)*8)))) } - zSql = sqlite3Fts5Mprintf(tls, bp+64 /* &rc */, ts+34032, /* "%z, %Q HIDDEN, %..." */ - libc.VaList(bp+32, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+21876 /* "rank" */)) + zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, ts+34032, /* "%z, %Q HIDDEN, %..." */ + libc.VaList(bp+24, zSql, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, ts+21876 /* "rank" */)) if zSql != 0 { - *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) + *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_declare_vtab(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql) Xsqlite3_free(tls, zSql) } - return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) } // Tokenize the text passed via the second and third arguments. @@ -219215,13 +219215,13 @@ func sqlite3Fts5ConfigSetValue(tls *libc.TLS, pConfig uintptr, zKey uintptr, pVa // Load the contents of the %_config table into memory. func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 { /* sqlite3.c:217381:12: */ - bp := tls.Alloc(68) - defer tls.Free(68) + bp := tls.Alloc(52) + defer tls.Free(52) var zSelect uintptr = ts + 34104 /* "SELECT k, v FROM..." */ var zSql uintptr - *(*uintptr)(unsafe.Pointer(bp + 56 /* p */)) = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK var iVersion int32 = 0 // Set default values @@ -219231,40 +219231,40 @@ func sqlite3Fts5ConfigLoad(tls *libc.TLS, pConfig uintptr, iCookie int32) int32 (*Fts5Config)(unsafe.Pointer(pConfig)).FnCrisisMerge = FTS5_DEFAULT_CRISISMERGE (*Fts5Config)(unsafe.Pointer(pConfig)).FnHashSize = (1024 * 1024) - zSql = sqlite3Fts5Mprintf(tls, bp+48 /* &rc */, zSelect, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + zSql = sqlite3Fts5Mprintf(tls, bp+32 /* &rc */, zSelect, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if zSql != 0 { - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+56 /* &p */, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+40 /* &p */, uintptr(0)) Xsqlite3_free(tls, zSql) } - if *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK { - for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* p */))) { - var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* p */)), 0) - var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* p */)), 1) + if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { + for SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */))) { + var zK uintptr = Xsqlite3_column_text(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 0) + var pVal uintptr = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */)), 1) if 0 == Xsqlite3_stricmp(tls, zK, ts+34136 /* "version" */) { iVersion = Xsqlite3_value_int(tls, pVal) } else { - *(*int32)(unsafe.Pointer(bp + 64 /* bDummy */)) = 0 - sqlite3Fts5ConfigSetValue(tls, pConfig, zK, pVal, bp+64 /* &bDummy */) + *(*int32)(unsafe.Pointer(bp + 48 /* bDummy */)) = 0 + sqlite3Fts5ConfigSetValue(tls, pConfig, zK, pVal, bp+48 /* &bDummy */) } } - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 56 /* p */))) + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* p */))) } - if (*(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK) && (iVersion != FTS5_CURRENT_VERSION) { - *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) = SQLITE_ERROR + if (*(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK) && (iVersion != FTS5_CURRENT_VERSION) { + *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR if (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg != 0 { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+34144, /* "invalid fts5 fil..." */ - libc.VaList(bp+24, iVersion, FTS5_CURRENT_VERSION)) + libc.VaList(bp+16, iVersion, FTS5_CURRENT_VERSION)) } } - if *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { (*Fts5Config)(unsafe.Pointer(pConfig)).FiCookie = iCookie } - return *(*int32)(unsafe.Pointer(bp + 48 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) } // 2014 May 31 @@ -219329,8 +219329,8 @@ func fts5ExprIsspace(tls *libc.TLS, t int8) int32 { /* sqlite3.c:217576:12: */ // Read the first token from the nul-terminated string at *pz. func fts5ExprGetToken(tls *libc.TLS, pParse uintptr, pz uintptr, pToken uintptr) int32 { /* sqlite3.c:217583:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var z uintptr = *(*uintptr)(unsafe.Pointer(pz)) var tok int32 @@ -221386,8 +221386,8 @@ func sqlite3Fts5ExprClonePhrase(tls *libc.TLS, pExpr uintptr, iPhrase int32, ppN // is expected. If token pTok does not contain "NEAR", store an error // in the pParse object. func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqlite3.c:219344:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if ((*Fts5Token)(unsafe.Pointer(pTok)).Fn != 4) || (libc.Xmemcmp(tls, ts+34267 /* "NEAR" */, (*Fts5Token)(unsafe.Pointer(pTok)).Fp, uint64(4)) != 0) { sqlite3Fts5ParseError(tls, @@ -221396,8 +221396,8 @@ func sqlite3Fts5ParseNear(tls *libc.TLS, pParse uintptr, pTok uintptr) { /* sqli } func sqlite3Fts5ParseSetDistance(tls *libc.TLS, pParse uintptr, pNear uintptr, p uintptr) { /* sqlite3.c:219352:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if pNear != 0 { var nNear int32 = 0 @@ -221487,8 +221487,8 @@ func sqlite3Fts5ParseColsetInvert(tls *libc.TLS, pParse uintptr, p uintptr) uint } func sqlite3Fts5ParseColset(tls *libc.TLS, pParse uintptr, pColset uintptr, p uintptr) uintptr { /* sqlite3.c:219451:19: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pRet uintptr = uintptr(0) var iCol int32 @@ -221722,8 +221722,8 @@ func fts5ParsePhraseToAnd(tls *libc.TLS, pParse uintptr, pNear uintptr) uintptr // Allocate and return a new expression object. If anything goes wrong (i.e. // OOM error), leave an error code in pParse and return NULL. func sqlite3Fts5ParseNode(tls *libc.TLS, pParse uintptr, eType int32, pLeft uintptr, pRight uintptr, pNear uintptr) uintptr { /* sqlite3.c:219698:21: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pRet uintptr = uintptr(0) @@ -223340,8 +223340,8 @@ func fts5IndexPrepareStmt(tls *libc.TLS, p uintptr, ppStmt uintptr, zSql uintptr // INSERT OR REPLACE a record into the %_data table. func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData int32) { /* sqlite3.c:221797:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { return @@ -223368,8 +223368,8 @@ func fts5DataWrite(tls *libc.TLS, p uintptr, iRowid I64, pData uintptr, nData in // // DELETE FROM %_data WHERE id BETWEEN $iFirst AND $iLast func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite3.c:221821:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Fts5Index)(unsafe.Pointer(p)).Frc != SQLITE_OK { return @@ -223393,8 +223393,8 @@ func fts5DataDelete(tls *libc.TLS, p uintptr, iFirst I64, iLast I64) { /* sqlite // Remove all records associated with segment iSegid. func fts5DataRemoveSegment(tls *libc.TLS, p uintptr, iSegid int32) { /* sqlite3.c:221842:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var iFirst I64 = (((((I64(iSegid)) << ((FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B) + FTS5_DATA_DLI_B)) + (I64((int64(0))) << (FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B))) + (I64((int64(0))) << (FTS5_DATA_PAGE_B))) + (int64(0))) var iLast I64 = ((((((I64(iSegid + 1)) << ((FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B) + FTS5_DATA_DLI_B)) + (I64((int64(0))) << (FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B))) + (I64((int64(0))) << (FTS5_DATA_PAGE_B))) + (int64(0))) - int64(1)) @@ -223602,8 +223602,8 @@ func fts5StructureReadUncached(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c: } func fts5IndexDataVersion(tls *libc.TLS, p uintptr) I64 { /* sqlite3.c:222059:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var iVersion I64 = int64(0) @@ -225038,8 +225038,8 @@ __31: } func fts5IdxSelectStmt(tls *libc.TLS, p uintptr) uintptr { /* sqlite3.c:223398:21: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) if (*Fts5Index)(unsafe.Pointer(p)).FpIdxSelect == uintptr(0) { var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig @@ -226623,8 +226623,8 @@ func fts5WriteFinish(tls *libc.TLS, p uintptr, pWriter uintptr, pnLeaf uintptr) } func fts5WriteInit(tls *libc.TLS, p uintptr, pWriter uintptr, iSegid int32) { /* sqlite3.c:225137:13: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var nBuffer int32 = ((*Fts5Config)(unsafe.Pointer((*Fts5Index)(unsafe.Pointer(p)).FpConfig)).Fpgsz + FTS5_DATA_PADDING) @@ -227871,36 +227871,36 @@ func sqlite3Fts5IndexReinit(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:22636 // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. func sqlite3Fts5IndexOpen(tls *libc.TLS, pConfig uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:226378:12: */ - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(12) + defer tls.Free(12) - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK var p uintptr // New object - *(*uintptr)(unsafe.Pointer(pp)) = libc.AssignUintptr(&p, sqlite3Fts5MallocZero(tls, bp+16 /* &rc */, int64(unsafe.Sizeof(Fts5Index{})))) - if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + *(*uintptr)(unsafe.Pointer(pp)) = libc.AssignUintptr(&p, sqlite3Fts5MallocZero(tls, bp+8 /* &rc */, int64(unsafe.Sizeof(Fts5Index{})))) + if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).FpConfig = pConfig (*Fts5Index)(unsafe.Pointer(p)).FnWorkUnit = FTS5_WORK_UNIT - (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+16 /* &rc */, ts+34721 /* "%s_data" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + (*Fts5Index)(unsafe.Pointer(p)).FzDataTbl = sqlite3Fts5Mprintf(tls, bp+8 /* &rc */, ts+34721 /* "%s_data" */, libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) if ((*Fts5Index)(unsafe.Pointer(p)).FzDataTbl != 0) && (bCreate != 0) { - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5CreateTable(tls, + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+24702 /* "data" */, ts+34729 /* "id INTEGER PRIMA..." */, 0, pzErr) - if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11574, /* "idx" */ + if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5CreateTable(tls, pConfig, ts+11574, /* "idx" */ ts+34764, /* "segid, term, pgn..." */ 1, pzErr) } - if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5IndexReinit(tls, p) + if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = sqlite3Fts5IndexReinit(tls, p) } } } - if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) != 0 { + if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) != 0 { sqlite3Fts5IndexClose(tls, p) *(*uintptr)(unsafe.Pointer(pp)) = uintptr(0) } - return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } // Close a handle opened by an earlier call to sqlite3Fts5IndexOpen(). @@ -228315,11 +228315,11 @@ func fts5IntegrityCheckPgidx(tls *libc.TLS, p uintptr, pLeaf uintptr) { /* sqlit } func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* sqlite3.c:227051:13: */ - bp := tls.Alloc(56) - defer tls.Free(56) + bp := tls.Alloc(48) + defer tls.Free(48) var pConfig uintptr = (*Fts5Index)(unsafe.Pointer(p)).FpConfig - *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) var rc2 int32 var iIdxPrevLeaf int32 = ((*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoFirst - 1) var iDlidxPrevLeaf int32 = (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FpgnoLast @@ -228328,20 +228328,20 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* return } - fts5IndexPrepareStmt(tls, p, bp+32 /* &pStmt */, Xsqlite3_mprintf(tls, + fts5IndexPrepareStmt(tls, p, bp+24 /* &pStmt */, Xsqlite3_mprintf(tls, ts+34808, /* "SELECT segid, te..." */ libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, (*Fts5StructureSegment)(unsafe.Pointer(pSeg)).FiSegid))) // Iterate through the b-tree hierarchy. - for ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)))) { + for ((*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK) && (SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)))) { var iRow I64 // Rowid for this leaf var pLeaf uintptr // Data for this leaf - var zIdxTerm uintptr = Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 1) - var nIdxTerm int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 1) - var iIdxLeaf int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 2) - var bIdxDlidx int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */)), 3) + var zIdxTerm uintptr = Xsqlite3_column_blob(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1) + var nIdxTerm int32 = Xsqlite3_column_bytes(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 1) + var iIdxLeaf int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 2) + var bIdxDlidx int32 = Xsqlite3_column_int(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), 3) // If the leaf in question has already been trimmed from the segment, // ignore this b-tree entry. Otherwise, load it into memory. @@ -228363,7 +228363,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* } else { var iOff int32 // Offset of first term on leaf var iRowidOff int32 // Offset of first rowid on leaf - // var nTerm int32 at bp+40, 4 + // var nTerm int32 at bp+32, 4 // Size of term on leaf in bytes var res int32 // Comparison of term and split-key @@ -228372,25 +228372,25 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* if (iRowidOff >= iOff) || (iOff >= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf) { (*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8)) } else { - iOff = iOff + (sqlite3Fts5GetVarint32(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + uintptr(iOff)), bp+40 /* &nTerm */)) + iOff = iOff + (sqlite3Fts5GetVarint32(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + uintptr(iOff)), bp+32 /* &nTerm */)) res = func() int32 { if (func() int32 { - if (*(*int32)(unsafe.Pointer(bp + 40 /* nTerm */))) < (nIdxTerm) { - return *(*int32)(unsafe.Pointer(bp + 40 /* nTerm */)) + if (*(*int32)(unsafe.Pointer(bp + 32 /* nTerm */))) < (nIdxTerm) { + return *(*int32)(unsafe.Pointer(bp + 32 /* nTerm */)) } return nIdxTerm }()) == 0 { return 0 } return libc.Xmemcmp(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + uintptr(iOff)), zIdxTerm, func() uint64 { - if (*(*int32)(unsafe.Pointer(bp + 40 /* nTerm */))) < (nIdxTerm) { - return uint64(*(*int32)(unsafe.Pointer(bp + 40 /* nTerm */))) + if (*(*int32)(unsafe.Pointer(bp + 32 /* nTerm */))) < (nIdxTerm) { + return uint64(*(*int32)(unsafe.Pointer(bp + 32 /* nTerm */))) } return uint64(nIdxTerm) }()) }() if res == 0 { - res = (*(*int32)(unsafe.Pointer(bp + 40 /* nTerm */)) - nIdxTerm) + res = (*(*int32)(unsafe.Pointer(bp + 32 /* nTerm */)) - nIdxTerm) } if res < 0 { (*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8)) @@ -228440,15 +228440,15 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* iKey = (((((I64(iSegid)) << ((FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B) + FTS5_DATA_DLI_B)) + (I64((int64(0))) << (FTS5_DATA_PAGE_B + FTS5_DATA_HEIGHT_B))) + (I64((int64(0))) << (FTS5_DATA_PAGE_B))) + (I64(iPrevLeaf))) pLeaf = fts5DataRead(tls, p, iKey) if pLeaf != 0 { - // var iRowid I64 at bp+48, 8 + // var iRowid I64 at bp+40, 8 var iRowidOff int32 = int32(fts5GetU16(tls, (*Fts5Data)(unsafe.Pointer(pLeaf)).Fp)) if iRowidOff >= (*Fts5Data)(unsafe.Pointer(pLeaf)).FszLeaf { (*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8)) } else { - sqlite3Fts5GetVarint(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + uintptr(iRowidOff)), bp+48 /* &iRowid */) - if *(*I64)(unsafe.Pointer(bp + 48 /* iRowid */)) != fts5DlidxIterRowid(tls, pDlidx) { + sqlite3Fts5GetVarint(tls, ((*Fts5Data)(unsafe.Pointer(pLeaf)).Fp + uintptr(iRowidOff)), bp+40 /* &iRowid */) + if *(*I64)(unsafe.Pointer(bp + 40 /* iRowid */)) != fts5DlidxIterRowid(tls, pDlidx) { (*Fts5Index)(unsafe.Pointer(p)).Frc = (SQLITE_CORRUPT | (int32(1) << 8)) } } @@ -228467,7 +228467,7 @@ func fts5IndexIntegrityCheckSegment(tls *libc.TLS, p uintptr, pSeg uintptr) { /* iIdxPrevLeaf = iIdxLeaf } - rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pStmt */))) + rc2 = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) if (*Fts5Index)(unsafe.Pointer(p)).Frc == SQLITE_OK { (*Fts5Index)(unsafe.Pointer(p)).Frc = rc2 } @@ -228931,8 +228931,8 @@ func fts5UsePatternMatch(tls *libc.TLS, pConfig uintptr, p uintptr) int32 { /* s // // Costs are not modified by the ORDER BY clause. func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* sqlite3.c:228337:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(16) + defer tls.Free(16) var pTab uintptr = pVTab var pConfig uintptr = (*Fts5Table)(unsafe.Pointer(pTab)).FpConfig @@ -229001,7 +229001,7 @@ func fts5BestIndexMethod(tls *libc.TLS, pVTab uintptr, pInfo uintptr) int32 { /* } return int8('G') }() - Xsqlite3_snprintf(tls, 6, (idxStr + uintptr(iIdxStr)), ts+5451 /* "%d" */, libc.VaList(bp+16, iCol)) + Xsqlite3_snprintf(tls, 6, (idxStr + uintptr(iIdxStr)), ts+5451 /* "%d" */, libc.VaList(bp+8, iCol)) idxStr += uintptr(libc.Xstrlen(tls, (idxStr + uintptr(iIdxStr)))) (*sqlite3_index_constraint_usage)(unsafe.Pointer((*Sqlite3_index_info)(unsafe.Pointer(pInfo)).FaConstraintUsage + uintptr(i)*8)).FargvIndex = libc.PreIncInt32(&iCons, 1) @@ -229300,15 +229300,15 @@ func fts5CursorReseek(tls *libc.TLS, pCsr uintptr, pbSkip uintptr) int32 { /* sq // even if we reach end-of-file. The fts5EofMethod() will be called // subsequently to determine whether or not an EOF was hit. func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:228688:12: */ - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(12) + defer tls.Free(12) var pCsr uintptr = pCursor var rc int32 if (*Fts5Cursor)(unsafe.Pointer(pCsr)).FePlan < 3 { - *(*int32)(unsafe.Pointer(bp + 16 /* bSkip */)) = 0 - if (libc.AssignInt32(&rc, fts5CursorReseek(tls, pCsr, bp+16 /* &bSkip */)) != 0) || (*(*int32)(unsafe.Pointer(bp + 16 /* bSkip */)) != 0) { + *(*int32)(unsafe.Pointer(bp + 8 /* bSkip */)) = 0 + if (libc.AssignInt32(&rc, fts5CursorReseek(tls, pCsr, bp+8 /* &bSkip */)) != 0) || (*(*int32)(unsafe.Pointer(bp + 8 /* bSkip */)) != 0) { return rc } rc = sqlite3Fts5ExprNext(tls, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpExpr, (*Fts5Cursor)(unsafe.Pointer(pCsr)).FiLastRowid) @@ -229359,10 +229359,10 @@ func fts5NextMethod(tls *libc.TLS, pCursor uintptr) int32 { /* sqlite3.c:228688: } func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt uintptr, va uintptr) int32 { /* sqlite3.c:228741:12: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) - *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) = uintptr(0) var rc int32 var zSql uintptr var ap Va_list @@ -229374,7 +229374,7 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u rc = SQLITE_NOMEM } else { rc = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, - uint32(SQLITE_PREPARE_PERSISTENT), bp+16 /* &pRet */, uintptr(0)) + uint32(SQLITE_PREPARE_PERSISTENT), bp+8 /* &pRet */, uintptr(0)) if rc != SQLITE_OK { *(*uintptr)(unsafe.Pointer((*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb))) } @@ -229382,13 +229382,13 @@ func fts5PrepareStatement(tls *libc.TLS, ppStmt uintptr, pConfig uintptr, zFmt u } _ = ap - *(*uintptr)(unsafe.Pointer(ppStmt)) = *(*uintptr)(unsafe.Pointer(bp + 16 /* pRet */)) + *(*uintptr)(unsafe.Pointer(ppStmt)) = *(*uintptr)(unsafe.Pointer(bp + 8 /* pRet */)) return rc } func fts5CursorFirstSorted(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int32 { /* sqlite3.c:228770:12: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(56) + defer tls.Free(56) var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var pSorter uintptr @@ -229469,8 +229469,8 @@ func fts5CursorFirst(tls *libc.TLS, pTab uintptr, pCsr uintptr, bDesc int32) int // the text passed to the MATCH operator are used as the special query // parameters. func fts5SpecialMatch(tls *libc.TLS, pTab uintptr, pCsr uintptr, zQuery uintptr) int32 { /* sqlite3.c:228839:12: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var rc int32 = SQLITE_OK // Return code var z uintptr = zQuery // Special query text @@ -229514,78 +229514,78 @@ func fts5FindAuxiliary(tls *libc.TLS, pTab uintptr, zName uintptr) uintptr { /* } func fts5FindRankFunction(tls *libc.TLS, pCsr uintptr) int32 { /* sqlite3.c:228886:12: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(32) + defer tls.Free(32) var pTab uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_OK + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK var pAux uintptr = uintptr(0) var zRank uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank var zRankArgs uintptr = (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs if zRankArgs != 0 { - var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+32 /* &rc */, ts+35036 /* "SELECT %s" */, libc.VaList(bp, zRankArgs)) + var zSql uintptr = sqlite3Fts5Mprintf(tls, bp+16 /* &rc */, ts+35036 /* "SELECT %s" */, libc.VaList(bp, zRankArgs)) if zSql != 0 { - *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, - uint32(SQLITE_PREPARE_PERSISTENT), bp+40 /* &pStmt */, uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_prepare_v3(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, + uint32(SQLITE_PREPARE_PERSISTENT), bp+24 /* &pStmt */, uintptr(0)) Xsqlite3_free(tls, zSql) - if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { - if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) { + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) { var nByte Sqlite3_int64 - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg = Xsqlite3_column_count(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) nByte = (Sqlite3_int64(uint64(unsafe.Sizeof(uintptr(0))) * uint64((*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg))) - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg = sqlite3Fts5MallocZero(tls, bp+32 /* &rc */, nByte) - if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg = sqlite3Fts5MallocZero(tls, bp+16 /* &rc */, nByte) + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { var i int32 for i = 0; i < (*Fts5Cursor)(unsafe.Pointer(pCsr)).FnRankArg; i++ { - *(*uintptr)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg + uintptr(i)*8)) = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)), i) + *(*uintptr)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).FapRankArg + uintptr(i)*8)) = Xsqlite3_column_value(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)), i) } } - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRankArgStmt = *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRankArgStmt = *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */)) } else { - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 40 /* pStmt */))) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pStmt */))) } } } } - if *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { pAux = fts5FindAuxiliary(tls, pTab, zRank) if pAux == uintptr(0) { - (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35046 /* "no such function..." */, libc.VaList(bp+16, zRank)) - *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) = SQLITE_ERROR + (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.Fbase.FzErrMsg = Xsqlite3_mprintf(tls, ts+35046 /* "no such function..." */, libc.VaList(bp+8, zRank)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } } (*Fts5Cursor)(unsafe.Pointer(pCsr)).FpRank = pAux - return *(*int32)(unsafe.Pointer(bp + 32 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } func fts5CursorParseRank(tls *libc.TLS, pConfig uintptr, pCsr uintptr, pRank uintptr) int32 { /* sqlite3.c:228937:12: */ - bp := tls.Alloc(32) - defer tls.Free(32) + bp := tls.Alloc(24) + defer tls.Free(24) var rc int32 = SQLITE_OK if pRank != 0 { var z uintptr = Xsqlite3_value_text(tls, pRank) - *(*uintptr)(unsafe.Pointer(bp + 16 /* zRank */)) = uintptr(0) - *(*uintptr)(unsafe.Pointer(bp + 24 /* zRankArgs */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* zRank */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 16 /* zRankArgs */)) = uintptr(0) if z == uintptr(0) { if Xsqlite3_value_type(tls, pRank) == SQLITE_NULL { rc = SQLITE_ERROR } } else { - rc = sqlite3Fts5ConfigParseRank(tls, z, bp+16 /* &zRank */, bp+24 /* &zRankArgs */) + rc = sqlite3Fts5ConfigParseRank(tls, z, bp+8 /* &zRank */, bp+16 /* &zRankArgs */) } if rc == SQLITE_OK { - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = *(*uintptr)(unsafe.Pointer(bp + 16 /* zRank */)) - (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = *(*uintptr)(unsafe.Pointer(bp + 24 /* zRankArgs */)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRank = *(*uintptr)(unsafe.Pointer(bp + 8 /* zRank */)) + (*Fts5Cursor)(unsafe.Pointer(pCsr)).FzRankArgs = *(*uintptr)(unsafe.Pointer(bp + 16 /* zRankArgs */)) *(*int32)(unsafe.Pointer(pCsr + 80 /* &.csrflags */)) |= (FTS5CSR_FREE_ZRANK) } else if rc == SQLITE_ERROR { (*Sqlite3_vtab)(unsafe.Pointer((*Fts5Cursor)(unsafe.Pointer(pCsr)).Fbase.FpVtab)).FzErrMsg = Xsqlite3_mprintf(tls, @@ -229623,8 +229623,8 @@ func fts5GetRowidLimit(tls *libc.TLS, pVal uintptr, iDefault I64) I64 { /* sqlit // 2. A by-rowid lookup. // 3. A full-table scan. func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintptr, nVal int32, apVal uintptr) int32 { /* sqlite3.c:228995:12: */ - bp := tls.Alloc(24) - defer tls.Free(24) + bp := tls.Alloc(16) + defer tls.Free(16) var pTab uintptr var pConfig uintptr @@ -229640,7 +229640,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp var pzErrmsg uintptr var i int32 var iIdxStr int32 - // var pExpr uintptr at bp+16, 8 + // var pExpr uintptr at bp+8, 8 var pzErr uintptr var zText uintptr @@ -229656,7 +229656,7 @@ func fts5FilterMethod(tls *libc.TLS, pCursor uintptr, idxNum int32, idxStr uintp pRowidGe = uintptr(0) pzErrmsg = (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg iIdxStr = 0 - *(*uintptr)(unsafe.Pointer(bp + 16 /* pExpr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */)) = uintptr(0) if !((*Fts5Config)(unsafe.Pointer(pConfig)).FbLock != 0) { goto __1 @@ -229735,12 +229735,12 @@ __17: goto __19 __18: pzErr = (pTab /* &.p */ /* &.base */ + 16 /* &.zErrMsg */) - rc = sqlite3Fts5ExprNew(tls, pConfig, 0, iCol, zText, bp+16 /* &pExpr */, pzErr) + rc = sqlite3Fts5ExprNew(tls, pConfig, 0, iCol, zText, bp+8 /* &pExpr */, pzErr) if !(rc == SQLITE_OK) { goto __20 } - rc = sqlite3Fts5ExprAnd(tls, (pCsr + 64 /* &.pExpr */), *(*uintptr)(unsafe.Pointer(bp + 16 /* pExpr */))) - *(*uintptr)(unsafe.Pointer(bp + 16 /* pExpr */)) = uintptr(0) + rc = sqlite3Fts5ExprAnd(tls, (pCsr + 64 /* &.pExpr */), *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */)) = uintptr(0) __20: ; if !(rc != SQLITE_OK) { @@ -229773,14 +229773,14 @@ __24: if !(zText1 != 0) { goto __25 } - rc = sqlite3Fts5ExprPattern(tls, pConfig, bGlob, iCol, zText1, bp+16 /* &pExpr */) + rc = sqlite3Fts5ExprPattern(tls, pConfig, bGlob, iCol, zText1, bp+8 /* &pExpr */) __25: ; if !(rc == SQLITE_OK) { goto __26 } - rc = sqlite3Fts5ExprAnd(tls, (pCsr + 64 /* &.pExpr */), *(*uintptr)(unsafe.Pointer(bp + 16 /* pExpr */))) - *(*uintptr)(unsafe.Pointer(bp + 16 /* pExpr */)) = uintptr(0) + rc = sqlite3Fts5ExprAnd(tls, (pCsr + 64 /* &.pExpr */), *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */))) + *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */)) = uintptr(0) __26: ; if !(rc != SQLITE_OK) { @@ -229935,7 +229935,7 @@ __32: ; filter_out: - sqlite3Fts5ExprFree(tls, *(*uintptr)(unsafe.Pointer(bp + 16 /* pExpr */))) + sqlite3Fts5ExprFree(tls, *(*uintptr)(unsafe.Pointer(bp + 8 /* pExpr */))) (*Fts5Config)(unsafe.Pointer(pConfig)).FpzErrmsg = pzErrmsg return rc } @@ -229998,8 +229998,8 @@ func fts5RowidMethod(tls *libc.TLS, pCursor uintptr, pRowid uintptr) int32 { /* // If argument bErrormsg is true and an error occurs, an error message may // be left in sqlite3_vtab.zErrMsg. func fts5SeekCursor(tls *libc.TLS, pCsr uintptr, bErrormsg int32) int32 { /* sqlite3.c:229244:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = SQLITE_OK @@ -230146,13 +230146,13 @@ func fts5StorageInsert(tls *libc.TLS, pRc uintptr, pTab uintptr, apVal uintptr, // 3. Values for each of the nCol matchable columns. // 4. Values for the two hidden columns (<tablename> and "rank"). func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, pRowid uintptr) int32 { /* sqlite3.c:229405:12: */ - bp := tls.Alloc(28) - defer tls.Free(28) + bp := tls.Alloc(20) + defer tls.Free(20) var pTab uintptr = pVtab var pConfig uintptr = (*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig var eType0 int32 // value_type() of apVal[0] - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_OK // Return code + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK // Return code // A transaction must be open when this is called. @@ -230168,9 +230168,9 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p var z uintptr = Xsqlite3_value_text(tls, *(*uintptr)(unsafe.Pointer(apVal + uintptr((2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol))*8))) if ((*Fts5Config)(unsafe.Pointer(pConfig)).FeContent != FTS5_CONTENT_NORMAL) && (0 == Xsqlite3_stricmp(tls, ts+17346 /* "delete" */, z)) { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialDelete(tls, pTab, apVal) } else { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(((2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)+1))*8))) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = fts5SpecialInsert(tls, pTab, z, *(*uintptr)(unsafe.Pointer(apVal + uintptr(((2+(*Fts5Config)(unsafe.Pointer(pConfig)).FnCol)+1))*8))) } } else { // A regular INSERT, UPDATE or DELETE statement. The trick here is that @@ -230199,51 +230199,51 @@ func fts5UpdateMethod(tls *libc.TLS, pVtab uintptr, nArg int32, apVal uintptr, p } return ts + 35350 /* "DELETE from" */ }(), (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR } else if nArg == 1 { var iDel I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) // Rowid to delete - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iDel, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iDel, uintptr(0)) } else { var eType1 int32 = Xsqlite3_value_numeric_type(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) if (eType1 != SQLITE_INTEGER) && (eType1 != SQLITE_NULL) { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = SQLITE_MISMATCH + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_MISMATCH } else if eType0 != SQLITE_INTEGER { // If this is a REPLACE, first remove the current entry (if any) if (eConflict == SQLITE_REPLACE) && (eType1 == SQLITE_INTEGER) { var iNew I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) // Rowid to delete - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) } - fts5StorageInsert(tls, bp+24 /* &rc */, pTab, apVal, pRowid) + fts5StorageInsert(tls, bp+16 /* &rc */, pTab, apVal, pRowid) } else { var iOld I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal))) // Old rowid var iNew I64 = Xsqlite3_value_int64(tls, *(*uintptr)(unsafe.Pointer(apVal + 1*8))) // New rowid if (eType1 == SQLITE_INTEGER) && (iOld != iNew) { if eConflict == SQLITE_REPLACE { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) - if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iNew, uintptr(0)) } - fts5StorageInsert(tls, bp+24 /* &rc */, pTab, apVal, pRowid) + fts5StorageInsert(tls, bp+16 /* &rc */, pTab, apVal, pRowid) } else { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, pRowid) - if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageContentInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, pRowid) + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) } - if *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) == SQLITE_OK { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageIndexInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, *(*Sqlite_int64)(unsafe.Pointer(pRowid))) + if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageIndexInsert(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, apVal, *(*Sqlite_int64)(unsafe.Pointer(pRowid))) } } } else { - *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) - fts5StorageInsert(tls, bp+24 /* &rc */, pTab, apVal, pRowid) + *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = sqlite3Fts5StorageDelete(tls, (*Fts5FullTable)(unsafe.Pointer(pTab)).FpStorage, iOld, uintptr(0)) + fts5StorageInsert(tls, bp+16 /* &rc */, pTab, apVal, pRowid) } } } } (*Fts5Config)(unsafe.Pointer((*Fts5FullTable)(unsafe.Pointer(pTab)).Fp.FpConfig)).FpzErrmsg = uintptr(0) - return *(*int32)(unsafe.Pointer(bp + 24 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) } // Implementation of xSync() method. @@ -230855,8 +230855,8 @@ func fts5CursorFromCsrid(tls *libc.TLS, pGlobal uintptr, iCsrId I64) uintptr { / } func fts5ApiCallback(tls *libc.TLS, context uintptr, argc int32, argv uintptr) { /* sqlite3.c:230147:13: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pAux uintptr var pCsr uintptr @@ -231157,8 +231157,8 @@ func fts5FindTokenizer(tls *libc.TLS, pApi uintptr, zName uintptr, ppUserData ui } func sqlite3Fts5GetTokenizer(tls *libc.TLS, pGlobal uintptr, azArg uintptr, nArg int32, pConfig uintptr, pzErr uintptr) int32 { /* sqlite3.c:230505:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var pMod uintptr var rc int32 = SQLITE_OK @@ -231367,8 +231367,8 @@ func Xsqlite3Fts5Init(tls *libc.TLS, db uintptr) int32 { /* sqlite3.c:230712:20: // Return SQLITE_OK if successful, or an SQLite error code if an error // occurs. func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, pzErrMsg uintptr) int32 { /* sqlite3.c:230770:12: */ - bp := tls.Alloc(264) - defer tls.Free(264) + bp := tls.Alloc(216) + defer tls.Free(216) var rc int32 = SQLITE_OK @@ -231376,7 +231376,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p // statements to operate on it. if *(*uintptr)(unsafe.Pointer((p + 40 /* &.aStmt */) + uintptr(eStmt)*8)) == uintptr(0) { - *(*[11]uintptr)(unsafe.Pointer(bp + 176 /* azStmt */)) = [11]uintptr{ + *(*[11]uintptr)(unsafe.Pointer(bp + 128 /* azStmt */)) = [11]uintptr{ ts + 35567, /* "SELECT %s FROM %..." */ ts + 35635, /* "SELECT %s FROM %..." */ ts + 35704, /* "SELECT %s FROM %..." */ // LOOKUP @@ -231397,7 +231397,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p switch eStmt { case FTS5_STMT_SCAN: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* &azStmt[0] */ + uintptr(eStmt)*8)), + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent)) break fallthrough @@ -231405,15 +231405,15 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p case FTS5_STMT_SCAN_ASC: fallthrough case FTS5_STMT_SCAN_DESC: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+24, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+16, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) break fallthrough case FTS5_STMT_LOOKUP: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* &azStmt[0] */ + uintptr(eStmt)*8)), - libc.VaList(bp+72, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*8)), + libc.VaList(bp+56, (*Fts5Config)(unsafe.Pointer(pC)).FzContentExprlist, (*Fts5Config)(unsafe.Pointer(pC)).FzContent, (*Fts5Config)(unsafe.Pointer(pC)).FzContentRowid)) break fallthrough @@ -231432,7 +231432,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p *(*int8)(unsafe.Pointer(zBind + uintptr(((i * 2) + 1)))) = int8(',') } *(*int8)(unsafe.Pointer(zBind + uintptr(((i * 2) - 1)))) = int8(0) - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+104, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName, zBind)) + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+80, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName, zBind)) Xsqlite3_free(tls, zBind) } break @@ -231441,7 +231441,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p fallthrough default: - zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 176 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+136, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName)) + zSql = Xsqlite3_mprintf(tls, *(*uintptr)(unsafe.Pointer(bp + 128 /* &azStmt[0] */ + uintptr(eStmt)*8)), libc.VaList(bp+104, (*Fts5Config)(unsafe.Pointer(pC)).FzDb, (*Fts5Config)(unsafe.Pointer(pC)).FzName)) break } @@ -231457,7 +231457,7 @@ func fts5StorageGetStmt(tls *libc.TLS, p uintptr, eStmt int32, ppStmt uintptr, p (*Fts5Config)(unsafe.Pointer((*Fts5Storage)(unsafe.Pointer(p)).FpConfig)).FbLock-- Xsqlite3_free(tls, zSql) if (rc != SQLITE_OK) && (pzErrMsg != 0) { - *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+160, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) + *(*uintptr)(unsafe.Pointer(pzErrMsg)) = Xsqlite3_mprintf(tls, ts+3630 /* "%s" */, libc.VaList(bp+120, Xsqlite3_errmsg(tls, (*Fts5Config)(unsafe.Pointer(pC)).Fdb))) } } } @@ -231490,8 +231490,8 @@ func fts5ExecPrintf(tls *libc.TLS, db uintptr, pzErr uintptr, zFormat uintptr, v // Drop all shadow tables. Return SQLITE_OK if successful or an SQLite error // code otherwise. func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:230901:12: */ - bp := tls.Alloc(104) - defer tls.Free(104) + bp := tls.Alloc(80) + defer tls.Free(80) var rc int32 = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), @@ -231502,19 +231502,19 @@ func sqlite3Fts5DropAll(tls *libc.TLS, pConfig uintptr) int32 { /* sqlite3.c:230 if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0) { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), ts+36144, /* "DROP TABLE IF EX..." */ - libc.VaList(bp+56, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FeContent == FTS5_CONTENT_NORMAL) { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), ts+36182, /* "DROP TABLE IF EX..." */ - libc.VaList(bp+80, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + libc.VaList(bp+64, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } return rc } func fts5StorageRenameOne(tls *libc.TLS, pConfig uintptr, pRc uintptr, zTail uintptr, zName uintptr) { /* sqlite3.c:230925:13: */ - bp := tls.Alloc(48) - defer tls.Free(48) + bp := tls.Alloc(40) + defer tls.Free(40) if *(*int32)(unsafe.Pointer(pRc)) == SQLITE_OK { *(*int32)(unsafe.Pointer(pRc)) = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), @@ -231545,13 +231545,13 @@ func sqlite3Fts5StorageRename(tls *libc.TLS, pStorage uintptr, zName uintptr) in // Create the shadow table named zPost, with definition zDefn. Return // SQLITE_OK if successful, or an SQLite error code otherwise. func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn uintptr, bWithout int32, pzErr uintptr) int32 { /* sqlite3.c:230959:12: */ - bp := tls.Alloc(88) - defer tls.Free(88) + bp := tls.Alloc(72) + defer tls.Free(72) var rc int32 - *(*uintptr)(unsafe.Pointer(bp + 80 /* zErr */)) = uintptr(0) + *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) = uintptr(0) - rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+80 /* &zErr */, ts+36262, /* "CREATE TABLE %Q...." */ + rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, bp+64 /* &zErr */, ts+36262, /* "CREATE TABLE %Q...." */ libc.VaList(bp, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, zDefn, func() uintptr { if bWithout != 0 { @@ -231559,11 +231559,11 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn } return ts + 755 /* "" */ }())) - if *(*uintptr)(unsafe.Pointer(bp + 80 /* zErr */)) != 0 { + if *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)) != 0 { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36292, /* "fts5: error crea..." */ - libc.VaList(bp+48, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 80 /* zErr */)))) - Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 80 /* zErr */))) + libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName, zPost, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */)))) + Xsqlite3_free(tls, *(*uintptr)(unsafe.Pointer(bp + 64 /* zErr */))) } return rc @@ -231575,8 +231575,8 @@ func sqlite3Fts5CreateTable(tls *libc.TLS, pConfig uintptr, zPost uintptr, zDefn // If successful, set *pp to point to the new object and return SQLITE_OK. // Otherwise, set *pp to NULL and return an SQLite error code. func sqlite3Fts5StorageOpen(tls *libc.TLS, pConfig uintptr, pIndex uintptr, bCreate int32, pp uintptr, pzErr uintptr) int32 { /* sqlite3.c:230994:12: */ - bp := tls.Alloc(16) - defer tls.Free(16) + bp := tls.Alloc(8) + defer tls.Free(8) var rc int32 = SQLITE_OK var p uintptr // New object @@ -231849,8 +231849,8 @@ func sqlite3Fts5StorageDelete(tls *libc.TLS, p uintptr, iDel I64, apVal uintptr) // Delete all entries in the FTS5 index. func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c:231282:12: */ - bp := tls.Alloc(64) - defer tls.Free(64) + bp := tls.Alloc(48) + defer tls.Free(48) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var rc int32 @@ -231866,7 +231866,7 @@ func sqlite3Fts5StorageDeleteAll(tls *libc.TLS, p uintptr) int32 { /* sqlite3.c: if (rc == SQLITE_OK) && ((*Fts5Config)(unsafe.Pointer(pConfig)).FbColumnsize != 0) { rc = fts5ExecPrintf(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, uintptr(0), ts+36464, /* "DELETE FROM %Q.'..." */ - libc.VaList(bp+40, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) + libc.VaList(bp+32, (*Fts5Config)(unsafe.Pointer(pConfig)).FzDb, (*Fts5Config)(unsafe.Pointer(pConfig)).FzName)) } // Reinitialize the %_data table. This call creates the initial structure @@ -232063,8 +232063,8 @@ func sqlite3Fts5StorageIndexInsert(tls *libc.TLS, p uintptr, apVal uintptr, iRow } func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) int32 { /* sqlite3.c:231488:12: */ - bp := tls.Alloc(40) - defer tls.Free(40) + bp := tls.Alloc(32) + defer tls.Free(32) var pConfig uintptr = (*Fts5Storage)(unsafe.Pointer(p)).FpConfig var zSql uintptr @@ -232075,13 +232075,13 @@ func fts5StorageCount(tls *libc.TLS, p uintptr, zSuffix uintptr, pnRow uintptr) if zSql == uintptr(0) { rc = SQLITE_NOMEM } else { - *(*uintptr)(unsafe.Pointer(bp + 32 /* pCnt */)) = uintptr(0) - rc = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+32 /* &pCnt */, uintptr(0)) + *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */)) = uintptr(0) + rc = Xsqlite3_prepare_v2(tls, (*Fts5Config)(unsafe.Pointer(pConfig)).Fdb, zSql, -1, bp+24 /* &pCnt */, uintptr(0)) if rc == SQLITE_OK { - if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pCnt */))) { - *(*I64)(unsafe.Pointer(pnRow)) = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pCnt */)), 0) + if SQLITE_ROW == Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */))) { + *(*I64)(unsafe.Pointer(pnRow)) = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */)), 0) } - rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 32 /* pCnt */))) + rc = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 24 /* pCnt */))) } } @@ -235358,12 +235358,12 @@ type Fts5VocabCursor = Fts5VocabCursor1 /* sqlite3.c:234462:32 */ // value and return SQLITE_OK. Otherwise, set *pzErr to an error message // and return SQLITE_ERROR. func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uintptr) int32 { /* sqlite3.c:234521:12: */ - bp := tls.Alloc(20) - defer tls.Free(20) + bp := tls.Alloc(12) + defer tls.Free(12) - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_OK - var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+16 /* &rc */, zType, -1) - if *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_OK + var zCopy uintptr = sqlite3Fts5Strndup(tls, bp+8 /* &rc */, zType, -1) + if *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) == SQLITE_OK { sqlite3Fts5Dequote(tls, zCopy) if Xsqlite3_stricmp(tls, zCopy, ts+36910 /* "col" */) == 0 { *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_COL @@ -235373,12 +235373,12 @@ func fts5VocabTableType(tls *libc.TLS, zType uintptr, pzErr uintptr, peType uint *(*int32)(unsafe.Pointer(peType)) = FTS5_VOCAB_INSTANCE } else { *(*uintptr)(unsafe.Pointer(pzErr)) = Xsqlite3_mprintf(tls, ts+36927 /* "fts5vocab: unkno..." */, libc.VaList(bp, zCopy)) - *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) = SQLITE_ERROR + *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) = SQLITE_ERROR } Xsqlite3_free(tls, zCopy) } - return *(*int32)(unsafe.Pointer(bp + 16 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 8 /* rc */)) } // The xDisconnect() virtual table method. @@ -235571,14 +235571,14 @@ func fts5VocabBestIndexMethod(tls *libc.TLS, pUnused uintptr, pInfo uintptr) int // Implementation of xOpen method. func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* sqlite3.c:234743:12: */ - bp := tls.Alloc(104) - defer tls.Free(104) + bp := tls.Alloc(80) + defer tls.Free(80) var pTab uintptr = pVTab var pFts5 uintptr = uintptr(0) var pCsr uintptr = uintptr(0) - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_OK - *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)) = uintptr(0) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK + *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) var zSql uintptr = uintptr(0) if (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy != 0 { @@ -235586,55 +235586,55 @@ func fts5VocabOpenMethod(tls *libc.TLS, pVTab uintptr, ppCsr uintptr) int32 { /* ts+37112 /* "recursive defini..." */, libc.VaList(bp, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) return SQLITE_ERROR } - zSql = sqlite3Fts5Mprintf(tls, bp+88, /* &rc */ + zSql = sqlite3Fts5Mprintf(tls, bp+64, /* &rc */ ts+37143, /* "SELECT t.%Q FROM..." */ - libc.VaList(bp+24, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + libc.VaList(bp+16, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) if zSql != 0 { - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+96 /* &pStmt */, uintptr(0)) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_prepare_v2(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).Fdb, zSql, -1, bp+72 /* &pStmt */, uintptr(0)) } Xsqlite3_free(tls, zSql) - if *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == SQLITE_ERROR { - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_OK + if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_ERROR { + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_OK } (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy = uint32(1) - if (*(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)) != 0) && (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))) == SQLITE_ROW) { - var iId I64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)), 0) + if (*(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) != 0) && (Xsqlite3_step(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) == SQLITE_ROW) { + var iId I64 = Xsqlite3_column_int64(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)), 0) pFts5 = sqlite3Fts5TableFromCsrid(tls, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FpGlobal, iId) } (*Fts5VocabTable)(unsafe.Pointer(pTab)).FbBusy = uint32(0) - if *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK { if pFts5 == uintptr(0) { - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))) - *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)) = uintptr(0) - if *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == SQLITE_OK { + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) + *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) = uintptr(0) + if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK { (*Sqlite3_vtab)(unsafe.Pointer(pVTab)).FzErrMsg = Xsqlite3_mprintf(tls, - ts+37194 /* "no such fts5 tab..." */, libc.VaList(bp+64, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = SQLITE_ERROR + ts+37194 /* "no such fts5 tab..." */, libc.VaList(bp+48, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Db, (*Fts5VocabTable)(unsafe.Pointer(pTab)).FzFts5Tbl)) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = SQLITE_ERROR } } else { - *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) = sqlite3Fts5FlushToDisk(tls, pFts5) + *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) = sqlite3Fts5FlushToDisk(tls, pFts5) } } - if *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) == SQLITE_OK { + if *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) == SQLITE_OK { var nByte int32 = (int32(((uint64((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pFts5)).FpConfig)).FnCol) * uint64(unsafe.Sizeof(I64(0)))) * uint64(2)) + uint64(unsafe.Sizeof(Fts5VocabCursor{})))) - pCsr = sqlite3Fts5MallocZero(tls, bp+88 /* &rc */, int64(nByte)) + pCsr = sqlite3Fts5MallocZero(tls, bp+64 /* &rc */, int64(nByte)) } if pCsr != 0 { (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpFts5 = pFts5 - (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */)) + (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FpStmt = *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */)) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt = (pCsr + 1*120) (*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaDoc = ((*Fts5VocabCursor)(unsafe.Pointer(pCsr)).FaCnt + uintptr((*Fts5Config)(unsafe.Pointer((*Fts5Table)(unsafe.Pointer(pFts5)).FpConfig)).FnCol)*8) } else { - Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 96 /* pStmt */))) + Xsqlite3_finalize(tls, *(*uintptr)(unsafe.Pointer(bp + 72 /* pStmt */))) } *(*uintptr)(unsafe.Pointer(ppCsr)) = pCsr - return *(*int32)(unsafe.Pointer(bp + 88 /* rc */)) + return *(*int32)(unsafe.Pointer(bp + 64 /* rc */)) } func fts5VocabResetCursor(tls *libc.TLS, pCsr uintptr) { /* sqlite3.c:234811:13: */ |