File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,8 @@ func do_FOR_ITER(vm *Vm, delta int32) {
533
533
534
534
// Loads the global named co_names[namei] onto the stack.
535
535
func do_LOAD_GLOBAL (vm * Vm , namei int32 ) {
536
- vm .NotImplemented ("LOAD_GLOBAL" , namei )
536
+ // FIXME what if global doesn't exist?
537
+ vm .PUSH (vm .globals [vm .co .Names [namei ]])
537
538
}
538
539
539
540
// Pushes a block for a loop onto the block stack. The block spans
@@ -626,6 +627,9 @@ func do_RAISE_VARARGS(vm *Vm, argc int32) {
626
627
// function arguments, and the function itself off the stack, and
627
628
// pushes the return value.
628
629
func do_CALL_FUNCTION (vm * Vm , argc int32 ) {
630
+ fmt .Printf ("Stack: %v\n " , vm .stack )
631
+ fmt .Printf ("Locals: %v\n " , vm .locals )
632
+ fmt .Printf ("Globals: %v\n " , vm .globals )
629
633
nargs := int (argc & 0xFF )
630
634
nkwargs := int ((argc >> 8 ) & 0xFF )
631
635
p , q := len (vm .stack )- 2 * nkwargs , len (vm .stack )
You can’t perform that action at this time.
0 commit comments