Skip to content

Commit

Permalink
Reuse input string space for brackets stack
Browse files Browse the repository at this point in the history
  • Loading branch information
kahgoh committed Jun 20, 2024
1 parent b0d21bd commit 821c196
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions exercises/practice/matching-brackets/.meta/proof.ci.wat
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,8 @@
)
)

;; Use some space to store info about the brackets we come across
(call $initBracketStack
(i32.add
(i32.add
(local.get $text)
(local.get $length)
)
;; Put some separation between our text content
(i32.const 2)
)
)
;; Reuse the input string space to store info about the brackets.
(call $initBracketStack (local.get $text))

(block $checkBlock
(loop $checkLoop
Expand Down

0 comments on commit 821c196

Please sign in to comment.