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 ...@@ -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) { func (b *Block) Exec(back *Frame, globals *Dict) (*Object, *BaseException) {
f := newFrame(back) f := newFrame(back)
f.globals = globals f.globals = globals
f.block = b
return b.execInternal(f, nil) return b.execInternal(f, nil)
} }
......
...@@ -38,7 +38,6 @@ type Frame struct { ...@@ -38,7 +38,6 @@ type Frame struct {
state RunState state RunState
globals *Dict `attr:"f_globals"` globals *Dict `attr:"f_globals"`
lineno int `attr:"f_lineno"` lineno int `attr:"f_lineno"`
block *Block `attr:"f_code"`
} }
// newFrame creates a new Frame whose parent frame is back. // newFrame creates a new Frame whose parent frame is back.
......
...@@ -46,7 +46,6 @@ type Generator struct { ...@@ -46,7 +46,6 @@ type Generator struct {
func NewGenerator(b *Block, globals *Dict) *Generator { func NewGenerator(b *Block, globals *Dict) *Generator {
f := newFrame(nil) f := newFrame(nil)
f.globals = globals f.globals = globals
f.block = b
return &Generator{Object: Object{typ: GeneratorType}, block: b, frame: f} 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