Front page | perl.perl6.internals |
Postings from June 2002
Opcode documentation
From:
Eric Kidder
Date:
June 29, 2002 06:21
Subject:
Opcode documentation
Message ID:
Pine.LNX.4.33.0206290121480.8836-100000@persian.evilkitten.org
First, a quick introduction:
I'm Eric. At YAPC, I asked Dan what I can do to help out Parrot and this
is what he pointed me at.
I've compiled a list of all of the opcodes (as listed in the *.ops files)
that are not documented in docs/pdds/pdd06_pasm.pod. In addition, because
of some possible weirdness I noticed, I've also compiled a list of the
opcodes which are in pdd06 but are not implemented in any of the *.ops.
Without further ado:
# parrot/core.ops (53/133 documented)
abs and band bnot bor bounds bxor call callcc
callco callnative capturecc chopn cleari clearn clearp
clears close cmod collectoff collecton debug depth
end enternative eq err find_type ge gt
index intdepth intrestore intsave le loadext loadlib
lt mod ne neg noop not or ord pack
popi popn popp pops print profile pushi pushn pushp
pushs readline restore restoreall rotate_up save
saveall savec set_addr set_keyed set_keyed_integer
shl shr sleep stringinfo substr sweepoff sweepon
time trace unless warningsoff warningson xor yield
# parrot/debug.ops (0/4 documented)
debug_break debug_init debug_load debug_print
# parrot/io.ops (3/8 documented)
close fdopen print printerr puts
# parrot/math.ops (0/3 documented)
fact gcd lcm
# parrot/obscure.ops (0/4 documented)
covers exsec hav vers
# parrot/rx.ops (0/32 documented)
rx_advance rx_allocinfo rx_backwards rx_clearinfo
rx_cloneinfo rx_compile rx_dot rx_endgroup
rx_fail rx_forwards rx_freeinfo rx_incrindex
rx_info_getgroup rx_info_getindex rx_info_getstartindex
rx_info_successful rx_is_d rx_is_s rx_is_w rx_literal
rx_makebmp rx_oneof rx_oneof_bmp rx_popindex
rx_pushindex rx_pushmark rx_setprops rx_startgroup
rx_succeed rx_zwa_atbeginning rx_zwa_atend
rx_zwa_boundary
Here is a listing of the unimplemented opcodes which are defined in pdd06.
The reason I include them is that there are some opcodes in core.ops which
are closely named to the ones listed below. For example 'pushn' (from
core.ops) is similar to 'push_n' (from pdd06_pasm).
atan2 call_method callout can chop_key clear_eh
clone_key fetch_global fetch_lex find_attribute
find_global_slot find_global_table find_lex
find_method find_string_lib get_op_count get_string_name
inc_key isa ke_type ke_value key_size load_bytecode
load_opcode_lib load_string_lib lock log make_object
new_fh new_key newpad pausecollect pop_i pop_n pop_p
pop_s push_i push_i_c push_n push_n_c push_p
push_p_c push_s push_s_c pushunlock readw
restore_i restore_n restore_p restore_s
resumecollect rethrow save_i save_n save_p save_s set_attribute
set_eh set_key set_warp size_key status tell
throw toss_key tostring unlock unwarp wait
warp writew
Finally, for my data collection techniques, I used a script which scans
the *.ops files for:
$op =~ /^(inline|)\s*op\s+([\w\d_]+)\s*\(/;
which should signify the beginning of the C code for the opcode.
Hopefully. I then compare that to a list of the opcodes pulled from
pdd06_pasm (done by scanning the =item lines) to see what is where.
If I've made any mistakes or am just deeply confused, please let me know
and I'll make adjustments.
Eric
-
Opcode documentation
by Eric Kidder