This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Manx.Lowering do | |
alias Beaver.MLIR | |
import MLIR.Sigils | |
import MLIR.{Transforms, Conversion} | |
alias Beaver.MLIR.Dialect.GPU | |
def tosa_vulkan(op) do | |
op | |
|> MLIR.Operation.verify!(dump_if_fail: true) | |
|> canonicalize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Kinda.Parser do | |
import NimbleParsec | |
# *** Tokens *** | |
container_doc_comment = | |
string("//!") |> repeat(ascii_char([?^, ?\n])) |> repeat([?\s, ?\n]) |> times(min: 1) | |
doc_comment = | |
string("///") |> repeat(ascii_char([?^, ?\n])) |> repeat([?\s, ?\n]) |> times(min: 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Kinda.ParserHelper do | |
@moduledoc false | |
@doc """ | |
define a parser combinator and variable with same name | |
""" | |
defmacro defcv(name, expr) do | |
quote do | |
defcombinatorp(unquote(name), unquote(expr)) | |
Kernel.var!(unquote({name, [], nil})) = parsec(unquote(name)) | |
_ = Kernel.var!(unquote({name, [], nil})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/elixir/src/elixir_erl_compiler.erl b/lib/elixir/src/elixir_erl_compiler.erl | |
index a299ab4c2d..98462f7148 100644 | |
--- a/lib/elixir/src/elixir_erl_compiler.erl | |
+++ b/lib/elixir/src/elixir_erl_compiler.erl | |
@@ -50,7 +50,16 @@ compile(Forms, File, Opts) when is_list(Forms), is_list(Opts), is_binary(File) - | |
format_warnings(Opts, CoreWarnings), | |
CompileOpts = [no_spawn_compiler_process, from_core, no_core_prepare, | |
no_auto_import, return, {source, Source} | Opts], | |
- | |
+ case compile:noenv_forms(CoreForms, [dprecg|CompileOpts]) of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Cmath do | |
alias Beaver.MLIR.Type | |
use Beaver.Dialect, name: "cmath" | |
deftype complex(t = any_of(t, [Type.f32(), Type.f64()])) do | |
parameters(t) | |
end | |
defop norm do | |
operands(complex(any())) |
OlderNewer