Commit Graph
2596 Commits
Author SHA1 Message Date
José Valim 6bcb7adeb4 Clean up DictTest implementation
Before this commit, DictTest used too many helper functions
and  used assertions in the opposite order.
2014-01-19 15:25:35 +01:00
José Valim d311e10bea Change HashDict implementation to use tries with compound nodes
The new implementation is basically a tree of tuples (tries) but
they allow compond nodes (a node with a key-value pair and a
sub-tree). This removes the need for node-expansion and also simplifies
the design structure to not require multiple stages nor buckets.

The end result is a faster HashDict implementation (about 10% faster
on access, 30% on updates), which is still small for small dicts
but about 30% bigger for large dicts (in terms of memory) and with
a much simpler implementation.
2014-01-19 13:58:45 +01:00
Ryan Coppolo ce61c60af5 Deprecates binary_to_term and term_to_binary in Kernel. 2014-01-17 16:08:15 -08:00
Eric Meadows-Jönsson 6c2744d373 Add index reflection to private records
Example:
defrecordp :user, [:name, age]
user(:age) #=> 2
2014-01-17 01:24:43 +01:00
José Valim f671e1204c Change precedence of <- to be the same as other generators 2014-01-16 20:08:55 +01:00
José Valim 4ade0f98aa Remove deprecated code 2014-01-16 10:26:48 +01:00
José Valim 67a672e6ed Guarantee nullary funs/macros are allowed in guards, closes #1997 2014-01-16 10:00:39 +01:00
José Valim 54e8ea13f4 Ensure heredocs are allowed in calls, closes #1998 2014-01-16 09:49:13 +01:00
José Valim 5a2e838def Deprecate <-/2 in favor of send/2 2014-01-14 18:27:41 +01:00
José Valim 42fc70a0eb Deprecate Enum.first/1 in favor of Enum.at/2 and List.first/1
The main reason for this change is because `Enum.first/1` does
not communicate that enumeration will happen, in contrast to
functions like Enum.at/2 and Enum.fetch/2 which are meant to
be used with non-indexed collections and the need for enumeration
is made a bit more obvious.

Closes #1983
2014-01-14 16:26:32 +01:00
José Valim 87fee37711 Change String.next_grapheme/1 and String.next_codepoint/1 to return nil on string end
This is more composable in the sense can use in in if/cond constructs
and also makes it easy to build streams. Closes #1721.
2014-01-14 16:15:54 +01:00
José Valim 4870351d2f Deprecate continuable heredocs, closes #1986 2014-01-14 16:03:14 +01:00
John Warwick 68c9a28d06 Cleaning up Module docs 2014-01-14 17:31:28 +08:00
Chris McCord 8c45982cc6 Fix Module.definitions_in documentation typo. 2014-01-13 11:52:07 -05:00
Chas Lemley 94812b4242 fix error with float midpoint rounding
- remove midpoint rounding option from Float.round/2
- always midpoint round away from 0
2014-01-12 12:17:50 -05:00
John Warwick 7ea4b02460 Dict.Behaviour doc cleanup 2014-01-12 07:46:23 +08:00
José Valim 11423af777 Add missing fixture file for previous commit 2014-01-11 19:11:08 +01:00
José Valim 23c67ac47c Add a test to ensure no hanging in ParallelCompiler 2014-01-11 19:10:43 +01:00
José Valim b4b9ecccb4 Remove :[] as a valid atom and do not allow remote container calls 2014-01-11 17:02:45 +01:00
José Valim 53b68887b6 Invert the precedence of | and when
Although this adds some drawbacks when it comes to typespecs,
it prepares us for when we have named patterns.
2014-01-11 16:52:46 +01:00
Eric Meadows-Jönsson b4ad1ff5bc Fix bootstrapping issue in previous commit 2014-01-11 00:36:31 +01:00
Eric Meadows-Jönsson ab538670d3 Add :records, :binaries and :char_lists options to inspect/2
Deprecate :raw in favor of :records
2014-01-11 00:25:23 +01:00
José Valim ba88ee7c92 Improve binary handling to properly consider chars and bitstring with specifiers
Closes #1963
2014-01-10 22:25:08 +01:00
José Valim 9cd5a47bbe Improve docs for Dict.Behaviour 2014-01-10 14:29:47 +01:00
José Valim 0538e46023 Compile unicode modules in parallel 2014-01-09 20:12:20 +01:00
José Valim ebf84037cc Kernel.inspect/2 with Inspect.Opts[] is deprecated
In favor of `Inspect.Algebra.to_doc/2`. Closes #1965.
2014-01-09 20:12:20 +01:00
José Valim 1b3cdbc7fb Merge pull request #1981 from christhekeele/patch-1
Add Keyword.delete/3 for deleting explicit values.
2014-01-09 09:37:09 -08:00
José Valim 1d13d189c1 Document that ^ always points to the previous value 2014-01-09 16:22:33 +01:00
José Valim 7fcdecde95 Turn off dependency tracking for compilation on release, closes #1982 2014-01-09 15:50:48 +01:00
José Valim bc852a6fba Add Enum.flat_map_reduce/3 2014-01-09 15:38:27 +01:00
José Valim b0e1c09579 Add Stream.transform/3
Note: the function name may be modified before the next release.
2014-01-09 13:54:45 +01:00
Christopher Keele d3a5cd22a6 Add Keyword.delete/3 for deleting explicit values. 2014-01-09 00:59:38 -06:00
José Valim 96a1628033 Unify precedence of ++, --, **, .., <> ops 2014-01-09 01:06:34 +01:00
José Valim 19301b9005 Small improvements to records and others 2014-01-08 14:55:28 +01:00
Eric Meadows-Jonsson 435597286f Give erl_eval bindings as an orddict
Fixes error where in IEx when referencing the ~10th defined variable.
2014-01-08 05:55:31 +01:00
John Warwick 9fcab6e881 Fixing doc typos in Kernel.Typespec 2014-01-07 23:13:56 -05:00
Eric Meadows-Jonsson e169c0f49b Create a signature for callbacks 2014-01-07 23:00:07 +01:00
Eric Meadows-Jonsson 8c97056b0e Use :application.get_application/1 in stracktraces 2014-01-07 22:48:46 +01:00
Eric Meadows-Jonsson 4be1501f57 Annotated types should not be in guard vars 2014-01-07 22:10:47 +01:00
José Valim 59402569ed Use relative paths when compiling elixir itself 2014-01-07 12:00:57 +01:00
José Valim 0aff2a3139 Compile with relative paths and include apps in stacktraces
Closes #1964, closes #1861
2014-01-07 11:30:44 +01:00
José Valim 9c4271891a Deprecate is_alive in favor of Node.alive? 2014-01-07 10:12:31 +01:00
José Valim 7c240199f3 Improve stacktraces and error messages during expansion 2014-01-06 19:34:38 +01:00
José Valim 27467bdb67 Fix spelling of overridden 2014-01-05 12:28:11 +01:00
José Valim 952052869f Ensure bitstring modifiers args are expanded 2014-01-04 22:44:55 +01:00
José Valim df8b216357 Reenable case clause rewriting, closes #1972 2014-01-04 10:45:18 +01:00
José Valim 79faa1f706 Do not export case and receive vars 2014-01-04 10:45:13 +01:00
José Valim cba7c5bd80 Only expand __ENV__.call if it is a known function 2014-01-03 22:39:48 +01:00
José Valim 9b22b6d883 Ensure local is disabled on module definitions 2014-01-03 17:57:24 +01:00
José Valim 2a6940014a Move environment cache to locals tracker, which is per module 2014-01-02 20:44:32 +01:00