Skip to content

Commit

Permalink
Use for..in
Browse files Browse the repository at this point in the history
  • Loading branch information
shilangyu committed Jan 28, 2024
1 parent 6980547 commit b67841b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/transformations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ const transformations: Transformations = [
t := 0
func Read()
for j = 1..N
for j in 1..N
(t[j], x[j]) := RReg[i, j].read()
(t[0], x[0]) := WReg[i].read()
(t', x') := highest(t, x)
for j = 1..N
for j in 1..N
RReg[i, j].write((t', x'))
return x
Expand Down Expand Up @@ -289,13 +289,13 @@ const transformations: Transformations = [
Reg[1..N] := (0, 0)
func Read()
for j = 1..N
for j in 1..N
(t[j], x[j]) := Reg[j].read()
(t', x') := highest(t, x)
return x
func Write(v)
for j = 1..N
for j in 1..N
(t[j], x[j]) := Reg[j].read()
(t', x') := highest(t, x)
Reg[i].write((t' + 1, v))
Expand Down

0 comments on commit b67841b

Please sign in to comment.