Commit 8c990618 authored by John van Groningen's avatar John van Groningen
Browse files

added clear_cache

parent 07aed48d
CleanCompilerLib
clear_cache
BEGetVersion
BEInit
BECloseFiles
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
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