@@ -115,10 +115,6 @@ func do_GET_ITER(vm *Vm, arg int32) {
115
115
// f_locals. This is used in class construction.
116
116
func do_STORE_LOCALS (vm * Vm , arg int32 ) {
117
117
locals := vm .POP ()
118
- // FIXME don't know why it is getting nil here?
119
- if locals == nil {
120
- locals = py.StringDict {}
121
- }
122
118
vm .frame .Locals = locals .(py.StringDict )
123
119
}
124
120
@@ -702,6 +698,7 @@ func do_STORE_MAP(vm *Vm, arg int32) {
702
698
703
699
// Pushes a reference to the local co_varnames[var_num] onto the stack.
704
700
func do_LOAD_FAST (vm * Vm , var_num int32 ) {
701
+ fmt .Printf ("LOAD_FAST %q\n " , vm .frame .Code .Varnames [var_num ])
705
702
vm .PUSH (vm .frame .Locals [vm .frame .Code .Varnames [var_num ]])
706
703
}
707
704
@@ -889,7 +886,7 @@ func do_CALL_FUNCTION_VAR_KW(vm *Vm, argc int32) {
889
886
func (vm * Vm ) NotImplemented (name string , arg int32 ) {
890
887
fmt .Printf ("%s %d NOT IMPLEMENTED\n " , name , arg )
891
888
fmt .Printf ("vmstack = %#v\n " , vm .stack )
892
- panic ("Opcode not implemented" )
889
+ panic (fmt . Sprintf ( "Opcode %s %d NOT IMPLEMENTED" , name , arg ) )
893
890
}
894
891
895
892
// Calls function fn with args and kwargs
0 commit comments