Commit 94df6066 authored by Dylan Trotter's avatar Dylan Trotter

Remove block from frame object. Will eventually be replaced with code object.

parent b29461f0
......@@ -35,7 +35,6 @@ func NewBlock(name, filename string, fn func(*Frame, *Object) (*Object, *BaseExc
func (b *Block) Exec(back *Frame, globals *Dict) (*Object, *BaseException) {
f := newFrame(back)
f.globals = globals
f.block = b
return b.execInternal(f, nil)
}
......
......@@ -36,9 +36,8 @@ type Frame struct {
// include exception handlers and finally blocks.
checkpoints []RunState
state RunState
globals *Dict `attr:"f_globals"`
lineno int `attr:"f_lineno"`
block *Block `attr:"f_code"`
globals *Dict `attr:"f_globals"`
lineno int `attr:"f_lineno"`
}
// newFrame creates a new Frame whose parent frame is back.
......
......@@ -46,7 +46,6 @@ type Generator struct {
func NewGenerator(b *Block, globals *Dict) *Generator {
f := newFrame(nil)
f.globals = globals
f.block = b
return &Generator{Object: Object{typ: GeneratorType}, block: b, frame: f}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment