rustc: Move much of metadata reading over to interior vectors

This commit is contained in:
Patrick Walton 2011-07-12 10:59:18 -07:00
parent 4664b67ea2
commit be489ee9e2
16 changed files with 337 additions and 336 deletions

View file

@ -1,5 +1,5 @@
import std::io;
import std::ioivec;
import std::ivec;
import std::vec;
import std::str;
@ -59,8 +59,8 @@ fn new_parser_from_file(parse_sess sess, ast::crate_cfg cfg,
str path, uint pos) -> parser {
auto ftype = SOURCE_FILE;
if (str::ends_with(path, ".rc")) { ftype = CRATE_FILE; }
auto srdr = io::file_reader(path);
auto src = str::unsafe_from_bytes(srdr.read_whole_stream());
auto srdr = ioivec::file_reader(path);
auto src = str::unsafe_from_bytes_ivec(srdr.read_whole_stream());
auto filemap = codemap::new_filemap(path, pos);
vec::push(sess.cm.files, filemap);
auto itr = @interner::mk(str::hash, str::eq);