From 767bde57d84af82f3e34e57aff2e9901b3c2425b Mon Sep 17 00:00:00 2001 From: johnvg Date: Thu, 11 Dec 2003 14:59:33 +0000 Subject: remove BackendBody git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1427 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- backend/backendconvert.icl | 21 --------------------- backend/backendpreprocess.icl | 7 ------- frontend/syntax.dcl | 6 ------ frontend/syntax.icl | 7 ------- 4 files changed, 41 deletions(-) diff --git a/backend/backendconvert.icl b/backend/backendconvert.icl index 41ac150..f3efdd6 100644 --- a/backend/backendconvert.icl +++ b/backend/backendconvert.icl @@ -29,10 +29,6 @@ sfoldr op r l s foldr [] = r foldr [a:x] = op a (foldr x) -// fix spelling, this will be removed when cases are implemented in the back end -:: BackEndBody :== BackendBody -BackEndBody x :== BackendBody x - :: BEMonad a :== *BackEndState -> *(!a,!*BackEndState) :: BackEnder :== *BackEndState -> *BackEndState @@ -617,12 +613,6 @@ instance declareVars TransformedBody where = declareVars tb_args dvInput o` declareVars tb_rhs dvInput -instance declareVars BackendBody where - declareVars :: BackendBody !DeclVarsInput -> BackEnder - declareVars {bb_args, bb_rhs} dvInput - = declareVars bb_args dvInput - o` declareVars bb_rhs dvInput - instance declareVars Case where declareVars {case_expr, case_guards, case_default} dvInput = declareVars case_guards dvInput @@ -1440,17 +1430,6 @@ isCodeBlock expr = False convertFunctionBody :: Int Int Ident FunctionBody Int -> BEMonad BERuleAltP -convertFunctionBody functionIndex lineNumber aliasDummyId (BackEndBody bodies) main_dcl_module_n - = convertBackEndBodies functionIndex lineNumber bodies main_dcl_module_n -where - convertBackEndBodies :: Int Int [BackEndBody] Int -> BEMonad BERuleAltP - convertBackEndBodies functionIndex lineNumber bodies main_dcl_module_n - = sfoldr (beRuleAlts o convertBackEndBody functionIndex lineNumber aliasDummyId main_dcl_module_n) beNoRuleAlts bodies - where - convertBackEndBody :: Int Int Ident Int BackEndBody -> BEMonad BERuleAltP - convertBackEndBody functionIndex lineNumber aliasDummyId main_dcl_module_n body - = declareVars body aliasDummyId - o` convertBody False functionIndex lineNumber aliasDummyId body.bb_args body.bb_rhs main_dcl_module_n convertFunctionBody functionIndex lineNumber aliasDummyId (TransformedBody body) main_dcl_module_n = convertTransformedBody functionIndex lineNumber aliasDummyId body main_dcl_module_n diff --git a/backend/backendpreprocess.icl b/backend/backendpreprocess.icl index 0e81669..47274b1 100644 --- a/backend/backendpreprocess.icl +++ b/backend/backendpreprocess.icl @@ -81,8 +81,6 @@ instance sequence (Optional a) | sequence a where // +++ this assigns sequence numbers per function, should be per alternative and moved to backendconvert instance sequence FunctionBody where - sequence (BackendBody backEndBodies) - = sequence backEndBodies sequence (TransformedBody transformedBody) = sequence transformedBody sequence body @@ -95,11 +93,6 @@ instance sequence TransformedBody where o` sequence body.tb_rhs // ... case test -instance sequence BackendBody where - sequence body - = sequence body.bb_args - o` sequence body.bb_rhs - instance sequence FreeVar where sequence freeVar = sequence freeVar.fv_info_ptr diff --git a/frontend/syntax.dcl b/frontend/syntax.dcl index 9d53b45..01be501 100644 --- a/frontend/syntax.dcl +++ b/frontend/syntax.dcl @@ -546,14 +546,8 @@ FI_IsUnboxedListOfRecordsConsOrNil :== 8 /* macro expansion transforms a CheckedBody into a TransformedBody */ | TransformedBody !TransformedBody | Expanding ![FreeVar] // the parameters of the newly generated function - | BackendBody ![BackendBody] | GeneratedBody // the body will be generated automatically - for generics | NoBody - -:: BackendBody = - { bb_args :: ![FunctionPattern] - , bb_rhs :: !Expression - } :: FunDef = { fun_ident :: !Ident diff --git a/frontend/syntax.icl b/frontend/syntax.icl index a32a191..00dc5aa 100644 --- a/frontend/syntax.icl +++ b/frontend/syntax.icl @@ -525,10 +525,6 @@ where instance <<< ParsedBody where (<<<) file {pb_args,pb_rhs} = file <<< pb_args <<< " = " <<< pb_rhs - -instance <<< BackendBody -where - (<<<) file {bb_args,bb_rhs} = file <<< bb_args <<< " = " <<< bb_rhs instance <<< FunctionPattern where @@ -570,8 +566,6 @@ where // <<< '[' <<< fi_free_vars <<< "] [" <<< fi_local_vars <<< ']' <<< tb_args <<< '[' <<< fi_calls <<< ']' <<< "\n\t= " <<< tb_rhs <<< '\n' // <<< '.' <<< fi_def_level <<< ' ' <<< '[' <<< fi_free_vars <<< ']' <<< tb_args <<< " = " <<< tb_rhs - (<<<) file {fun_ident,fun_body=BackendBody body,fun_type=Yes type} = file // <<< type <<< '\n' - <<< fun_ident <<< '.' <<< body <<< '\n' (<<<) file {fun_ident,fun_body=NoBody,fun_type=Yes type} = file // <<< type <<< '\n' <<< fun_ident <<< '.' <<< "Array function\n" @@ -582,7 +576,6 @@ where (<<<) file (ParsedBody bodies) = file <<< bodies (<<<) file (CheckedBody {cb_args,cb_rhs}) = file <<< "C " <<< cb_args <<< " = " <<< cb_rhs <<< '\n' (<<<) file (TransformedBody {tb_args,tb_rhs}) = file <<< "T " <<< tb_args <<< " = " <<< tb_rhs <<< '\n' - (<<<) file (BackendBody body) = file <<< body <<< '\n' (<<<) file (Expanding vars) = file <<< "E " <<< vars (<<<) file GeneratedBody = file <<< "Generic function\n" (<<<) file NoBody = file <<< "Array function\n" -- cgit v1.2.3