dup void? [ no-c-type ] when
dup c-type-name? [ c-type ] when ;
+<PRIVATE
+
: parse-array-type ( name -- dims c-type )
"[" split unclip
- [ [ "]" ?tail drop parse-word ] map ] dip ;
+ [ [ "]" ?tail drop string>number ] map ] dip ;
+
+PRIVATE>
M: string c-type ( name -- c-type )
CHAR: ] over member? [
: parse-c-type-name ( name -- word )
dup search [ ] [ no-word ] ?if ;
+: parse-array-type ( name -- dims c-type )
+ "[" split unclip
+ [ [ "]" ?tail drop parse-word ] map ] dip ;
+
: (parse-c-type) ( string -- type )
{
{ [ dup "void" = ] [ drop void ] }
run-file
] when ;
+: strip-specialized-arrays ( -- )
+ strip-dictionary? "specialized-arrays" vocab and [
+ "Stripping specialized arrays" show
+ "vocab:tools/deploy/shaker/strip-specialized-arrays.factor"
+ run-file
+ ] when ;
+
: strip-word-names ( words -- )
"Stripping word names" show
[ f >>name f >>vocabulary drop ] each ;
strip-call
strip-cocoa
strip-debugger
+ strip-specialized-arrays
compute-next-methods
strip-init-hooks
add-command-line-hook
--- /dev/null
+IN: specialized-arrays
+
+ERROR: cannot-define-array-in-deployed-app type ;
+
+: define-array-vocab ( type -- ) cannot-define-array-in-deployed-app ;