Skip to content

Commit d708247

Browse files
committed
---
yaml --- r: 148315 b: refs/heads/try2 c: f63a7f5 h: refs/heads/master i: 148313: e634bc4 148311: 210a5e3 v: v3
1 parent e64a3cc commit d708247

File tree

7 files changed

+54
-115
lines changed

7 files changed

+54
-115
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: f98f76e3a75b4d75d809601ce1d6fa62d3eca428
8+
refs/heads/try2: f63a7f598a0796b979ec3b626673168e5faa7f3f
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ DRIVER_CRATE := $(S)src/driver/driver.rs
371371
LLVM_COMPONENTS=x86 arm mips ipo bitreader bitwriter linker asmparser jit mcjit \
372372
interpreter instrumentation
373373

374+
# Only build these LLVM tools
375+
LLVM_TOOLS=bugpoint llc llvm-ar llvm-as llvm-dis llvm-mc opt
376+
374377
define DEF_LLVM_VARS
375378
# The configure script defines these variables with the target triples
376379
# separated by Z. This defines new ones with the expected format.

branches/try2/doc/index.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,52 +4,54 @@
44
<style type="text/css">
55
#TOC { display: none; }
66
.header-section-number { display: none; }
7+
li {list-style-type: none; }
78
</style>
89

9-
[The Rust tutorial](tutorial.html) ([PDF](tutorial.pdf))
10-
[The Rust reference manual](rust.html) ([PDF](rust.pdf))
10+
* [The Rust tutorial](tutorial.html) (* [PDF](tutorial.pdf))
11+
* [The Rust reference manual](rust.html) (* [PDF](rust.pdf))
1112

1213
# Guides
1314

14-
[Pointers](guide-pointers.html)
15-
[References and Lifetimes](guide-lifetimes.html)
16-
[Containers and Iterators](guide-container.html)
17-
[Tasks and Communication](guide-tasks.html)
18-
[Foreign Function Interface](guide-ffi.html)
19-
[Macros](guide-macros.html)
20-
[Packaging](guide-rustpkg.html)
21-
[Testing](guide-testing.html)
22-
[Conditions](guide-conditions.html)
23-
[Rust's Runtime](guide-runtime.html)
15+
* [Pointers](guide-pointers.html)
16+
* [References and Lifetimes](guide-lifetimes.html)
17+
* [Containers and Iterators](guide-container.html)
18+
* [Tasks and Communication](guide-tasks.html)
19+
* [Foreign Function Interface](guide-ffi.html)
20+
* [Macros](guide-macros.html)
21+
* [Packaging](guide-rustpkg.html)
22+
* [Testing](guide-testing.html)
23+
* [Conditions](guide-conditions.html)
24+
* [Rust's Runtime](guide-runtime.html)
2425

2526
# Libraries
2627

27-
[The standard library, `libstd`](std/index.html)
28-
[The extra library, `libextra`](extra/index.html)
28+
* [The standard library, `libstd`](std/index.html)
29+
* [The extra library, `libextra`](extra/index.html)
2930

30-
[The M:N runtime library, `libgreen`](green/index.html)
31-
[The 1:1 runtime library, `libnative`](native/index.html)
31+
* [The M:N runtime library, `libgreen`](green/index.html)
32+
* [The 1:1 runtime library, `libnative`](native/index.html)
3233

33-
[The Rust libuv library, `librustuv`](rustuv/index.html)
34-
[The Rust packaging library, `librustpkg`](rustpkg/index.html)
34+
* [The Rust libuv library, `librustuv`](rustuv/index.html)
35+
* [The Rust packaging library, `librustpkg`](rustpkg/index.html)
3536

36-
[The Rust parser, `libsyntax`](syntax/index.html)
37-
[The Rust compiler, `librustc`](rustc/index.html)
37+
* [The Rust parser, `libsyntax`](syntax/index.html)
38+
* [The Rust compiler, `librustc`](rustc/index.html)
3839

3940
# Tooling
4041

41-
[The `rustpkg` manual](rustpkg.html)
42+
* [The `rustdoc` manual](rustdoc.html)
43+
* [The `rustpkg` manual](rustpkg.html)
4244

4345
# FAQs
4446

45-
[Language FAQ](complement-lang-faq.html)
46-
[Project FAQ](complement-project-faq.html)
47-
[Usage FAQ](complement-usage-faq.html)
48-
[Code cheatsheet](complement-cheatsheet.html) - "How do I do X?"
49-
[How to submit a bug report](complement-bugreport.html)
47+
* [Language FAQ](complement-lang-faq.html)
48+
* [Project FAQ](complement-project-faq.html)
49+
* [Usage FAQ](complement-usage-faq.html)
50+
* [Code cheatsheet](complement-cheatsheet.html) - "How do I do X?"
51+
* [How to submit a bug report](complement-bugreport.html)
5052

5153
# External resources
5254

53-
The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - `#rust` on irc.mozilla.org
54-
The Rust community on [Reddit](http://reddit.com/r/rust)
55-
The Rust [wiki](http://github.com/mozilla/rust/wiki)
55+
* The Rust [IRC channel](http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust) - `#rust` on irc.mozilla.org
56+
* The Rust community on [Reddit](http://reddit.com/r/rust)
57+
* The Rust [wiki](http://github.com/mozilla/rust/wiki)

branches/try2/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LLVM_STAMP_$(1) = $$(CFG_LLVM_BUILD_DIR_$(1))/llvm-auto-clean-stamp
2828

2929
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS) $$(LLVM_STAMP_$(1))
3030
@$$(call E, make: llvm)
31-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1))
31+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV_$(1)) ONLY_TOOLS="$$(LLVM_TOOLS)"
3232
$$(Q)touch $$(LLVM_CONFIG_$(1))
3333
endif
3434

branches/try2/src/libstd/path/windows.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,13 @@ impl GenericPathUnsafe for Path {
261261
let mut s = str::with_capacity(me.repr.len() + 1 + pathlen);
262262
s.push_str(me.repr);
263263
let plen = me.prefix_len();
264-
if !(me.repr.len() > plen && me.repr[me.repr.len()-1] == sep as u8) {
265-
s.push_char(sep);
264+
// if me is "C:" we don't want to add a path separator
265+
match me.prefix {
266+
Some(DiskPrefix) if me.repr.len() == plen => (),
267+
_ if !(me.repr.len() > plen && me.repr[me.repr.len()-1] == sep as u8) => {
268+
s.push_char(sep);
269+
}
270+
_ => ()
266271
}
267272
match path_ {
268273
None => s.push_str(path),
@@ -1549,6 +1554,8 @@ mod tests {
15491554
t!(s: "C:a\\b\\c", "C:d", "C:a\\b\\c\\d");
15501555
t!(s: "C:a\\b", "..\\..\\..\\c", "C:..\\c");
15511556
t!(s: "C:\\a\\b", "..\\..\\..\\c", "C:\\c");
1557+
t!(s: "C:", r"a\b\c", r"C:a\b\c");
1558+
t!(s: "C:", r"..\a", r"C:..\a");
15521559
t!(s: "\\\\server\\share\\foo", "bar", "\\\\server\\share\\foo\\bar");
15531560
t!(s: "\\\\server\\share\\foo", "..\\..\\bar", "\\\\server\\share\\bar");
15541561
t!(s: "\\\\server\\share\\foo", "C:baz", "C:baz");

branches/try2/src/libsyntax/codemap.rs

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,6 @@ pub struct FileLines
191191
lines: ~[uint]
192192
}
193193

194-
// represents the origin of a file:
195-
pub enum FileSubstr {
196-
// indicates that this is a normal standalone file:
197-
FssNone,
198-
// indicates that this "file" is actually a substring
199-
// of another file that appears earlier in the codemap
200-
FssInternal(Span),
201-
}
202-
203194
/// Identifies an offset of a multi-byte character in a FileMap
204195
pub struct MultiByteChar {
205196
/// The absolute offset of the character in the CodeMap
@@ -214,8 +205,6 @@ pub struct FileMap {
214205
/// originate from files has names between angle brackets by convention,
215206
/// e.g. `<anon>`
216207
name: FileName,
217-
/// Extra information used by qquote
218-
substr: FileSubstr,
219208
/// The complete source code
220209
src: @str,
221210
/// The start position of this source in the CodeMap
@@ -278,16 +267,7 @@ impl CodeMap {
278267
}
279268
}
280269

281-
/// Add a new FileMap to the CodeMap and return it
282270
pub fn new_filemap(&self, filename: FileName, src: @str) -> @FileMap {
283-
return self.new_filemap_w_substr(filename, FssNone, src);
284-
}
285-
286-
pub fn new_filemap_w_substr(&self,
287-
filename: FileName,
288-
substr: FileSubstr,
289-
src: @str)
290-
-> @FileMap {
291271
let mut files = self.files.borrow_mut();
292272
let start_pos = if files.get().len() == 0 {
293273
0
@@ -298,7 +278,8 @@ impl CodeMap {
298278
};
299279

300280
let filemap = @FileMap {
301-
name: filename, substr: substr, src: src,
281+
name: filename,
282+
src: src,
302283
start_pos: Pos::from_uint(start_pos),
303284
lines: RefCell::new(~[]),
304285
multibyte_chars: RefCell::new(~[]),
@@ -322,31 +303,16 @@ impl CodeMap {
322303

323304
pub fn lookup_char_pos_adj(&self, pos: BytePos) -> LocWithOpt {
324305
let loc = self.lookup_char_pos(pos);
325-
match (loc.file.substr) {
326-
FssNone =>
327-
LocWithOpt {
328-
filename: loc.file.name,
329-
line: loc.line,
330-
col: loc.col,
331-
file: Some(loc.file)},
332-
FssInternal(sp) =>
333-
self.lookup_char_pos_adj(
334-
sp.lo + (pos - loc.file.start_pos)),
306+
LocWithOpt {
307+
filename: loc.file.name,
308+
line: loc.line,
309+
col: loc.col,
310+
file: Some(loc.file)
335311
}
336312
}
337313

338314
pub fn adjust_span(&self, sp: Span) -> Span {
339-
let line = self.lookup_line(sp.lo);
340-
match (line.fm.substr) {
341-
FssNone => sp,
342-
FssInternal(s) => {
343-
self.adjust_span(Span {
344-
lo: s.lo + (sp.lo - line.fm.start_pos),
345-
hi: s.lo + (sp.hi - line.fm.start_pos),
346-
expn_info: sp.expn_info
347-
})
348-
}
349-
}
315+
sp
350316
}
351317

352318
pub fn span_to_str(&self, sp: Span) -> ~str {

branches/try2/src/libsyntax/parse/mod.rs

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313

1414
use ast;
15-
use codemap::{Span, CodeMap, FileMap, FileSubstr};
15+
use codemap::{Span, CodeMap, FileMap};
1616
use codemap;
1717
use diagnostic::{SpanHandler, mk_span_handler, mk_handler, Emitter};
1818
use parse::attr::ParserAttr;
@@ -180,27 +180,6 @@ pub fn parse_tts_from_source_str(
180180
maybe_aborted(p.parse_all_token_trees(),p)
181181
}
182182

183-
// given a function and parsing information (source str,
184-
// filename, crate cfg, and sess), create a parser,
185-
// apply the function, and check that the parser
186-
// consumed all of the input before returning the function's
187-
// result.
188-
pub fn parse_from_source_str<T>(
189-
f: |&mut Parser| -> T,
190-
name: @str,
191-
ss: codemap::FileSubstr,
192-
source: @str,
193-
cfg: ast::CrateConfig,
194-
sess: @ParseSess)
195-
-> T {
196-
let mut p = new_parser_from_source_substr(sess, cfg, name, ss, source);
197-
let r = f(&mut p);
198-
if !p.reader.is_eof() {
199-
p.reader.fatal(~"expected end-of-string");
200-
}
201-
maybe_aborted(r,p)
202-
}
203-
204183
// Create a new parser from a source string
205184
pub fn new_parser_from_source_str(sess: @ParseSess,
206185
cfg: ast::CrateConfig,
@@ -210,17 +189,6 @@ pub fn new_parser_from_source_str(sess: @ParseSess,
210189
filemap_to_parser(sess,string_to_filemap(sess,source,name),cfg)
211190
}
212191

213-
// Create a new parser from a source string where the origin
214-
// is specified as a substring of another file.
215-
pub fn new_parser_from_source_substr(sess: @ParseSess,
216-
cfg: ast::CrateConfig,
217-
name: @str,
218-
ss: codemap::FileSubstr,
219-
source: @str)
220-
-> Parser {
221-
filemap_to_parser(sess,substring_to_filemap(sess,source,name,ss),cfg)
222-
}
223-
224192
/// Create a new parser, handling errors as appropriate
225193
/// if the file doesn't exist
226194
pub fn new_parser_from_file(
@@ -297,13 +265,6 @@ pub fn string_to_filemap(sess: @ParseSess, source: @str, path: @str)
297265
sess.cm.new_filemap(path, source)
298266
}
299267

300-
// given a session and a string and a path and a FileSubStr, add
301-
// the string to the CodeMap and return the new FileMap
302-
pub fn substring_to_filemap(sess: @ParseSess, source: @str, path: @str,
303-
filesubstr: FileSubstr) -> @FileMap {
304-
sess.cm.new_filemap_w_substr(path,filesubstr,source)
305-
}
306-
307268
// given a filemap, produce a sequence of token-trees
308269
pub fn filemap_to_tts(sess: @ParseSess, filemap: @FileMap)
309270
-> ~[ast::TokenTree] {

0 commit comments

Comments
 (0)