Annotation of gforth/peeprules.vmg, revision 1.18

1.14      anton       1: \ Gforth superinstructions and stack caching replicas
                      2: 
1.17      anton       3: \ Copyright (C) 2003,2004 Free Software Foundation, Inc.
1.14      anton       4: 
                      5: \ This file is part of Gforth.
                      6: 
                      7: \ Gforth is free software; you can redistribute it and/or
                      8: \ modify it under the terms of the GNU General Public License
                      9: \ as published by the Free Software Foundation; either version 2
                     10: \ of the License, or (at your option) any later version.
                     11: 
                     12: \ This program is distributed in the hope that it will be useful,
                     13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: \ GNU General Public License for more details.
                     16: 
                     17: \ You should have received a copy of the GNU General Public License
                     18: \ along with this program; if not, write to the Free Software
                     19: \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
                     20: 
1.8       anton      21: \ taken from David Gregg's EuroForth 2001 paper; omitted some sequences
1.12      anton      22: \ eliminated for gforth-native:
                     23: \ 1) sequences containing call
                     24: \ 2) sequences with immediate arguments not in the first position
1.15      anton      25: 
                     26: \ no new prim-nums for supers and state-replicas
                     27: \E ' noop is output-c-prim-num
                     28: 
1.7       anton      29: super1 = lit +
1.12      anton      30: \ super2 = lit call
1.7       anton      31: super3 = lit @
1.12      anton      32: \ super4 = lit @ call
                     33: \ super5 = @ call
1.8       anton      34: super6 = lit !
1.12      anton      35: \ super7 = lit lit
                     36: \ super8 = dup lit
                     37: \ super9 = ! lit
                     38: \ super10 = lit ! lit
1.8       anton      39: super11 = ! ;s
                     40: super12 = lit + @
1.12      anton      41: \ super13 = 0= ?branch
                     42: \ super14 = dup call
1.8       anton      43: super15 = useraddr @
                     44: super16 = + @
1.12      anton      45: \ super17 = lit @ ?branch
1.8       anton      46: super18 = lit ! ;s
                     47: super19 = lit @ and
1.13      anton      48: \ super20 = = ?branch
1.12      anton      49: \ super21 = lit lit !
                     50: \ super22 = @ ?branch
1.8       anton      51: super23 = useraddr !
1.12      anton      52: \ super24 = dup ?branch
1.8       anton      53: super25 = @ ;s
                     54: super26 = lit @ +
                     55: super27 = dup @
1.9       anton      56: 
1.11      anton      57: \F 0 [if]
1.9       anton      58: 
1.15      anton      59: \ \E prim-states ;s                   \ 2950159
                     60: \E prim-states lit                  \ 2802835
                     61: \ \E prim-states call                 \ 2558373
                     62: \E prim-states @                    \ 2244351
                     63: \E branch-states ?branch              \ 1134432
                     64: \E prim-states lit@                 \ 1051813
                     65: \E prim-states swap                 \ 737988
1.16      anton      66: \E S0 S2 state-prim swap
                     67: \E S1 S2 state-prim swap
1.18    ! anton      68: \E S2 S3 state-prim swap
        !            69: \E S3 S2 state-prim swap
1.15      anton      70: \E prim-states c@                   \ 651406
                     71: \E prim-states =                    \ 590006
                     72: \E prim-states 0=                   \ 584487
                     73: \E prim-states dup                  \ 566855
                     74: \E S0 S1 state-prim dup
1.18    ! anton      75: \E S1 S1 state-prim dup
1.15      anton      76: \E prim-states +                    \ 566003
                     77: \E prim-states i                    \ 502908
                     78: \E prim-states +!                   \ 448925
                     79: \ \E prim-states branch               \ 409561
                     80: \ \E prim-states (loop)               \ 379646
                     81: \ \E prim-states lp!                  \ 326743
                     82: \E prim-states and                  \ 309427
                     83: \E prim-states useraddr             \ 303254
                     84: \E prim-states over                 \ 283556
                     85: \E S0 S1 state-prim over
1.16      anton      86: \E S1 S2 state-prim over
                     87: \E S2 S1 state-prim over
1.18    ! anton      88: \E S3 S2 state-prim over
1.15      anton      89: \E prim-states negate               \ 257417
                     90: \E prim-states cells                \ 254644
                     91: \E prim-states rot                  \ 220273
1.18    ! anton      92: \E S3 S1 state-prim rot
        !            93: \E S2 S3 state-prim rot
        !            94: \E S1 S3 state-prim rot
        !            95: \E S0 S3 state-prim rot
        !            96: \E S4 S2 state-prim rot
        !            97: \E S5 S3 state-prim rot
1.15      anton      98: \E prim-states !                    \ 218672
                     99: \E prim-states 2dup                 \ 211315
                    100: \E S0 S1 state-prim 2dup
1.16      anton     101: \E S0 S2 state-prim 2dup
1.18    ! anton     102: \E S1 S3 state-prim 2dup
1.16      anton     103: \E S2 S2 state-prim 2dup
1.18    ! anton     104: \E S3 S1 state-prim 2dup
        !           105: \E S4 S4 state-prim 2dup
        !           106: \E S4 S2 state-prim 2dup
1.15      anton     107: \ \E branch-states lit-perform          \ 188331
                    108: \E prim-states <>                   \ 179502
                    109: \E prim-states c!                   \ 179332
                    110: \E prim-states lit+                 \ 179156
                    111: \E prim-states drop                 \ 173995
                    112: \E S0 S0 state-prim drop
                    113: \E prim-states lshift               \ 164671
                    114: \E prim-states /mod                 \ 164670
                    115: \E prim-states >r                   \ 145247
                    116: \E prim-states r>                   \ 133792
                    117: \ \E branch-states does-exec            \ 120944
                    118: \E prim-states cell+                \ 116183
                    119: \E prim-states lp+!#                \ 106697 \ --
                    120: \E prim-states -                    \ 106245
                    121: \E prim-states unloop               \ 98938 \ --
                    122: \E prim-states lp+                  \ 87190 \ --
                    123: \E prim-states >=                   \ 80994
                    124: \E prim-states tuck                 \ 78696
1.16      anton     125: \E S2 S2 state-prim tuck
1.18    ! anton     126: \E S3 S3 state-prim tuck
1.15      anton     127: \E prim-states /string              \ 78595
                    128: \E prim-states char+                \ 77542
1.18    ! anton     129: \E prim-states ?dup                 \ 76850
1.15      anton     130: \E prim-states @local0              \ 75322
                    131: \E prim-states min                  \ 75264
                    132: \ \E prim-states compare              \ 65603
                    133: \E branch-states (u+do)               \ 63823
                    134: \ \E prim-states (read-line)          \ 63823
                    135: \E prim-states 2>r                  \ 62646
                    136: \E prim-states 2r>                  \ 62644
                    137: \E prim-states 2r@                  \ 61338
                    138: \E prim-states 2@                   \ 61067
                    139: \E prim-states nip                  \ 54961
                    140: \E S1 S1 state-prim nip
                    141: \E S0 S1 state-prim nip
1.18    ! anton     142: \E S2 S2 state-prim nip
1.15      anton     143: \E prim-states within               \ 51075
                    144: \E prim-states 1-                   \ 47441
1.18    ! anton     145: \E branch-states execute              \ 46674
1.15      anton     146: \E prim-states lp-                  \ 45385
1.18    ! anton     147: \E branch-states perform              \ 38756
1.15      anton     148: \E prim-states xor                  \ 35599
                    149: \E prim-states @local#              \ 34586
                    150: \ \E prim-states pick                 \ 32015
                    151: \E prim-states u>                   \ 29373
                    152: \E prim-states -rot                 \ 26211
1.18    ! anton     153: \E S3 S2 state-prim -rot
        !           154: \E S1 S3 state-prim -rot
        !           155: \E S4 S3 state-prim -rot
        !           156: \E S2 S4 state-prim -rot
        !           157: \E S3 S5 state-prim -rot
1.15      anton     158: \E prim-states 2drop                \ 25418
                    159: \E S0 S0 state-prim 2drop
                    160: \E S1 S0 state-prim 2drop
                    161: \ \E prim-states (tablelfind)         \ 22243
                    162: \E prim-states or                   \ 21587
                    163: \E prim-states @local2              \ 20859
                    164: \E branch-states (+loop)              \ 20006
                    165: \E prim-states 1+                   \ 17944
                    166: \E prim-states rdrop                \ 17902
                    167: \E branch-states (?do)                \ 17348
                    168: \E prim-states max                  \ 16948
                    169: \E prim-states 2*                   \ 15606
                    170: \ \E prim-states filename-match       \ 15003
                    171: \ \E prim-states (listlfind)          \ 13074
                    172: \ \E prim-states sp@                  \ 12741
                    173: \ \E prim-states fp@                  \ 12384
                    174: \ \E prim-states um/mod               \ 12288
                    175: \E prim-states 2!                   \ 11904
                    176: \ \E prim-states fill                 \ 10781
                    177: \ \E prim-states (parse-white)        \ 10624
                    178: \E branch-states (do)                 \ 10516
                    179: \ \E prim-states (hashkey1)           \ 10239
                    180: \E prim-states u<                   \ 9602
                    181: \ \E prim-states write-file           \ 8973
                    182: \E prim-states count                \ 8873
                    183: \ \E prim-states rp@                  \ 8410
                    184: \E prim-states 0<                   \ 8380
                    185: \E prim-states <                    \ 7741
                    186: \E prim-states @local1              \ 7458
                    187: \ \E prim-states move                 \ 7050
                    188: \E prim-states u>=                  \ 6138
                    189: \E branch-states (+do)                \ 5863
                    190: \ \E prim-states va-return-double     \ 5517
                    191: \E prim-states um*                  \ 5342
1.18    ! anton     192: \ \E prim-states toupper              \ 3517
1.15      anton     193: \ \E prim-states f@local1             \ 2907
                    194: \ \E prim-states rp!                  \ 2859
                    195: \ \E prim-states ?dup-?branch         \ 2829
                    196: \E prim-states d+                   \ 2671
                    197: \ \E prim-states ftuck                \ 2636
                    198: \ \E prim-states read-file            \ 2623
                    199: \ \E prim-states ms                   \ 2454
                    200: \ \E prim-states (s+loop)             \ 2429
                    201: \ \E prim-states allocate             \ 1869
                    202: \E prim-states *                    \ 1520
                    203: \E prim-states 0<>                  \ 925
                    204: \ \E prim-states noop                 \ 715
                    205: \E prim-states aligned              \ 714
                    206: \E prim-states u<=                  \ 684
                    207: \E prim-states i'                   \ 684
                    208: \E prim-states >                    \ 411
                    209: \ \E prim-states (hashlfind)          \ 397
                    210: \E prim-states 2swap                \ 336
1.18    ! anton     211: \E S0 S3 state-prim 2swap
        !           212: \E S1 S3 state-prim 2swap
        !           213: \E S2 S4 state-prim 2swap
        !           214: \E S4 S2 state-prim 2swap
1.15      anton     215: \E prim-states laddr#               \ 335
                    216: \ \E prim-states faxpy                \ 286
                    217: \ \E prim-states (next)               \ 272
                    218: \ \E prim-states (-loop)-lp+!#        \ 248
                    219: \E prim-states <=                   \ 199
                    220: \E prim-states invert               \ 170
                    221: \E branch-states (-do)                \ 169
                    222: \E prim-states 2over                \ 165
1.16      anton     223: \E S0 S2 state-prim 2over
1.18    ! anton     224: \E S1 S3 state-prim 2over
        !           225: \E S2 S4 state-prim 2over
        !           226: \E S3 S5 state-prim 2over
        !           227: \E S4 S2 state-prim 2over
        !           228: \E S5 S3 state-prim 2over
        !           229: \E S6 S4 state-prim 2over
1.15      anton     230: \E prim-states under+               \ 154
                    231: \E prim-states dnegate              \ 128
                    232: \E prim-states u<>                  \ 128
                    233: \E prim-states 0>                   \ 122
                    234: \ \E prim-states (loop)-lp+!#         \ 118
                    235: \E prim-states j                    \ 117
                    236: \E prim-states float+               \ 78
                    237: \ \E prim-states (for)                \ 68
                    238: \E prim-states 2rdrop               \ 60 \ --
                    239: \ \E prim-states f!                   \ 14
                    240: \E prim-states >l                   \ 14
                    241: \ \E prim-states close-file           \ 5
                    242: \ \E prim-states call-c               \ 4
                    243: \ \E prim-states reposition-file      \ 3
                    244: \E prim-states /                    \ 3
                    245: \ \E prim-states resize-file          \ 2
                    246: \ \E prim-states free                 \ 2
                    247: \E prim-states 2/                   \ 2
                    248: \ \E prim-states up!                  \ 1
                    249: \ \E prim-states stdin                \ 1
                    250: \ \E prim-states key?-file            \ 1
                    251: \ \E prim-states flush-icache         \ 1
                    252: \ \E prim-states cmove                \ 1
                    253: \ \E prim-states (system)             \ 1
1.9       anton     254: 
1.15      anton     255: \E ' noop is output-nextp0
                    256: \E ' noop is output-nextp1
1.9       anton     257: 
1.15      anton     258: \E gen-transitions noop
1.9       anton     259: 
1.11      anton     260: \F [ENDIF]

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>