experimental.ops - Experimental Operations
This file contains operations that are in an experimental state.
Do not rely upon the existence of the ops in this file when writing production code.
No decision has yet been made as to whether they are accepted as regular Parrot ops or not.
They are included here for testing purposes only!
Implementations of various mathematical operations
- gcd(out INT,
in NUM,
in NUM)
- Greatest Common divisor of $2 and $3.
- gcd(out INT,
out INT,
out INT,
in INT,
in INT)
- Given $4 and $5,
it calculates $1,
$2 and $3 so that
- $1 = gcd($4,
$5) = $2 * $4 + $3 * $5 (d = gcd(a,b) = x*a + y*b)
- die()
- Die.
Hard.
Calls _exit,
and won't do any process cleanup
- TODO encode in existing die_hard opcode.
- splice(in PMC,
in PMC,
in INT,
in INT)
- Replace $4 values at offset $3 in aggregate $1 with the PMCs in aggregate $2.
The values are put into the aggregate by a shallow copy.
If the values would be reused,
they have to be cloned.
- 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.
- morph(in PMC,
in INT)
- Have $1 turn itself into a PMC of type $2.
- exec(in STR)
- Execute the passed-in command.
Completely tosses the current process image and replaces it with the command.
Doesn't exit (the program ends,
after all),
though it does throw an exception if something goes wrong.
###############################################################################
Copyright (C) 2001-2004 The Perl Foundation.
All rights reserved.
This program is free software.
It is subject to the same license as the Parrot interpreter itself.
Hey!
The above document had some coding errors,
which are explained below:
- Around line 233:
- =cut found outside a pod block.
Skipping to next block.