Advertisement
Guest User

Untitled

a guest
Mar 12th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. 17:24:16 < notk0> I am looking at the lambda_switch code and what does sw_consts and sw_blocks
  2. represent?
  3. 17:24:30 < notk0> sw_consts are the constructors and blocks the code to execute in case of a
  4. match?
  5. 17:24:31 < notk0> and lambda_switch =
  6. 17:24:31 < notk0> { sw_numconsts: int;
  7. 17:24:31 < notk0> sw_consts: (int * lambda) list;
  8. 17:24:31 < notk0> sw_numblocks: int;
  9. 17:24:32 < notk0> sw_blocks: (int * lambda) list;
  10. 17:24:34 < notk0> sw_failaction : lambda option}
  11. 18:16:13 -!- notk0 [~notk0@unaffiliated/notk0] has quit [Quit: Leaving]
  12. 18:33:23 < def-lkb> notk0: lambda_switch makes the distinction between constant constructors
  13. (without arguments, like None) and constructors with arguments (like Some
  14. v)
  15. 18:34:58 < def-lkb> constant constructors are represented as integers, so I guess sw_consts is
  16. a list associating the code to execute to a particular integer value
  17. 18:37:09 < def-lkb> blocks are represented as pointers to a memory area with a tag and one or
  18. more words/values : sw_blocks works the same way except that there is one
  19. more indirection and the dispatch is done on the tag value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement