diff options
author | johnvg | 2002-06-19 14:52:26 +0000 |
---|---|---|
committer | johnvg | 2002-06-19 14:52:26 +0000 |
commit | a475ddbcff4a53e5263989bf5e842d86946bfc30 (patch) | |
tree | f0c908c5ee4df8389860f9d98eaa7b5ba774b68a | |
parent | Removed test arguments. (diff) |
added clear_cache
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1121 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | backend/Mac/Clean System Files/backend_library | 1 | ||||
-rw-r--r-- | backendC/CleanCompilerSources/path_cache.c | 9 | ||||
-rw-r--r-- | main/Mac/CoclSystemDependent.icl | 14 |
3 files changed, 21 insertions, 3 deletions
diff --git a/backend/Mac/Clean System Files/backend_library b/backend/Mac/Clean System Files/backend_library index 16cd02d..1ff82e5 100644 --- a/backend/Mac/Clean System Files/backend_library +++ b/backend/Mac/Clean System Files/backend_library @@ -1,4 +1,5 @@ CleanCompilerLib +clear_cache BEGetVersion BEInit BECloseFiles diff --git a/backendC/CleanCompilerSources/path_cache.c b/backendC/CleanCompilerSources/path_cache.c index c8b7325..c9873d0 100644 --- a/backendC/CleanCompilerSources/path_cache.c +++ b/backendC/CleanCompilerSources/path_cache.c @@ -177,6 +177,15 @@ struct file_block **get_file_blocks_p_of_dcl_file (char *file_name) return NULL; } +extern void clear_inline_cache (void); + +void clear_cache (void) +{ + clear_path_cache(); + clear_inline_cache(); + FreePathList(); +} + void clear_path_cache (void) { int n; diff --git a/main/Mac/CoclSystemDependent.icl b/main/Mac/CoclSystemDependent.icl index 39e2451..2cc2b22 100644 --- a/main/Mac/CoclSystemDependent.icl +++ b/main/Mac/CoclSystemDependent.icl @@ -24,10 +24,12 @@ script_handler script files ["clear_cache"] # 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=clear_cache 1 // # r=1 -> (r,files) - # (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0 +// # (r,s) = DoCommandNullTerminated ("clear_cache" +++ "\0") 0 + # r=clear_cache 1 // # r=1 -> (r,files) _ @@ -44,7 +46,8 @@ script_handler script files store_cache_or_clear_cache cache files | isMember "-clear_cache" scriptArgs | store_state (empty_cache cache.hash_table.hte_symbol_heap)>0 - # (r,s)=DoCommandNullTerminated "clear_cache\0" 0 + # r=clear_cache 1 +// # (r,s)=DoCommandNullTerminated "clear_cache\0" 0 | r==0 = files; = files; @@ -115,6 +118,11 @@ set_compiler_id id = code { ccall set_compiler_id "I:I" }; +clear_cache :: !Int -> Int; +clear_cache i = code { + ccall clear_cache ":V:I" + } + :: * MyFiles = MyFiles; create_myfiles = MyFiles; |