]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflicts
authorSlava Pestov <slava@factorcode.org>
Sun, 6 Jan 2008 18:17:50 +0000 (14:17 -0400)
committerSlava Pestov <slava@factorcode.org>
Sun, 6 Jan 2008 18:17:50 +0000 (14:17 -0400)
1  2 
core/bootstrap/primitives.factor
core/io/crc32/crc32.factor
core/source-files/source-files.factor
extra/assoc-heaps/assoc-heaps.factor
extra/combinators/lib/lib.factor
extra/delegate/delegate.factor
extra/macros/macros.factor
extra/sequences/lib/lib.factor
extra/xml/utilities/utilities.factor

index 586d4c0dfaa4dcd7228af37bbc38a1f8cff8ef30,297d49e6965c6f4aacb24ab69328242eec0f6375..1c09ae1c60bd067b963a5e6da793bca69344d391
mode 100755,100644..100755
@@@ -1,4 -1,4 +1,4 @@@
--! Copyright (C) 2004, 2007 Slava Pestov.
++! Copyright (C) 2004, 2008 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
  IN: bootstrap.primitives
  USING: alien arrays byte-arrays generic hashtables
@@@ -406,205 -605,5 +406,205 @@@ builtins get num-tags get tail f union-
  "tombstone" "hashtables.private" lookup t
  2array >tuple 1quotation define-inline
  
-     { "<word>" "words.private" }
 +! Primitive words
 +: make-primitive ( word vocab n -- )
 +    >r create dup reset-word r> [ do-primitive ] curry [ ] like define ;
 +
 +{
 +    { "(execute)" "words.private" }
 +    { "(call)" "kernel.private" }
 +    { "uncurry" "kernel.private" }
 +    { "string>sbuf" "sbufs.private" }
 +    { "bignum>fixnum" "math.private" }
 +    { "float>fixnum" "math.private" }
 +    { "fixnum>bignum" "math.private" }
 +    { "float>bignum" "math.private" }
 +    { "fixnum>float" "math.private" }
 +    { "bignum>float" "math.private" }
 +    { "<ratio>" "math.private" }
 +    { "string>float" "math.private" }
 +    { "float>string" "math.private" }
 +    { "float>bits" "math" }
 +    { "double>bits" "math" }
 +    { "bits>float" "math" }
 +    { "bits>double" "math" }
 +    { "<complex>" "math.private" }
 +    { "fixnum+" "math.private" }
 +    { "fixnum+fast" "math.private" }
 +    { "fixnum-" "math.private" }
 +    { "fixnum-fast" "math.private" }
 +    { "fixnum*" "math.private" }
 +    { "fixnum*fast" "math.private" }
 +    { "fixnum/i" "math.private" }
 +    { "fixnum-mod" "math.private" }
 +    { "fixnum/mod" "math.private" }
 +    { "fixnum-bitand" "math.private" }
 +    { "fixnum-bitor" "math.private" }
 +    { "fixnum-bitxor" "math.private" }
 +    { "fixnum-bitnot" "math.private" }
 +    { "fixnum-shift" "math.private" }
 +    { "fixnum<" "math.private" }
 +    { "fixnum<=" "math.private" }
 +    { "fixnum>" "math.private" }
 +    { "fixnum>=" "math.private" }
 +    { "bignum=" "math.private" }
 +    { "bignum+" "math.private" }
 +    { "bignum-" "math.private" }
 +    { "bignum*" "math.private" }
 +    { "bignum/i" "math.private" }
 +    { "bignum-mod" "math.private" }
 +    { "bignum/mod" "math.private" }
 +    { "bignum-bitand" "math.private" }
 +    { "bignum-bitor" "math.private" }
 +    { "bignum-bitxor" "math.private" }
 +    { "bignum-bitnot" "math.private" }
 +    { "bignum-shift" "math.private" }
 +    { "bignum<" "math.private" }
 +    { "bignum<=" "math.private" }
 +    { "bignum>" "math.private" }
 +    { "bignum>=" "math.private" }
 +    { "bignum-bit?" "math.private" }
 +    { "bignum-log2" "math.private" }
 +    { "byte-array>bignum" "math" }
 +    { "float=" "math.private" }
 +    { "float+" "math.private" }
 +    { "float-" "math.private" }
 +    { "float*" "math.private" }
 +    { "float/f" "math.private" }
 +    { "float-mod" "math.private" }
 +    { "float<" "math.private" }
 +    { "float<=" "math.private" }
 +    { "float>" "math.private" }
 +    { "float>=" "math.private" }
++    { "<word>" "words" }
 +    { "word-xt" "words" }
 +    { "drop" "kernel" }
 +    { "2drop" "kernel" }
 +    { "3drop" "kernel" }
 +    { "dup" "kernel" }
 +    { "2dup" "kernel" }
 +    { "3dup" "kernel" }
 +    { "rot" "kernel" }
 +    { "-rot" "kernel" }
 +    { "dupd" "kernel" }
 +    { "swapd" "kernel" }
 +    { "nip" "kernel" }
 +    { "2nip" "kernel" }
 +    { "tuck" "kernel" }
 +    { "over" "kernel" }
 +    { "pick" "kernel" }
 +    { "swap" "kernel" }
 +    { ">r" "kernel" }
 +    { "r>" "kernel" }
 +    { "eq?" "kernel" }
 +    { "getenv" "kernel.private" }
 +    { "setenv" "kernel.private" }
 +    { "(stat)" "io.files.private" }
 +    { "(directory)" "io.files.private" }
 +    { "data-gc" "memory" }
 +    { "code-gc" "memory" }
 +    { "gc-time" "memory" }
 +    { "save-image" "memory" }
 +    { "save-image-and-exit" "memory" }
 +    { "datastack" "kernel" }
 +    { "retainstack" "kernel" }
 +    { "callstack" "kernel" }
 +    { "set-datastack" "kernel" }
 +    { "set-retainstack" "kernel" }
 +    { "set-callstack" "kernel" }
 +    { "exit" "system" }
 +    { "data-room" "memory" }
 +    { "code-room" "memory" }
 +    { "os-env" "system" }
 +    { "millis" "system" }
 +    { "type" "kernel.private" }
 +    { "tag" "kernel.private" }
 +    { "cwd" "io.files" }
 +    { "cd" "io.files" }
 +    { "modify-code-heap" "words.private" }
 +    { "dlopen" "alien" }
 +    { "dlsym" "alien" }
 +    { "dlclose" "alien" }
 +    { "<byte-array>" "byte-arrays" }
 +    { "<bit-array>" "bit-arrays" }
 +    { "<displaced-alien>" "alien" }
 +    { "alien-signed-cell" "alien" }
 +    { "set-alien-signed-cell" "alien" }
 +    { "alien-unsigned-cell" "alien" }
 +    { "set-alien-unsigned-cell" "alien" }
 +    { "alien-signed-8" "alien" }
 +    { "set-alien-signed-8" "alien" }
 +    { "alien-unsigned-8" "alien" }
 +    { "set-alien-unsigned-8" "alien" }
 +    { "alien-signed-4" "alien" }
 +    { "set-alien-signed-4" "alien" }
 +    { "alien-unsigned-4" "alien" }
 +    { "set-alien-unsigned-4" "alien" }
 +    { "alien-signed-2" "alien" }
 +    { "set-alien-signed-2" "alien" }
 +    { "alien-unsigned-2" "alien" }
 +    { "set-alien-unsigned-2" "alien" }
 +    { "alien-signed-1" "alien" }
 +    { "set-alien-signed-1" "alien" }
 +    { "alien-unsigned-1" "alien" }
 +    { "set-alien-unsigned-1" "alien" }
 +    { "alien-float" "alien" }
 +    { "set-alien-float" "alien" }
 +    { "alien-double" "alien" }
 +    { "set-alien-double" "alien" }
 +    { "alien-cell" "alien" }
 +    { "set-alien-cell" "alien" }
 +    { "alien>char-string" "alien" }
 +    { "string>char-alien" "alien" }
 +    { "alien>u16-string" "alien" }
 +    { "string>u16-alien" "alien" }
 +    { "(throw)" "kernel.private" }
 +    { "string>memory" "alien" }
 +    { "memory>string" "alien" }
 +    { "alien-address" "alien" }
 +    { "slot" "slots.private" }
 +    { "set-slot" "slots.private" }
 +    { "char-slot" "strings.private" }
 +    { "set-char-slot" "strings.private" }
 +    { "resize-array" "arrays" }
 +    { "resize-string" "strings" }
 +    { "(hashtable)" "hashtables.private" }
 +    { "<array>" "arrays" }
 +    { "begin-scan" "memory" }
 +    { "next-object" "memory" }
 +    { "end-scan" "memory" }
 +    { "size" "memory" }
 +    { "die" "kernel" }
 +    { "fopen" "io.streams.c" }
 +    { "fgetc" "io.streams.c" }
 +    { "fread" "io.streams.c" }
 +    { "fwrite" "io.streams.c" }
 +    { "fflush" "io.streams.c" }
 +    { "fclose" "io.streams.c" }
 +    { "<wrapper>" "kernel" }
 +    { "(clone)" "kernel" }
 +    { "array>vector" "vectors.private" }
 +    { "<string>" "strings" }
 +    { "(>tuple)" "tuples.private" }
 +    { "array>quotation" "quotations.private" }
 +    { "quotation-xt" "quotations" }
 +    { "<tuple>" "tuples.private" }
 +    { "tuple>array" "tuples" }
 +    { "profiling" "tools.profiler.private" }
 +    { "become" "kernel.private" }
 +    { "(sleep)" "threads.private" }
 +    { "<float-array>" "float-arrays" }
 +    { "curry" "kernel" }
 +    { "<tuple-boa>" "tuples.private" }
 +      { "class-hash" "kernel.private" }
 +    { "callstack>array" "kernel" }
 +    { "innermost-frame-quot" "kernel.private" }
 +    { "innermost-frame-scan" "kernel.private" }
 +    { "set-innermost-frame-quot" "kernel.private" }
 +    { "call-clear" "kernel" }
 +    { "(os-envs)" "system" }
 +}
 +dup length [ >r first2 r> make-primitive ] 2each
 +
  ! Bump build number
 -"build" "kernel" create build 1+ 1quotation define-compound
 +"build" "kernel" create build 1+ 1quotation define
index 53da1ed5a51ccb9cd4e3842967526cedc85c01a6,1c0c2e9f5cd144f6dc910a302c85be158b4f8226..d253170ac05836dc31a343fd8149c519dc0aa48f
mode 100755,100644..100755
index d715fd0c953ceb692e02315c8286a93f150c8ec2,4df59e5dd926e80eeb5f66b91068cd2b8dbee348..601963eebc3d3a9fd8d55c4d9a32f8ec28469ad1
mode 100755,100644..100755
index a5471c213fc3b2fef5ff06c338adc4c958b356d9,552845b00ee98304741d665f059e20bc6041d296..55a5aa7f6216c36dcf1de8eebdefc040c5790884
mode 100755,100644..100755
index 39a04571f714ea9ee55a4886c28227c09e7e9137,a24e7bd7913f668ce7a70970d56d878b6928a529..e9bf49b15ab4c43a8892131e4223113e23885b1d
mode 100755,100644..100755
index 44da847d9e6e57239bc5573ce5b88fdc2b7d51fa,8ff5e2110b8d68e0f727721dfd1ade05b2124dc0..a0b2c7817c7b6793fe28c89c71ed3ac73e42bf6e
mode 100755,100644..100755
index 586156c0400190545efdf3e8836f1a2d98867179,9c1cb6210bb56a04054501312c7c2280bbdb4e01..2efd38d4692d0b29e98d3362d46b30e2f5b87519
@@@ -10,10 -10,10 +10,10 @@@ IN: macro
      CREATE dup reset-generic parse-definition
      over "declared-effect" word-prop effect-in length ;
  
- : (MACRO:)
-     >r
-     2dup "macro" set-word-prop
-     2dup [ call ] append define
+ : (MACRO:) ( word definition effect-in -- )
+     >r 2dup "macro" set-word-prop
+     2dup over "declared-effect" word-prop memoize-quot
 -    [ call ] append define-compound 
++    [ call ] append define
      r> define-transform ;
  
  : MACRO:
index 269c22e81138c908df03a9efc564781d5bd6a824,442b5f317d728c5784e3ddc4b6592642a55f25ed..1aefee732155756bb40c441835fb6283e733dbe9
mode 100755,100644..100755
index 798b7f571aed925766b567463e99886e91410cf8,2d2c6a1d042c3c7b6894880d75fe9a74b7d6eb09..0d910298f00056d50e8e5ba5671077de05eb809f
mode 100755,100644..100755
 -! Copyright (C) 2005, 2006 Daniel Ehrenberg\r
 -! See http://factorcode.org/license.txt for BSD license.\r
 -USING: kernel namespaces sequences words io assocs\r
 -quotations strings parser arrays xml.data xml.writer debugger\r
 -splitting vectors sequences.deep ;\r
 -IN: xml.utilities\r
 -\r
 -! * System for words specialized on tag names\r
 -\r
 -TUPLE: process-missing process tag ;\r
 -M: process-missing error.\r
 -    "Tag <" write\r
 -    dup process-missing-tag print-name\r
 -    "> not implemented on process process " write\r
 -    process-missing-process word-name print ;\r
 -\r
 -: run-process ( tag word -- )\r
 -    2dup "xtable" word-prop\r
 -    >r dup name-tag r> at* [ 2nip call ] [\r
 -        drop \ process-missing construct-boa throw\r
 -    ] if ;\r
 -\r
 -: PROCESS:\r
 -    CREATE\r
 -    dup H{ } clone "xtable" set-word-prop\r
 -    dup [ run-process ] curry define-compound ; parsing\r
 -\r
 -: TAG:\r
 -    scan scan-word\r
 -    parse-definition\r
 -    swap "xtable" word-prop\r
 -    rot "/" split [ >r 2dup r> swap set-at ] each 2drop ;\r
 -    parsing\r
 -\r
 -\r
 -! * Common utility functions\r
 -\r
 -: build-tag* ( items name -- tag )\r
 -    assure-name swap >r f r> <tag> ;\r
 -\r
 -: build-tag ( item name -- tag )\r
 -    >r 1array r> build-tag* ;\r
 -\r
 -: standard-prolog ( -- prolog )\r
 -    T{ prolog f "1.0" "iso-8859-1" f } ;\r
 -\r
 -: build-xml ( tag -- xml )\r
 -    standard-prolog { } rot { } <xml> ;\r
 -\r
 -: children>string ( tag -- string )\r
 -    tag-children\r
 -    dup [ string? ] all?\r
 -    [ "XML tag unexpectedly contains non-text children" throw ] unless\r
 -    concat ;\r
 -\r
 -: children-tags ( tag -- sequence )\r
 -    tag-children [ tag? ] subset ;\r
 -\r
 -: first-child-tag ( tag -- tag )\r
 -    tag-children [ tag? ] find nip ;\r
 -\r
 -! * Accessing part of an XML document\r
 -! for tag- words, a start means that it searches all children\r
 -! and no star searches only direct children\r
 -\r
 -: tag-named? ( name elem -- ? )\r
 -    dup tag? [ names-match? ] [ 2drop f ] if ;\r
 -\r
 -: tags@ ( tag name -- children name )\r
 -    >r { } like r> assure-name ;\r
 -\r
 -: deep-tag-named ( tag name/string -- matching-tag )\r
 -    assure-name [ swap tag-named? ] curry deep-find ;\r
 -\r
 -: deep-tags-named ( tag name/string -- tags-seq )\r
 -    tags@ [ swap tag-named? ] curry deep-subset ;\r
 -\r
 -: tag-named ( tag name/string -- matching-tag )\r
 -    ! like get-name-tag but only looks at direct children,\r
 -    ! not all the children down the tree.\r
 -    assure-name swap [ tag-named? ] curry* find nip ;\r
 -\r
 -: tags-named ( tag name/string -- tags-seq )\r
 -    tags@ swap [ tag-named? ] curry* subset ;\r
 -\r
 -: tag-with-attr? ( elem attr-value attr-name -- ? )\r
 -    rot dup tag? [ at = ] [ 3drop f ] if ;\r
 -\r
 -: tag-with-attr ( tag attr-value attr-name -- matching-tag )\r
 -    assure-name [ tag-with-attr? ] 2curry find nip ;\r
 -\r
 -: tags-with-attr ( tag attr-value attr-name -- tags-seq )\r
 -    tags@ [ tag-with-attr? ] 2curry subset tag-children ;\r
 -\r
 -: deep-tag-with-attr ( tag attr-value attr-name -- matching-tag )\r
 -    assure-name [ tag-with-attr? ] 2curry deep-find ;\r
 -\r
 -: deep-tags-with-attr ( tag attr-value attr-name -- tags-seq )\r
 -    tags@ [ tag-with-attr? ] 2curry deep-subset ;\r
 -\r
 -: get-id ( tag id -- elem ) ! elem=tag.getElementById(id)\r
 -    "id" deep-tag-with-attr ;\r
 -\r
 -: deep-tags-named-with-attr ( tag tag-name attr-value attr-name -- tags )\r
 -    >r >r deep-tags-named r> r> tags-with-attr ;\r
 -\r
 -: assert-tag ( name name -- )\r
 -    names-match? [ "Unexpected XML tag found" throw ] unless ;\r
 -\r
 -: insert-children ( children tag -- )\r
 -    dup tag-children [ push-all ]\r
 -    [ >r V{ } like r> set-tag-children ] if ;\r
 -\r
 -: insert-child ( child tag -- )\r
 -    >r 1vector r> insert-children ;\r
 +! Copyright (C) 2005, 2006 Daniel Ehrenberg
 +! See http://factorcode.org/license.txt for BSD license.
 +USING: kernel namespaces sequences words io assocs
 +quotations strings parser arrays xml.data xml.writer debugger
- splitting vectors ;
++splitting vectors sequences.deep ;
 +IN: xml.utilities
 +
 +! * System for words specialized on tag names
 +
 +TUPLE: process-missing process tag ;
 +M: process-missing error.
 +    "Tag <" write
 +    dup process-missing-tag print-name
 +    "> not implemented on process process " write
 +    process-missing-process word-name print ;
 +
 +: run-process ( tag word -- )
 +    2dup "xtable" word-prop
 +    >r dup name-tag r> at* [ 2nip call ] [
 +        drop \ process-missing construct-boa throw
 +    ] if ;
 +
 +: PROCESS:
 +    CREATE
 +    dup H{ } clone "xtable" set-word-prop
 +    dup [ run-process ] curry define-compound ; parsing
 +
 +: TAG:
 +    scan scan-word
 +    parse-definition
 +    swap "xtable" word-prop
 +    rot "/" split [ >r 2dup r> swap set-at ] each 2drop ;
 +    parsing
 +
 +
 +! * Common utility functions
 +
 +: build-tag* ( items name -- tag )
 +    assure-name swap >r f r> <tag> ;
 +
 +: build-tag ( item name -- tag )
 +    >r 1array r> build-tag* ;
 +
 +: standard-prolog ( -- prolog )
 +    T{ prolog f "1.0" "iso-8859-1" f } ;
 +
 +: build-xml ( tag -- xml )
 +    standard-prolog { } rot { } <xml> ;
 +
 +: children>string ( tag -- string )
 +    tag-children
 +    dup [ string? ] all?
 +    [ "XML tag unexpectedly contains non-text children" throw ] unless
 +    concat ;
 +
 +: children-tags ( tag -- sequence )
 +    tag-children [ tag? ] subset ;
 +
 +: first-child-tag ( tag -- tag )
 +    tag-children [ tag? ] find nip ;
 +
- ! * Utilities for searching through XML documents
- ! These all work from the outside in, top to bottom.
- : with-delegate ( object quot -- object )
-     over clone >r >r delegate r> call r>
-     [ set-delegate ] keep ; inline
- GENERIC# xml-each 1 ( quot tag -- ) inline
- M: tag xml-each
-     [ call ] 2keep
-     swap tag-children [ swap xml-each ] curry* each ;
- M: object xml-each
-     call ;
- M: xml xml-each
-     >r delegate r> xml-each ;
- GENERIC# xml-map 1 ( quot tag -- tag ) inline
- M: tag xml-map
-     swap clone over >r swap call r>
-     swap [ tag-children [ swap xml-map ] curry* map ] keep
-     [ set-tag-children ] keep ;
- M: object xml-map
-     call ;
- M: xml xml-map
-     swap [ swap xml-map ] with-delegate ;
- : xml-subset ( quot tag -- seq ) ! quot: tag -- ?
-     V{ } clone rot [
-         swap >r [ swap call ] 2keep rot r>
-         swap [ [ push ] keep ] [ nip ] if
-     ] xml-each nip ;
- GENERIC# xml-find 1 ( quot tag -- tag ) inline
- M: tag xml-find
-     [ call ] 2keep swap rot [
-         f swap
-         [ nip over >r swap xml-find r> swap dup ] find
-         2drop ! leaves result of quot
-     ] unless nip ;
- M: object xml-find
-     keep f ? ;
- M: xml xml-find
-     >r delegate r> xml-find ;
- GENERIC# xml-inject 1 ( quot tag -- ) inline
- M: tag xml-inject
-     swap [
-         swap [ call ] keep
-         [ xml-inject ] keep
-     ] change-each ;
- M: object xml-inject 2drop ;
- M: xml xml-inject >r delegate >r xml-inject ;
 +! * Accessing part of an XML document
 +! for tag- words, a start means that it searches all children
 +! and no star searches only direct children
 +
 +: tag-named? ( name elem -- ? )
 +    dup tag? [ names-match? ] [ 2drop f ] if ;
 +
- : tag-named* ( tag name/string -- matching-tag )
-     assure-name swap [ dupd tag-named? ] xml-find nip ;
++: tags@ ( tag name -- children name )
++    >r { } like r> assure-name ;
++
++: deep-tag-named ( tag name/string -- matching-tag )
++    assure-name [ swap tag-named? ] curry deep-find ;
 +
- : tags-named* ( tag name/string -- tags-seq )
-     assure-name swap [ dupd tag-named? ] xml-subset nip ;
++: deep-tags-named ( tag name/string -- tags-seq )
++    tags@ [ swap tag-named? ] curry deep-subset ;
 +
 +: tag-named ( tag name/string -- matching-tag )
 +    ! like get-name-tag but only looks at direct children,
 +    ! not all the children down the tree.
 +    assure-name swap [ tag-named? ] curry* find nip ;
 +
 +: tags-named ( tag name/string -- tags-seq )
-     assure-name swap [ tag-named? ] curry* subset ;
- : assert-tag ( name name -- )
-     names-match? [ "Unexpected XML tag found" throw ] unless ;
- : insert-children ( children tag -- )
-     dup tag-children [ push-all ]
-     [ >r V{ } like r> set-tag-children ] if ;
- : insert-child ( child tag -- )
-     >r 1vector r> insert-children ;
++    tags@ swap [ tag-named? ] curry* subset ;
 +
 +: tag-with-attr? ( elem attr-value attr-name -- ? )
-     rot dup tag? [ at = ] [ drop f ] if ;
++    rot dup tag? [ at = ] [ 3drop f ] if ;
 +
 +: tag-with-attr ( tag attr-value attr-name -- matching-tag )
 +    assure-name [ tag-with-attr? ] 2curry find nip ;
 +
 +: tags-with-attr ( tag attr-value attr-name -- tags-seq )
-     assure-name [ tag-with-attr? ] 2curry subset ;
++    tags@ [ tag-with-attr? ] 2curry subset tag-children ;
 +
- : tag-with-attr* ( tag attr-value attr-name -- matching-tag )
-     assure-name [ tag-with-attr? ] 2curry xml-find nip ;
++: deep-tag-with-attr ( tag attr-value attr-name -- matching-tag )
++    assure-name [ tag-with-attr? ] 2curry deep-find ;
 +
- : tags-with-attr* ( tag attr-value attr-name -- tags-seq )
-     assure-name [ tag-with-attr? ] 2curry xml-subset ;
++: deep-tags-with-attr ( tag attr-value attr-name -- tags-seq )
++    tags@ [ tag-with-attr? ] 2curry deep-subset ;
 +
 +: get-id ( tag id -- elem ) ! elem=tag.getElementById(id)
-     "id" tag-with-attr ;
++    "id" deep-tag-with-attr ;
++
++: deep-tags-named-with-attr ( tag tag-name attr-value attr-name -- tags )
++    >r >r deep-tags-named r> r> tags-with-attr ;
++
++: assert-tag ( name name -- )
++    names-match? [ "Unexpected XML tag found" throw ] unless ;
 +
- : tags-named-with-attr* ( tag tag-name attr-value attr-name -- tags )
-     >r >r tags-named* r> r> tags-with-attr ;
++: insert-children ( children tag -- )
++    dup tag-children [ push-all ]
++    [ >r V{ } like r> set-tag-children ] if ;
++
++: insert-child ( child tag -- )
++    >r 1vector r> insert-children ;