about summary refs log tree commit diff
path: root/src/libsyntax/abi.rs
AgeCommit message (Collapse)AuthorLines
2014-05-30libsyntax: Fix snake_case errors.Kevin Butler-1/+2
A number of functions/methods have been moved or renamed to align better with rust standard conventions. syntax::ext::mtwt::xorPush => xor_push syntax::parse::parser::Parser => Parser::new [breaking-change]
2014-05-15Updates with core::fmt changesAlex Crichton-1/+1
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
2014-04-03Test fixes from the rollupAlex Crichton-8/+8
2014-04-03syntax: Remove AbiSet, use one AbiAlex Crichton-253/+21
This change removes the AbiSet from the AST, converting all usage to have just one Abi value. The current scheme selects a relevant ABI given a list of ABIs based on the target architecture and how relevant each ABI is to that architecture. Instead of this mildly complicated scheme, only one ABI will be allowed in abi strings, and pseudo-abis will be created for special cases as necessary. For example the "system" abi exists for stdcall on win32 and C on win64. Closes #10049
2014-03-31syntax: Switch field privacy as necessaryAlex Crichton-1/+1
2014-03-23use TotalEq for HashMapDaniel Micay-2/+2
Closes #5283
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-1/+1
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-2/+3
2014-03-01Publicise types/add #[allow(visible_private_types)] to a variety of places.Huon Wilson-2/+2
There's a lot of these types in the compiler libraries, and a few of the older or private stdlib ones. Some types are obviously meant to be public, others not so much.
2014-02-24replace manual Hash impls with `#[deriving(Hash)]`Erick Tryzelaar-8/+1
2014-02-24Remove deriving(ToStr)Alex Crichton-1/+1
This has been superseded by deriving(Show). cc #9806
2014-02-23Remove all ToStr impls, add Show implsAlex Crichton-8/+13
This commit changes the ToStr trait to: impl<T: fmt::Show> ToStr for T { fn to_str(&self) -> ~str { format!("{}", *self) } } The ToStr trait has been on the chopping block for quite awhile now, and this is the final nail in its coffin. The trait and the corresponding method are not being removed as part of this commit, but rather any implementations of the `ToStr` trait are being forbidden because of the generic impl. The new way to get the `to_str()` method to work is to implement `fmt::Show`. Formatting into a `&mut Writer` (as `format!` does) is much more efficient than `ToStr` when building up large strings. The `ToStr` trait forces many intermediate allocations to be made while the `fmt::Show` trait allows incremental buildup in the same heap allocated buffer. Additionally, the `fmt::Show` trait is much more extensible in terms of interoperation with other `Writer` instances and in more situations. By design the `ToStr` trait requires at least one allocation whereas the `fmt::Show` trait does not require any allocations. Closes #8242 Closes #9806
2014-02-24Transition to new `Hash`, removing IterBytes and std::to_bytes.Huon Wilson-11/+5
2014-02-22Warn about unnecessary parentheses upon assignmentEduard Bopp-1/+1
Closes #12366. Parentheses around assignment statements such as let mut a = (0); a = (1); a += (2); are not necessary and therefore an unnecessary_parens warning is raised when statements like this occur. The warning mechanism was refactored along the way to allow for code reuse between the routines for checking expressions and statements. Code had to be adopted throughout the compiler and standard libraries to comply with this modification of the lint.
2014-02-08Fixed error starting with uppercasemr.Shu-2/+2
Error messages cleaned in librustc/middle Error messages cleaned in libsyntax Error messages cleaned in libsyntax more agressively Error messages cleaned in librustc more aggressively Fixed affected tests Fixed other failing tests Last failing tests fixed
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-0/+1
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-7/+7
2013-11-20auto merge of #10527 : eholk/rust/win64, r=alexcrichtonbors-0/+3
This was needed to access UEFI boot services in my new Boot2Rust experiment. I also realized that Rust functions declared as extern always use the C calling convention regardless of how they were declared, so this pull request fixes that as well.
2013-11-19libsyntax: Change all uses of `&fn` to `||`.Patrick Walton-2/+2
2013-11-18Add Win64 calling convention.Eric Holk-0/+3
2013-11-09Add a "system" ABIAlex Crichton-13/+36
This adds an other ABI option which allows a custom selection over the target architecture and OS. The only current candidate for this change is that kernel32 on win32 uses stdcall, but on win64 it uses the cdecl calling convention. Otherwise everywhere else this is defined as using the Cdecl calling convention. cc #10049 Closes #8774
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-5/+5
Who doesn't like a massive renaming?
2013-09-30syntax: Remove usage of fmt!Alex Crichton-6/+6
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-2/+2
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-03remove obsolete `foreach` keywordDaniel Micay-4/+4
this has been replaced by `for`
2013-08-03replace all remaining `for` with `foreach` or `do`Daniel Micay-13/+22
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-4/+4
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-1/+1
2013-06-25great renaming propagation: syntaxCorey Richardson-3/+1
2013-06-23vec: remove BaseIter implementationDaniel Micay-3/+3
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-2/+2
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-2/+1
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-21/+21
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+1
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+2
to libextra
2013-05-19Register snapshotsBrian Anderson-39/+0
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-3/+1
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-2/+2
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-10syntax: Use the new `for` protocolAlex Crichton-0/+29
2013-04-27only use #[no_core] in libcoreDaniel Micay-2/+0
2013-04-19syntax: de-mode and prepare for de-modeing rustcAlex Crichton-2/+2
2013-04-14syntax: remove unnecessary unsafe blocks/functionsAlex Crichton-6/+4
2013-03-30libsyntax: Update abi constants. Fixes #5423.Luqman Aden-5/+2
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-0/+427
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.