zeam-vm / pelemay

Pelemay is a native compiler for Elixir, which generates SIMD instructions. It has a plan to generate for GPU code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

String.replace in defpelemay doesn't finish when the pattern is not matched.

zacky1972 opened this issue · comments

Describe the bug
String.replace in defpelemay doesn't finish when the pattern is not matched.

To Reproduce
Steps to reproduce the behavior:

  1. Use Pelemay in the source code:
defmodule StringSample do
  require Pelemay
  import Pelemay

  @string """
  abcdefghi
  FizzBuzzFizzBuzz
  """

  @pattern "hoge"
  @replacement "Buzz"

  defpelemay do
    def replace_pelemay do
      String.replace(@string, @pattern, @replacement)
    end
  end
end
  1. Run in the command StringSample.replace_pelemay in iex
  2. It won't finish.

Expected behavior
Finish and subject will be returned.

Screenshots
snip

Desktop (please complete the following information):

  • Pelemay Version: master

Additional context
None.