diff options
| author | Graydon Hoare <[email protected]> | 2010-06-27 20:48:28 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-06-27 20:48:28 -0700 |
| commit | 1316312c0c0f0225922b94fc6bfa2e07e3a85ac4 (patch) | |
| tree | 3d56e02aa4afb3202a49dee2ec4c8757b97ec0fa /src/boot/me/trans.ml | |
| parent | Change slot_mem_ctrl to classify vec[state] as GC mem. Breaking / XFAILing mu... (diff) | |
| download | rust-1316312c0c0f0225922b94fc6bfa2e07e3a85ac4.tar.xz rust-1316312c0c0f0225922b94fc6bfa2e07e3a85ac4.zip | |
Only translate or dwarf-emit items or stubs locally defined or used. Avoids instantiating O(sizeof(standard-library)) worth of imports stubs on each 'use std'. Closes issue 13.
Diffstat (limited to 'src/boot/me/trans.ml')
| -rw-r--r-- | src/boot/me/trans.ml | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/boot/me/trans.ml b/src/boot/me/trans.ml index 229395c2..4b7c5b17 100644 --- a/src/boot/me/trans.ml +++ b/src/boot/me/trans.ml @@ -5094,7 +5094,8 @@ let fixup_assigning_visitor in let visit_block_pre b = - htab_put cx.ctxt_block_fixups b.id (new_fixup "lexical block"); + htab_put cx.ctxt_block_fixups b.id + (new_fixup ("lexical block in " ^ (path_name()))); inner.Walk.visit_block_pre b in @@ -5118,13 +5119,15 @@ let process_crate let path = Stack.create () in let passes = [| - (fixup_assigning_visitor cx path - Walk.empty_visitor); - (Walk.mod_item_logging_visitor - (log cx "translation pass: %s") - path - (trans_visitor cx path - Walk.empty_visitor)) + (unreferenced_required_item_ignoring_visitor cx + (fixup_assigning_visitor cx path + Walk.empty_visitor)); + (unreferenced_required_item_ignoring_visitor cx + (Walk.mod_item_logging_visitor + (log cx "translation pass: %s") + path + (trans_visitor cx path + Walk.empty_visitor))) |]; in log cx "translating crate"; |