NAME ^

set.ops - Register Loading Ops

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, in PMC)

set(out INT, in STR)

set(out NUM, in INT)

set(out NUM, in NUM)

set(out NUM, in PMC)

set(out NUM, in STR)

set(in PMC, in INT)

set(in PMC, in NUM)

set(out PMC, in PMC)

set(in PMC, in STR)

set(out STR, in INT)

set(out STR, in NUM)

set(out STR, in PMC)

set(out STR, in STR)

Set $1 to $2.

PMC assignment operations: Px = x ^

assign(in PMC, in INT)

assign(in PMC, in NUM)

Assign a new value $2, to PMC $1. Same as the equivalent set opcodes.

assign(in PMC, in STR)

assign(in PMC, in 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(in PMC, in PMC)

Make $1 refer to $2 by calling set_pmc.

deref(out PMC, in PMC)

Not strictly an assigment operation: Get the PMC into $1, that the reference PMC $2 refers to.

Indirect PMC register set ^

setp_ind(in INT, in 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(in PMC, in INTKEY, in INT)

set(in PMC, in INTKEY, in NUM)

set(in PMC, in INTKEY, in STR)

set(in PMC, in INTKEY, in PMC)

Keyed get operations: Ax = Px[ INTKEY ] ^

set(out INT, in PMC, in INTKEY)

set(out NUM, in PMC, in INTKEY)

set(out STR, in PMC, in INTKEY)

set(out PMC, in PMC, in INTKEY)

Keyed set operations: Px[ KEY ] = Bx ^

set(in PMC, in KEY, in INT)

set(in PMC, in KEY, in NUM)

set(in PMC, in KEY, in STR)

set(in PMC, in KEY, in PMC)

Keyed get operations: Ax = Px[ KEY ] ^

set(out INT, in PMC, in KEY)

set(out NUM, in PMC, in KEY)

set(out STR, in PMC, in KEY)

set(out PMC, in PMC, in KEY)

slice(out PMC, in PMC, in KEY)

Return a new Iterator PMC $1 for aggregate $2 and Slice PMC $3.

slice(out PMC, in PMC, in KEY, inconst INT)

Return a new list PMC $1 for aggregate $2 and Slice PMC $3.

This is a Python opcode. Range is i <= k < j. $4 must be 1. May change and move to python.ops.

iter(out PMC, in PMC)

Return a new Iterator PMC $1 for aggregate $2.

clone(out PMC, in PMC)

Makes a copy of the PMC in $2 and puts it in $1.

Register operations ^

These operations effect entire sets of registers.

null(out STR)

null(out INT)

null(out PMC)

null(out NUM)

Set register $1 to a null value, or zero for the numeric registers

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-2004 The Perl Foundation. All rights reserved.

LICENSE ^

This program is free software. It is subject to the same license as the Parrot interpreter itself.


parrot