about summary refs log tree commit diff
path: root/src/lib/vec.rs
AgeCommit message (Collapse)AuthorLines
2011-12-06Establish 'core' library separate from 'std'.Graydon Hoare-835/+0
2011-11-30Fix typo in stdlib docs.Lindsey Kuper-1/+1
2011-11-21Separate vec::map and vec::map_mutMarijn Haverbeke-1/+13
The safe-reference checker requires a copy of each mapped-over element only when the vector is mutable. Let's not pay that cost for immutable vectors.
2011-11-18Update stdlib, compiler, and tests to new kind systemMarijn Haverbeke-44/+38
This involved adding 'copy' to more generics than I hoped, but an experiment with making it implicit showed that that way lies madness -- unless enforced, you will not remember to mark functions that don't copy as not requiring copyable kind. Issue #1177
2011-11-18Implement a last-use-of-local finding algorithmMarijn Haverbeke-2/+2
Issue #925
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-16Replace 'mutable?' with 'const'Brian Anderson-31/+31
2011-11-16Use attributes for native module ABI and link nameHaitao Li-2/+4
This patch changes how to specify ABI and link name of a native module. Before: native "cdecl" mod llvm = "rustllvm" {...} After: #[abi = "cdecl"] #[link_name = "rustllvm"] native mod llvm {...} The old optional syntax for ABI and link name is no longer supported. Fixes issue #547
2011-11-09Rename "c-stack-cdecl" ABI to "cdecl"Brian Anderson-1/+1
2011-11-04vec: take [mutable? T] instead of [T]Elly Jones-2/+2
2011-11-02Add vec::permute to the standard library (#1013)Matt Brubeck-0/+25
2011-10-29stdlib: Add vec::concat to concatenate a vector of vectorsBrian Anderson-0/+13
Compare to str::concat
2011-10-28stdlib: Add vec::init. Returns all but the last element.Brian Anderson-1/+17
Per haskell, to go with head/tail, and last.
2011-10-27Add std::vec::foldrBrian Anderson-1/+14
2011-10-27Add reverse iterators to std::vecBrian Anderson-0/+29
2011-10-27Remove std::vec::eachi. Same function as iter2.Brian Anderson-24/+11
2011-10-27Implement vec::foldl without recursionBrian Anderson-6/+6
2011-10-27Add std::vec::iterBrian Anderson-1/+12
2011-10-27Make vec::reversed take [mutable? T]Brian Anderson-1/+1
2011-10-27Make std:vec::grow_fn take an init_op typeBrian Anderson-2/+2
2011-10-27Reorder std::vec so the documentation renders betterBrian Anderson-34/+35
Put all types first, then predicates, then functions
2011-10-27Convert various functions in std to take lambda blocksBrian Anderson-3/+3
2011-10-26Add more std documentationBrian Anderson-1/+6
2011-10-25Begin documenting std and add doc generation using naturaldocsBrian Anderson-21/+366
Naturaldocs isn't really that great but it seems easier to get something working than with doxygen, for which we would need to convert rust code to something C++ish. We probably want to just write a rustdoc utility at some point.
2011-10-25Update our code to new type parameter kind syntaxMarijn Haverbeke-37/+37
Closes #1067
2011-10-24remove unused task ptr argNiko Matsakis-7/+5
2011-10-24purge log_errNiko Matsakis-1/+0
2011-10-24update vec libs to use c-stack-cdecl calling conventionNiko Matsakis-6/+14
2011-10-21Remove last uses of iterators from stdlibMarijn Haverbeke-2/+2
Issue #1056
2011-10-20Make fn denote a bare function. Convert fn to fn@ as neededBrian Anderson-1/+1
2011-10-17Don't unify from mutable? to immutableBrian Anderson-2/+2
Immutable is supposed to be a subtype of mutable-huh.
2011-10-12reimplement some of the unsafe stuff which got lostNiko Matsakis-7/+5
- blocks inherit unsafety - remove the --check-unsafe flag - add unsafe annotations where needed to get things to compile
2011-10-12Add unsafe blocks, unsafe functions, and two rudimentary testsNiko Matsakis-1/+3
related to them
2011-10-10Make vectors and strings immediates againMarijn Haverbeke-1/+1
There's no good reason to force them to be spilled anymore. Some pieces of trans become more elegant this way, and less stack allocs and load/stores are needed. Issue #1021
2011-10-07Give up on providing a by-value version of map, convert fold over toMarijn Haverbeke-11/+0
passing pointers by ref Issue #1008
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-0/+11
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-09-29stdlib: Add vec::eachi to the standard libraryPatrick Walton-0/+10
2011-09-27Don't ever raise unique kinds of pinned kinds to shared (again)Brian Anderson-3/+3
So *resource, ~resource, [resource] are all pinned. This is counter to the design of the kind system, but this way is a much clearer path to type safety. Once we've established a good baseline with lots of tests, then we can try to make raising pinned kinds work.
2011-09-24Mark vec::len as pureJesse Ruderman-4/+2
2011-09-24Vectors containing pinned kinds become pinnedBrian Anderson-1/+1
Otherwise they could be copied
2011-09-23Add vec::filterJesse Ruderman-0/+11
2011-09-12Factor imports mindlessly.Graydon Hoare-2/+1
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-9/+9
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-40/+39
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-02Reformat. Issue #855Brian Anderson-22/+9
2011-09-02Rename std::vec::unsafe::ivec_repr to vec_repr. Issue #855Brian Anderson-5/+5
2011-08-30Add a total version of vec::last that has a preconditionTim Chevalier-0/+5
2011-08-30Add a precondition on vec::zipTim Chevalier-2/+35
vec::zip now has the precondition that the two argument vectors are the same length. Changed uses of it to reflect that. Also added a few vector-enumerating utilities to vec.rs, which necessitated in making some functions in u8 declared-pure.
2011-08-29Implement non-internal ivecsMarijn Haverbeke-33/+21
Vectors are now similar to our old, pre-internal vectors, except that they are uniquely owned, not refcounted. Their name should probably change too, then. I've renamed them to vec in the runtime, will do so throughout the compiler later.
2011-08-25Change "pred" to "pure fn" in all libraries and test casesTim Chevalier-2/+2