Skip to content

Commit 76f1651

Browse files
committed
---
yaml --- r: 146053 b: refs/heads/try2 c: 9d047cd h: refs/heads/master i: 146051: a81ec74 v: v3
1 parent 6880aa7 commit 76f1651

Some content is hidden

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

62 files changed

+529
-1560
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: 759b20da87b65d45b552adc75dd418e89b201261
8+
refs/heads/try2: 9d047cdead764ae33e19a7149286302560b000f2
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/platform.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,8 @@ define CFG_MAKE_TOOLCHAIN
507507

508508
# For the ARM and MIPS crosses, use the toolchain assembler
509509
# XXX: We should be able to use the LLVM assembler
510-
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
510+
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
511+
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)
511512

512513
endif
513514

branches/try2/mk/rt.mk

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ RUNTIME_CXXS_$(1)_$(2) := \
9191
rt/miniz.cpp \
9292
rt/memory_region.cpp \
9393
rt/boxed_region.cpp \
94-
rt/arch/$$(HOST_$(1))/context.cpp \
95-
rt/arch/$$(HOST_$(1))/gpr.cpp \
9694
rt/rust_android_dummy.cpp \
9795
rt/rust_test_helpers.cpp
9896

@@ -106,7 +104,6 @@ RUNTIME_CS_$(1)_$(2) := rt/sundown/src/autolink.c \
106104
rt/sundown/html/html.c
107105

108106
RUNTIME_S_$(1)_$(2) := rt/arch/$$(HOST_$(1))/_context.S \
109-
rt/arch/$$(HOST_$(1))/ccall.S \
110107
rt/arch/$$(HOST_$(1))/record_sp.S
111108

112109
RT_BUILD_DIR_$(1)_$(2) := $$(RT_OUTPUT_DIR_$(1))/stage$(2)
@@ -122,7 +119,7 @@ RUNTIME_OBJS_$(1)_$(2) := $$(RUNTIME_CXXS_$(1)_$(2):rt/%.cpp=$$(RT_BUILD_DIR_$(1
122119
$$(RUNTIME_S_$(1)_$(2):rt/%.S=$$(RT_BUILD_DIR_$(1)_$(2))/%.o)
123120
ALL_OBJ_FILES += $$(RUNTIME_OBJS_$(1)_$(2))
124121

125-
MORESTACK_OBJ_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/morestack.o
122+
MORESTACK_OBJS_$(1)_$(2) := $$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/morestack.o
126123
ALL_OBJ_FILES += $$(MORESTACK_OBJS_$(1)_$(2))
127124

128125
$$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.cpp $$(MKFILE_DEPS)
@@ -140,9 +137,9 @@ $$(RT_BUILD_DIR_$(1)_$(2))/%.o: rt/%.S $$(MKFILE_DEPS) \
140137
@$$(call E, compile: $$@)
141138
$$(Q)$$(call CFG_ASSEMBLE_$(1),$$@,$$<)
142139

143-
$$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJ_$(1)_$(2))
140+
$$(RT_BUILD_DIR_$(1)_$(2))/arch/$$(HOST_$(1))/libmorestack.a: $$(MORESTACK_OBJS_$(1)_$(2))
144141
@$$(call E, link: $$@)
145-
$$(Q)$(AR_$(1)) rcs $$@ $$<
142+
$$(Q)$(AR_$(1)) rcs $$@ $$^
146143

147144
$$(RT_BUILD_DIR_$(1)_$(2))/$(CFG_RUNTIME_$(1)): $$(RUNTIME_OBJS_$(1)_$(2)) $$(MKFILE_DEPS) \
148145
$$(RUNTIME_DEF_$(1)_$(2)) $$(LIBUV_LIB_$(1))

branches/try2/src/driver/driver.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ extern mod this(name = "rustpkg");
1414
#[cfg(rustdoc)]
1515
extern mod this(name = "rustdoc");
1616

17-
#[cfg(rusti)]
18-
extern mod this(name = "rusti");
19-
20-
#[cfg(rust)]
21-
extern mod this(name = "rust");
22-
2317
#[cfg(rustc)]
2418
extern mod this(name = "rustc");
2519

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,6 +2226,7 @@ pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
22262226
[path_name(item.ident)]),
22272227
decl,
22282228
body,
2229+
item.attrs,
22292230
llfndecl,
22302231
item.id);
22312232
} else if !generics.is_type_parameterized() {

branches/try2/src/librustc/middle/trans/foreign.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,14 +386,15 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: @mut CrateContext,
386386
path: &ast_map::path,
387387
decl: &ast::fn_decl,
388388
body: &ast::Block,
389+
attrs: &[ast::Attribute],
389390
llwrapfn: ValueRef,
390391
id: ast::NodeId) {
391392
let _icx = push_ctxt("foreign::build_foreign_fn");
392393
let tys = foreign_types_for_id(ccx, id);
393394

394395
unsafe { // unsafe because we call LLVM operations
395396
// Build up the Rust function (`foo0` above).
396-
let llrustfn = build_rust_fn(ccx, path, decl, body, id);
397+
let llrustfn = build_rust_fn(ccx, path, decl, body, attrs, id);
397398

398399
// Build up the foreign wrapper (`foo` above).
399400
return build_wrap_fn(ccx, llrustfn, llwrapfn, &tys);
@@ -403,6 +404,7 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: @mut CrateContext,
403404
path: &ast_map::path,
404405
decl: &ast::fn_decl,
405406
body: &ast::Block,
407+
attrs: &[ast::Attribute],
406408
id: ast::NodeId)
407409
-> ValueRef {
408410
let _icx = push_ctxt("foreign::foreign::build_rust_fn");
@@ -434,6 +436,7 @@ pub fn trans_rust_fn_with_foreign_abi(ccx: @mut CrateContext,
434436
t.repr(tcx));
435437

436438
let llfndecl = base::decl_internal_rust_fn(ccx, f.sig.inputs, f.sig.output, ps);
439+
base::set_llvm_fn_attrs(attrs, llfndecl);
437440
base::trans_fn(ccx,
438441
(*path).clone(),
439442
decl,

branches/try2/src/librustc/rustc.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,12 @@ pub fn monitor(f: ~fn(@diagnostic::Emitter)) {
326326
use std::comm::*;
327327

328328
// XXX: This is a hack for newsched since it doesn't support split stacks.
329-
// rustc needs a lot of stack!
330-
static STACK_SIZE: uint = 6000000;
329+
// rustc needs a lot of stack! When optimizations are disabled, it needs
330+
// even *more* stack than usual as well.
331+
#[cfg(rtopt)]
332+
static STACK_SIZE: uint = 6000000; // 6MB
333+
#[cfg(not(rtopt))]
334+
static STACK_SIZE: uint = 20000000; // 20MB
331335

332336
let (p, ch) = stream();
333337
let ch = SharedChan::new(ch);

branches/try2/src/librustdoc/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ impl Clean<Item> for ast::method {
337337
name: Some(self.ident.clean()),
338338
attrs: self.attrs.clean(),
339339
source: self.span.clean(),
340-
id: self.self_id.clone(),
340+
id: self.id.clone(),
341341
visibility: self.vis.clean(),
342342
inner: MethodItem(Method {
343343
generics: self.generics.clean(),

branches/try2/src/librustdoc/html/render.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,26 @@ fn item_enum(w: &mut io::Writer, it: &clean::Item, e: &clean::Enum) {
13441344
write!(w, "<tr><td id='variant.{name}'><code>{name}</code></td><td>",
13451345
name = variant.name.get_ref().as_slice());
13461346
document(w, variant);
1347+
match variant.inner {
1348+
clean::VariantItem(ref var) => {
1349+
match var.kind {
1350+
clean::StructVariant(ref s) => {
1351+
write!(w, "<h3 class='fields'>Fields</h3>\n<table>");
1352+
for field in s.fields.iter() {
1353+
write!(w, "<tr><td id='variant.{v}.field.{f}'>\
1354+
<code>{f}</code></td><td>",
1355+
v = variant.name.get_ref().as_slice(),
1356+
f = field.name.get_ref().as_slice());
1357+
document(w, field);
1358+
write!(w, "</td></tr>");
1359+
}
1360+
write!(w, "</table>");
1361+
}
1362+
_ => ()
1363+
}
1364+
}
1365+
_ => ()
1366+
}
13471367
write!(w, "</td></tr>");
13481368
}
13491369
write!(w, "</table>");

branches/try2/src/librustdoc/passes.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,14 @@ impl<'self> fold::DocFolder for Stripper<'self> {
135135
}
136136
}
137137

138-
clean::ViewItemItem(*) | clean::StructFieldItem(*) => {
138+
clean::ViewItemItem(*) => {
139139
if i.visibility != Some(ast::public) {
140+
return None
141+
}
142+
}
143+
144+
clean::StructFieldItem(*) => {
145+
if i.visibility == Some(ast::private) {
140146
return None;
141147
}
142148
}

0 commit comments

Comments
 (0)