+ batteryOp{kind: "create", path: "internal/reader/gatemut_jason.go", content: "package reader\n\nimport \"github.com/firehol/iprange/v4/go/internal/tree\"\n\ntype cbSig = func(src, output []byte) error\n\n// J1: any-hosting field, type-assert callee, owned buffers.\ntype liarJ1 struct{ cb any }\n\nfunc (s *liarJ1) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ1) PageLimit() uint64 { return 0 }\nfunc (s *liarJ1) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ1) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ1) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ1) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ1) CopyPage(source, destination uint32, fn cbSig) error {\n\ts.cb = fn\n\tout := make([]byte, 4096)\n\treturn s.cb.(cbSig)(out, out)\n}\n\n// J2: array slot holder, owned buffers.\ntype liarJ2 struct{}\n\nfunc (s *liarJ2) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ2) PageLimit() uint64 { return 0 }\nfunc (s *liarJ2) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ2) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ2) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ2) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ2) CopyPage(source, destination uint32, fn cbSig) error {\n\tvar arr [1]cbSig\n\tarr[0] = fn\n\tout := make([]byte, 4096)\n\treturn arr[0](out, out)\n}\n\n// J3: map slot holder, owned buffers.\ntype liarJ3 struct{}\n\nfunc (s *liarJ3) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ3) PageLimit() uint64 { return 0 }\nfunc (s *liarJ3) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ3) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ3) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ3) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ3) CopyPage(source, destination uint32, fn cbSig) error {\n\tm := map[string]cbSig{}\n\tm[\"cb\"] = fn\n\tout := make([]byte, 4096)\n\treturn m[\"cb\"](out, out)\n}\n\n// J4: assertion alias of a field holder, owned buffers.\ntype liarJ4 struct{ cb any }\n\nfunc (s *liarJ4) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ4) PageLimit() uint64 { return 0 }\nfunc (s *liarJ4) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ4) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ4) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ4) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ4) CopyPage(source, destination uint32, fn cbSig) error {\n\ts.cb = fn\n\tf := s.cb.(cbSig)\n\tout := make([]byte, 4096)\n\treturn f(out, out)\n}\n\n// J5: slice-literal element holder, owned buffers.\ntype liarJ5 struct{}\n\nfunc (s *liarJ5) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ5) PageLimit() uint64 { return 0 }\nfunc (s *liarJ5) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ5) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ5) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ5) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ5) CopyPage(source, destination uint32, fn cbSig) error {\n\ths := []cbSig{fn}\n\tout := make([]byte, 4096)\n\treturn hs[0](out, out)\n}\n\n// J6: struct slice-field element holder, owned buffers.\ntype liarJ6 struct{ hs []cbSig }\n\nfunc (s *liarJ6) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ6) PageLimit() uint64 { return 0 }\nfunc (s *liarJ6) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ6) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ6) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ6) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ6) CopyPage(source, destination uint32, fn cbSig) error {\n\ts.hs = []cbSig{fn}\n\tout := make([]byte, 4096)\n\treturn s.hs[0](out, out)\n}\n\n// J7: identity-return wrapper roundtrip, owned buffers.\ntype liarJ7 struct{ cb any }\n\nfunc (s *liarJ7) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ7) PageLimit() uint64 { return 0 }\nfunc (s *liarJ7) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ7) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ7) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ7) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ7) CopyPage(source, destination uint32, fn cbSig) error {\n\ts.cb = fn\n\tout := make([]byte, 4096)\n\tcast := func(sig cbSig) cbSig { return sig }\n\treturn cast(s.cb.(cbSig))(out, out)\n}\n\n// J8: box-assertion alias forwarded to a helper, owned buffers.\ntype liarJ8 struct{}\n\nfunc (s *liarJ8) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ8) PageLimit() uint64 { return 0 }\nfunc (s *liarJ8) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ8) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ8) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ8) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ8) CopyPage(source, destination uint32, fn cbSig) error {\n\tvar box any = fn\n\tf := box.(cbSig)\n\tout := make([]byte, 4096)\n\treturn runJ311(f, out, out)\n}\n\n// J9: field-assertion alias forwarded to a helper, owned buffers.\ntype liarJ9 struct{ cb any }\n\nfunc (s *liarJ9) TargetTxn() uint64 { return 0 }\nfunc (s *liarJ9) PageLimit() uint64 { return 0 }\nfunc (s *liarJ9) Inspect(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ9) Allocate() (uint32, error) { return 0, nil }\nfunc (s *liarJ9) DiscardPrivate(uint32) error { return nil }\nfunc (s *liarJ9) Update(uint32, func([]byte) error) error { return nil }\nfunc (s *liarJ9) CopyPage(source, destination uint32, fn cbSig) error {\n\ts.cb = fn\n\tf := s.cb.(cbSig)\n\tout := make([]byte, 4096)\n\treturn runJ311(f, out, out)\n}\n\nfunc runJ311(fn cbSig, a, b []byte) error { return fn(a, b) }\n\nfunc liarProbeJ311(page []byte) error {\n\tvar st1 tree.Store = &liarJ1{}\n\tvar st2 tree.Store = &liarJ2{}\n\tvar st3 tree.Store = &liarJ3{}\n\tvar st4 tree.Store = &liarJ4{}\n\tvar st5 tree.Store = &liarJ5{}\n\tvar st6 tree.Store = &liarJ6{}\n\tvar st7 tree.Store = &liarJ7{}\n\tvar st8 tree.Store = &liarJ8{}\n\tvar st9 tree.Store = &liarJ9{}\n\t_ = st1.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st2.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st3.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st4.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st5.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st6.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st7.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\t_ = st8.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n\treturn st9.CopyPage(0, 1, func(src, output []byte) error { copy(output, page); return nil })\n}\n"},
0 commit comments