Skip to content

Instantly share code, notes, and snippets.

@nbrown
nbrown / keybase.md
Last active February 19, 2017 03:51

Keybase proof

I hereby claim:

  • I am nbrown on github.
  • I am nbrown04 (https://keybase.io/nbrown04) on keybase.
  • I have a public key whose fingerprint is AA5A 7988 5E8D 30E3 A77D 0D70 E8E4 D604 EEF2 B1D5

To claim this, I am signing this object:

@nbrown
nbrown / gist:2706968
Created May 16, 2012 03:01
M0 Debugger idea

Debugger:

Use the same m0 run loop and ops as m0 proper

The debugger main function, should be called from m0 proper

Store all state data in a debugger state struct

The struct has the following fields:

  • Run state => an enumerated value which is initialized to STEP. The valid values for the enumeration are:
    • INIT => the initial state during which the debugger state structure is initialized from command line arguments if they exist
@nbrown
nbrown / questions.txt
Created May 5, 2012 01:19 — forked from cotto/questions.txt
m0 memory questions
per-callframe constants segment layout:
constants segment starts with a list of fixed-width pointers. I/N entries are stored directly. S/P entries are pointers to later in the constants segment
The data segment has a couple options. It can be appended after the constants segment (either on the next page or immediately after), with the constants data being marked read-only. Alternately, it can just be another segment attached to a special register.
If callframes are analogous to subs, the constants and data segment can be analogous to lexical data.
If callframes are analogous to subs, how will recursion work?
* clone a callframe (when? before entering ( -> no state) or after entering (less waste, leftover state))
* need to work out calling conventions