@@ -180,10 +180,6 @@ func (vm *Vm) PUSH(obj py.Object) {
180180 vm .stack = append (vm .stack , obj )
181181}
182182
183- // Indicates end-of-code to the compiler, not used by the interpreter.
184- func do_STOP_CODE (vm * Vm , arg int32 ) {
185- }
186-
187183// Do nothing code. Used as a placeholder by the bytecode optimizer.
188184func do_NOP (vm * Vm , arg int32 ) {
189185}
@@ -240,10 +236,6 @@ func do_UNARY_NEGATIVE(vm *Vm, arg int32) {
240236func do_UNARY_NOT (vm * Vm , arg int32 ) {
241237}
242238
243- // Implements TOS = `TOS`.
244- func do_UNARY_CONVERT (vm * Vm , arg int32 ) {
245- }
246-
247239// Implements TOS = ~TOS.
248240func do_UNARY_INVERT (vm * Vm , arg int32 ) {
249241}
@@ -264,11 +256,6 @@ func do_BINARY_POWER(vm *Vm, arg int32) {
264256func do_BINARY_MULTIPLY (vm * Vm , arg int32 ) {
265257}
266258
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-
272259// Implements TOS = TOS1 // TOS.
273260func do_BINARY_FLOOR_DIVIDE (vm * Vm , arg int32 ) {
274261}
@@ -327,11 +314,6 @@ func do_INPLACE_POWER(vm *Vm, arg int32) {
327314func do_INPLACE_MULTIPLY (vm * Vm , arg int32 ) {
328315}
329316
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-
335317// Implements in-place TOS = TOS1 // TOS.
336318func do_INPLACE_FLOOR_DIVIDE (vm * Vm , arg int32 ) {
337319}
@@ -370,62 +352,9 @@ func do_INPLACE_XOR(vm *Vm, arg int32) {
370352}
371353
372354// Implements in-place TOS = TOS1 | TOS.
373-
374- // The slice opcodes take up to three parameters.
375355func do_INPLACE_OR (vm * Vm , arg int32 ) {
376356}
377357
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-
429358// Implements TOS1[TOS] = TOS2.
430359func do_STORE_SUBSCR (vm * Vm , arg int32 ) {
431360}
@@ -442,28 +371,6 @@ func do_DELETE_SUBSCR(vm *Vm, arg int32) {
442371func do_PRINT_EXPR (vm * Vm , arg int32 ) {
443372}
444373
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-
467374// Terminates a loop due to a break statement.
468375func do_BREAK_LOOP (vm * Vm , arg int32 ) {
469376}
@@ -499,13 +406,6 @@ func do_LIST_APPEND(vm *Vm, i int32) {
499406func do_MAP_ADD (vm * Vm , i int32 ) {
500407}
501408
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-
509409// Returns with TOS to the caller of the function.
510410func do_RETURN_VALUE (vm * Vm , arg int32 ) {
511411}
@@ -524,11 +424,6 @@ func do_YIELD_VALUE(vm *Vm, arg int32) {
524424func do_IMPORT_STAR (vm * Vm , arg int32 ) {
525425}
526426
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-
532427// Removes one block from the block stack. Per frame, there is a stack
533428// of blocks, denoting nested loops, try statements, and such.
534429func do_POP_BLOCK (vm * Vm , arg int32 ) {
@@ -603,11 +498,6 @@ func do_DELETE_NAME(vm *Vm, namei int32) {
603498func do_UNPACK_SEQUENCE (vm * Vm , count int32 ) {
604499}
605500
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-
611501// Implements TOS.name = TOS1, where namei is the index of name in
612502// co_names.
613503func do_STORE_ATTR (vm * Vm , namei int32 ) {
@@ -772,10 +662,6 @@ func do_STORE_DEREF(vm *Vm, i int32) {
772662func do_DELETE_DEREF (vm * Vm , i int32 ) {
773663}
774664
775- // This opcode is obsolete.
776- func do_SET_LINENO (vm * Vm , lineno int32 ) {
777- }
778-
779665// Raises an exception. argc indicates the number of parameters to the
780666// raise statement, ranging from 0 to 3. The handler will find the
781667// traceback as TOS2, the parameter as TOS1, and the exception as TOS.
0 commit comments