Commit graph

744 commits

Author SHA1 Message Date
Graydon Hoare
8ecbe49a8f Add -minimal mode to rustboot that skips emitting code that's broken or unneeded for rustc. Shrink rustc by 300kb. Back under 1mb. 2010-10-05 18:44:39 -07:00
Graydon Hoare
d1e59d6910 Add input coordinate tracking to all major rustc ast nodes. 2010-10-05 18:21:44 -07:00
Graydon Hoare
4168c1dcda Add -lpasses for logging just the progress of passes. 2010-10-05 18:10:33 -07:00
Graydon Hoare
cdf67b1f2e Better backpointer logic. 2010-10-05 18:09:49 -07:00
Patrick Walton
246e72b0fb Use RTLD_GLOBAL when loading libraries. This is needed to get LLVM working on the Mac in rustc. 2010-10-05 11:37:46 -07:00
Graydon Hoare
19d0fa107a Improve name nodes to ast, teach to parse qualified names, put out flaming tinderbox. 2010-10-04 17:25:52 -07:00
Graydon Hoare
44e4b2d63a Teach rustc about phi nodes, block relationships. Translate if- and block-expressions. 2010-10-04 15:55:12 -07:00
Graydon Hoare
a87e81b929 Support refcount-drop and conditional free in rustc. 2010-10-01 18:25:42 -07:00
Graydon Hoare
d07f7533b0 Sketch out #fmt syntax extension in rustboot. 2010-10-01 14:54:40 -07:00
Graydon Hoare
2e0d075407 Fix bug in bind thunks failing top drop unbound args; add test and adjust rustc to use bind again. 2010-09-30 17:39:37 -07:00
Graydon Hoare
62c224ffe4 Drop slots on block exits even when blocks have no statements. Part way to fixing bind leakage in rustc. 2010-09-30 16:10:30 -07:00
Peter Hull
f6e3e6903b Initial check-in of 99 Bottles Of Beer
using different methods (simple, iterator, tail-call, pattern match)
2010-09-30 13:50:25 -07:00
Or Brostovski
4a3404803b implemented break for while-loop case
ast.ml - added break and cont statements
item.ml - added break and cont statements
lexer.mll - added break and cont statements
token.ml - added break and cont statements
trans.ml - implemented the break statement for the while-loop case
         - replaced hash table accesses with get_stmt_depth where needed
type.ml = added break and cont statements
typestate.ml - implemented the break statement for the while-loop case
             - added shorthand filter_live_block_slots
walk.ml - added break and cont statements
while-with-break.rs - code for testing while loops
2010-09-30 13:45:57 -07:00
Or Brostovski
74cb9508cd Closed issue 154 - prevents compiler from compiliing a line to zero statements 2010-09-30 13:40:34 -07:00
Graydon Hoare
b970563fe3 Patchwork of attempted fixes to effect system and gc system; eventually give up and disable it entirely in the runtime. Will need extensive reworking. 2010-09-29 17:22:13 -07:00
Patrick Walton
7e733bf2ee Allow tag recursion through vectors as well as boxes 2010-09-29 16:58:42 -07:00
Graydon Hoare
f13306e8d6 Switch boolean operands to 1-bit, as llvm prefers. Will promote to 8-bit when storing to memory. 2010-09-28 16:17:28 -07:00
Graydon Hoare
5a4cb3ef36 Translate a modest selection of easy binops. 2010-09-28 14:01:21 -07:00
Graydon Hoare
11e72fd4e0 Translate literal int, char, bool and str types, as well as logging them. 2010-09-28 12:23:40 -07:00
Graydon Hoare
fbea4d04b7 More rustc expr-parsing logic. 2010-09-28 10:30:34 -07:00
Graydon Hoare
5b4b035c7a Start building up the expression tower. 2010-09-27 18:25:02 -07:00
Graydon Hoare
f5787ed80c Translate exit-task glue such that rustc's output programs exit properly. 2010-09-27 15:38:34 -07:00
Graydon Hoare
a2f4d9089a Fix indexing bug in rustc's indirect-upcall arg-copying loops. 2010-09-27 14:42:58 -07:00
Graydon Hoare
d31eca41d5 First linkable and executable translation from rustc. Upcalls to log, passes wrong arg, crashes. Baby steps. 2010-09-27 13:43:53 -07:00
Graydon Hoare
d53209c927 Construct the crate constant in rustc. 2010-09-24 16:41:01 -07:00
Graydon Hoare
b69a0c137c Modify the task type to not contain any opaques; apparently these make LLVM cross. 2010-09-24 15:22:48 -07:00
Graydon Hoare
4cfc4250bf More work on trans, almost getting to the point of emitting an upcall. 2010-09-24 14:56:04 -07:00
Graydon Hoare
6b412be619 Wrap long line. 2010-09-23 18:42:49 -07:00
Graydon Hoare
274128c6b2 Add trans.get_upcall and skeleton for trans_log. 2010-09-23 18:38:37 -07:00
Graydon Hoare
730439c508 Improve LLVM builder wrapper-object. 2010-09-23 18:38:09 -07:00
Graydon Hoare
2db1f864e2 Declare the global and upcall glues as ValueRefs in rustc's trans. 2010-09-23 17:16:34 -07:00
Graydon Hoare
bba4cae1b8 Resolve constant types through to their definitions. 2010-09-23 17:11:30 -07:00
Graydon Hoare
46e46d0b49 Translate a bunch of the material (lltrans, llasm, abi) from rustboot to rustc, and move files around. 2010-09-23 15:46:31 -07:00
Graydon Hoare
2c514f33f2 More fleshing-out on rustc.me.trans. Emitting modules and fns corresponding to parsed input now. 2010-09-23 13:15:51 -07:00
Graydon Hoare
04a55df54b Flesh out rustc.me.trans to construct functions, basic blocks and builders off the AST. 2010-09-22 17:05:38 -07:00
Graydon Hoare
4d17283371 Add 'items' iter to hashmap. 2010-09-22 17:04:08 -07:00
Graydon Hoare
2880ecd73f Reformat standard library; no code changes. 2010-09-22 15:44:13 -07:00
Graydon Hoare
738fe078a4 Move llvm-using code in rustc to trans module. 2010-09-22 15:27:40 -07:00
Graydon Hoare
e0f682e5fb Add some basic string functions: index, rindes, find, substr, split, concat, connect. 2010-09-22 15:27:40 -07:00
Graydon Hoare
fc6f307787 Fix linear for loops on strings to not hit trailing null. 2010-09-22 15:27:35 -07:00
Graydon Hoare
913882de7f Make deps via temps, to avoid syntax errors wedging deps. 2010-09-22 15:27:24 -07:00
Graydon Hoare
264c765931 Revert "Make recursive type verification logic better by allowing it to see through multiple levels of indirection. Still can trigger "unexpected OpaqueTy" bugs, but that's better than infinite loops."
This reverts commit 751a47cc5a.

Broken build.
2010-09-22 10:57:58 -07:00
Patrick Walton
751a47cc5a Make recursive type verification logic better by allowing it to see through multiple levels of indirection. Still can trigger "unexpected OpaqueTy" bugs, but that's better than infinite loops. 2010-09-21 19:15:47 -07:00
Patrick Walton
742b1c5793 Report an error instead of asserting when an item name is already in use 2010-09-21 17:38:47 -07:00
Graydon Hoare
1f0621d04e Begin teaching rustc to parse literals, atoms, stmts, blocks, items, modules, crates. 2010-09-21 16:22:32 -07:00
Graydon Hoare
8beb118df4 Add insn-selection fixup-name logging. 2010-09-21 16:21:30 -07:00
Graydon Hoare
b549721a2e Tighten pattern parsing on 0-ary constructors. 2010-09-21 16:18:47 -07:00
Graydon Hoare
9f0a6c21b2 Implement preliminary form of structured compare. No boxes, vectors or strings yet. 2010-09-21 11:47:10 -07:00
Graydon Hoare
72cc89c8c3 Add QUES to comp/fe/lexer.rs, rustc can self-lex again. 2010-09-21 08:30:06 -07:00
Graydon Hoare
28b9357a0c Kill residual dead code in Trans.iter_tag_parts. Shaves a couple kb off rustc. 2010-09-21 08:28:19 -07:00