Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-compiler-and-rts
compiler
Commits
f9d47e14
Commit
f9d47e14
authored
Feb 13, 2002
by
Ronny Wichers Schreur
Browse files
work around for incorrect merging of cases (see source comment)
parent
c77d8a39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
frontend/mergecases.icl
frontend/mergecases.icl
+18
-0
No files found.
frontend/mergecases.icl
View file @
f9d47e14
...
...
@@ -94,6 +94,23 @@ where
No
->
(
No
,
var_heap
,
symbol_heap
)
DynamicPatterns
[
dynamic_pattern
]
/*
Don't merge dynamic cases, as a work around for the following case
apply :: Dynamic Dynamic -> Int
apply _ (_ :: Int)
= 1
apply (f :: a ) (x :: a)
= 2
This work around leads to less efficient code.
mergeCases changes the order of matching of (f :: a) and
(x :: a), but the auxilary dynamics administration is not
updated.
FIXME: Update auxilary dynamics administration when dynamic cases
are reversed.
# (split_result, var_heap, symbol_heap) = split_case split_var_info_ptr dynamic_pattern.dp_rhs var_heap symbol_heap
-> case split_result of
Yes split_case
...
...
@@ -103,6 +120,7 @@ where
-> (Yes cees, var_heap, symbol_heap)
No
*/
->
(
No
,
var_heap
,
symbol_heap
)
_
->
(
No
,
var_heap
,
symbol_heap
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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