- 基于stack虚拟机
- 内存包括4部分:the Scheme objects, the Scheme global variables, the RVM’s stack, and the instruction stream executed by the RVM.
- 使用rib来表示object, [ x,x,x ],整数用低位为1的word(host c): an object reference is implemented with a machine word with the lower bit encoding the type: 1 when the object is an integer (the other bits represent the integer value), and 0 when the object is a rib (all the bits are the aligned address of the rib in memory).
- 虚拟机只需要两个指针:stack, which refers to the rib at the top-of-stack (TOS), and pc, which refers to the rib containing the RVM instruction being executed. (同时亦作为gc root)
- 使用 Cheney-style stop-and-copy GC 算法
- 类型:[ field0, field1, type ] 0 pair, 1 procedure, 2 symbol/global variable, 3 string, 4 vector, 5 special
标签: none
评论已关闭