Commit Graph
2612 Commits
Author SHA1 Message Date
José Valim fe8fc1be25 Inline some process and node calls, closes #1808 2014-01-22 15:06:35 +01:00
Eric Meadows-Jönsson bcb7cff5f2 Add Version.compare/2 2014-01-22 14:36:41 +01:00
José Valim 8023c29c3f Consistently inline functions in the Kernel module by the compiler 2014-01-22 14:11:48 +01:00
José Valim 674f4a2cb3 Do not erase elixir_compiler_pid 2014-01-22 10:47:17 +01:00
José Valim 25c54dad84 Remove duplicated type assertions 2014-01-21 21:08:43 +01:00
José Valim 48b8efe9c6 Ensure proper tokenization of the ... identifier 2014-01-21 20:50:43 +01:00
José Valim e63546bda6 Ensure proper dependency on bootstrap 2014-01-21 10:25:31 +01:00
José Valim 04c8ca9718 Deprecate keywords, getter and list getter functionalities of defrecordp
Those functionalities can still be simulated via pattern matching
and perform basic operations. The reason for this deprecation is
that we are starting to unify defrecord/defrecordp syntaxes, so
instead of doing a big change at once, we are first bringing them
to a common set of functionalities to easy migration in the future.
2014-01-21 10:15:35 +01:00
José Valim 08d69e3975 Add a test for records with default function fields 2014-01-21 09:56:16 +01:00
Carsten Bormann 9764f3f384 Fix functions as default values in records
successful check_value/2 needs to return its second argument
2014-01-20 20:42:46 +01:00
José Valim b1915b1ad6 Convert HashSet to use the new trie implementation 2014-01-20 13:58:43 +01:00
José Valim b3e07652cc Range is no longer a record
The goal is to simplify and allow us to extend ranges in the future.
Also, incentivate people to use `first .. last` in pattern matching
instead of `Range[first: first, last: last]`.
2014-01-20 12:24:22 +01:00
José Valim cad7551caf Inspect :... and :foo@bar as valid atoms 2014-01-20 12:24:22 +01:00
José Valim 8ac132fee1 Fix HashDict.pop signature 2014-01-20 12:24:22 +01:00
José Valim ec94c93b24 Remove ** from operators list for now 2014-01-20 12:24:22 +01:00
xuming 9d4f15c1c9 minor typo in doc 2014-01-20 01:09:47 +08:00
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