Commit Graph

8575 Commits

Author SHA1 Message Date
Marijn Haverbeke
1e5266260a Take move captures in account in mutability checker
Closes #1461
2012-02-22 13:35:17 +01:00
Marijn Haverbeke
8015e6d52b Return a new type var instead of nil when failing to typecheck a field
The previous solution was usually causing a second spurious error
message.
2012-02-22 13:34:43 +01:00
Marijn Haverbeke
ffd50b9cdf Make the various from_str functions return options
So that they can be used with user input without causing task
failures.

Closes #1335
2012-02-22 13:18:15 +01:00
Marijn Haverbeke
72373438d2 Add core::to_str module
Provides a central iface for the various stringification
functions.
2012-02-22 13:06:38 +01:00
Marijn Haverbeke
ad03761a97 Remove preconditions from libraries
Closes #1805
2012-02-22 11:47:47 +01:00
Marijn Haverbeke
e57b6775c3 Clean up small things in syntax submodules 2012-02-22 11:16:25 +01:00
Brian Anderson
40cd1a7c45 rustdoc: Turn off parallel folding until I figure out what's wrong on OS X 2012-02-21 16:15:14 -08:00
Brian Anderson
8b071ebe4c rustdoc: Make it easy to switch between parallel and sequential folds 2012-02-21 16:14:02 -08:00
Brian Anderson
1ee139ae1f rustdoc: Convert most passes to parallel folds 2012-02-21 16:14:02 -08:00
Brian Anderson
d4f57620ae rustdoc: Implement a parallel fold 2012-02-21 16:14:02 -08:00
Brian Anderson
7599d2dd51 rustdoc: Implement astsrv in a dedicated task
This allows the srv type to be sendable so we can parallelize
all the rustdoc passes
2012-02-21 16:14:02 -08:00
Brian Anderson
96e3031675 rustdoc: Convert the astsrv constructor to a higher order fn
This will allow it to manage the destruction of the astsrv after
I convert it to a task
2012-02-21 16:14:02 -08:00
Brian Anderson
d6095dc6b5 rustdoc: Rename mk_srv_from_str/file to just from_str/file 2012-02-21 16:14:02 -08:00
Brian Anderson
77a01054fa rustc: Generate crates with #ast 2012-02-21 15:34:26 -08:00
Brian Anderson
a896eb326e core: Fix unused variable warning 2012-02-21 14:25:51 -08:00
Brian Anderson
6527fc3925 core: Fix to_str_exact for floats with no decimal component 2012-02-21 14:25:31 -08:00
Brian Anderson
910a32c7c7 core: Add option::unwrap
This function uses some unsafe code to move the value out of an option.
2012-02-21 13:55:50 -08:00
Marijn Haverbeke
9d20ed7bf9 Clean up unification code 2012-02-21 17:08:14 +01:00
Marijn Haverbeke
ff927f18f5 Clean up some FIXMEs in middle:: modules
Rename all TODOs to FIXMEs
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
92a45f5582 Move trans::type_of code into its own file
Slowly shrinking base.rs
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
d85d4f55f7 Include @ in crate_ctxt and fn_ctxt type definitions
So that code using them doesn't have to spell it out constantly.
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
b1d7f252a9 Remove unused tydesc argument to upcall_shared_malloc 2012-02-21 17:08:14 +01:00
Marijn Haverbeke
389aff333d Make the cleanup tag in resource types a u8
Closes #1184
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
5458da0fd9 Remove some checks and associated FIXMEs from trans code
Such intentions are better tracked in the bug tracker, don't need
to litter the code with repetetive comments.
2012-02-21 17:08:14 +01:00
Marijn Haverbeke
789a1ae356 Clean up a number of TODOs in the trans modules
Rename the ones that I didn't handle to FIXME
2012-02-21 14:20:18 +01:00
Brian Anderson
9691ce18a2 core: Resolve a FIXME in str module 2012-02-21 01:03:13 -08:00
Daniel Brooks
3c95fa22da python might be in a path with spaces in it, you never know 2012-02-21 00:53:01 -08:00
Brian Anderson
4601810747 core: Remove a useless test from option mod 2012-02-20 22:43:33 -08:00
Tim Chevalier
4cd3d4ab1e More work on typechecking classes
classes-simple doesn't fail until trans now!
2012-02-20 22:26:19 -08:00
Brian Anderson
4220dcf1e9 core: New task API 2012-02-20 18:58:04 -08:00
Tim Chevalier
fbc95ba018 Re-XFAIL test that I accidentally 2012-02-20 17:33:35 -08:00
Tim Chevalier
cd9579e079 fix whitespace again 2012-02-20 17:21:33 -08:00
Tim Chevalier
ac7aa73b3e Oops, my whitespace is showing 2012-02-20 17:19:09 -08:00
Tim Chevalier
2299d204e4 Further work on resolving and typechecking classes
Class tests aren't working yet, but they fail a little later :-)

Also, make the parser correctly set a constructor's result type to
its enclosing class type.
2012-02-20 17:16:52 -08:00
Brian Anderson
5837e1e809 rustdoc: Remove stray log 2012-02-20 16:57:29 -08:00
Brian Anderson
86e1d4ecbd rustdoc: astsrv::exec should return sendable types
In order to make it parallelizable someday.
2012-02-20 16:56:59 -08:00
Brian Anderson
57be673025 rustdoc: Document reexports 2012-02-20 16:39:35 -08:00
Graydon Hoare
1028968970 Merge pull request #1870 from tychosci/cargo-sysroot
cargo: Fixes for issue #1795
2012-02-20 11:27:30 -08:00
Tycho Sci
b06cb0df5a cargo: Install blobs to $sysroot/(bin|lib) on system-mode
Issue #1795
2012-02-20 17:55:36 +09:00
Tycho Sci
ff0ab6b7ee cargo: Use system-mode by default except "install"
I think it is confused that you need to "cargo init"
and "cargo sync" every time to setup local-level .cargo
2012-02-20 17:55:35 +09:00
Tycho Sci
2e63bc5d82 cargo: Use $sysroot/$libdir/cargo as work dir
On win32  environment, it's "$sysroot/bin/cargo".
On unix-y environment, it's "$sysroot/lib/cargo".
2012-02-20 17:55:35 +09:00
Brian Anderson
657ef8ef60 Merge pull request #1869 from cpeterso/master
rt: lock_and_signal fixes
2012-02-19 23:42:38 -08:00
Chris Peterson
fed81c2cfc rt: Add some lock_and_signal assertions
Assert that locks are not reentered on the same thread, unlocked by a
different thread, or deleted while locked.
2012-02-19 23:15:35 -08:00
Chris Peterson
9f49293232 rt: Initialize Windows CRITICAL_SECTION with non-zero spin count
If a CRITICAL_SECTION is not initialized with a spin count, it will
default to 0, even on multi-processor systems. MSDN suggests using
4000. On single-processor systems, the spin count parameter is ignored
and the critical section's spin count defaults to 0.

For Windows >= Vista, extra debug info is allocated for
CRITICAL_SECTIONs but not released in a timely manner. Consider using
InitializeCriticalSectionEx(CRITICAL_SECTION_NO_DEBUG_INFO).
2012-02-19 23:13:31 -08:00
Chris Peterson
159dfd7c3b rt: Delete Windows CRITICAL_SECTION in dtor 2012-02-19 23:11:03 -08:00
Erick Tryzelaar
4a3d551b85 vim: fix indenting enums and macros
Now vim indenting goes from:

fn main() {
    enum t {
a: int,
   b: int
    }
#error("hello world");
}

to:

fn main() {
    enum t {
        a: int,
        b: int
    }
    #error("hello world");
}
2012-02-19 13:08:32 -08:00
Brian Anderson
6b280c61ce core: Export future mod 2012-02-18 23:03:26 -08:00
Brian Anderson
010f2abc70 core: When running tests sequentially, print the test name before running it
Useful for debugging hanging tests
2012-02-18 16:30:09 -08:00
Brian Anderson
23d36be1e9 core: Define futures in terms of local functions, of which port::recv is one possibility 2012-02-18 15:23:56 -08:00
Brian Anderson
d2294a2d99 rustc: Add missing space to error message 2012-02-18 14:04:24 -08:00