Commit 437a9be4 authored by John van Groningen's avatar John van Groningen
Browse files

create symbol_heap only once

parent 1a6c812d
...@@ -19,14 +19,18 @@ script_handler script files ...@@ -19,14 +19,18 @@ script_handler script files
# (ok,cache,files) = compile coclArgs cache files; # (ok,cache,files) = compile coclArgs cache files;
-> (if ok 1 0,store_cache_or_clear_cache cache files) -> (if ok 1 0,store_cache_or_clear_cache cache files)
["clear_cache"] ["clear_cache"]
| store_state empty_cache>0 # cache = load_state 0;
| store_state (empty_cache cache.hash_table.hte_symbol_heap)>0
# (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0 # (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0
// # r=1
-> (r,files) -> (r,files)
# (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0 # (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0
// # r=1
-> (r,files) -> (r,files)
_ _
// +++ handle errors from docommand // +++ handle errors from docommand
# (r,s) = DoCommandNullTerminated (script +++ "\0") 0 # (r,s) = DoCommandNullTerminated (script +++ "\0") 0
// # r=1
-> (r,files) -> (r,files)
where where
args args
...@@ -35,14 +39,17 @@ script_handler script files ...@@ -35,14 +39,17 @@ script_handler script files
= splitArgs script = splitArgs script
store_cache_or_clear_cache cache files store_cache_or_clear_cache cache files
| isMember "-clear_cache" scriptArgs && store_state empty_cache>0 | isMember "-clear_cache" scriptArgs
# (r,s)=DoCommandNullTerminated "clear_cache\0" 0 | store_state (empty_cache cache.hash_table.hte_symbol_heap)>0
| r==0 # (r,s)=DoCommandNullTerminated "clear_cache\0" 0
= files | r==0
= files;
= files;
= files; = files;
| store_state cache>0 | store_state cache>0
= files = files
= files = files
replace s replace s
| s == "\xb3" /* \xb3 == >= ligature */ | s == "\xb3" /* \xb3 == >= ligature */
= "-RE" = "-RE"
...@@ -72,14 +79,20 @@ script_handler script files ...@@ -72,14 +79,20 @@ script_handler script files
//import StdDebug,StdString; //import StdDebug,StdString;
//get_apple_event_string_dummy :: !Int !String -> Int;
//get_apple_event_string_dummy _ _ = 0;
clean2_compiler :: !Int !*Files -> (!Int,!*Files); clean2_compiler :: !Int !*Files -> (!Int,!*Files);
clean2_compiler length files clean2_compiler length files
# string=createArray length ' '; # string=createArray length ' ';
# r=get_apple_event_string length string; # r=get_apple_event_string length string;
// | trace_t length && trace_t ':' && trace_t r && trace_t '\n' // | trace_t length && trace_t ':' && trace_t r && trace_t '\n'
// | trace_t string // | trace_t string
= script_handler (string%(6,r-1)) files;
// = (0,files); | r==r
// = (1,files);
= script_handler (string%(6,r-1)) files;
// = (0,files);
// = (0,files); // = (0,files);
clean2_compile :: !Int -> Int; clean2_compile :: !Int -> Int;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment