Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
2cd71b0e
Commit
2cd71b0e
authored
Sep 07, 2001
by
John van Groningen
Browse files
moved function checkLocalFunctions from checksupport to checkFunctionBodies
parent
e3bf26e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend/checkFunctionBodies.icl
View file @
2cd71b0e
...
...
@@ -2,6 +2,7 @@ implementation module checkFunctionBodies
import
syntax
,
typesupport
,
parse
,
checksupport
,
utilities
,
checktypes
,
transform
,
predef
//, RWSDebug
import
explicitimports
,
comparedefimp
,
mergecases
from
check
import
checkFunctions
cIsInExpressionList
:==
True
cIsNotInExpressionList
:==
False
...
...
@@ -462,6 +463,11 @@ where
(
let_expr
,
expr_heap
)
=
buildLetExpression
strict_binds
lazy_binds
let_expr
let_expr_position
expr_heap
=
(
if
(
isEmpty
strict_binds
&&
isEmpty
lazy_binds
)
let_expr_position
NoPos
,
let_expr
,
expr_heap
)
checkLocalFunctions
::
!
Index
!
Level
!
LocalDefs
!*{#
FunDef
}
!*
ExpressionInfo
!*
Heaps
!*
CheckState
->
(!.{#
FunDef
},!.
ExpressionInfo
,!.
Heaps
,!.
CheckState
);
checkLocalFunctions
mod_index
level
(
CollectedLocalDefs
{
loc_functions
={
ir_from
,
ir_to
}})
fun_defs
e_info
heaps
cs
=
checkFunctions
mod_index
level
ir_from
ir_to
fun_defs
e_info
heaps
cs
checkExpression
::
![
FreeVar
]
!
ParsedExpr
!
ExpressionInput
!*
ExpressionState
!*
ExpressionInfo
!*
CheckState
->
*(!
Expression
,
![
FreeVar
],
!*
ExpressionState
,
!*
ExpressionInfo
,
!*
CheckState
);
checkExpression
free_vars
(
PE_List
exprs
)
e_input
e_state
e_info
cs
...
...
frontend/checksupport.dcl
View file @
2cd71b0e
...
...
@@ -148,9 +148,6 @@ instance <<< IdentPos, ExplImpInfo, DeclarationInfo
,
ef_is_macro_fun
::
!
Bool
}
checkLocalFunctions
::
!
Index
!
Level
!
LocalDefs
!*{#
FunDef
}
!*
ExpressionInfo
!*
Heaps
!*
CheckState
->
(!.{#
FunDef
},!.
ExpressionInfo
,!.
Heaps
,!.
CheckState
);
convertIndex
::
!
Index
!
Index
!(
Optional
ConversionTable
)
->
!
Index
retrieveGlobalDefinition
::
!
SymbolTableEntry
!
STE_Kind
!
Index
->
(!
Index
,
!
Index
)
...
...
frontend/checksupport.icl
View file @
2cd71b0e
...
...
@@ -222,20 +222,12 @@ where
,
ef_is_macro_fun
::
!
Bool
}
checkLocalFunctions
::
!
Index
!
Level
!
LocalDefs
!*{#
FunDef
}
!*
ExpressionInfo
!*
Heaps
!*
CheckState
->
(!.{#
FunDef
},!.
ExpressionInfo
,!.
Heaps
,!.
CheckState
);
checkLocalFunctions
mod_index
level
(
CollectedLocalDefs
{
loc_functions
={
ir_from
,
ir_to
}})
fun_defs
e_info
heaps
cs
=
checkFunctions
mod_index
level
ir_from
ir_to
fun_defs
e_info
heaps
cs
convertIndex
::
!
Index
!
Index
!(
Optional
ConversionTable
)
->
!
Index
convertIndex
index
table_index
(
Yes
tables
)
=
tables
.[
table_index
].[
index
]
convertIndex
index
table_index
No
=
index
retrieveGlobalDefinition
::
!
SymbolTableEntry
!
STE_Kind
!
Index
->
(!
Index
,
!
Index
)
retrieveGlobalDefinition
{
ste_kind
=
STE_Imported
kind
decl_index
,
ste_def_level
,
ste_index
}
requ_kind
mod_index
|
kind
==
requ_kind
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment