Skip to content

Commit ceed469

Browse files
committed
vm: remove STORE_LOCALS opcode as it is no longer used
1 parent 5546ccd commit ceed469

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

vm/eval.go

-8
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,6 @@ func do_GET_ITER(vm *Vm, arg int32) {
249249
vm.SET_TOP(py.Iter(vm.TOP()))
250250
}
251251

252-
// Pops TOS from the stack and stores it as the current frame’s
253-
// f_locals. This is used in class construction.
254-
func do_STORE_LOCALS(vm *Vm, arg int32) {
255-
defer vm.CheckException()
256-
locals := vm.POP()
257-
vm.frame.Locals = locals.(py.StringDict)
258-
}
259-
260252
// Binary operations remove the top of the stack (TOS) and the second
261253
// top-most stack item (TOS1) from the stack. They perform the
262254
// operation, and put the result back on the stack.

vm/jumptable.go

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func init() {
5454
jumpTable[BINARY_OR] = do_BINARY_OR
5555
jumpTable[INPLACE_POWER] = do_INPLACE_POWER
5656
jumpTable[GET_ITER] = do_GET_ITER
57-
jumpTable[STORE_LOCALS] = do_STORE_LOCALS
5857
jumpTable[PRINT_EXPR] = do_PRINT_EXPR
5958
jumpTable[LOAD_BUILD_CLASS] = do_LOAD_BUILD_CLASS
6059
jumpTable[YIELD_FROM] = do_YIELD_FROM

vm/opcodes.go

-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ const (
4646
BINARY_OR = 66
4747
INPLACE_POWER = 67
4848
GET_ITER = 68
49-
STORE_LOCALS = 69
5049
PRINT_EXPR = 70
5150
LOAD_BUILD_CLASS = 71
5251
YIELD_FROM = 72
@@ -181,7 +180,6 @@ var NameToOpCode = map[string]byte{
181180
"BINARY_OR": 66,
182181
"INPLACE_POWER": 67,
183182
"GET_ITER": 68,
184-
"STORE_LOCALS": 69,
185183
"PRINT_EXPR": 70,
186184
"LOAD_BUILD_CLASS": 71,
187185
"YIELD_FROM": 72,

0 commit comments

Comments
 (0)