diff options
author | clean | 2000-09-25 10:17:20 +0000 |
---|---|---|
committer | clean | 2000-09-25 10:17:20 +0000 |
commit | e734b1c84b7d5e16e72712d937cd0fc2413a9105 (patch) | |
tree | 5f82d0ba8d6c48c6c3c23cc24528e812457a9888 /frontend | |
parent | error messages become more and more beautiful (diff) |
added arrayCopyBegin
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@225 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/_aconcat.dcl | 15 | ||||
-rw-r--r-- | frontend/_aconcat.icl | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/frontend/_aconcat.dcl b/frontend/_aconcat.dcl index 487f1f3..96c2652 100644 --- a/frontend/_aconcat.dcl +++ b/frontend/_aconcat.dcl @@ -44,3 +44,18 @@ where sr=s1+s2 s1=size a s2=length l + +arrayCopyBegin a s + :== copy_elements a r0 0 +where + /*2.0 + r0=_createArray s +0.2*/ +//1.3 + r0=_createArrayc s +//3.1 + copy_elements a1 a2 i + | i<size a2 + # (e,a1) = a1![i] + = copy_elements a1 {a2 & [i]=e} (i+1) + = (a2,a1) diff --git a/frontend/_aconcat.icl b/frontend/_aconcat.icl index 67d7771..1e5dc2c 100644 --- a/frontend/_aconcat.icl +++ b/frontend/_aconcat.icl @@ -44,3 +44,18 @@ where sr=s1+s2 s1=size a s2=length l + +arrayCopyBegin a s + :== copy_elements a r0 0 +where + /*2.0 + r0=_createArray s +0.2*/ +//1.3 + r0=_createArrayc s +//3.1 + copy_elements a1 a2 i + | i<size a2 + # (e,a1) = a1![i] + = copy_elements a1 {a2 & [i]=e} (i+1) + = (a2,a1) |