aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorjohnvg2001-08-31 11:56:24 +0000
committerjohnvg2001-08-31 11:56:24 +0000
commit0841aa258883183d535957d20f6525560aaa358c (patch)
tree976b1b9a76d1700c9889edf4419f5dfa5fdec4e6 /main
parentadd symbol_heap parameter to function empty_cache (diff)
create symbol_heap only once
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@720 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'main')
-rw-r--r--main/Mac/CoclSystemDependent.icl29
1 files changed, 21 insertions, 8 deletions
diff --git a/main/Mac/CoclSystemDependent.icl b/main/Mac/CoclSystemDependent.icl
index 190d18b..afa1dc0 100644
--- a/main/Mac/CoclSystemDependent.icl
+++ b/main/Mac/CoclSystemDependent.icl
@@ -19,14 +19,18 @@ script_handler script files
# (ok,cache,files) = compile coclArgs cache files;
-> (if ok 1 0,store_cache_or_clear_cache cache files)
["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=1
-> (r,files)
# (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0
+// # r=1
-> (r,files)
_
// +++ handle errors from docommand
# (r,s) = DoCommandNullTerminated (script +++ "\0") 0
+// # r=1
-> (r,files)
where
args
@@ -35,14 +39,17 @@ script_handler script files
= splitArgs script
store_cache_or_clear_cache cache files
- | isMember "-clear_cache" scriptArgs && store_state empty_cache>0
- # (r,s)=DoCommandNullTerminated "clear_cache\0" 0
- | r==0
- = files
+ | isMember "-clear_cache" scriptArgs
+ | store_state (empty_cache cache.hash_table.hte_symbol_heap)>0
+ # (r,s)=DoCommandNullTerminated "clear_cache\0" 0
+ | r==0
+ = files;
+ = files;
= files;
| store_state cache>0
= files
= files
+
replace s
| s == "\xb3" /* \xb3 == >= ligature */
= "-RE"
@@ -72,14 +79,20 @@ script_handler script files
//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 length files
# string=createArray length ' ';
# r=get_apple_event_string length string;
// | trace_t length && trace_t ':' && trace_t r && trace_t '\n'
-// | trace_t string
- = script_handler (string%(6,r-1)) files;
-// = (0,files);
+// | trace_t string
+
+ | r==r
+// = (1,files);
+ = script_handler (string%(6,r-1)) files;
+// = (0,files);
// = (0,files);
clean2_compile :: !Int -> Int;