Skip to content

Commit 5544991

Browse files
committed
---
yaml --- r: 161725 b: refs/heads/master c: e2fe7a0 h: refs/heads/master i: 161723: 8b06fd2 v: v3
1 parent cd5bbd6 commit 5544991

File tree

372 files changed

+12683
-12395
lines changed

Some content is hidden

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

372 files changed

+12683
-12395
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: 207a5084110d106149f7aba96603abba5850fdcb
2+
refs/heads/master: e2fe7a083ed63b1a739f5e0d0417cfd8a7da6510
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cafe2966770ff377aad6dd9fd808e68055587c58
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6

trunk/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ include $(CFG_SRC_DIR)mk/rustllvm.mk
198198
include $(CFG_SRC_DIR)mk/docs.mk
199199
# LLVM
200200
include $(CFG_SRC_DIR)mk/llvm.mk
201-
# Rules for installing debugger scripts
202-
include $(CFG_SRC_DIR)mk/debuggers.mk
203201

204202
######################################################################
205203
# Secondary makefiles, conditionalized for speed

trunk/configure

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ probe CFG_LD ld
624624
probe CFG_VALGRIND valgrind
625625
probe CFG_PERF perf
626626
probe CFG_ISCC iscc
627+
probe CFG_LLNEXTGEN LLnextgen
627628
probe CFG_JAVAC javac
628629
probe CFG_ANTLR4 antlr4
629630
probe CFG_GRUN grun
@@ -1040,18 +1041,19 @@ do
10401041
make_dir $h/test/debuginfo-gdb
10411042
make_dir $h/test/debuginfo-lldb
10421043
make_dir $h/test/codegen
1044+
make_dir $h/test/doc-tutorial
10431045
make_dir $h/test/doc-guide
10441046
make_dir $h/test/doc-guide-ffi
10451047
make_dir $h/test/doc-guide-runtime
10461048
make_dir $h/test/doc-guide-macros
1047-
make_dir $h/test/doc-guide-lifetimes
1049+
make_dir $h/test/doc-guide-ownership
10481050
make_dir $h/test/doc-guide-pointers
10491051
make_dir $h/test/doc-guide-container
10501052
make_dir $h/test/doc-guide-tasks
10511053
make_dir $h/test/doc-guide-plugin
10521054
make_dir $h/test/doc-guide-crates
10531055
make_dir $h/test/doc-guide-error-handling
1054-
make_dir $h/test/doc-reference
1056+
make_dir $h/test/doc-rust
10551057
done
10561058

10571059
# Configure submodules

trunk/mk/clean.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ clean-generic-$(2)-$(1):
6363
-name '*.lib' -o \
6464
-name '*.dll' -o \
6565
-name '*.def' -o \
66-
-name '*.py' -o \
6766
-name '*.bc' \
6867
\) \
6968
| xargs rm -f
@@ -79,7 +78,7 @@ define CLEAN_HOST_STAGE_N
7978

8079
clean$(1)_H_$(2): \
8180
$$(foreach crate,$$(CRATES),clean$(1)_H_$(2)-lib-$$(crate)) \
82-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_H_$(2)-tool-$$(tool))
81+
$$(foreach tool,$$(TOOLS),clean$(1)_H_$(2)-tool-$$(tool))
8382
$$(Q)rm -fr $(2)/rt/libbacktrace
8483

8584
clean$(1)_H_$(2)-tool-%:
@@ -99,7 +98,7 @@ define CLEAN_TARGET_STAGE_N
9998

10099
clean$(1)_T_$(2)_H_$(3): \
101100
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
102-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
101+
$$(foreach tool,$$(TOOLS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103102
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
104103
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
105104
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix

trunk/mk/debuggers.mk

Lines changed: 0 additions & 59 deletions
This file was deleted.

trunk/mk/docs.mk

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# L10N_LANGS are the languages for which the docs have been
2626
# translated.
2727
######################################################################
28-
DOCS := index intro tutorial guide guide-ffi guide-macros guide-lifetimes \
28+
DOCS := index intro tutorial guide guide-ffi guide-macros guide-ownership \
2929
guide-tasks guide-container guide-pointers guide-testing \
3030
guide-plugin guide-crates complement-bugreport guide-error-handling \
3131
complement-lang-faq complement-design-faq complement-project-faq \
@@ -246,6 +246,26 @@ endef
246246
$(foreach lang,$(L10N_LANGS),$(eval $(call DEF_L10N_DOC,$(lang),guide)))
247247

248248

249+
######################################################################
250+
# LLnextgen (grammar analysis from refman)
251+
######################################################################
252+
253+
ifeq ($(CFG_LLNEXTGEN),)
254+
$(info cfg: no llnextgen found, omitting grammar-verification)
255+
else
256+
.PHONY: verify-grammar
257+
258+
doc/rust.g: $(D)/rust.md $(S)src/etc/extract_grammar.py
259+
@$(call E, extract_grammar: $@)
260+
$(Q)$(CFG_PYTHON) $(S)src/etc/extract_grammar.py $< >$@
261+
262+
verify-grammar: doc/rust.g
263+
@$(call E, LLnextgen: $<)
264+
$(Q)$(CFG_LLNEXTGEN) --generate-lexer-wrapper=no $< >$@
265+
$(Q)rm -f doc/rust.c doc/rust.h
266+
endif
267+
268+
249269
######################################################################
250270
# Rustdoc (libstd/extra)
251271
######################################################################
@@ -279,8 +299,7 @@ $(2) += doc/$(1)/index.html
279299
doc/$(1)/index.html: CFG_COMPILER_HOST_TRIPLE = $(CFG_TARGET)
280300
doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
281301
@$$(call E, rustdoc: $$@)
282-
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(CFG_BUILD)) \
283-
$$(RUSTDOC) --cfg dox --cfg stage2 $$<
302+
$$(Q)$$(RUSTDOC) --cfg dox --cfg stage2 $$<
284303
endef
285304

286305
$(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS)))

trunk/mk/llvm.mk

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ else
4949
LLVM_STDCPP_LOCATION_$(1) =
5050
endif
5151

52-
53-
# LLVM linkage:
54-
LLVM_LINKAGE_PATH_$(1):=$$(abspath $$(RT_OUTPUT_DIR_$(1))/llvmdeps.rs)
55-
$$(LLVM_LINKAGE_PATH_$(1)): $(S)src/etc/mklldeps.py $$(LLVM_CONFIG_$(1))
56-
$(Q)$(CFG_PYTHON) "$$<" "$$@" "$$(LLVM_COMPONENTS)" "$$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \
57-
$$(LLVM_CONFIG_$(1))
5852
endef
5953

6054
$(foreach host,$(CFG_HOST), \
@@ -63,14 +57,10 @@ $(foreach host,$(CFG_HOST), \
6357
$(foreach host,$(CFG_HOST), \
6458
$(eval LLVM_CONFIGS := $(LLVM_CONFIGS) $(LLVM_CONFIG_$(host))))
6559

66-
# This can't be done in target.mk because it's included before this file.
67-
define LLVM_LINKAGE_DEPS
68-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc_llvm: $$(LLVM_LINKAGE_PATH_$(3))
69-
endef
70-
71-
$(foreach source,$(CFG_HOST), \
72-
$(foreach target,$(CFG_TARGET), \
73-
$(eval $(call LLVM_LINKAGE_DEPS,0,$(target),$(source))) \
74-
$(eval $(call LLVM_LINKAGE_DEPS,1,$(target),$(source))) \
75-
$(eval $(call LLVM_LINKAGE_DEPS,2,$(target),$(source))) \
76-
$(eval $(call LLVM_LINKAGE_DEPS,3,$(target),$(source)))))
60+
$(S)src/librustc_llvm/llvmdeps.rs: \
61+
$(LLVM_CONFIGS) \
62+
$(S)src/etc/mklldeps.py \
63+
$(MKFILE_DEPS)
64+
$(Q)$(CFG_PYTHON) $(S)src/etc/mklldeps.py \
65+
"$@" "$(LLVM_COMPONENTS)" "$(CFG_ENABLE_LLVM_STATIC_STDCPP)" \
66+
$(LLVM_CONFIGS)

trunk/mk/main.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,7 @@ HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
356356
else
357357
HSREQ$(1)_H_$(3) = \
358358
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
359-
$$(MKFILE_DEPS) \
360-
tmp/install-debugger-scripts$(1)_H_$(3).done
359+
$$(MKFILE_DEPS)
361360
endif
362361

363362
# Prerequisites for using the stageN compiler to build target artifacts
@@ -371,8 +370,7 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
371370
SREQ$(1)_T_$(2)_H_$(3) = \
372371
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
373372
$$(foreach dep,$$(TARGET_CRATES), \
374-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
375-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
373+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep))
376374

377375
# Prerequisites for a working stageN compiler and complete set of target
378376
# libraries

trunk/mk/prepare.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ prepare-base-$(1): PREPARE_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELAT
155155
prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1
156156
prepare-base-$(1): prepare-everything-$(1)
157157

158-
prepare-everything-$(1): prepare-host-$(1) prepare-targets-$(1) prepare-debugger-scripts-$(1)
158+
prepare-everything-$(1): prepare-host-$(1) prepare-targets-$(1)
159159

160160
prepare-host-$(1): prepare-host-tools-$(1)
161161

@@ -167,13 +167,8 @@ prepare-host-tools-$(1): \
167167
prepare-host-dirs-$(1): prepare-maybe-clean-$(1)
168168
$$(call PREPARE_DIR,$$(PREPARE_DEST_BIN_DIR))
169169
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR))
170-
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR)/rustlib/etc)
171170
$$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR))
172171

173-
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) $(DEBUGGER_SCRIPTS_ALL)
174-
$$(Q)$$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_ABS) $$(PREPARE_DEST_BIN_DIR)
175-
$$(Q)$$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(PREPARE_DEST_LIB_DIR)/rustlib/etc
176-
177172
$$(foreach tool,$$(PREPARE_TOOLS), \
178173
$$(foreach host,$$(CFG_HOST), \
179174
$$(eval $$(call DEF_PREPARE_HOST_TOOL,$$(tool),$$(PREPARE_STAGE),$$(host),$(1)))))

trunk/mk/target.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7979
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8080
$$(call REMOVE_ALL_OLD_GLOB_MATCHES, \
8181
$$(dir $$@)$$(call CFG_RLIB_GLOB,$(4)))
82-
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
83-
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) \
82+
$$(STAGE$(1)_T_$(2)_H_$(3)) \
8483
$$(RUST_LIB_FLAGS_ST$(1)) \
8584
-L "$$(RT_OUTPUT_DIR_$(2))" \
8685
-L "$$(LLVM_LIBDIR_$(2))" \
@@ -135,6 +134,8 @@ SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD))
135134

136135
define TARGET_HOST_RULES
137136

137+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc_llvm: $(S)src/librustc_llvm/llvmdeps.rs
138+
138139
$$(TBIN$(1)_T_$(2)_H_$(3))/:
139140
mkdir -p $$@
140141

trunk/mk/tests.mk

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
412412
$$(CRATEFILE_$(4)) \
413413
$$(TESTDEP_$(1)_$(2)_$(3)_$(4))
414414
@$$(call E, rustc: $$@)
415-
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
416-
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
415+
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
417416
-L "$$(RT_OUTPUT_DIR_$(2))" \
418417
-L "$$(LLVM_LIBDIR_$(2))" \
419418
$$(RUSTFLAGS_$(4))
@@ -598,7 +597,7 @@ CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
598597
endif
599598

600599
ifeq ($(CFG_OSTYPE),apple-darwin)
601-
CTEST_DISABLE_debuginfo-gdb = "gdb on darwin needs root"
600+
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
602601
endif
603602

604603
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
@@ -891,8 +890,7 @@ endif
891890
ifeq ($(2),$$(CFG_BUILD))
892891
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)): $$(CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4))
893892
@$$(call E, run doc-crate-$(4) [$(2)])
894-
$$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
895-
$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
893+
$$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
896894
$$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
897895
else
898896
$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)):

trunk/src/doc/complement-bugreport.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# I think I found a bug in the compiler!
44

5-
If you see this message: `error: internal compiler error: unexpected panic`,
5+
If you see this message: `error: internal compiler error: unexpected failure`,
66
then you have definitely found a bug in the compiler. It's also possible that
77
your code is not well-typed, but if you saw this message, it's still a bug in
88
error reporting.

trunk/src/doc/complement-lang-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The `str` type is UTF-8 because we observe more text in the wild in this encodin
108108

109109
This does mean that indexed access to a Unicode codepoint inside a `str` value is an O(n) operation. On the one hand, this is clearly undesirable; on the other hand, this problem is full of trade-offs and we'd like to point a few important qualifications:
110110

111-
* Scanning a `str` for ASCII-range codepoints can still be done safely octet-at-a-time. If you use `.as_bytes()`, pulling out a `u8` costs only O(1) and produces a value that can be cast and compared to an ASCII-range `char`. So if you're (say) line-breaking on `'\n'`, octet-based treatment still works. UTF8 was well-designed this way.
111+
* Scanning a `str` for ASCII-range codepoints can still be done safely octet-at-a-time, with each indexing operation pulling out a `u8` costing only O(1) and producing a value that can be cast and compared to an ASCII-range `char`. So if you're (say) line-breaking on `'\n'`, octet-based treatment still works. UTF8 was well-designed this way.
112112
* Most "character oriented" operations on text only work under very restricted language assumptions sets such as "ASCII-range codepoints only". Outside ASCII-range, you tend to have to use a complex (non-constant-time) algorithm for determining linguistic-unit (glyph, word, paragraph) boundaries anyways. We recommend using an "honest" linguistically-aware, Unicode-approved algorithm.
113113
* The `char` type is UCS4. If you honestly need to do a codepoint-at-a-time algorithm, it's trivial to write a `type wstr = [char]`, and unpack a `str` into it in a single pass, then work with the `wstr`. In other words: the fact that the language is not "decoding to UCS4 by default" shouldn't stop you from decoding (or re-encoding any other way) if you need to work with that encoding.
114114

File renamed without changes.

0 commit comments

Comments
 (0)