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
ExaStencils
exastencils-release
Commits
b60e0dcb
Commit
b60e0dcb
authored
Feb 25, 2022
by
Richard Angersbach
Browse files
Fix component accesses in IR_AccessFieldFunction.
parent
42dc9f8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Compiler/src/exastencils/io/ir/IR_AccessPattern.scala
View file @
b60e0dcb
...
...
@@ -17,7 +17,10 @@ abstract class IR_AccessFunction extends IR_Node {
case
class
IR_AccessFieldFunction
(
var
field
:
IR_Field
,
var
slot
:
IR_Expression
,
var
hodtComponentIndex
:
Option
[
IR_Index
]
=
None
)
extends
IR_AccessFunction
{
override
def
get
(
idx
:
IR_Index
)
:
IR_Access
=
{
val
index
=
if
(
hodtComponentIndex
.
isDefined
)
idx
+
hodtComponentIndex
.
get
else
idx
val
index
=
if
(
hodtComponentIndex
.
isDefined
)
IR_ExpressionIndex
(
idx
.
toExpressionIndex
.
indices
++
hodtComponentIndex
.
get
.
toExpressionIndex
.
indices
)
else
idx
IR_FieldAccess
(
field
,
slot
,
index
.
toExpressionIndex
)
}
}
...
...
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