Skip to content

Commit 19b785e

Browse files
committed
---
yaml --- r: 227031 b: refs/heads/master c: 6d99272 h: refs/heads/master i: 227029: a8d067d 227027: 6075470 227023: 9e5a9a8 v: v3
1 parent ddfbe76 commit 19b785e

File tree

430 files changed

+9517
-18448
lines changed

Some content is hidden

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

430 files changed

+9517
-18448
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 44f41063dd241320cbe19b078862fc29eb66c097
2+
refs/heads/master: 6d992728c331128810704d16d8026aa4fa2e0c87
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

trunk/mk/crates.mk

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@
5252
TARGET_CRATES := libc std flate arena term \
5353
serialize getopts collections test rand \
5454
log graphviz core rbml alloc \
55-
rustc_unicode rustc_bitflags
55+
rustc_unicode rustc_bitflags \
56+
alloc_system
5657
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5758
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5859
rustc_data_structures
5960
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
60-
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
6161
TOOLS := compiletest rustdoc rustc rustbook error-index-generator
6262

6363
DEPS_core :=
6464
DEPS_libc := core
6565
DEPS_rustc_unicode := core
66-
DEPS_alloc := core libc native:jemalloc
66+
DEPS_alloc := core libc alloc_system
6767
DEPS_std := core libc rand alloc collections rustc_unicode \
6868
native:rust_builtin native:backtrace \
69-
rustc_bitflags
69+
alloc_system
7070
DEPS_graphviz := std
71-
DEPS_syntax := std term serialize log fmt_macros arena libc
71+
DEPS_syntax := std term serialize log fmt_macros arena libc rustc_bitflags
7272
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
7373
rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
7474
rustc_trans rustc_privacy rustc_lint
@@ -82,7 +82,7 @@ DEPS_rustc_privacy := rustc log syntax
8282
DEPS_rustc_lint := rustc log syntax
8383
DEPS_rustc := syntax flate arena serialize getopts rbml \
8484
log graphviz rustc_llvm rustc_back rustc_data_structures
85-
DEPS_rustc_llvm := native:rustllvm libc std
85+
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
8686
DEPS_rustc_back := std syntax rustc_llvm flate log libc
8787
DEPS_rustc_data_structures := std log serialize
8888
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
@@ -102,6 +102,7 @@ DEPS_test := std getopts serialize rbml term native:rust_test_helpers
102102
DEPS_rand := core
103103
DEPS_log := std
104104
DEPS_fmt_macros = std
105+
DEPS_alloc_system := core libc
105106

106107
TOOL_DEPS_compiletest := test getopts
107108
TOOL_DEPS_rustdoc := rustdoc
@@ -121,14 +122,26 @@ ONLY_RLIB_rand := 1
121122
ONLY_RLIB_collections := 1
122123
ONLY_RLIB_rustc_unicode := 1
123124
ONLY_RLIB_rustc_bitflags := 1
125+
ONLY_RLIB_alloc_system := 1
124126

125127
# Documented-by-default crates
126128
DOC_CRATES := std alloc collections core libc rustc_unicode
127129

130+
ifeq ($(CFG_DISABLE_JEMALLOC),)
131+
TARGET_CRATES += alloc_jemalloc
132+
DEPS_std += alloc_jemalloc
133+
DEPS_alloc_jemalloc := core libc native:jemalloc
134+
ONLY_RLIB_alloc_jemalloc := 1
135+
else
136+
RUSTFLAGS_rustc_back := --cfg disable_jemalloc
137+
endif
138+
128139
################################################################################
129140
# You should not need to edit below this line
130141
################################################################################
131142

143+
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
144+
132145
# This macro creates some simple definitions for each crate being built, just
133146
# some munging of all of the parameters above.
134147
#

trunk/mk/rt.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ $$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
184184
EXTRA_CFLAGS="-g1 -ffunction-sections -fdata-sections"
185185
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
186186

187-
ifeq ($$(CFG_DISABLE_JEMALLOC),)
188-
RUSTFLAGS_alloc := --cfg jemalloc
189187
ifeq ($(1),$$(CFG_BUILD))
190188
ifneq ($$(CFG_JEMALLOC_ROOT),)
191189
$$(JEMALLOC_LIB_$(1)): $$(CFG_JEMALLOC_ROOT)/libjemalloc_pic.a
@@ -199,10 +197,6 @@ else
199197
$$(JEMALLOC_LIB_$(1)): $$(JEMALLOC_LOCAL_$(1))
200198
$$(Q)cp $$< $$@
201199
endif
202-
else
203-
$$(JEMALLOC_LIB_$(1)): $$(MKFILE_DEPS)
204-
$$(Q)touch $$@
205-
endif
206200

207201
################################################################################
208202
# compiler-rt

trunk/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ $(eval $(call RUST_CRATE,coretest))
2222
DEPS_collectionstest :=
2323
$(eval $(call RUST_CRATE,collectionstest))
2424

25-
TEST_TARGET_CRATES = $(filter-out core rustc_unicode,$(TARGET_CRATES)) \
25+
TEST_TARGET_CRATES = $(filter-out core rustc_unicode alloc_system \
26+
alloc_jemalloc,$(TARGET_CRATES)) \
2627
collectionstest coretest
2728
TEST_DOC_CRATES = $(DOC_CRATES)
2829
TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve \

trunk/src/doc/trpl/the-stack-and-the-heap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ reuse.
549549
If you’d like to dive into this topic in greater detail, [this paper][wilson]
550550
is a great introduction.
551551

552-
[wilson]: http://www.cs.northwestern.edu/~pdinda/icsclass/doc/dsa.pdf
552+
[wilson]: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.143.4688
553553

554554
## Semantic impact
555555

trunk/src/etc/unicode.py

Lines changed: 0 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -395,46 +395,6 @@ def emit_conversions_module(f, to_upper, to_lower, to_title):
395395
is_pub=False, t_type = t_type, pfun=pfun)
396396
f.write("}\n\n")
397397

398-
def emit_grapheme_module(f, grapheme_table, grapheme_cats):
399-
f.write("""pub mod grapheme {
400-
use core::slice::SliceExt;
401-
pub use self::GraphemeCat::*;
402-
use core::result::Result::{Ok, Err};
403-
404-
#[allow(non_camel_case_types)]
405-
#[derive(Clone, Copy)]
406-
pub enum GraphemeCat {
407-
""")
408-
for cat in grapheme_cats + ["Any"]:
409-
f.write(" GC_" + cat + ",\n")
410-
f.write(""" }
411-
412-
fn bsearch_range_value_table(c: char, r: &'static [(char, char, GraphemeCat)]) -> GraphemeCat {
413-
use core::cmp::Ordering::{Equal, Less, Greater};
414-
match r.binary_search_by(|&(lo, hi, _)| {
415-
if lo <= c && c <= hi { Equal }
416-
else if hi < c { Less }
417-
else { Greater }
418-
}) {
419-
Ok(idx) => {
420-
let (_, _, cat) = r[idx];
421-
cat
422-
}
423-
Err(_) => GC_Any
424-
}
425-
}
426-
427-
pub fn grapheme_category(c: char) -> GraphemeCat {
428-
bsearch_range_value_table(c, grapheme_cat_table)
429-
}
430-
431-
""")
432-
433-
emit_table(f, "grapheme_cat_table", grapheme_table, "&'static [(char, char, GraphemeCat)]",
434-
pfun=lambda x: "(%s,%s,GC_%s)" % (escape_char(x[0]), escape_char(x[1]), x[2]),
435-
is_pub=False)
436-
f.write("}\n")
437-
438398
def emit_charwidth_module(f, width_table):
439399
f.write("pub mod charwidth {\n")
440400
f.write(" use core::option::Option;\n")
@@ -497,79 +457,6 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
497457
canon_comp_keys = canon_comp.keys()
498458
canon_comp_keys.sort()
499459

500-
f.write("pub mod normalization {\n")
501-
502-
def mkdata_fun(table):
503-
def f(char):
504-
data = "(%s,&[" % escape_char(char)
505-
first = True
506-
for d in table[char]:
507-
if not first:
508-
data += ","
509-
first = False
510-
data += escape_char(d)
511-
data += "])"
512-
return data
513-
return f
514-
515-
f.write(" // Canonical decompositions\n")
516-
emit_table(f, "canonical_table", canon_keys, "&'static [(char, &'static [char])]",
517-
pfun=mkdata_fun(canon))
518-
519-
f.write(" // Compatibility decompositions\n")
520-
emit_table(f, "compatibility_table", compat_keys, "&'static [(char, &'static [char])]",
521-
pfun=mkdata_fun(compat))
522-
523-
def comp_pfun(char):
524-
data = "(%s,&[" % escape_char(char)
525-
canon_comp[char].sort(lambda x, y: x[0] - y[0])
526-
first = True
527-
for pair in canon_comp[char]:
528-
if not first:
529-
data += ","
530-
first = False
531-
data += "(%s,%s)" % (escape_char(pair[0]), escape_char(pair[1]))
532-
data += "])"
533-
return data
534-
535-
f.write(" // Canonical compositions\n")
536-
emit_table(f, "composition_table", canon_comp_keys,
537-
"&'static [(char, &'static [(char, char)])]", pfun=comp_pfun)
538-
539-
f.write("""
540-
fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 {
541-
use core::cmp::Ordering::{Equal, Less, Greater};
542-
use core::slice::SliceExt;
543-
use core::result::Result::{Ok, Err};
544-
match r.binary_search_by(|&(lo, hi, _)| {
545-
if lo <= c && c <= hi { Equal }
546-
else if hi < c { Less }
547-
else { Greater }
548-
}) {
549-
Ok(idx) => {
550-
let (_, _, result) = r[idx];
551-
result
552-
}
553-
Err(_) => 0
554-
}
555-
}\n
556-
""")
557-
558-
emit_table(f, "combining_class_table", combine, "&'static [(char, char, u8)]", is_pub=False,
559-
pfun=lambda x: "(%s,%s,%s)" % (escape_char(x[0]), escape_char(x[1]), x[2]))
560-
561-
f.write(""" #[deprecated(reason = "use the crates.io `unicode-normalization` lib instead",
562-
since = "1.0.0")]
563-
#[unstable(feature = "unicode",
564-
reason = "this functionality will be moved to crates.io")]
565-
pub fn canonical_combining_class(c: char) -> u8 {
566-
bsearch_range_value_table(c, combining_class_table)
567-
}
568-
569-
}
570-
571-
""")
572-
573460
def remove_from_wtable(wtable, val):
574461
wtable_out = []
575462
while wtable:
@@ -649,53 +536,3 @@ def optimize_width_table(wtable):
649536
# normalizations and conversions module
650537
emit_norm_module(rf, canon_decomp, compat_decomp, combines, norm_props)
651538
emit_conversions_module(rf, to_upper, to_lower, to_title)
652-
653-
### character width module
654-
width_table = []
655-
for zwcat in ["Me", "Mn", "Cf"]:
656-
width_table.extend(map(lambda (lo, hi): (lo, hi, 0, 0), gencats[zwcat]))
657-
width_table.append((4448, 4607, 0, 0))
658-
659-
# get widths, except those that are explicitly marked zero-width above
660-
ea_widths = load_east_asian_width(["W", "F", "A"], ["Me", "Mn", "Cf"])
661-
# these are doublewidth
662-
for dwcat in ["W", "F"]:
663-
width_table.extend(map(lambda (lo, hi): (lo, hi, 2, 2), ea_widths[dwcat]))
664-
width_table.extend(map(lambda (lo, hi): (lo, hi, 1, 2), ea_widths["A"]))
665-
666-
width_table.sort(key=lambda w: w[0])
667-
668-
# soft hyphen is not zero width in preformatted text; it's used to indicate
669-
# a hyphen inserted to facilitate a linebreak.
670-
width_table = remove_from_wtable(width_table, 173)
671-
672-
# optimize the width table by collapsing adjacent entities when possible
673-
width_table = optimize_width_table(width_table)
674-
emit_charwidth_module(rf, width_table)
675-
676-
### grapheme cluster module
677-
# from http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Break_Property_Values
678-
grapheme_cats = load_properties("auxiliary/GraphemeBreakProperty.txt", [])
679-
680-
# Control
681-
# Note 1:
682-
# This category also includes Cs (surrogate codepoints), but Rust's `char`s are
683-
# Unicode Scalar Values only, and surrogates are thus invalid `char`s.
684-
# Thus, we have to remove Cs from the Control category
685-
# Note 2:
686-
# 0x0a and 0x0d (CR and LF) are not in the Control category for Graphemes.
687-
# However, the Graphemes iterator treats these as a special case, so they
688-
# should be included in grapheme_cats["Control"] for our implementation.
689-
grapheme_cats["Control"] = group_cat(list(
690-
(set(ungroup_cat(grapheme_cats["Control"]))
691-
| set(ungroup_cat(grapheme_cats["CR"]))
692-
| set(ungroup_cat(grapheme_cats["LF"])))
693-
- set(ungroup_cat([surrogate_codepoints]))))
694-
del(grapheme_cats["CR"])
695-
del(grapheme_cats["LF"])
696-
697-
grapheme_table = []
698-
for cat in grapheme_cats:
699-
grapheme_table.extend([(x, y, cat) for (x, y) in grapheme_cats[cat]])
700-
grapheme_table.sort(key=lambda w: w[0])
701-
emit_grapheme_module(rf, grapheme_table, grapheme_cats.keys())

0 commit comments

Comments
 (0)