Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv2v
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
sv2v
Commits
00d12c7a
Commit
00d12c7a
authored
Apr 01, 2019
by
Zachary Snow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed combined ranges incorrect upper bound calculation
parent
9b8a9502
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/Convert/Struct.hs
+4
-4
No files found.
src/Convert/Struct.hs
View file @
00d12c7a
...
...
@@ -149,11 +149,11 @@ convertAsgn structs types (lhs, expr) =
(
tf
,
rs
)
=
typeRanges
t
convertLHS
(
LHSRange
l
(
rOuter
@
(
hiO
,
loO
)))
=
case
l'
of
LHSRange
lInner
(
hiI
,
loI
)
->
LHSRange
lInner
(
_
,
loI
)
->
(
t
,
LHSRange
lInner
(
simplify
hi
,
simplify
lo
))
where
hi
=
BinOp
Add
(
BinOp
Sub
hiI
loI
)
hiO
lo
=
BinOp
Add
loI
loO
hi
=
BinOp
Add
loI
hiO
_
->
if
null
rs
then
(
Implicit
Unspecified
[]
,
LHSRange
l'
rOuter
)
else
(
tf
rs'
,
LHSRange
l'
rOuter
)
...
...
@@ -237,11 +237,11 @@ convertAsgn structs types (lhs, expr) =
-- nested Ranges into a single range. My understanding of the
-- semantics are that a range returns a new, zero-indexed sub-range.
case
eOuter'
of
Range
eInner
(
hiI
,
loI
)
->
Range
eInner
(
_
,
loI
)
->
(
t
,
Range
eInner
(
simplify
hi
,
simplify
lo
))
where
hi
=
BinOp
Add
(
BinOp
Sub
hiI
loI
)
hiO
lo
=
BinOp
Add
loI
loO
hi
=
BinOp
Add
loI
hiO
_
->
(
t
,
Range
eOuter'
rOuter
)
where
(
t
,
eOuter'
)
=
convertSubExpr
eOuter
convertSubExpr
(
Concat
exprs
)
=
...
...
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