Commit Graph

18852 Commits

Author SHA1 Message Date
Patrick Walton
1c1dc651a7 Stub an interface to the (as-yet-nonexistent) structural comparison glue in trans 2010-07-18 14:25:43 +08:00
Jeffrey Yasskin
22eca31d98 Fix argv.rs under the LLVM compiler.
The call to rust_start was assuming that all rust main() functions have the
same signature, but the compiler doesn't actually canonicalize them.  So
instead just match the C signature of rust_start, and cast.
2010-07-18 14:25:19 +08:00
Jeffrey Yasskin
8ebf72ed29 Fix the LLVM ocamlopt build. 2010-07-18 14:25:19 +08:00
Jeffrey Yasskin
bd56de745b Explain that rust methods can't call other methods on the same object, either
implicitly or explicitly.
2010-07-18 14:25:18 +08:00
Jeffrey Yasskin
c3c425e9f1 Work around auto-dereference crash in rustboot. 2010-07-18 14:25:18 +08:00
Roy Frostig
fb68286700 Add incomplete hashmap implementation to stdlib. 2010-07-16 18:14:52 -07:00
Roy Frostig
c906759807 Fix IL translation of pattern-alt to allow a value of mutable/constrained type to be the subject of a pattern-alt. 2010-07-16 18:04:34 -07:00
Patrick Walton
1ac01e16cf Ensure that functions that should return a value do; issue 41 2010-07-16 15:34:25 -07:00
Graydon Hoare
4d413af822 Un-XFAIL a couple tests fixed by pcwalton's new typechecker. Closes #50. Closes #51. 2010-07-16 15:22:40 -07:00
Patrick Walton
35e73b0627 Un-XFAIL generic-fn-twice.rs, issue 93 2010-07-16 15:07:40 -07:00
Patrick Walton
8b00ab1a48 Feed the correct return type to the typechecker when typechecking objects, and add a testcase. 2010-07-16 14:54:47 -07:00
Patrick Walton
aa37b8c047 XFAIL foreach-nested.rs and foreach-nested-2.rs under LLVM 2010-07-16 14:46:54 -07:00
Roy Frostig
700e522dff More renaming of GEP offsets in abi/trans. This should settle it. Also, fix some overenthusiastic renaming in previous commit. 2010-07-16 12:23:46 -07:00
Roy Frostig
348e434cee Clean up nomenclature in the Abi constants brigade. Purge magic GEP numbers in trans. Adjust obj_closure_rty (and its consumers) to be more explicit about the fact that it is a box. 2010-07-16 11:17:25 -07:00
Graydon Hoare
de8a7dc7dc Merge branch 'contrib' 2010-07-15 23:58:13 -07:00
Jason Orendorff
7671828d45 Support nested for-each loops. Closes #79. 2010-07-16 14:53:49 +08:00
Graydon Hoare
5d8430afa7 Fix a couple fails with wrong arg count (new arg from last gc change); expand vec_grow logging a bit. 2010-07-15 18:59:31 -07:00
Graydon Hoare
f300ca4ed7 XFAIL the new destructor tests; collided with new typechecker; add test for issue #109. 2010-07-15 18:57:21 -07:00
Patrick Walton
c96f0bf738 Implement the "simple typechecker", which avoids HM inference 2010-07-15 18:27:09 -07:00
Patrick Walton
91b4cae8da Remove log-type-error; everything is loggable. 2010-07-15 18:18:58 -07:00
Graydon Hoare
e1b8863e45 Update AUTHORS.txt. 2010-07-15 17:28:35 -07:00
Graydon Hoare
60044bbcef XFAIL jyasskin's new tests under LLVM backend. 2010-07-15 17:22:30 -07:00
Jeffrey Yasskin
b3ca7522bb More destruction ordering tests. 2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
7dd464fdb5 Initial test that the compiler runs destructors in the right order. 2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
765a2b3ecf Add a _vec.slice function that'll hold us over until .(a,b) syntax is
implemented.  This could actually replace .(a,b) syntax if the language grows
optional function parameters.
2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
c866672a99 Add a test for std._vec.init_elt, and an XFAILed test for std._vec.init_fn. 2010-07-16 08:13:08 +08:00
Jeffrey Yasskin
3e63343fbc Let the compiler find libraries that aren't in the current directory. 2010-07-16 08:13:07 +08:00
Jeffrey Yasskin
29d0458814 Remove the __PAGEZERO segment from shared MachO libraries. This avoids a
segfault in dlclose() and fixes the tests on OSX 10.5.8.
2010-07-16 08:13:07 +08:00
Jeffrey Yasskin
9c4bc7b872 In Mach-O shared libraries, avoid counting an extra load command. Closes #99. 2010-07-16 08:13:07 +08:00
Graydon Hoare
6cf1fe8dd5 Merge branch 'master' of git@github.com:graydon/rust 2010-07-15 17:00:36 -07:00
Graydon Hoare
3b9286cb65 XFAIL use-import-export.rs on the LLVM backend. 2010-07-15 16:57:28 -07:00
Roy Frostig
d2b845d29c Define (in Abi) and use named constants for indices of elements of an obj IL referent type. 2010-07-15 16:54:38 -07:00
Graydon Hoare
c218d06601 Merge branch 'contrib' 2010-07-15 16:49:02 -07:00
Graydon Hoare
e714402a92 Update AUTHORS.txt. 2010-07-15 16:48:40 -07:00
Adam Bozanich
7a13a61e02 use,import,export parse fixes
* use,import,export must come before all other items.
* disallow use,import in "native" declarations.
2010-07-16 07:23:16 +08:00
Adam Bozanich
b096b0e308 permit use before import. closes #48 2010-07-16 07:19:14 +08:00
Patrick Walton
0b675a021a Make mutability no longer a type constructor 2010-07-15 15:20:04 -07:00
Roy Frostig
f02f9cbf29 Correct the way we get typarams when dropping an obj type in drop_ty by using get_tydesc_params. 2010-07-15 12:30:46 -07:00
Roy Frostig
25a38ee4f7 Modify copy_fn_args not to bother with dynamic GEP to get the indirect args cell in a calltup. It's now possible to obtain it with just regular GEP. 2010-07-15 12:30:46 -07:00
Roy Frostig
373f904c92 Explicitly provide an optional closure/obj pointer to trans_call_glue so that it can push one in the right position when calling glue, instead of always pushing a null. As far as I can tell this only affects calls to obj drop glue, since only that makes use of an object binding passed as closure/obj, so pass the binding there as needed. 2010-07-15 12:30:46 -07:00
Roy Frostig
df75165cf4 Make the x86 backend push an extra word as closure/obj arg when emitting any code that amounts to a glue or native call. 2010-07-15 12:30:46 -07:00
Roy Frostig
5d10a264de Add another null byte preceding commandline args passed to the root task, in position of closure/obj pointer. 2010-07-15 12:30:46 -07:00
Roy Frostig
dbb109853f Adjust trans_call_glue to push/pop an extra null word implicit arg, in position of closure/obj pointer. 2010-07-15 12:30:46 -07:00
Roy Frostig
7c8c98a6d7 Adjust call args laid out by fake frame created in rust_task::start to reflect new position of closure-or-obj pointer. 2010-07-15 12:30:46 -07:00
Roy Frostig
e21865a440 Begin moving closure-or-obj pointer out to front of call args by changing the order within the call-arg tup referent type. This breaks the world quite a bit, since it remains to fix custom call paths: glue, upcalls, natives. 2010-07-15 12:30:46 -07:00
Roy Frostig
44d719d5fb Make the call args referent type always have a closure word (non-optional, null in case of no closure) in preparation for shifting it inward from its current position at end-of-call-tup. 2010-07-15 12:30:46 -07:00
Graydon Hoare
b0ee41064c Minimize pointless logging during walk. 2010-07-14 17:05:17 -07:00
Graydon Hoare
d0da083c5b Fix support for profiling the compiler. 2010-07-14 17:03:08 -07:00
Graydon Hoare
872f588ccb Sketch some not-quite-compiling code into comp/fe/lexer.rs. 2010-07-14 09:41:36 -07:00
Graydon Hoare
0fdad302b8 Fix ret/put mis-identification in typechecker. Closes #87. 2010-07-14 09:41:08 -07:00