Skip to content

Commit 6bcbc19

Browse files
committed
---
yaml --- r: 94134 b: refs/heads/try c: 554c3c3 h: refs/heads/master v: v3
1 parent c5d2274 commit 6bcbc19

File tree

137 files changed

+1696
-1578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1696
-1578
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 09db61fb4f2ab880726dc29624ce66b41f1eb341
5+
refs/heads/try: 554c3c316e2fedca11aa3bf5659937dd76200a14
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/Makefile.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,6 @@ TLIBRUSTUV_DEFAULT$(1)_T_$(2)_H_$(3) = \
431431
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTUV_$(2))
432432

433433
# Preqrequisites for using the stageN compiler
434-
ifeq ($(1),0)
435-
HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
436-
else
437434
HSREQ$(1)_H_$(3) = \
438435
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
439436
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
@@ -442,7 +439,6 @@ HSREQ$(1)_H_$(3) = \
442439
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
443440
$$(HLIBRUSTUV_DEFAULT$(1)_H_$(3)) \
444441
$$(MKFILE_DEPS)
445-
endif
446442

447443
# Prerequisites for using the stageN compiler to build target artifacts
448444
TSREQ$(1)_T_$(2)_H_$(3) = \

branches/try/mk/stage0.mk

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,34 @@ endif
2525
endif
2626
$(Q)touch $@
2727

28+
# Host libs will be extracted by the above rule
29+
30+
# NOTE: remove all these after the next snapshot
31+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_STDLIB_$(CFG_BUILD)): \
32+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
33+
| $(HLIB0_H_$(CFG_BUILD))/
34+
$(Q)touch $@
35+
36+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_EXTRALIB_$(CFG_BUILD)): \
37+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
38+
| $(HLIB0_H_$(CFG_BUILD))/
39+
$(Q)touch $@
40+
41+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTUV_$(CFG_BUILD)): \
42+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
43+
| $(HLIB0_H_$(CFG_BUILD))/
44+
$(Q)touch $@
45+
46+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_LIBRUSTC_$(CFG_BUILD)): \
47+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
48+
| $(HLIB0_H_$(CFG_BUILD))/
49+
$(Q)touch $@
50+
51+
$(HLIB0_H_$(CFG_BUILD))/$(CFG_RUSTLLVM_$(CFG_BUILD)): \
52+
$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD)) \
53+
| $(HLIB0_H_$(CFG_BUILD))/
54+
$(Q)touch $@
55+
2856
# For other targets, let the host build the target:
2957

3058
define BOOTSTRAP_STAGE0
@@ -44,6 +72,45 @@ $$(HBIN0_H_$(1))/rustc$$(X_$(1)): \
4472
@$$(call E, cp: $$@)
4573
$$(Q)cp $$< $$@
4674

75+
# NOTE: removing everything below after the next snapshot
76+
$$(HLIB0_H_$(1))/$(CFG_STDLIB_$(1)): \
77+
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_STDLIB_$(1)) \
78+
| $(HLIB0_H_$(1))/
79+
@$$(call E, cp: $$@)
80+
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_GLOB_$(4)),$$(notdir $$@))
81+
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(STDLIB_GLOB_$(1)) $$@
82+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(STDLIB_GLOB_$(4)),$$(notdir $$@))
83+
84+
$$(HLIB0_H_$(1))/$(CFG_EXTRALIB_$(1)): \
85+
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_EXTRALIB_$(1)) \
86+
| $(HLIB0_H_$(1))/
87+
@$$(call E, cp: $$@)
88+
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(EXTRALIB_GLOB_$(4)),$$(notdir $$@))
89+
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(EXTRALIB_GLOB_$(1)) $$@
90+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(EXTRALIB_GLOB_$(4)),$$(notdir $$@))
91+
92+
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTUV_$(1)): \
93+
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTUV_$(1)) \
94+
| $(HLIB0_H_$(1))/
95+
@$$(call E, cp: $$@)
96+
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
97+
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTUV_GLOB_$(1)) $$@
98+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTUV_GLOB_$(4)),$$(notdir $$@))
99+
100+
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC_$(1)): \
101+
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_LIBRUSTC_$(1)) \
102+
| $(HLIB0_H_$(1))/
103+
@$$(call E, cp: $$@)
104+
$$(call CHECK_FOR_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(4)),$$(notdir $$@))
105+
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$(LIBRUSTC_GLOB_$(1)) $$@
106+
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(4)),$$(notdir $$@))
107+
108+
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM_$(1)): \
109+
$$(TLIB$(2)_T_$(1)_H_$(3))/$(CFG_RUSTLLVM_$(1)) \
110+
| $(HLIB0_H_$(1))/
111+
@$$(call E, cp: $$@)
112+
$$(Q)cp $$< $$@
113+
47114
endef
48115

49116
# Use stage1 to build other architectures: then you don't have to wait

branches/try/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
130130
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
131131
$$(call REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_RGLOB_$(2)),$$(notdir $$@))
132132
$$(STAGE$(1)_T_$(2)_H_$(3)) $$(WFLAGS_ST$(1)) \
133-
-L "$$(LLVM_LIBDIR_$(2))" \
133+
-L "$$(LLVM_LIBDIR_$(3))" \
134134
--out-dir $$(@D) $$< && touch $$@
135135
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_GLOB_$(2)),$$(notdir $$@))
136136
$$(call LIST_ALL_OLD_GLOB_MATCHES_EXCEPT,$$(dir $$@),$(LIBRUSTC_RGLOB_$(2)),$$(notdir $$@))

branches/try/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ $(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
377377
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX_$(2))
378378
@$$(call E, compile_and_link: $$@)
379379
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
380-
-L "$$(LLVM_LIBDIR_$(2))"
380+
-L "$$(LLVM_LIBDIR_$(3))"
381381

382382
$(3)/stage$(1)/test/rustpkgtest-$(2)$$(X_$(2)): \
383383
$$(RUSTPKG_LIB) $$(RUSTPKG_INPUTS) \

branches/try/src/compiletest/compiletest.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
192192
match maybestr { None => ~"(none)", Some(s) => { s } }
193193
}
194194

195+
pub fn str_opt(maybestr: ~str) -> Option<~str> {
196+
if maybestr != ~"(none)" { Some(maybestr) } else { None }
197+
}
198+
195199
pub fn str_mode(s: ~str) -> mode {
196200
match s {
197201
~"compile-fail" => mode_compile_fail,

branches/try/src/compiletest/runtest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use header::TestProps;
1818
use header::load_props;
1919
use procsrv;
2020
use util::logv;
21-
#[cfg(target_os = "win32")]
2221
use util;
2322

2423
use std::io::File;
@@ -483,7 +482,6 @@ fn check_expected_errors(expected_errors: ~[errors::ExpectedError],
483482
format!("{}:{}:", testfile.display(), ee.line)
484483
}).collect::<~[~str]>();
485484

486-
#[cfg(target_os = "win32")]
487485
fn to_lower( s : &str ) -> ~str {
488486
let i = s.chars();
489487
let c : ~[char] = i.map( |c| {
@@ -824,7 +822,6 @@ fn make_cmdline(libpath: &str, prog: &str, args: &[~str]) -> ~str {
824822

825823
// Build the LD_LIBRARY_PATH variable as it would be seen on the command line
826824
// for diagnostic purposes
827-
#[cfg(target_os = "win32")]
828825
fn lib_path_cmd_prefix(path: &str) -> ~str {
829826
format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path))
830827
}

branches/try/src/compiletest/util.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
use common::config;
1212

13-
#[cfg(target_os = "win32")]
1413
use std::os::getenv;
1514

1615
/// Conversion table from triple OS name to Rust SYSNAME
@@ -32,7 +31,6 @@ pub fn get_os(triple: &str) -> &'static str {
3231
fail!("Cannot determine OS from triple");
3332
}
3433

35-
#[cfg(target_os = "win32")]
3634
pub fn make_new_path(path: &str) -> ~str {
3735

3836
// Windows just uses PATH as the library search path, so we have to
@@ -45,9 +43,21 @@ pub fn make_new_path(path: &str) -> ~str {
4543
}
4644
}
4745

46+
#[cfg(target_os = "linux")]
47+
#[cfg(target_os = "freebsd")]
48+
pub fn lib_path_env_var() -> ~str { ~"LD_LIBRARY_PATH" }
49+
50+
#[cfg(target_os = "macos")]
51+
pub fn lib_path_env_var() -> ~str { ~"DYLD_LIBRARY_PATH" }
52+
4853
#[cfg(target_os = "win32")]
4954
pub fn lib_path_env_var() -> ~str { ~"PATH" }
5055

56+
#[cfg(target_os = "linux")]
57+
#[cfg(target_os = "macos")]
58+
#[cfg(target_os = "freebsd")]
59+
pub fn path_div() -> ~str { ~":" }
60+
5161
#[cfg(target_os = "win32")]
5262
pub fn path_div() -> ~str { ~";" }
5363

branches/try/src/etc/emacs/rust-mode.el

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
;; or one further indent from that if either current line
8585
;; begins with 'else', or previous line didn't end in
8686
;; semi, comma or brace (other than whitespace and line
87-
;; comments) , and wasn't an attribute. But if we have
87+
;; comments) , and wasn't an attribute. But if we have
8888
;; something after the open brace and ending with a comma,
8989
;; treat it as fields and align them. PHEW.
9090
((> level 0)
@@ -213,15 +213,15 @@
213213

214214
(defun rust-fill-prefix-for-comment-start (line-start)
215215
"Determine what to use for `fill-prefix' based on what is at the beginning of a line."
216-
(let ((result
216+
(let ((result
217217
;; Replace /* with same number of spaces
218218
(replace-regexp-in-string
219-
"\\(?:/\\*+\\)[!*]"
219+
"\\(?:/\\*+\\)[!*]"
220220
(lambda (s)
221221
;; We want the * to line up with the first * of the comment start
222222
(concat (make-string (- (length s) 2) ?\x20) "*"))
223223
line-start)))
224-
;; Make sure we've got at least one space at the end
224+
;; Make sure we've got at least one space at the end
225225
(if (not (= (aref result (- (length result) 1)) ?\x20))
226226
(setq result (concat result " ")))
227227
result))
@@ -247,14 +247,14 @@
247247
;; inferring it from the comment start.
248248
(let ((next-bol (line-beginning-position 2)))
249249
(while (save-excursion
250-
(end-of-line)
251-
(syntax-ppss-flush-cache 1)
252-
(and (nth 4 (syntax-ppss))
253-
(save-excursion
254-
(beginning-of-line)
255-
(looking-at paragraph-start))
256-
(looking-at "[[:space:]]*$")
257-
(nth 4 (syntax-ppss next-bol))))
250+
(end-of-line)
251+
(syntax-ppss-flush-cache 1)
252+
(and (nth 4 (syntax-ppss))
253+
(save-excursion
254+
(beginning-of-line)
255+
(looking-at paragraph-start))
256+
(looking-at "[[:space:]]*$")
257+
(nth 4 (syntax-ppss next-bol))))
258258
(goto-char next-bol)))
259259

260260
(syntax-ppss-flush-cache 1)
@@ -269,10 +269,10 @@
269269

270270
(defun rust-with-comment-fill-prefix (body)
271271
(let*
272-
((line-string (buffer-substring-no-properties
272+
((line-string (buffer-substring-no-properties
273273
(line-beginning-position) (line-end-position)))
274274
(line-comment-start
275-
(when (nth 4 (syntax-ppss))
275+
(when (nth 4 (syntax-ppss))
276276
(cond
277277
;; If we're inside the comment and see a * prefix, use it
278278
((string-match "^\\([[:space:]]*\\*+[[:space:]]*\\)"
@@ -281,9 +281,9 @@
281281
;; If we're at the start of a comment, figure out what prefix
282282
;; to use for the subsequent lines after it
283283
((string-match (concat "[[:space:]]*" comment-start-skip) line-string)
284-
(rust-fill-prefix-for-comment-start
284+
(rust-fill-prefix-for-comment-start
285285
(match-string 0 line-string))))))
286-
(fill-prefix
286+
(fill-prefix
287287
(or line-comment-start
288288
fill-prefix)))
289289
(funcall body)))
@@ -294,7 +294,7 @@
294294
(defun rust-fill-paragraph (&rest args)
295295
"Special wrapping for `fill-paragraph' to handle multi-line comments with a * prefix on each line."
296296
(rust-in-comment-paragraph
297-
(lambda ()
297+
(lambda ()
298298
(rust-with-comment-fill-prefix
299299
(lambda ()
300300
(let
@@ -321,20 +321,6 @@
321321
(rust-with-comment-fill-prefix
322322
(lambda () (comment-indent-new-line arg))))
323323

324-
;;; Imenu support
325-
(defvar rust-imenu-generic-expression
326-
(append (loop for item in
327-
'("enum" "struct" "type" "mod" "fn")
328-
collect `(nil ,(rust-re-item-def item) 1))
329-
`(("Impl" ,(rust-re-item-def "impl") 1)))
330-
"Value for `imenu-generic-expression' in Rust mode.
331-
332-
Create a flat index of the item definitions in a Rust file.
333-
334-
Imenu will show all the enums, structs, etc. at the same level.
335-
Implementations will be shown under the `Impl` subheading.
336-
Use idomenu (imenu with ido-mode) for best mileage.")
337-
338324
;; For compatibility with Emacs < 24, derive conditionally
339325
(defalias 'rust-parent-mode
340326
(if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
@@ -362,7 +348,7 @@ Use idomenu (imenu with ido-mode) for best mileage.")
362348
(set (make-local-variable 'indent-tabs-mode) nil)
363349

364350
;; Allow paragraph fills for comments
365-
(set (make-local-variable 'comment-start-skip)
351+
(set (make-local-variable 'comment-start-skip)
366352
"\\(?://[/!]*\\|/\\*[*!]?\\)[[:space:]]*")
367353
(set (make-local-variable 'paragraph-start)
368354
(concat "[[:space:]]*\\(?:" comment-start-skip "\\|\\*/?[[:space:]]*\\|\\)$"))
@@ -373,7 +359,6 @@ Use idomenu (imenu with ido-mode) for best mileage.")
373359
(set (make-local-variable 'adaptive-fill-function) 'rust-find-fill-prefix)
374360
(set (make-local-variable 'comment-multi-line) t)
375361
(set (make-local-variable 'comment-line-break-function) 'rust-comment-indent-new-line)
376-
(set (make-local-variable 'imenu-generic-expression) rust-imenu-generic-expression)
377362
)
378363

379364

branches/try/src/etc/extract-tests.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#[ allow(dead_assignment) ];\n
6565
#[ allow(unused_mut) ];\n
6666
#[ allow(attribute_usage) ];\n
67-
#[ allow(dead_code) ];\n
6867
#[ feature(macro_rules, globs, struct_variant, managed_boxes) ];\n
6968
""" + block
7069
if xfail:

branches/try/src/libextra/bitv.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,11 @@ impl Bitv {
382382
#[inline]
383383
pub fn negate(&mut self) {
384384
match self.rep {
385-
Small(ref mut s) => s.negate(),
386-
Big(ref mut b) => b.negate(),
387-
}
385+
Small(ref mut b) => b.negate(),
386+
Big(ref mut s) => {
387+
s.each_storage(|w| { *w = !*w; true });
388+
}
389+
}
388390
}
389391

390392
/**

0 commit comments

Comments
 (0)