1. 13 Feb, 2018 2 commits
    • Kirill Smelkov's avatar
      X neonet: polish a bit · 8052ef1f
      Kirill Smelkov authored
      8052ef1f
    • Kirill Smelkov's avatar
      X Goodbye neotools · a440d090
      Kirill Smelkov authored
      zodbtools provide additional service over zodb (various dumping
      routines), but neotools just invokes neo.NewMaster and neo.NewStorage.
      
      For a possible future `neo monitor` maybe bringing neotools back would
      be needed, but for now there is simply no reason to keep them around.
      a440d090
  2. 12 Feb, 2018 5 commits
  3. 09 Feb, 2018 6 commits
  4. 08 Feb, 2018 3 commits
  5. 07 Feb, 2018 1 commit
  6. 06 Feb, 2018 5 commits
  7. 05 Feb, 2018 3 commits
  8. 02 Feb, 2018 5 commits
  9. 01 Feb, 2018 2 commits
  10. 25 Jan, 2018 2 commits
  11. 24 Jan, 2018 4 commits
    • Kirill Smelkov's avatar
      X neo/protogen/decode: Help compiler to elmiminate bounds checks by explicitly specifying :hi · de3ef2c0
      Kirill Smelkov authored
      See https://github.com/golang/go/issues/19126#issuecomment-358743715.
      
      Examples:
      
      		before										after
      
      TEXT ·(*GetObject).neoMsgDecode(SB), NOSPLIT, $8-56 // zproto-marshal.go:1914   │TEXT ·(*GetObject).neoMsgDecode(SB), NOSPLIT, $0-56 // zproto-marshal.go:1914
              // SUBQ    $8, SP                                                       │        NO_LOCAL_POINTERS
              // MOVQ    BP, (SP) (BP save)                                           │        // FUNCDATA $0, gclocals·846769608458630ae82546dab39e913e(SB) (args)
              // LEAQ    (SP), BP (BP init)                                           │        // FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) (no locals)
              // FUNCDATA $0, gclocals·21e863e2261befa92f8534560680bbb6(SB) (args)    │        MOVQ       data+24(SP), AX
              FUNCDATA   $1, gclocals·69c1753bd5f81501d95132d08af04464(SB) (locals)   │        CMPQ       AX, $24                        // zproto-marshal.go:1915
              MOVQ       data+32(SP), AX                                              │        JGE        pc45
              CMPQ       AX, $24                      // zproto-marshal.go:1915       │        MOVQ       ·ErrDecodeOverflow+8(SB), AX  // zproto-marshal.go:1924
              JLT        pc163                                                        │        MOVQ       ·ErrDecodeOverflow(SB), CX
              MOVQ       data+24(SP), CX                                              │        MOVQ       $0, _r1+40(SP)
              MOVQ       (CX), DX                     // zproto-marshal.go:1918       │        MOVQ       CX, _r2+48(SP)
              BSWAPQ     DX                                                           │        MOVQ       AX, _r2+56(SP)
              MOVQ       p+16(SP), BX                                                 │        RET
              MOVQ       DX, (BX)                                                     │pc45:
              LEAQ       -8(AX), DX                   // zproto-marshal.go:1919       │        MOVQ       data+16(SP), AX
              MOVQ       data+40(SP), SI                                              │        MOVQ       (AX), CX                       // zproto-marshal.go:1918
              LEAQ       -8(SI), DI                                                   │        BSWAPQ     CX
              NEGQ       DI                                                           │        MOVQ       p+8(SP), DX
              SARQ       $63, DI                                                      │        MOVQ       CX, (DX)
              ANDQ       $8, DI                                                       │        MOVQ       8(AX), CX                      // zproto-marshal.go:1919
              CMPQ       DX, $7                                                       │        BSWAPQ     CX
              JLS        pc212                                                        │        MOVQ       CX, 8(DX)
              MOVQ       (CX)(DI*1), DX                                               │        MOVQ       16(AX), AX                     // zproto-marshal.go:1920
              BSWAPQ     DX                                                           │        BSWAPQ     AX
              MOVQ       DX, 8(BX)                                                    │        MOVQ       AX, 16(DX)
              LEAQ       -16(SI), DX                  // zproto-marshal.go:1920       │        MOVQ       $24, _r1+40(SP)                // zproto-marshal.go:1921
              NEGQ       DX                                                           │        MOVQ       $0, _r2+48(SP)
              ADDQ       $-16, AX                                                     │        MOVQ       $0, _r2+56(SP)
              SARQ       $63, DX                                                      │        RET
              ANDQ       $16, DX                                                      │
              CMPQ       AX, $7                                                       │
              JLS        pc205                                                        │
              MOVQ       (CX)(DX*1), AX                                               │
              BSWAPQ     AX                                                           │
              MOVQ       AX, 16(BX)                                                   │
              MOVQ       $24, _r1+48(SP)              // zproto-marshal.go:1921       │
              MOVQ       $0, _r2+56(SP)                                               │
              MOVQ       $0, _r2+64(SP)                                               │
              // MOVQ    (SP), BP (BP restore)                                        │
              // ADDQ    $8, SP (SP restore)                                          │
              RET                                                                     │
      pc163:                                                                          │
              MOVQ       ·ErrDecodeOverflow(SB), AX  // zproto-marshal.go:1924        │
              MOVQ       ·ErrDecodeOverflow+8(SB), CX                                 │
              MOVQ       $0, _r1+48(SP)                                               │
              MOVQ       AX, _r2+56(SP)                                               │
              MOVQ       CX, _r2+64(SP)                                               │
              // MOVQ    (SP), BP (BP restore)                                        │
              // ADDQ    $8, SP (SP restore)                                          │
              RET                                                                     │
      pc205:                                                                          │
              PCDATA     $0, $1                       // zproto-marshal.go:1920       │
              CALL       runtime.panicindex(SB)                                       │
              UNDEF                                                                   │
      pc212:                                                                          │
              PCDATA     $0, $1                       // zproto-marshal.go:1919       │
              CALL       runtime.panicindex(SB)                                       │
              UNDEF                                                                   │
      de3ef2c0
    • Kirill Smelkov's avatar
      X neo/protogen/decode: Don't cast len(data) to uint64 if we know it will be compared to constan · 0f7e0b00
      Kirill Smelkov authored
      Improves signal/noise ratio in generated decoder.
      0f7e0b00
    • Kirill Smelkov's avatar
      X neo/protogen: Catch length checks overflows on decode · c884bfd5
      Kirill Smelkov authored
      For example a list is encoded as
      
      	l        u32
      	[l]item  itemType
      
      on decode len is read from data stream and for rest of data len(data) is
      checked to be < l*sizeof(item).
      
      However since l is u32 and sizeof(item) is just number the result of `l
      * sizeof(item)` has also u32 type. However it could overflow e.g. for
      
      	l		= 0x20000000
      	sizeof(item)	= 8
      
      with the l*sizeof(item) being = u32(0)	(exactly zero) -> oops.
      
      Avoid the problem by doing all checking arithmetics with u64 ints.
      c884bfd5
    • Kirill Smelkov's avatar
      . · d7c9395b
      Kirill Smelkov authored
      d7c9395b
  12. 23 Jan, 2018 2 commits
    • Kirill Smelkov's avatar
      . · 6c35f692
      Kirill Smelkov authored
      6c35f692
    • Kirill Smelkov's avatar
      Merge remote-tracking branch 'origin/master' into t · d228eacd
      Kirill Smelkov authored
      * origin/master:
        client: kill .supportsTransactionalUndo()
        client: for read accesses, pick a random good node, connected or not
        storage: optimize storage layout of raw data for replication
        sqlite: remove useless AUTOINCREMENT for data.id (reuse of deleted ids is fine)
        storage: speed up reads by indexing 'obj' primarily by 'oid' (instead of 'tid')
        storage: pass schema of tables to migration methods
        storage: update backend version between each migration step
      d228eacd