aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohnvg2004-04-29 11:14:45 +0000
committerjohnvg2004-04-29 11:14:45 +0000
commite0d042aa73c67f8cb3de5a98fe81861d1b7754d0 (patch)
tree55be147892a36e61a0fdf8ad3fa29cd910190af1
parentadd set_compiler_id and get_compiler_id (diff)
pass compiler_id in message to the IDE
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1493 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r--main/Windows/CoclSystemDependent.dcl2
-rw-r--r--main/Windows/CoclSystemDependent.icl15
2 files changed, 12 insertions, 5 deletions
diff --git a/main/Windows/CoclSystemDependent.dcl b/main/Windows/CoclSystemDependent.dcl
index 992fa23..03df339 100644
--- a/main/Windows/CoclSystemDependent.dcl
+++ b/main/Windows/CoclSystemDependent.dcl
@@ -23,6 +23,6 @@ SystemDependentInitialIO :: [a]
ensureCleanSystemFilesExists :: !String !*Files -> (!Bool, !*Files)
-set_compiler_id :: Int -> Int
+set_compiler_id :: !Int -> Int
compiler_loop :: ([{#Char}] *st -> *(Bool, *st)) *st -> (!Bool, !*st)
diff --git a/main/Windows/CoclSystemDependent.icl b/main/Windows/CoclSystemDependent.icl
index dad5c47..b88dd05 100644
--- a/main/Windows/CoclSystemDependent.icl
+++ b/main/Windows/CoclSystemDependent.icl
@@ -26,13 +26,20 @@ ensureCleanSystemFilesExists :: !String !*Files -> (!Bool, !*Files)
ensureCleanSystemFilesExists path env
= ensureDirectoryExists path env
-set_compiler_id :: Int -> Int
-set_compiler_id compiler_id = compiler_id
-
import thread_message;
import code from "thread_message.obj";
+set_compiler_id :: !Int -> Int
+set_compiler_id compiler_id = code {
+ ccall set_compiler_id "I:I"
+ };
+
+get_compiler_id :: Int
+get_compiler_id = code {
+ ccall get_compiler_id ":I"
+ };
+
compiler_loop :: ([{#Char}] *st -> *(Bool, *st)) *st -> (!Bool, !*st)
compiler_loop compile compile_state
| length commandArgs==2 && commandArgs!!0=="-ide"
@@ -119,7 +126,7 @@ compile_files compile thread_id wm_number compile_state
["cocl":cocl_args]
# (ok,compile_state)=compile cocl_args compile_state
# result=if ok 0(-1);
- # r=send_integers_to_thread thread_id wm_number 0 result;
+ # r=send_integers_to_thread thread_id wm_number get_compiler_id result;
| r==0
-> abort "compile_files 3";
-> compile_files compile thread_id wm_number compile_state