First evolved tag use

November 4, 2010
by Lee Spector (lspector)

The following solution to the tg8 regression example is the first thing I’ve evolved (and then hand simplified) that makes use of stackless tagging. It uses a single tag, associated with the code “(in integer_mult)” — this is a subroutine that multiplies whatever is on top of the integer stack by the input.

(tag_exec_837 (in integer_mult)
  6 (integer_mult tagged_778) (in -10)
  (integer_mult integer_add in integer_sub -2 in in
    integer_sub 10 integer_add tagged_20 in tagged_237
    integer_sub integer_sub integer_sub -3 integer_add
    in integer_div tagged_767 tagged_601 tagged_20 6
    tagged_237 integer_sub in integer_add tagged_20 in
    integer_add in integer_add in integer_add in
    integer_mult 1 integer_add 4 integer_add))

Leave a Reply

You must be logged in to post a comment.