NAME
set.ops - Assignment Opcodes
DESCRIPTION
These operations all set registers to various values.
- clone(out STR, in STR) Make a clone of $2, and put it in $1. Doesn't affect what was in $1. Removes the constant flag on the copy, if there was one.
- exchange(inout INT, inout INT)
- exchange(inout NUM, inout NUM)
- exchange(inout PMC, inout PMC)
- exchange(inout STR, inout STR) Exchange the contents of registers $1 and $2
- set(out INT, in INT)
- set(out INT, in NUM)
- set(out INT, invar PMC)
- set(out INT, invar PMC)
- set(out INT, in STR)
- set(out NUM, in INT)
- set(out NUM, in NUM)
- set(out NUM, invar PMC)
- set(out NUM, in STR)
- set(invar PMC, in INT)
- set(invar PMC, in NUM)
- set(out PMC, invar PMC)
- set(invar PMC, invar STR)
- set(out STR, in INT)
- set(out STR, in NUM)
- set(out STR, invar PMC)
- set(out STR, inconst STR)
- set(out STR, invar STR)
- set(out PMC, inconst PMC)
- set(invar PMC, inconst STR) Set $1 to $2.
PMC assignment operations: Px = x
- assign(invar PMC, in INT)
- assign(invar PMC, in NUM) Assign a new value $2, to PMC $1. Same as the equivalent set opcodes.
- assign(invar PMC, in STR)
- assign(invar PMC, invar PMC) Assign a new value $2, to PMC $1 by copying the value.
- assign(out STR, in STR) Assign a new value to a string by reusing the string header.
- setref(invar PMC, invar PMC) Make $1 refer to $2 by calling
- deref(out PMC, invar PMC) Not strictly an assignment operation: Put into $1 the PMC that the reference PMC $2 refers to.
set_pmc
.
Indirect PMC register set
- setp_ind(in INT, invar PMC) Set the PMC in register $1 to $2. Please note, that the register allocator doesn't track the usage of the affected register - handle with care.
- setn_ind(in INT, in NUM) Set the number in register $1 to $2. Please note, that the register allocator doesn't track the usage of the affected register - handle with care.
- sets_ind(in INT, in STR) Set the string in register $1 to $2. Please note, that the register allocator doesn't track the usage of the affected register - handle with care.
- seti_ind(in INT, in INT) Set the int in register $1 to $2. Please note, that the register allocator doesn't track the usage of the affected register - handle with care.
Keyed set operations: Px[ INTKEY ] = Bx
- set(invar PMC, in INTKEY, in INT)
- set(invar PMC, in INTKEY, in NUM)
- set(invar PMC, in INTKEY, in STR)
- set(invar PMC, in INTKEY, invar PMC)
Keyed get operations: Ax = Px[ INTKEY ]
- set(out INT, invar PMC, in INTKEY)
- set(out NUM, invar PMC, in INTKEY)
- set(out STR, invar PMC, in INTKEY)
- set(out PMC, invar PMC, in INTKEY)
Keyed set operations: Px[ KEY ] = Bx
- set(invar PMC, in KEY, in INT)
- set(invar PMC, in KEY, in NUM)
- set(invar PMC, in KEY, in STR)
- set(invar PMC, in KEY, invar PMC)
Keyed get operations: Ax = Px[ KEY ]
- set(out INT, invar PMC, in KEY)
- set(out NUM, invar PMC, in KEY)
- set(out STR, invar PMC, in KEY)
- set(out PMC, invar PMC, in KEY)
- clone(out PMC, invar PMC) Makes a copy of the PMC in $2 and puts it in $1.
- clone(out PMC, invar PMC, in PMC) Makes a copy of the PMC in $2 and puts it in $1, using the arguments in $3.
- copy(inout PMC, invar PMC) Morphs the PMC in $1 to the type of the PMC in $2, then assigns $2 to $1.
Register operations
These operations effect entire sets of registers.
- null(out INT)
- null(out NUM) Set register $1 to zero.
- null(out STR) Set register $1 to a NULL string value.
- null(out PMC) Set register $1 to PMCNULL.
- cleari()
- clearn()
- clearp()
- clears() Clear all the registers of the type indicated in the name of the operation.INTVAL ('i') and FLOATVAL ('n') registers clear to zero.PMC ('p') and STRING ('s') registers clear to NULL.
COPYRIGHT
Copyright (C) 2001-2009, Parrot Foundation.
LICENSE
This program is free software. It is subject to the same license as the Parrot interpreter itself.