Skip to content

ICE: computeRecSizeAux() #1090

@BitPuffin

Description

@BitPuffin

Was just sort of roughing out the structure and API of my new session store with this code:

import times

type
  PSessionStore* = ref TSessionStore
  TSessionStore = object
    sessionsExpireAfter: TTimeInterval
    substores: seq[PSubStore]
  PSubStore = ref TSubStore
  TSubStore = object
    sessions: PSessionTree
    thread: TThread
  PSessionTree = ref TSessionTree
  TSessionTree = object
    size: int
    root: PSession
  PSession = ref TSession
  TSession = object
    id*: string
    createdAt*: TTime
    parent: PSession
    left: PSession
    right: PSession

const defaultTimeInterval = initTimeInterval(days = 7)

proc newSessionStore*(sessionsExpireAfter = defaultTimeInterval, threadcount = 4): PSessionStore
proc genSession*(store: PSessionStore): PSession
proc `[]`*(sessionId: string): PSession
proc containsSession*(store: PSessionStore, session: PSession): bool
proc containsSession*(store: PSessionStore, sessionId: string): bool
proc hasExpired*(PSession): bool

And if try to compile, this happen:

% nimrod c --threads:on sheshonshtore.nim
config/nimrod.cfg(37, 2) Hint: added path: '/Users/isak/.babel/pkgs/babel-0.2.0' [Path]
config/nimrod.cfg(37, 2) Hint: added path: '/Users/isak/.babel/pkgs/aporia-0.2.0' [Path]
config/nimrod.cfg(37, 2) Hint: added path: '/Users/isak/.babel/pkgs/gtk2-1.0' [Path]
config/nimrod.cfg(37, 2) Hint: added path: '/Users/isak/.babel/pkgs/jester-0.1.0' [Path]
config/nimrod.cfg(37, 2) Hint: added path: '/Users/isak/.babel/pkgs/' [Path]
Hint: used config file '/Users/isak/src/softlib/nimrod/config/nimrod.cfg' [Conf]
Hint: system [Processing]
Hint: sheshonshtore [Processing]
Hint: times [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Error: internal error: computeRecSizeAux()
No stack traceback available

On Mac OS X.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions