[svn:parrot] r38813 - trunk/docs/dev
coke at svn.parrot.org
coke at svn.parrot.org
Sat May 16 02:22:58 UTC 2009
Author: coke
Date: Sat May 16 02:22:57 2009
New Revision: 38813
URL: https://trac.parrot.org/parrot/changeset/38813
Log:
[docs] Mark & test more PIR/PASM
Modified:
trunk/docs/dev/byteorder.pod
trunk/docs/dev/jit_i386.pod
trunk/docs/dev/pmc_obj_design_meeting_notes.pod
Modified: trunk/docs/dev/byteorder.pod
==============================================================================
--- trunk/docs/dev/byteorder.pod Sat May 16 02:13:00 2009 (r38812)
+++ trunk/docs/dev/byteorder.pod Sat May 16 02:22:57 2009 (r38813)
@@ -13,8 +13,14 @@
for parrot code in
- $P0 = _config()
- $P0["byteorder"]
+=begin PIR_FRAGMENT
+
+ $P0 = getinterp
+ .include 'iglobals.pasm'
+ $P1 = $P0[.IGLOBALS_CONFIG_HASH]
+ $P2 = $P1["byteorder"]
+
+=end PIR_FRAGMENT
or for perl code via
Modified: trunk/docs/dev/jit_i386.pod
==============================================================================
--- trunk/docs/dev/jit_i386.pod Sat May 16 02:13:00 2009 (r38812)
+++ trunk/docs/dev/jit_i386.pod Sat May 16 02:22:57 2009 (r38813)
@@ -28,21 +28,24 @@
PASM JIT ops Normal CGP ops
- (call cgp_core) (jmp back)
+=begin PASM
+ # (call cgp_core) (jmp back)
- set I0, 10 set_i_ic
- print I0 (call) print_i
- print "\n" print_sc
- bsr inc (call) bsr_ic cpu_ret
- end (jmp) HALT end (ret)
- end (ret)
+ set I0, 10 # set_i_ic
+ print I0 # (call) print_i
+ print "\n" # print_sc
+ bsr inc # (call) bsr_ic cpu_ret
+ end # (jmp) HALT end (ret)
+ # end (ret)
inc:
- inc I0 inc_i
- new P0, 'String' new_p_sc
- set P0, I0 set_p_i
- print P0 (call) print_p
- print "\n" print_sc
- ret (call) ret cpu_ret
+ inc I0 # inc_i
+ new P0, 'String' # new_p_sc
+ set P0, I0 # set_p_i
+ print P0 # (call) print_p
+ print "\n" # print_sc
+ ret # (call) ret cpu_ret
+
+=end PASM
=head2 Startup sequence
Modified: trunk/docs/dev/pmc_obj_design_meeting_notes.pod
==============================================================================
--- trunk/docs/dev/pmc_obj_design_meeting_notes.pod Sat May 16 02:13:00 2009 (r38812)
+++ trunk/docs/dev/pmc_obj_design_meeting_notes.pod Sat May 16 02:22:57 2009 (r38813)
@@ -188,12 +188,18 @@
Dan used to often remark that sequences like the following were "very slow":
+=begin PIR_FRAGMENT_INVALID
+
$P0 = getattribute obj, "foo"
$P1 = getattribute obj, "bar"
$P2 = getattribute obj, "baz"
+=end PIR_FRAGMENT_INVALID
+
Instead, Dan suggested always using classoffset to obtain attributes:
+=begin PIR_FRAGMENT_INVALID
+
$I0 = classoffset obj, "FooClass"
$P0 = getattribute obj, $I0 # which attr is this?
inc $I0
@@ -201,6 +207,8 @@
inc $I0
$P0 = getattribute obj, $I0
+=end PIR_FRAGMENT_INVALID
+
Unfortunately, this doesn't seem to be very practical in many respects. Can
we at least get a declaration from the designers about the appropriate style
to use for object attributes? I much prefer the former to the latter, and if
More information about the parrot-commits
mailing list