Skip to content

Commit b2541a1

Browse files
author
José Valim
committed
Inline list funcs so we don't pay an extra dispatch cost
1 parent 5e24dba commit b2541a1

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lib/elixir/lib/enum.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ defmodule Enum do
6565
`{ key, value }` tuple.
6666
"""
6767

68+
@compile :inline_list_funcs
69+
6870
@type t :: Enumerable.t
6971
@type element :: any
7072
@type index :: non_neg_integer

lib/elixir/lib/list.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ defmodule List do
1010
first argument.
1111
"""
1212

13+
@compile :inline_list_funcs
14+
1315
@doc """
1416
Given a list of lists, concatenates the sublists into a single list.
1517

lib/elixir/src/elixir_compiler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ core_main() ->
208208
[
209209
"lib/elixir/lib/kernel.ex",
210210
"lib/elixir/lib/keyword.ex",
211+
"lib/elixir/lib/module.ex",
211212
"lib/elixir/lib/list.ex",
212213
"lib/elixir/lib/kernel/typespec.ex",
213-
"lib/elixir/lib/module.ex",
214214
"lib/elixir/lib/record.ex",
215215
"lib/elixir/lib/macro.ex",
216216
"lib/elixir/lib/macro/env.ex",

0 commit comments

Comments
 (0)