Skip to content

Commit e25e3bb

Browse files
author
Drew O'Meara
committed
code cleanup
1 parent f2602bc commit e25e3bb

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

vm/eval.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,10 +1087,8 @@ func do_IMPORT_NAME(vm *Vm, namei int32) error {
10871087
}
10881088
v := vm.POP()
10891089
u := vm.TOP()
1090-
var locals py.Object
1091-
if vm.frame.Locals == nil {
1092-
locals = py.None
1093-
} else {
1090+
var locals py.Object = py.None
1091+
if vm.frame.Locals != nil {
10941092
locals = vm.frame.Locals
10951093
}
10961094
var args py.Tuple
@@ -1734,7 +1732,7 @@ func (vm *Vm) UnwindExceptHandler(frame *py.Frame, block *py.TryBlock) {
17341732
func RunFrame(frame *py.Frame) (res py.Object, err error) {
17351733
var vm = Vm{
17361734
frame: frame,
1737-
ctx: frame.Ctx,
1735+
ctx: frame.Ctx,
17381736
}
17391737

17401738
// FIXME need to do this to save the old exeption when we
@@ -2172,7 +2170,6 @@ func EvalCode(ctx py.Ctx, co *py.Code, globals, locals py.StringDict, args []py.
21722170
return RunFrame(f)
21732171
}
21742172

2175-
21762173
// Write the py global to avoid circular import
21772174
func init() {
21782175
py.VmEvalCode = EvalCode

0 commit comments

Comments
 (0)