about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-10-20Tweak typecheck to enforce covariance on higher-order function argumentsBrian Anderson-1/+4
2011-10-20Remove type coercion from fn to blockBrian Anderson-48/+4
fn is a proper subtype of block now
2011-10-20Give subtype relationships to function typesBrian Anderson-2/+57
2011-10-20Bare functions can coerce to blocksBrian Anderson-0/+4
2011-10-20Bare functions can coerce to shared closuresBrian Anderson-6/+15
2011-10-20Revert "Remove the environment argument from bare functions"Brian Anderson-35/+7
This reverts commit 1b0f1f0b79fb29d28bcabb7a8468f4a5a95c0712.
2011-10-20Split parsing of fn proto between types, items and anonsBrian Anderson-6/+30
The meaning of various fn incantations is going to get temporarily confusing
2011-10-20Convert the test runners to typesafe spawnBrian Anderson-2/+58
Issue #1022
2011-10-20Fix the problem with check-fast randomly failingBrian Anderson-5/+18
Trans has been assuming that tag node id's are unique across crates and they are not so, depending on which way the wind is blowing, it would choose to use a crate-local tag variant instead of the correct one from std. No test case since I can't come up with a reliable one that compiles in a reasonable amount of time.
2011-10-20Don't rely on main.ll anymoreMarijn Haverbeke-33/+62
I'll remove the actual file after I register a snapshot. Issue #992
2011-10-20Output linker errors, when linking failsMarijn Haverbeke-3/+4
2011-10-20Get rid of taskpointer-passing throughout the compilerMarijn Haverbeke-62/+35
Only intrinsics still take a dummy taskptr. We'll have to do some makefile stunts to snapshot a version without taskptrs-in-intrinsics. Issue #466
2011-10-20Do not pass taskpointers to "rust" native functionsMarijn Haverbeke-1/+1
Issue #466
2011-10-20Remove taskptr argument from upcallsMarijn Haverbeke-44/+31
Issue #466
2011-10-20Remove spawn_wrap and main_wrap kludgesMarijn Haverbeke-1/+1
This isn't needed now that our functions are cdecl (and was apparently only still working by accident). Issue #992
2011-10-19Fail nicer when the parser doesn't find an expected string literalBrian Anderson-2/+4
Closes #1028
2011-10-18Introduce fn@ as a synonym for fnBrian Anderson-0/+3
2011-10-18Immutable and mutable? are covariant on their inner typesBrian Anderson-3/+10
Whereas [mutable T] is invariant with respect to T, [T] and [mutable? T] are covariant with respect to T.
2011-10-18Add a math module to the standard libMarijn Haverbeke-21/+14
I need some rudimentary stdlib stuff for the tutorial. Closes #1042
2011-10-18Don't try to build an LLVM switch on floatsMarijn Haverbeke-1/+2
Closes #1046
2011-10-17Enforce variance rules for mutable typesBrian Anderson-40/+48
2011-10-17Add a variance transform for calculation of recursive varianceBrian Anderson-14/+53
2011-10-17Introduce covariance, contravariance and invariance to the type unifierBrian Anderson-22/+47
This will be used to resolve some problems with mutable? covariance and also to implement function subtyping
2011-10-17Don't unify from mutable? to immutableBrian Anderson-1/+0
Immutable is supposed to be a subtype of mutable-huh.
2011-10-17Split record_var_binding into methods for expected and actualBrian Anderson-4/+26
This allows unify to maintain the same subtype relationship between expected and actual throughout unify, which we are going to need for mutable? and for function types.
2011-10-17Correct two more analyses of mutable? as mutableBrian Anderson-2/+2
I can't come up with test cases but this seems correct.
2011-10-17Don't allow assignment to mutable-wha?Brian Anderson-9/+9
2011-10-17Change the linkage order on linux and add -ldlBrian Anderson-5/+6
-lrt and -ldl need to be specified after -lrustrt since they are only used by rustrt.
2011-10-16Only link librt on linuxBrian Anderson-1/+8
2011-10-16Fix link error by explicitly link needed DSOsHaitao Li-1/+1
Building Rust(version 280bc56) on Ubuntu 11.10 failed with link error, like: compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/lib/libstd.so compile_and_link: stage0/lib/rustc/i686-unknown-linux-gnu/bin/rustc /local/src/rust/build/stage0/lib/rustc/i686-unknown-linux-gnu/lib/librustrt.so: undefined reference to `clock_gettime' collect2: ld returned 1 exit status error: linking with gcc failed with code 1 GCC toolchain released by Ubuntu 11.10 introduced a few compiler flags that are different with upstream GCC[1]. Flags "-Wl,--as-needed' and '-Wl,--no-copy-dt-needed-entries' are passed by default. Function clock_gettime from librt is used by librustrt, indirectly by rustc. It is necessary to explicitly pass the "-lrt" flags when building rustc. Please note since the toolchain changes will be the default in the next release(2.22) of binutils, this is not actually a Debian/Ubuntu specific issue. 1. https://wiki.ubuntu.com/OneiricOcelot/ReleaseNotes#GCC_4.6_Toolchain Signed-off-by: Haitao Li <lihaitao@gmail.com>
2011-10-14Use trans_expr_save_in instead of trans_expr when appropriateMarijn Haverbeke-2/+2
This guards against passing a save_in destination to nil or bot-typed things.
2011-10-14Don't crash when reporting an unresolved import in the nil scopeMarijn Haverbeke-18/+22
Closes #1027
2011-10-13Remove an unnecessary visitor from rustc::middle::fn_usageBrian Anderson-8/+1
2011-10-13Fix a use of visit in rustc::middle::fn_usageBrian Anderson-1/+1
This was working by just skipping an AST node instead of doing the advertised check. I can't find a test case for it, but this is more correct.
2011-10-13Don't allow the value of generic bare functions to be takenBrian Anderson-5/+36
Issue #1038
2011-10-13Rename rustc::middle::unsafeck to fn_usageBrian Anderson-15/+15
I'm going to add further checks unrelated to unsafe. Issue #1038
2011-10-13Make trans_anon_obj properly thread its bcxMarijn Haverbeke-9/+3
Closes #893 Unfortunately, anon objs are still so broken as to be useless (fields don't work).
2011-10-13Properly fill single-variant zero-arg tag values.Marijn Haverbeke-9/+10
Closes #1034. Closes #1035.
2011-10-12reimplement some of the unsafe stuff which got lostNiko Matsakis-115/+97
- blocks inherit unsafety - remove the --check-unsafe flag - add unsafe annotations where needed to get things to compile
2011-10-12remove unsafe tagsNiko Matsakis-12/+12
2011-10-12make compiler emit more than 1 error in the case of unsafeNiko Matsakis-23/+8
2011-10-12prohibit ptr deref unless in unsafe codeNiko Matsakis-2/+20
2011-10-12fix error msgNiko Matsakis-8/+2
2011-10-12make a good error msg if you try to use an unsafe fn for a testNiko Matsakis-8/+21
2011-10-12improve the span used in test generationNiko Matsakis-6/+8
2011-10-12add pass to check that unsafe fns cannot be used as valuesNiko Matsakis-1/+76
2011-10-12continue to annotate functions as unsafe where neccessaryNiko Matsakis-16/+15
2011-10-12continue to annotate trans functions as unsafe where neccessaryNiko Matsakis-5/+7
2011-10-12continue to annotate trans functions as unsafe where neccessaryNiko Matsakis-3/+3
2011-10-12add unsafe tags into various points in the translation chainsNiko Matsakis-73/+125
and so forth