diff options
author | sjakie | 1999-11-08 14:48:09 +0000 |
---|---|---|
committer | sjakie | 1999-11-08 14:48:09 +0000 |
commit | 499638c08d1866a31c39af9c323d01d6c697726e (patch) | |
tree | d275d0650f14ab2c0cbd8758725e6ba2f1eab00a | |
parent | minor changes (diff) |
bug fix: arity of imported function was incorrect
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@37 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/trans.icl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/frontend/trans.icl b/frontend/trans.icl index 87925b4..a68800f 100644 --- a/frontend/trans.icl +++ b/frontend/trans.icl @@ -1609,12 +1609,16 @@ transformApplication app=:{app_symb=symb=:{symb_kind = SK_Function {glob_module, // This function is imported | isEmpty extra_args = (App app, ti) - # ar_diff = ro.ro_imported_funs.[glob_module].[glob_object].ft_arity - symb_arity +/* Sjaak ... */ + # {ft_arity,ft_type} = ro.ro_imported_funs.[glob_module].[glob_object] + form_arity = ft_arity + length ft_type.st_context + ar_diff = form_arity - symb_arity nr_of_extra_args = length extra_args | nr_of_extra_args <= ar_diff = (App {app & app_args = app_args ++ extra_args, app_symb = { symb & symb_arity = symb_arity + nr_of_extra_args }}, ti) = (App {app & app_args = app_args ++ take ar_diff extra_args, app_symb = { symb & symb_arity = symb_arity + ar_diff }} @ drop ar_diff extra_args, ti) +/* ... Sjaak */ // XXX linear_bits field has to be added for generated functions transformApplication app=:{app_symb={symb_kind = SK_GeneratedFunction fun_def_ptr _}} extra_args ro ti=:{ti_fun_heap} |