Brian Anderson
3445454e79
core: Resolve and remove some FIXMEs
2012-03-16 16:46:32 -07:00
Erick Tryzelaar
2ddd084631
std: Add a function to iterate over a subset of a vec
2012-03-16 17:05:29 +01:00
Brian Anderson
389f53c6ff
core: Docs
2012-03-15 18:58:30 -07:00
Niko Matsakis
b30cb8e43a
implement deserialization, rename mk_mem_buffer() to mem_buffer()
2012-03-13 21:30:07 -04:00
Niko Matsakis
d91742294f
first (functional) version of the auto_serialize syntax ext
2012-03-13 21:30:07 -04:00
Niko Matsakis
bdd0c9387b
get new decorator extensions working
2012-03-13 21:30:06 -04:00
Brian Anderson
cd72b1f848
Overhaul constructor naming in libs
2012-03-13 11:07:22 -07:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Brian Anderson
91e5a1c8b3
core: Remove the nearly empty math module
...
This mod only had two functions, all of whose users have been changed
to use the uint module.
2012-03-10 17:43:19 -08:00
Brian Anderson
6d4fb35912
core Remove vec::enum_chars/uint. Closes #1955
2012-03-10 17:07:23 -08:00
Brian Anderson
e4bb2d707f
core: Rename vec::tail_n to vec::tailn to match other fns
2012-03-10 00:44:13 -08:00
Brian Anderson
a0f0a704b0
core: Clean up comments and exports
2012-03-10 00:35:02 -08:00
Brian Anderson
b22556a6f8
core: Convert to rustdoc
2012-03-09 22:56:53 -08:00
Tim Chevalier
0c5fdc8745
Rename last to last_opt, last_unsafe to last
...
As per discussion on IRC. I am about to file an RFC for further
discussion about the more general issue of whether to enforce
invariants through types, typestate, or dynamic checks, but for now,
removing the misleading name "last_unsafe".
2012-03-08 15:25:56 -08:00
Tim Chevalier
ebc1d3e704
Rename last_total to last_unsafe
...
See Issue 1943 for any discussion (reopen it if necessary).
Closes #1943
2012-03-08 13:07:31 -08:00
Niko Matsakis
713006c7b6
add mutability annotations to libcore
2012-03-07 07:47:50 -08:00
Niko Matsakis
3269a4043c
rewrite vec to be more unsafe, more inlined
2012-03-05 16:47:52 -08:00
Graydon Hoare
dafd649806
First cut at consolidated core::os module built on core::libc.
2012-03-02 18:46:13 -08:00
Brian Anderson
3ed6f6520f
core: Remove _mut functions from vec
...
Instead, use vec::to_mut/from_mut to transform vectors in place as
needed.
2012-03-02 15:49:49 -08:00
Brian Anderson
99f231f347
core: Change a number of arguments in vec to const vecs
2012-02-29 18:13:29 -08:00
Patrick Walton
362f23641a
libcore: Remove vec::to_ptr in favor of vec::unsafe::to_ptr. Closes #1829 .
2012-02-28 20:43:39 -08:00
Niko Matsakis
e65c39c100
add #[inline] to vec::iter
2012-02-28 06:31:29 -08:00
Graydon Hoare
324ecb58a7
Add libc module to libcore and utility file to help generate it.
2012-02-27 18:34:42 -08:00
Niko Matsakis
f3ca50c9ca
Encode/decode AST into metadata, re-instantiate inlined items
2012-02-24 20:46:27 -08:00
Marijn Haverbeke
ad03761a97
Remove preconditions from libraries
...
Closes #1805
2012-02-22 11:47:47 +01:00
Brian Anderson
4220dcf1e9
core: New task API
2012-02-20 18:58:04 -08:00
Brian Anderson
3411d19369
core: Make vec::push faster
...
This way makes it equivalent to the compiler's vec push, and is a lot
faster than calling vec::grow.
2012-02-17 18:15:52 -08:00
Marijn Haverbeke
ff42964546
Clean up some of trans using block combinators
...
`with_scope` and `with_cond` can be used to wrap a piece of code in a
scope block, or conditionalize it on a value, without doing all the
context-creation and jumping by hand.
Also renames @block_ctxt to block to reduce noise.
2012-02-17 23:03:12 +01:00
Marijn Haverbeke
f2e880b750
Add [X].len() to core, use it in trans modules
2012-02-14 13:43:36 +01:00
Brian Anderson
d2debed605
core: Change the argument order for vec::contains, vec::count
2012-02-11 18:00:52 -08:00
Brian Anderson
1040b47078
core: Rename vec::member to vec::contains to match str mod
2012-02-11 18:00:52 -08:00
Graydon Hoare
93450abb4b
Make process-spawning take environments and working directories, remove procsrv task from compiletest.
2012-02-07 19:57:03 -08:00
Brian Anderson
91b6dc5c8e
Merge remote-tracking branch 'erickt/master'
...
Conflicts:
src/libcore/vec.rs
src/libstd/getopts.rs
2012-02-05 15:15:21 -08:00
Tim Chevalier
49cb3fc7df
Remove remaining references to option::t outside option itself
2012-02-01 16:49:57 -08:00
Brian Anderson
d24eb58a09
core: Ignore should_fail tests on win32
2012-02-01 15:35:59 -08:00
Marijn Haverbeke
694de53d28
Make vec::pop efficient
2012-02-01 12:23:13 +01:00
Erick Tryzelaar
29ba196336
Adding a function to concatanate vectors with a separator
2012-01-28 15:41:53 -08:00
Erick Tryzelaar
f98210db07
core: Flesh out vec find functions.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
025e6ff158
core: add vec spliting functions.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
1be3a7c263
core: add (,r)position(,_from) functions
...
This is to help search through a vector better.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
259636a112
core: rename vec::position* functions
...
Almost all of the vec functions that predicates don't have a
corresponding function that takes a single element, so this
commit renames the common fn usecase to be the default.
2012-01-28 09:18:34 -08:00
Marijn Haverbeke
362625008a
Allow moving out of mutable unsafe pointers
...
This makes it possible to de-initialize values anywhere in
memory, which is needed, for example, for a fast imlementation
of vec::pop.
2012-01-27 17:15:40 +01:00
Kevin Cantu
d4b287e852
Added str::any, str::bytes_iter, str::windowed, and vec::windowed functions
2012-01-23 22:28:25 -08:00
Niko Matsakis
5e13d19cc0
s/block()/fn()/g
2012-01-23 19:06:33 -08:00
Graham Fawcett
7763b40c71
issue #1352 : change param order on vec::init_elt, putting block in final position.
...
To match the init_fn() and init_fn_mut() changes.
2012-01-21 13:33:16 -08:00
Graham Fawcett
35d12be2ce
fix #1352 : change param order on vec::init_fn (and vec::init_fn_mut), putting block in final position.
2012-01-21 13:31:12 -08:00
Tim Chevalier
5b028f527f
Remove support for the '.' after a nullary tag in a pattern
...
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
2012-01-19 01:04:59 -08:00
Haitao Li
dde41869ce
Use ctypes in native function declarations
2012-01-19 02:10:36 +08:00
Brian Anderson
17bf4b0e1b
libcore: Move core tests into libcore
2012-01-17 19:41:05 -08:00
Marijn Haverbeke
34d7f05292
Major clean-up of std::io
...
Use ifaces instead of objs, stop wrapping everything in two (or three)
layers of no-value-added indirection, and remove some of the more
pointless/outdated idioms from the code.
2012-01-11 21:00:11 +01:00
Graydon Hoare
4f3171ea81
Merge pull request #1450 from erickt/master
...
adding some misc functions and some functions just for [u8]
2012-01-06 13:04:49 -08:00
Marijn Haverbeke
7c1f683c6d
Fix bug in method type parameter passing
...
It would occasionally pass the wrong type parameter, when calling
a generic method from a generic impl on a bounded param type.
2012-01-06 17:40:05 +01:00
Erick Tryzelaar
3e68803891
libcore: add [u8] helper functions to vec.
2012-01-06 07:47:14 -08:00
Marijn Haverbeke
60ae1590af
Switch to new param kind bound syntax
...
And remove support for the old syntax
2012-01-05 15:50:02 +01:00
Marijn Haverbeke
a7e1a35f88
Properly typecheck and compile invocations of generic methods.
...
Aligning the type parameters of the ifaces, impls, and methods
correctly in typeck is almost brain surgery. Seems to work now for
everything I threw at it, but might still break in other corner cases.
Issue #1227
2012-01-04 17:28:51 +01:00
Erick Tryzelaar
8e54e74be4
libcore: add vec push.
...
This is a simple wrapper around grow for the common
case of pushing a value on the end of a vector.
2011-12-19 10:22:07 -08:00
Erick Tryzelaar
6b1c60d312
libcore: Add vec any2 and all2 functions.
2011-12-19 10:22:07 -08:00
Graydon Hoare
dbfa1b5689
Merge pull request #1317 from boggle/fix1315
...
fix to #1315 + small additions to std::either and result
2011-12-16 13:01:47 -08:00
Stefan Plantikow
bfbaadc694
core: marked fns as pure where possible
2011-12-16 17:41:07 +01:00
Niko Matsakis
ac6aba016e
rename iter2 to iteri to match typical convention
2011-12-16 07:17:29 -08:00
Niko Matsakis
2833ca478c
reorder args to the various vec, option fns so blk comes last
2011-12-16 07:17:23 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00