]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflict
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 9 Dec 2008 23:52:45 +0000 (17:52 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 9 Dec 2008 23:52:45 +0000 (17:52 -0600)
1  2 
basis/byte-vectors/byte-vectors.factor
basis/compiler/cfg/intrinsics/intrinsics.factor
basis/specialized-arrays/functor/functor.factor
basis/stack-checker/known-words/known-words.factor
basis/tools/walker/walker.factor
core/bootstrap/primitives.factor
core/sequences/sequences-docs.factor
core/sequences/sequences.factor
vm/types.c
vm/types.h

index 0000000000000000000000000000000000000000,e24c808bbc79e91d299a77f97ac17564c61465b5..d146017db08d636d5022f64fbf833e67f562e376
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,51 +1,51 @@@
 -    <byte-array> 0 byte-vector boa ; inline\r
+ ! Copyright (C) 2008 Slava Pestov.\r
+ ! See http://factorcode.org/license.txt for BSD license.\r
+ USING: arrays kernel kernel.private math sequences\r
+ sequences.private growable byte-arrays accessors parser\r
+ prettyprint.custom ;\r
+ IN: byte-vectors\r
\r
+ TUPLE: byte-vector\r
+ { underlying byte-array }\r
+ { length array-capacity } ;\r
\r
+ : <byte-vector> ( n -- byte-vector )\r
 -    drop [ <byte-array> ] [ >fixnum ] bi byte-vector boa ;\r
++    (byte-array) 0 byte-vector boa ; inline\r
\r
+ : >byte-vector ( seq -- byte-vector )\r
+     T{ byte-vector f B{ } 0 } clone-like ;\r
\r
+ M: byte-vector like\r
+     drop dup byte-vector? [\r
+         dup byte-array?\r
+         [ dup length byte-vector boa ] [ >byte-vector ] if\r
+     ] unless ;\r
\r
+ M: byte-vector new-sequence\r
++    drop [ (byte-array) ] [ >fixnum ] bi byte-vector boa ;\r
\r
+ M: byte-vector equal?\r
+     over byte-vector? [ sequence= ] [ 2drop f ] if ;\r
\r
+ M: byte-array like\r
+     #! If we have an byte-array, we're done.\r
+     #! If we have a byte-vector, and it's at full capacity,\r
+     #! we're done. Otherwise, call resize-byte-array, which is a\r
+     #! relatively fast primitive.\r
+     drop dup byte-array? [\r
+         dup byte-vector? [\r
+             [ length ] [ underlying>> ] bi\r
+             2dup length eq?\r
+             [ nip ] [ resize-byte-array ] if\r
+         ] [ >byte-array ] if\r
+     ] unless ;\r
\r
+ M: byte-array new-resizable drop <byte-vector> ;\r
\r
+ : BV{ \ } [ >byte-vector ] parse-literal ; parsing\r
\r
+ M: byte-vector pprint* pprint-object ;\r
+ M: byte-vector pprint-delims drop \ BV{ \ } ;\r
+ M: byte-vector >pprint-sequence ;\r
\r
+ INSTANCE: byte-vector growable\r
index 4e3249f15a739a317291503683a7763da80d37c3,6656cd11f7646047e95e11317dfb6a7779a501c3..5f753308655f96a8aa1e108057b89fe8a90b695b
@@@ -9,6 -9,7 +9,7 @@@ compiler.cfg.intrinsics.allo
  compiler.cfg.intrinsics.fixnum
  compiler.cfg.intrinsics.float
  compiler.cfg.intrinsics.slots
+ compiler.cfg.intrinsics.misc
  compiler.cfg.iterator ;
  QUALIFIED: kernel
  QUALIFIED: arrays
@@@ -18,11 -19,13 +19,13 @@@ QUALIFIED: slots.privat
  QUALIFIED: strings.private
  QUALIFIED: classes.tuple.private
  QUALIFIED: math.private
+ QUALIFIED: math.integers.private
  QUALIFIED: alien.accessors
  IN: compiler.cfg.intrinsics
  
  {
      kernel.private:tag
+     kernel.private:getenv
      math.private:both-fixnums?
      math.private:fixnum+
      math.private:fixnum-
@@@ -49,7 -52,6 +52,7 @@@
      classes.tuple.private:<tuple-boa>
      arrays:<array>
      byte-arrays:<byte-array>
 +    byte-arrays:(byte-array)
      math.private:<complex>
      math.private:<ratio>
      kernel:<wrapper>
          alien.accessors:set-alien-double
      } [ t "intrinsic" set-word-prop ] each ;
  
+ : enable-fixnum-log2 ( -- )
+     \ math.integers.private:fixnum-log2 t "intrinsic" set-word-prop ;
  : emit-intrinsic ( node word -- node/f )
      {
          { \ kernel.private:tag [ drop emit-tag iterate-next ] }
+         { \ kernel.private:getenv [ emit-getenv iterate-next ] }
          { \ math.private:both-fixnums? [ drop emit-both-fixnums? iterate-next ] }
          { \ math.private:fixnum+ [ drop [ ##fixnum-add ] [ ##fixnum-add-tail ] emit-fixnum-overflow-op ] }
          { \ math.private:fixnum- [ drop [ ##fixnum-sub ] [ ##fixnum-sub-tail ] emit-fixnum-overflow-op ] }
          { \ math.private:fixnum-bitxor [ [ ^^xor ] [ ^^xor-imm ] emit-fixnum-op iterate-next ] }
          { \ math.private:fixnum-shift-fast [ emit-fixnum-shift-fast iterate-next ] }
          { \ math.private:fixnum-bitnot [ drop emit-fixnum-bitnot iterate-next ] }
+         { \ math.integers.private:fixnum-log2 [ drop emit-fixnum-log2 iterate-next ] }
          { \ math.private:fixnum*fast [ emit-fixnum*fast iterate-next ] }
          { \ math.private:fixnum< [ cc< emit-fixnum-comparison iterate-next ] }
          { \ math.private:fixnum<= [ cc<= emit-fixnum-comparison iterate-next ] }
          { \ classes.tuple.private:<tuple-boa> [ emit-<tuple-boa> iterate-next ] }
          { \ arrays:<array> [ emit-<array> iterate-next ] }
          { \ byte-arrays:<byte-array> [ emit-<byte-array> iterate-next ] }
 +        { \ byte-arrays:(byte-array) [ emit-(byte-array) iterate-next ] }
          { \ math.private:<complex> [ emit-simple-allot iterate-next ] }
          { \ math.private:<ratio> [ emit-simple-allot iterate-next ] }
          { \ kernel:<wrapper> [ emit-simple-allot iterate-next ] }
index 2a062105bb4179a7046a900a40b0ab47c167918d,28946494282ec6ef777a91aa0931f511033ab39c..579da5b84a4dd783b2d7cc0523d2127e553b4325
@@@ -1,6 -1,6 +1,6 @@@
  ! Copyright (C) 2008 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
- USING: functors sequences sequences.private prettyprint.backend
+ USING: functors sequences sequences.private prettyprint.custom
  kernel words classes math parser alien.c-types byte-arrays
  accessors summary ;
  IN: specialized-arrays.functor
@@@ -10,14 -10,10 +10,14 @@@ ERROR: bad-byte-array-length byte-arra
  M: bad-byte-array-length summary
      drop "Byte array length doesn't divide type width" ;
  
 +: (c-array) ( n c-type -- array )
 +    heap-size * (byte-array) ; inline
 +
  FUNCTOR: define-array ( T -- )
  
  A            DEFINES ${T}-array
  <A>          DEFINES <${A}>
 +(A)          DEFINES (${A})
  >A           DEFINES >${A}
  byte-array>A DEFINES byte-array>${A}
  A{           DEFINES ${A}{
@@@ -33,8 -29,6 +33,8 @@@ TUPLE: 
  
  : <A> ( n -- specialized-array ) dup T <c-array> A boa ; inline
  
 +: (A) ( n -- specialized-array ) dup T (c-array) A boa ; inline
 +
  : byte-array>A ( byte-array -- specialized-array )
      dup length T heap-size /mod 0 = [ drop T bad-byte-array-length ] unless
      swap A boa ; inline
@@@ -51,7 -45,7 +51,7 @@@ M: A set-nth-unsafe underlying>> SET-NT
  
  M: A like drop dup A instance? [ >A execute ] unless ;
  
 -M: A new-sequence drop <A> execute ;
 +M: A new-sequence drop (A) execute ;
  
  M: A equal? over A instance? [ sequence= ] [ 2drop f ] if ;
  
index 2ef181b179f63d33fe4f94eba086388bd6d76420,a998e5394b7ee127da20d9d1cbcb2e1adb3f1723..ad4cadb743a4c518ed91b1c74313fbeb8743b4f3
@@@ -5,12 -5,12 +5,12 @@@ classes sequences.private continuations
  hashtables hashtables.private io io.backend io.files
  io.files.private io.streams.c kernel kernel.private math
  math.private memory namespaces namespaces.private parser
prettyprint quotations quotations.private sbufs sbufs.private
+ quotations quotations.private sbufs sbufs.private
  sequences sequences.private slots.private strings
  strings.private system threads.private classes.tuple
  classes.tuple.private vectors vectors.private words definitions
  words.private assocs summary compiler.units system.private
- combinators locals locals.backend locals.private words.private
+ combinators locals locals.backend locals.types words.private
  quotations.private stack-checker.values
  stack-checker.alien
  stack-checker.state
@@@ -99,21 -99,18 +99,18 @@@ M: object infer-call
      3 infer->r infer-call 3 infer-r> ;
  
  : infer-dip ( -- )
-     commit-literals
      literals get
      [ \ dip def>> infer-quot-here ]
      [ pop 1 infer->r infer-quot-here 1 infer-r>  ]
      if-empty ;
  
  : infer-2dip ( -- )
-     commit-literals
      literals get
      [ \ 2dip def>> infer-quot-here ]
      [ pop 2 infer->r infer-quot-here 2 infer-r>  ]
      if-empty ;
  
  : infer-3dip ( -- )
-     commit-literals
      literals get
      [ \ 3dip def>> infer-quot-here ]
      [ pop 3 infer->r infer-quot-here 3 infer-r>  ]
  \ <complex> { real real } { complex } define-primitive
  \ <complex> make-foldable
  
- \ both-fixnums? { object object } { object object object } define-primitive
+ \ both-fixnums? { object object } { object } define-primitive
  
  \ fixnum+ { fixnum fixnum } { integer } define-primitive
  \ fixnum+ make-foldable
  \ <byte-array> { integer } { byte-array } define-primitive
  \ <byte-array> make-flushable
  
 +\ (byte-array) { integer } { byte-array } define-primitive
 +\ (byte-array) make-flushable
 +
  \ <displaced-alien> { integer c-ptr } { c-ptr } define-primitive
  \ <displaced-alien> make-flushable
  
  \ <string> { integer integer } { string } define-primitive
  \ <string> make-flushable
  
 +\ (string) { integer } { string } define-primitive
 +\ (string) make-flushable
 +
  \ array>quotation { array } { quotation } define-primitive
  \ array>quotation make-flushable
  
index 5410aef8c9799c4c7617e5a9f992e0a425d33b1b,27358b53fc8644e5a871912a8bbd5465164c86aa..a614e2eb0a72400fe64191fdf26eb7196486d902
@@@ -4,7 -4,7 +4,7 @@@ USING: threads kernel namespaces contin
  sequences math namespaces.private continuations.private
  concurrency.messaging quotations kernel.private words
  sequences.private assocs models models.filter arrays accessors
 -generic generic.standard definitions make ;
 +generic generic.standard definitions make sbufs ;
  IN: tools.walker
  
  SYMBOL: show-walker-hook ! ( status continuation thread -- )
@@@ -147,15 -147,10 +147,15 @@@ SYMBOL: +stopped
      { (call-next-method) [ (step-into-call-next-method) ] }
  } [ "step-into" set-word-prop ] assoc-each
  
 +! Never step into these words
  {
      >n ndrop >c c>
      continue continue-with
      stop suspend (spawn)
 +    ! Don't step into some sequence words since output of
 +    ! (string) and new-sequence-unsafe may not print due to
 +    ! memory safety issues
 +    <sbuf> prepare-subseq subseq new-sequence-unsafe
  } [
      dup [ execute break ] curry
      "step-into" set-word-prop
  
  : walker-loop ( -- )
      +running+ set-status
-     [ status +stopped+ eq? not ] [
+     [ status +stopped+ eq? ] [
          [
              {
                  ! ignore these commands while the thread is
                  [ walker-suspended ]
              } case
          ] handle-synchronous
-     ] [ ] while ;
+     ] [ ] until ;
  
  : associate-thread ( walker -- )
      walker-thread tset
index d88247f3831af8d7e46d15cdb284e885b3d21195,cc05efc46e3818e6e747f0e03e8d715477b31823..79cc922f7864035a86beea2146724e171e1fa50c
@@@ -68,7 -68,6 +68,6 @@@ bootstrapping? o
      "alien.accessors"
      "arrays"
      "byte-arrays"
-     "byte-vectors"
      "classes.private"
      "classes.tuple"
      "classes.tuple.private"
  } [ create-vocab drop ] each
  
  ! Builtin classes
- : define-builtin-predicate ( class -- )
-     dup class>type [ builtin-instance? ] curry define-predicate ;
  : lookup-type-number ( word -- n )
      global [ target-word ] bind type-number ;
  
@@@ -192,6 -188,10 +188,10 @@@ define-union-clas
  ] [ ] make
  define-predicate-class
  
+ "array-capacity" "sequences.private" lookup
+ [ >fixnum ] bootstrap-max-array-capacity <fake-bignum> [ fixnum-bitand ] curry append
+ "coercer" set-word-prop
  ! Catch-all class for providing a default method.
  "object" "kernel" create
  [ f f { } intersection-class define-class ]
@@@ -468,7 -468,6 +468,7 @@@ tupl
      { "dlsym" "alien" }
      { "dlclose" "alien" }
      { "<byte-array>" "byte-arrays" }
 +    { "(byte-array)" "byte-arrays" }
      { "<displaced-alien>" "alien" }
      { "alien-signed-cell" "alien.accessors" }
      { "set-alien-signed-cell" "alien.accessors" }
      { "<wrapper>" "kernel" }
      { "(clone)" "kernel" }
      { "<string>" "strings" }
 +    { "(string)" "strings.private" }
      { "array>quotation" "quotations.private" }
      { "quotation-xt" "quotations" }
      { "<tuple>" "classes.tuple.private" }
index b5e8c17d9f6d3319091e5ba00488f02bb4f5e04d,0b3e0003ac90ec40ca9897a05a2e48185731d36c..a78117c35f03064f489e0afc603d44ca114c42f0
@@@ -59,7 -59,7 +59,7 @@@ HELP: immutabl
  
  HELP: new-sequence
  { $values { "len" "a non-negative integer" } { "seq" sequence } { "newseq" "a mutable sequence" } }
 -{ $contract "Outputs a mutable sequence of length " { $snippet "n" } " which can hold the elements of " { $snippet "seq" } "." } ;
 +{ $contract "Outputs a mutable sequence of length " { $snippet "n" } " which can hold the elements of " { $snippet "seq" } ". The initial contents of the sequence are undefined." } ;
  
  HELP: new-resizable
  { $values { "len" "a non-negative integer" } { "seq" sequence } { "newseq" "a resizable mutable sequence" } }
@@@ -416,11 -416,6 +416,6 @@@ HELP: interleav
  { $description "Applies " { $snippet "quot" } " to each element in turn, also invoking " { $snippet "between" } " in-between each pair of elements." }
  { $example "USING: io sequences ;" "{ \"a\" \"b\" \"c\" } [ \"X\" write ] [ write ] interleave" "aXbXc" } ;
  
- HELP: cache-nth
- { $values { "i" "a non-negative integer" } { "seq" "a mutable sequence" } { "quot" { $quotation "( i -- elt )" } } { "elt" object } }
- { $description "If the sequence does not contain at least " { $snippet "i" } " elements or if the " { $snippet "i" } "th element of the sequence is " { $link f } ", calls the quotation to produce a new value, and stores it back into the sequence. Otherwise, this word outputs the " { $snippet "i" } "th element of the sequence." }
- { $side-effects "seq" } ;
  HELP: index
  { $values { "obj" object } { "seq" sequence } { "n" "an index" } }
  { $description "Outputs the index of the first element in the sequence equal to " { $snippet "obj" } ". If no element is found, outputs " { $link f } "." } ;
@@@ -1497,7 -1492,6 +1492,6 @@@ ARTICLE: "sequences-destructive" "Destr
  "Changing elements:"
  { $subsection change-each }
  { $subsection change-nth }
- { $subsection cache-nth }
  "Deleting elements:"
  { $subsection delete }
  { $subsection delq }
index dfe1c2b9446b2869c52cafec1386bdbf7587ecc9,8c9eff94f514d2dfc1f52d3c915f478c0b74bd15..8083cffe972e9ac631982fdeadca6eccdf8816e4
@@@ -81,7 -81,6 +81,7 @@@ GENERIC: resize ( n seq -- newseq ) flu
  ! Unsafe sequence protocol for inner loops
  GENERIC: nth-unsafe ( n seq -- elt ) flushable
  GENERIC: set-nth-unsafe ( elt n seq -- )
 +GENERIC: new-sequence-unsafe ( len seq -- newseq ) flushable
  
  M: sequence nth bounds-check nth-unsafe ;
  M: sequence set-nth bounds-check set-nth-unsafe ;
@@@ -89,8 -88,6 +89,8 @@@
  M: sequence nth-unsafe nth ;
  M: sequence set-nth-unsafe set-nth ;
  
 +M: sequence new-sequence-unsafe new-sequence ;
 +
  ! The f object supports the sequence protocol trivially
  M: f length drop 0 ;
  M: f nth-unsafe nip ;
@@@ -259,7 -256,7 +259,7 @@@ INSTANCE: repetition immutable-sequenc
  
  : prepare-subseq ( from to seq -- dst i src j n )
      #! The check-length call forces partial dispatch
 -    [ [ swap - ] dip new-sequence dup 0 ] 3keep
 +    [ [ swap - ] dip new-sequence-unsafe dup 0 ] 3keep
      -rot drop roll length check-length ; inline
  
  : check-copy ( src n dst -- )
@@@ -526,13 -523,6 +526,6 @@@ PRIVATE
  : harvest ( seq -- newseq )
      [ empty? not ] filter ;
  
- : cache-nth ( i seq quot -- elt )
-     2over ?nth dup [
-         [ 3drop ] dip
-     ] [
-         drop swap [ over [ call dup ] dip ] dip set-nth
-     ] if ; inline
  : mismatch ( seq1 seq2 -- i )
      [ min-length ] 2keep
      [ 2nth-unsafe = not ] 2curry
@@@ -838,12 -828,35 +831,35 @@@ PRIVATE
  
  : supremum ( seq -- n ) dup first [ max ] reduce ;
  
- : flip ( matrix -- newmatrix )
-     dup empty? [
-         dup [ length ] map infimum
-         swap [ [ nth-unsafe ] with { } map-as ] curry { } map-as
-     ] unless ;
  : sigma ( seq quot -- n ) [ + ] compose 0 swap reduce ; inline
  
  : count ( seq quot -- n ) [ 1 0 ? ] compose sigma ; inline
+ ! We hand-optimize flip to such a degree because type hints
+ ! cannot express that an array is an array of arrays yet, and
+ ! this word happens to be performance-critical since the compiler
+ ! itself uses it. Optimizing it like this reduced compile time.
+ <PRIVATE
+ : generic-flip ( matrix -- newmatrix )
+     [ dup first length [ length min ] reduce ] keep
+     [ [ nth-unsafe ] with { } map-as ] curry { } map-as ; inline
+ USE: arrays
+ : array-length ( array -- len )
+     { array } declare length>> ;
+ : array-flip ( matrix -- newmatrix )
+     [ dup first array-length [ array-length min ] reduce ] keep
+     [ [ array-nth ] with { } map-as ] curry { } map-as ;
+ PRIVATE>
+ : flip ( matrix -- newmatrix )
+     dup empty? [
+         dup array? [
+             dup [ array? ] all?
+             [ array-flip ] [ generic-flip ] if
+         ] [ generic-flip ] if
+     ] unless ;
diff --combined vm/types.c
index 2a18030566f05c1312b96f2838e4bd4a9a597655,1afbcd3a4062fb2ef7597851fad0274a658b599c..4a598dc601d5088a9f92bcaab81bc873c6ca09f0
@@@ -157,27 -157,18 +157,18 @@@ CELL allot_array_4(CELL v1, CELL v2, CE
        return tag_object(a);
  }
  
- F_ARRAY *reallot_array(F_ARRAY* array, CELL capacity, CELL fill)
+ F_ARRAY *reallot_array(F_ARRAY* array, CELL capacity)
  {
-       int i;
-       F_ARRAY* new_array;
        CELL to_copy = array_capacity(array);
        if(capacity < to_copy)
                to_copy = capacity;
  
        REGISTER_UNTAGGED(array);
-       REGISTER_ROOT(fill);
-       new_array = allot_array_internal(untag_header(array->header),capacity);
-       UNREGISTER_ROOT(fill);
+       F_ARRAY* new_array = allot_array_internal(untag_header(array->header),capacity);
        UNREGISTER_UNTAGGED(array);
  
        memcpy(new_array + 1,array + 1,to_copy * CELLS);
-       for(i = to_copy; i < capacity; i++)
-               put(AREF(new_array,i),fill);
+       memset((char *)AREF(new_array,to_copy),'\0',(capacity - to_copy) * CELLS);
  
        return new_array;
  }
@@@ -186,7 -177,7 +177,7 @@@ void primitive_resize_array(void
  {
        F_ARRAY* array = untag_array(dpop());
        CELL capacity = unbox_array_size();
-       dpush(tag_object(reallot_array(array,capacity,F)));
+       dpush(tag_object(reallot_array(array,capacity)));
  }
  
  F_ARRAY *growable_array_add(F_ARRAY *result, CELL elt, CELL *result_count)
  
        if(*result_count == array_capacity(result))
        {
-               result = reallot_array(result,
-                       *result_count * 2,F);
+               result = reallot_array(result,*result_count * 2);
        }
  
        UNREGISTER_ROOT(elt);
@@@ -214,7 -204,7 +204,7 @@@ F_ARRAY *growable_array_append(F_ARRAY 
        CELL new_size = *result_count + elts_size;
  
        if(new_size >= array_capacity(result))
-               result = reallot_array(result,new_size * 2,F);
+               result = reallot_array(result,new_size * 2);
  
        UNREGISTER_UNTAGGED(elts);
  
@@@ -253,12 -243,6 +243,12 @@@ void primitive_byte_array(void
        dpush(tag_object(allot_byte_array(size)));
  }
  
 +void primitive_uninitialized_byte_array(void)
 +{
 +      CELL size = unbox_array_size();
 +      dpush(tag_object(allot_byte_array_internal(size)));
 +}
 +
  F_BYTE_ARRAY *reallot_byte_array(F_BYTE_ARRAY *array, CELL capacity)
  {
        CELL to_copy = array_capacity(array);
@@@ -439,13 -423,7 +429,7 @@@ void primitive_string(void
        dpush(tag_object(allot_string(length,initial)));
  }
  
- void primitive_uninitialized_string(void)
- {
-       CELL length = unbox_array_size();
-       dpush(tag_object(allot_string_internal(length)));
- }
- F_STRING* reallot_string(F_STRING* string, CELL capacity, CELL fill)
+ F_STRING* reallot_string(F_STRING* string, CELL capacity)
  {
        CELL to_copy = string_capacity(string);
        if(capacity < to_copy)
  
        REGISTER_UNTAGGED(string);
        REGISTER_UNTAGGED(new_string);
-       fill_string(new_string,to_copy,capacity,fill);
+       fill_string(new_string,to_copy,capacity,'\0');
        UNREGISTER_UNTAGGED(new_string);
        UNREGISTER_UNTAGGED(string);
  
@@@ -485,7 -463,7 +469,7 @@@ void primitive_resize_string(void
  {
        F_STRING* string = untag_string(dpop());
        CELL capacity = unbox_array_size();
-       dpush(tag_object(reallot_string(string,capacity,0)));
+       dpush(tag_object(reallot_string(string,capacity)));
  }
  
  /* Some ugly macros to prevent a 2x code duplication */
diff --combined vm/types.h
index d8d69dc5415e69bb92792ddab1dd427fc47bfb33,ba8d9689fe8b810c5c02ddc25944b2cebc44fba2..5850489a4c1ae5bb07c3a17ff88b09443a51530a
@@@ -116,19 -116,17 +116,19 @@@ void primitive_tuple(void)
  void primitive_tuple_boa(void);
  void primitive_tuple_layout(void);
  void primitive_byte_array(void);
 +void primitive_uninitialized_byte_array(void);
  void primitive_clone(void);
  
- F_ARRAY *reallot_array(F_ARRAY* array, CELL capacity, CELL fill);
+ F_ARRAY *reallot_array(F_ARRAY* array, CELL capacity);
  F_BYTE_ARRAY *reallot_byte_array(F_BYTE_ARRAY *array, CELL capacity);
  void primitive_resize_array(void);
  void primitive_resize_byte_array(void);
  
  F_STRING* allot_string_internal(CELL capacity);
  F_STRING* allot_string(CELL capacity, CELL fill);
 +void primitive_uninitialized_string(void);
  void primitive_string(void);
- F_STRING *reallot_string(F_STRING *string, CELL capacity, CELL fill);
+ F_STRING *reallot_string(F_STRING *string, CELL capacity);
  void primitive_resize_string(void);
  
  F_STRING *memory_to_char_string(const char *string, CELL length);
@@@ -179,7 -177,7 +179,7 @@@ F_ARRAY *growable_array_append(F_ARRAY 
        result = tag_object(growable_array_append(untag_object(result),elts,&result##_count))
  
  #define GROWABLE_ARRAY_TRIM(result) \
-       result = tag_object(reallot_array(untag_object(result),result##_count,F))
+       result = tag_object(reallot_array(untag_object(result),result##_count))
  
  /* Macros to simulate a byte vector in C */
  #define GROWABLE_BYTE_ARRAY(result) \