1. Perl
  2. Language implementation
  3. here

opnames.h

The operation code is written in opnames.h .

/* opname.h */typedef enum opcode {
  OP_NULL = 0,
  OP_STUB = 1,
  OP_SCALAR = 2,
  OP_PUSHMARK = 3,
  OP_WANTARRAY = 4,
  OP_CONST = 5,
  OP_GVSV = 6,
  ...
};

In Perl, the code is represented as a syntax tree after it has been parsed, but each node in the syntax tree is called an operation. This is expressed as "OP type". For example, Perl programming operations such as "push", "check the existence of a hash key", "execute a subroutine", and "express a scalar" are expressed by operations.

The operation code represents the type of operation. This is an enumeration.

The operation code is written in "opnames.h", but there is no explanation of what it represents. If you want to see the explanation, it is better to refer to "PL_op_desc" in "opcode.h".

/* opcode.h */EXTCONST char * const PL_op_desc [] = {
  "null operation",
  "stub",
  "scalar",
  "pushmark",
  "wantarray",
  "constant item",
  "glob value",
  ...
};

Perl Language Research

Related Informatrion