Skip to content

Commit ccfd620

Browse files
committed
---
yaml --- r: 148985 b: refs/heads/try2 c: dde2e0b h: refs/heads/master i: 148983: 1b5fc50 v: v3
1 parent ebf3658 commit ccfd620

File tree

23 files changed

+428
-324
lines changed

23 files changed

+428
-324
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: b89afe2af7bdd9b65836b278c6e0322a8f91fb07
8+
refs/heads/try2: dde2e0b3865ba040261d2078db371adbefb32506
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ src/.DS_Store
7575
/nd/
7676
/llvm/
7777
version.md
78-
*.tex
7978
keywords.md
8079
x86_64-apple-darwin/
8180
x86_64-unknown-linux-gnu/

branches/try2/mk/docs.mk

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ HTML_DEPS := doc/
1919

2020
BASE_DOC_OPTS := --standalone --toc --number-sections
2121
HTML_OPTS = $(BASE_DOC_OPTS) --to=html5 --section-divs --css=rust.css \
22-
--include-before-body=doc/version_info.html --include-in-header=doc/favicon.inc
23-
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md --to=latex
22+
--include-before-body=doc/version_info.html \
23+
--include-in-header=doc/favicon.inc --include-after-body=doc/footer.inc
24+
TEX_OPTS = $(BASE_DOC_OPTS) --include-before-body=doc/version.md \
25+
--from=markdown --include-before-body=doc/footer.tex --to=latex
2426
EPUB_OPTS = $(BASE_DOC_OPTS) --to=epub
2527

2628
D := $(S)src/doc
@@ -55,12 +57,21 @@ doc/rust.css: $(D)/rust.css | doc/
5557
@$(call E, cp: $@)
5658
$(Q)cp -a $< $@ 2> /dev/null
5759

60+
HTML_DEPS += doc/favicon.inc
61+
doc/favicon.inc: $(D)/favicon.inc | doc/
62+
@$(call E, cp: $@)
63+
$(Q)cp -a $< $@ 2> /dev/null
64+
5865
doc/full-toc.inc: $(D)/full-toc.inc | doc/
5966
@$(call E, cp: $@)
6067
$(Q)cp -a $< $@ 2> /dev/null
6168

62-
HTML_DEPS += doc/favicon.inc
63-
doc/favicon.inc: $(D)/favicon.inc | doc/
69+
HTML_DEPS += doc/footer.inc
70+
doc/footer.inc: $(D)/footer.inc | doc/
71+
@$(call E, cp: $@)
72+
$(Q)cp -a $< $@ 2> /dev/null
73+
74+
doc/footer.tex: $(D)/footer.tex | doc/
6475
@$(call E, cp: $@)
6576
$(Q)cp -a $< $@ 2> /dev/null
6677

@@ -83,7 +94,7 @@ doc/rust.html: $(D)/rust.md doc/full-toc.inc $(HTML_DEPS) | doc/
8394
$(CFG_PANDOC) $(HTML_OPTS) --include-in-header=doc/full-toc.inc --output=$@
8495

8596
DOCS += doc/rust.tex
86-
doc/rust.tex: $(D)/rust.md doc/version.md | doc/
97+
doc/rust.tex: $(D)/rust.md doc/footer.tex doc/version.md | doc/
8798
@$(call E, pandoc: $@)
8899
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
89100
$(CFG_PANDOC) $(TEX_OPTS) --output=$@
@@ -107,7 +118,7 @@ doc/tutorial.html: $(D)/tutorial.md $(HTML_DEPS)
107118
$(CFG_PANDOC) $(HTML_OPTS) --output=$@
108119

109120
DOCS += doc/tutorial.tex
110-
doc/tutorial.tex: $(D)/tutorial.md doc/version.md
121+
doc/tutorial.tex: $(D)/tutorial.md doc/footer.tex doc/version.md
111122
@$(call E, pandoc: $@)
112123
$(Q)$(CFG_NODE) $(D)/prep.js $< | \
113124
$(CFG_PANDOC) $(TEX_OPTS) --output=$@

branches/try2/src/doc/footer.inc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<footer><p>
2+
Copyright &copy; 2011-2014 The Rust Project Developers. Licensed under the
3+
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
4+
or the <a href="http://opensource.org/licenses/MIT">MIT license</a>, at your option.
5+
</p><p>
6+
This file may not be copied, modified, or distributed except according to those terms.
7+
</p></footer>

branches/try2/src/doc/footer.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright © 2011-2014 The Rust Project Developers. Licensed under the
2+
\href{http://www.apache.org/licenses/LICENSE-2.0}{Apache License,
3+
Version 2.0} or the \href{http://opensource.org/licenses/MIT}{MIT
4+
license}, at your option.
5+
6+
This file may not be copied, modified, or distributed except according
7+
to those terms.

branches/try2/src/doc/rust.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
body {
1616
margin: 0 auto;
1717
padding: 0 15px;
18-
margin-bottom: 4em;
1918
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
2019
font-size: 14px;
2120
color: #333;
@@ -76,6 +75,15 @@ p {
7675
margin: 0 0 10px;
7776
}
7877

78+
footer {
79+
border-top: 1px solid #ddd;
80+
font-size: 12px;
81+
font-style: italic;
82+
padding-top: 4px;
83+
margin-top: 4em;
84+
margin-bottom: 1em;
85+
}
86+
7987
/* Links layout
8088
========================================================================== */
8189
a {

branches/try2/src/libarena/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ impl Arena {
214214
#[inline]
215215
fn alloc_pod<'a, T>(&'a mut self, op: || -> T) -> &'a T {
216216
unsafe {
217-
let tydesc = get_tydesc::<T>();
218-
let ptr = self.alloc_pod_inner((*tydesc).size, (*tydesc).align);
217+
let ptr = self.alloc_pod_inner(mem::size_of::<T>(), mem::min_align_of::<T>());
219218
let ptr: *mut T = transmute(ptr);
220219
intrinsics::move_val_init(&mut (*ptr), op());
221220
return transmute(ptr);
@@ -272,7 +271,7 @@ impl Arena {
272271
unsafe {
273272
let tydesc = get_tydesc::<T>();
274273
let (ty_ptr, ptr) =
275-
self.alloc_nonpod_inner((*tydesc).size, (*tydesc).align);
274+
self.alloc_nonpod_inner(mem::size_of::<T>(), mem::min_align_of::<T>());
276275
let ty_ptr: *mut uint = transmute(ty_ptr);
277276
let ptr: *mut T = transmute(ptr);
278277
// Write in our tydesc along with a bit indicating that it

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ pub fn malloc_raw_dyn<'a>(
352352
if heap == heap_exchange {
353353
let llty_value = type_of::type_of(ccx, t);
354354

355-
356355
// Allocate space:
357356
let r = callee::trans_lang_call(
358357
bcx,
@@ -375,17 +374,14 @@ pub fn malloc_raw_dyn<'a>(
375374
// Grab the TypeRef type of box_ptr_ty.
376375
let box_ptr_ty = ty::mk_box(bcx.tcx(), t);
377376
let llty = type_of(ccx, box_ptr_ty);
378-
379-
// Get the tydesc for the body:
380-
let static_ti = get_tydesc(ccx, t);
381-
glue::lazily_emit_tydesc_glue(ccx, abi::tydesc_field_drop_glue, static_ti);
377+
let llalign = C_uint(ccx, llalign_of_min(ccx, llty) as uint);
382378

383379
// Allocate space:
384-
let tydesc = PointerCast(bcx, static_ti.tydesc, Type::i8p());
380+
let drop_glue = glue::get_drop_glue(ccx, t);
385381
let r = callee::trans_lang_call(
386382
bcx,
387383
langcall,
388-
[tydesc, size],
384+
[PointerCast(bcx, drop_glue, Type::glue_fn(Type::i8p()).ptr_to()), size, llalign],
389385
None);
390386
rslt(r.bcx, PointerCast(r.bcx, r.val, llty))
391387
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ pub struct tydesc_info {
114114
size: ValueRef,
115115
align: ValueRef,
116116
name: ValueRef,
117-
drop_glue: Cell<Option<ValueRef>>,
118117
visit_glue: Cell<Option<ValueRef>>,
119118
}
120119

0 commit comments

Comments
 (0)