Skip to content

Commit

Permalink
Support for optimized dictionary access
Browse files Browse the repository at this point in the history
Elixir 1.17 added support for optimized dictionary acccess made
available with OTP 26.2. With this commit, ProcessTree uses
optimized dictionary access when available, as determined at
compile time.
  • Loading branch information
jbsf2 committed Jun 14, 2024
1 parent 1599910 commit 038177b
Show file tree
Hide file tree
Showing 19 changed files with 258 additions and 163 deletions.
90 changes: 76 additions & 14 deletions bin/dialyzer
Original file line number Diff line number Diff line change
@@ -1,14 +1,76 @@
#! /bin/bash

bin/elixir14 \
&& bin/dialyzer24 \
&& bin/dialyzer25 \
&& bin/dialyzer26 \
&& bin/elixir15 \
&& bin/dialyzer24 \
&& bin/dialyzer25 \
&& bin/dialyzer26 \
&& bin/elixir16 \
&& bin/dialyzer24 \
&& bin/dialyzer25 \
&& bin/dialyzer26
#!/bin/bash

set -euxo pipefail

asdf local erlang 24.3.4.14
asdf local elixir 1.14.5-otp-24
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 25.3.2.7
asdf local elixir 1.14.5-otp-25
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 26.0
asdf local elixir 1.14.5-otp-26
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 24.3.4.14
asdf local elixir 1.15.8-otp-24
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 25.3.2.7
asdf local elixir 1.15.8-otp-25
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 26.0
asdf local elixir 1.15.8-otp-26
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 24.3.4.14
asdf local elixir 1.16.3-otp-24
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 25.3.2.7
asdf local elixir 1.16.3-otp-25
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 26.0
asdf local elixir 1.16.3-otp-26
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 25.3.2.7
asdf local elixir 1.17.0-otp-25
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 26.0
asdf local elixir 1.17.0-otp-26
rm -rf _build
mix local.hex --force
mix dialyzer

asdf local erlang 27.0
asdf local elixir 1.17.0-otp-27
rm -rf _build
mix local.hex --force
mix dialyzer

5 changes: 0 additions & 5 deletions bin/dialyzer24

This file was deleted.

5 changes: 0 additions & 5 deletions bin/dialyzer25

This file was deleted.

12 changes: 0 additions & 12 deletions bin/dialyzer26

This file was deleted.

3 changes: 0 additions & 3 deletions bin/elixir14

This file was deleted.

3 changes: 0 additions & 3 deletions bin/elixir15

This file was deleted.

3 changes: 0 additions & 3 deletions bin/elixir16

This file was deleted.

3 changes: 0 additions & 3 deletions bin/otp24

This file was deleted.

3 changes: 0 additions & 3 deletions bin/otp25

This file was deleted.

3 changes: 0 additions & 3 deletions bin/otp26

This file was deleted.

71 changes: 71 additions & 0 deletions bin/script_builder.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
defmodule ScriptBuilder do

def elixir_builds() do
[
{erlang_build("24"), "1.14.5-otp-24"},
{erlang_build("25"), "1.14.5-otp-25"},
{erlang_build("26"), "1.14.5-otp-26"},

{erlang_build("24"), "1.15.8-otp-24"},
{erlang_build("25"), "1.15.8-otp-25"},
{erlang_build("26"), "1.15.8-otp-26"},

{erlang_build("24"), "1.16.3-otp-24"},
{erlang_build("25"), "1.16.3-otp-25"},
{erlang_build("26"), "1.16.3-otp-26"},

{erlang_build("25"), "1.17.0-otp-25"},
{erlang_build("26"), "1.17.0-otp-26"},
{erlang_build("27"), "1.17.0-otp-27"},
]
end

def erlang_build(otp_version) do
erlang_builds()
|> Map.get(otp_version)
end

def erlang_builds() do
%{
"24" => "24.3.4.14",
"25" => "25.3.2.7",
"26" => "26.0",
"27" => "27.0"
}
end

def asdf_commands() do
erlang_builds()
|> Enum.each(fn {_version, build} -> IO.puts("asdf install erlang #{build}") end)

elixir_builds()
|> Enum.each(fn {_erlang_build, build} -> IO.puts("asdf install elixir #{build}") end)
end

def test_commands() do
IO.puts("#!/bin/bash\n")
IO.puts("set -euo pipefail\n")
elixir_builds()
|> Enum.each(fn {erlang_build, elixir_build} ->
IO.puts("asdf local erlang #{erlang_build}")
IO.puts("asdf local elixir #{elixir_build}")
IO.puts("mix local.hex --force")
IO.puts("mix test\n")
end)
end

def dialyzer_commands() do
IO.puts("#!/bin/bash\n")
IO.puts("set -euxo pipefail\n")
elixir_builds()
|> Enum.each(fn {erlang_build, elixir_build} ->
IO.puts("asdf local erlang #{erlang_build}")
IO.puts("asdf local elixir #{elixir_build}")
IO.puts("rm -rf _build")
IO.puts("mix local.hex --force")
IO.puts("mix dialyzer\n")
end)
end
end

ScriptBuilder.dialyzer_commands()
57 changes: 0 additions & 57 deletions bin/switch_version.exs

This file was deleted.

78 changes: 64 additions & 14 deletions bin/test
Original file line number Diff line number Diff line change
@@ -1,14 +1,64 @@
#! /bin/bash

bin/elixir14 \
&& bin/test24 \
&& bin/test25 \
&& bin/test26 \
&& bin/elixir15 \
&& bin/test24 \
&& bin/test25 \
&& bin/test26 \
&& bin/elixir16 \
&& bin/test24 \
&& bin/test25 \
&& bin/test26 \
#!/bin/bash

set -euxo pipefail

asdf local erlang 24.3.4.14
asdf local elixir 1.14.5-otp-24
mix local.hex --force
mix test

asdf local erlang 25.3.2.7
asdf local elixir 1.14.5-otp-25
mix local.hex --force
mix test

asdf local erlang 26.0
asdf local elixir 1.14.5-otp-26
mix local.hex --force
mix test

asdf local erlang 24.3.4.14
asdf local elixir 1.15.8-otp-24
mix local.hex --force
mix test

asdf local erlang 25.3.2.7
asdf local elixir 1.15.8-otp-25
mix local.hex --force
mix test

asdf local erlang 26.0
asdf local elixir 1.15.8-otp-26
mix local.hex --force
mix test

asdf local erlang 24.3.4.14
asdf local elixir 1.16.3-otp-24
mix local.hex --force
mix test

asdf local erlang 25.3.2.7
asdf local elixir 1.16.3-otp-25
mix local.hex --force
mix test

asdf local erlang 26.0
asdf local elixir 1.16.3-otp-26
mix local.hex --force
mix test

asdf local erlang 25.3.2.7
asdf local elixir 1.17.0-otp-25
mix local.hex --force
mix test

asdf local erlang 26.0
asdf local elixir 1.17.0-otp-26
mix local.hex --force
mix test

asdf local erlang 27.0
asdf local elixir 1.17.0-otp-27
mix local.hex --force
mix test

5 changes: 0 additions & 5 deletions bin/test24

This file was deleted.

5 changes: 0 additions & 5 deletions bin/test25

This file was deleted.

12 changes: 0 additions & 12 deletions bin/test26

This file was deleted.

4 changes: 0 additions & 4 deletions bin/testCurrentElixir

This file was deleted.

Loading

0 comments on commit 038177b

Please sign in to comment.