@@ -180,10 +180,6 @@ func (vm *Vm) PUSH(obj py.Object) {
180
180
vm .stack = append (vm .stack , obj )
181
181
}
182
182
183
- // Indicates end-of-code to the compiler, not used by the interpreter.
184
- func do_STOP_CODE (vm * Vm , arg int32 ) {
185
- }
186
-
187
183
// Do nothing code. Used as a placeholder by the bytecode optimizer.
188
184
func do_NOP (vm * Vm , arg int32 ) {
189
185
}
@@ -240,10 +236,6 @@ func do_UNARY_NEGATIVE(vm *Vm, arg int32) {
240
236
func do_UNARY_NOT (vm * Vm , arg int32 ) {
241
237
}
242
238
243
- // Implements TOS = `TOS`.
244
- func do_UNARY_CONVERT (vm * Vm , arg int32 ) {
245
- }
246
-
247
239
// Implements TOS = ~TOS.
248
240
func do_UNARY_INVERT (vm * Vm , arg int32 ) {
249
241
}
@@ -264,11 +256,6 @@ func do_BINARY_POWER(vm *Vm, arg int32) {
264
256
func do_BINARY_MULTIPLY (vm * Vm , arg int32 ) {
265
257
}
266
258
267
- // Implements TOS = TOS1 / TOS when from __future__ import division is
268
- // not in effect.
269
- func do_BINARY_DIVIDE (vm * Vm , arg int32 ) {
270
- }
271
-
272
259
// Implements TOS = TOS1 // TOS.
273
260
func do_BINARY_FLOOR_DIVIDE (vm * Vm , arg int32 ) {
274
261
}
@@ -327,11 +314,6 @@ func do_INPLACE_POWER(vm *Vm, arg int32) {
327
314
func do_INPLACE_MULTIPLY (vm * Vm , arg int32 ) {
328
315
}
329
316
330
- // Implements in-place TOS = TOS1 / TOS when from __future__ import
331
- // division is not in effect.
332
- func do_INPLACE_DIVIDE (vm * Vm , arg int32 ) {
333
- }
334
-
335
317
// Implements in-place TOS = TOS1 // TOS.
336
318
func do_INPLACE_FLOOR_DIVIDE (vm * Vm , arg int32 ) {
337
319
}
@@ -370,62 +352,9 @@ func do_INPLACE_XOR(vm *Vm, arg int32) {
370
352
}
371
353
372
354
// Implements in-place TOS = TOS1 | TOS.
373
-
374
- // The slice opcodes take up to three parameters.
375
355
func do_INPLACE_OR (vm * Vm , arg int32 ) {
376
356
}
377
357
378
- // Implements TOS = TOS[:].
379
- func do_SLICE_0 (vm * Vm , arg int32 ) {
380
- }
381
-
382
- // Implements TOS = TOS1[TOS:].
383
- func do_SLICE_1 (vm * Vm , arg int32 ) {
384
- }
385
-
386
- // Implements TOS = TOS1[:TOS].
387
- func do_SLICE_2 (vm * Vm , arg int32 ) {
388
- }
389
-
390
- // Implements TOS = TOS2[TOS1:TOS].
391
- func do_SLICE_3 (vm * Vm , arg int32 ) {
392
- }
393
-
394
- // Slice assignment needs even an additional parameter. As any
395
- // statement, they put nothing on the stack.
396
-
397
- // Implements TOS[:] = TOS1.
398
- func do_STORE_SLICE_0 (vm * Vm , arg int32 ) {
399
- }
400
-
401
- // Implements TOS1[TOS:] = TOS2.
402
- func do_STORE_SLICE_1 (vm * Vm , arg int32 ) {
403
- }
404
-
405
- // Implements TOS1[:TOS] = TOS2.
406
- func do_STORE_SLICE_2 (vm * Vm , arg int32 ) {
407
- }
408
-
409
- // Implements TOS2[TOS1:TOS] = TOS3.
410
- func do_STORE_SLICE_3 (vm * Vm , arg int32 ) {
411
- }
412
-
413
- // Implements del TOS[:].
414
- func do_DELETE_SLICE_0 (vm * Vm , arg int32 ) {
415
- }
416
-
417
- // Implements del TOS1[TOS:].
418
- func do_DELETE_SLICE_1 (vm * Vm , arg int32 ) {
419
- }
420
-
421
- // Implements del TOS1[:TOS].
422
- func do_DELETE_SLICE_2 (vm * Vm , arg int32 ) {
423
- }
424
-
425
- // Implements del TOS2[TOS1:TOS].
426
- func do_DELETE_SLICE_3 (vm * Vm , arg int32 ) {
427
- }
428
-
429
358
// Implements TOS1[TOS] = TOS2.
430
359
func do_STORE_SUBSCR (vm * Vm , arg int32 ) {
431
360
}
@@ -442,28 +371,6 @@ func do_DELETE_SUBSCR(vm *Vm, arg int32) {
442
371
func do_PRINT_EXPR (vm * Vm , arg int32 ) {
443
372
}
444
373
445
- // Prints TOS to the file-like object bound to sys.stdout. There is
446
- // one such instruction for each item in the print statement.
447
- func do_PRINT_ITEM (vm * Vm , arg int32 ) {
448
- }
449
-
450
- // Like PRINT_ITEM, but prints the item second from TOS to the
451
- // file-like object at TOS. This is used by the extended print
452
- // statement.
453
- func do_PRINT_ITEM_TO (vm * Vm , arg int32 ) {
454
- }
455
-
456
- // Prints a new line on sys.stdout. This is generated as the last
457
- // operation of a print statement, unless the statement ends with a
458
- // comma.
459
- func do_PRINT_NEWLINE (vm * Vm , arg int32 ) {
460
- }
461
-
462
- // Like PRINT_NEWLINE, but prints the new line on the file-like object
463
- // on the TOS. This is used by the extended print statement.
464
- func do_PRINT_NEWLINE_TO (vm * Vm , arg int32 ) {
465
- }
466
-
467
374
// Terminates a loop due to a break statement.
468
375
func do_BREAK_LOOP (vm * Vm , arg int32 ) {
469
376
}
@@ -499,13 +406,6 @@ func do_LIST_APPEND(vm *Vm, i int32) {
499
406
func do_MAP_ADD (vm * Vm , i int32 ) {
500
407
}
501
408
502
- // Pushes a reference to the locals of the current scope on the
503
- // stack. This is used in the code for a class definition: After the
504
- // class body is evaluated, the locals are passed to the class
505
- // definition.
506
- func do_LOAD_LOCALS (vm * Vm , arg int32 ) {
507
- }
508
-
509
409
// Returns with TOS to the caller of the function.
510
410
func do_RETURN_VALUE (vm * Vm , arg int32 ) {
511
411
}
@@ -524,11 +424,6 @@ func do_YIELD_VALUE(vm *Vm, arg int32) {
524
424
func do_IMPORT_STAR (vm * Vm , arg int32 ) {
525
425
}
526
426
527
- // Implements exec TOS2,TOS1,TOS. The compiler fills missing optional
528
- // parameters with None.
529
- func do_EXEC_STMT (vm * Vm , arg int32 ) {
530
- }
531
-
532
427
// Removes one block from the block stack. Per frame, there is a stack
533
428
// of blocks, denoting nested loops, try statements, and such.
534
429
func do_POP_BLOCK (vm * Vm , arg int32 ) {
@@ -603,11 +498,6 @@ func do_DELETE_NAME(vm *Vm, namei int32) {
603
498
func do_UNPACK_SEQUENCE (vm * Vm , count int32 ) {
604
499
}
605
500
606
- // Duplicate count items, keeping them in the same order. Due to
607
- // implementation limits, count should be between 1 and 5 inclusive.
608
- func do_DUP_TOPX (vm * Vm , count int32 ) {
609
- }
610
-
611
501
// Implements TOS.name = TOS1, where namei is the index of name in
612
502
// co_names.
613
503
func do_STORE_ATTR (vm * Vm , namei int32 ) {
@@ -772,10 +662,6 @@ func do_STORE_DEREF(vm *Vm, i int32) {
772
662
func do_DELETE_DEREF (vm * Vm , i int32 ) {
773
663
}
774
664
775
- // This opcode is obsolete.
776
- func do_SET_LINENO (vm * Vm , lineno int32 ) {
777
- }
778
-
779
665
// Raises an exception. argc indicates the number of parameters to the
780
666
// raise statement, ranging from 0 to 3. The handler will find the
781
667
// traceback as TOS2, the parameter as TOS1, and the exception as TOS.
0 commit comments