Skip to content

Commit c05afc8

Browse files
committed
---
yaml --- r: 151026 b: refs/heads/try2 c: 3ec3c09 h: refs/heads/master v: v3
1 parent 435a2d0 commit c05afc8

Some content is hidden

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

105 files changed

+2869
-3267
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: f49572373347b4110e7140fafbcb57db112712bd
8+
refs/heads/try2: 3ec3c092ee185ada1c376f311c9c55b64c49e840
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ pleasant high-level features include:
3333
This is an introductory tutorial for the Rust programming language. It
3434
covers the fundamentals of the language, including the syntax, the
3535
type system and memory model, generics, and modules. [Additional
36-
tutorials](#what-next) cover specific language features in greater
36+
tutorials](#what-next?) cover specific language features in greater
3737
depth.
3838

3939
This tutorial assumes that the reader is already familiar with one or

branches/try2/src/libcollections/btree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,13 +659,13 @@ impl<K: fmt::Show + TotalOrd, V: fmt::Show> fmt::Show for Branch<K, V> {
659659
}
660660
}
661661

662-
//A LeafElt containts no left child, but a key-value pair.
662+
//A LeafElt contains no left child, but a key-value pair.
663663
struct LeafElt<K, V> {
664664
key: K,
665665
value: V
666666
}
667667

668-
//A BranchElt has a left child in insertition to a key-value pair.
668+
//A BranchElt has a left child in insertion to a key-value pair.
669669
struct BranchElt<K, V> {
670670
left: ~Node<K, V>,
671671
key: K,

branches/try2/src/libcollections/hashmap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
605605
//
606606
// > Why a load factor of 90%?
607607
//
608-
// In general, all the distances to inital buckets will converge on the mean.
608+
// In general, all the distances to initial buckets will converge on the mean.
609609
// At a load factor of α, the odds of finding the target bucket after k
610610
// probes is approximately 1-α^k. If we set this equal to 50% (since we converge
611611
// on the mean) and set k=8 (64-byte cache line / 8-byte hash), α=0.92. I round
@@ -618,7 +618,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
618618
// > Wait, what? Where did you get 1-α^k from?
619619
//
620620
// On the first probe, your odds of a collision with an existing element is α.
621-
// The odds of doing this twice in a row is approximatelly α^2. For three times,
621+
// The odds of doing this twice in a row is approximately α^2. For three times,
622622
// α^3, etc. Therefore, the odds of colliding k times is α^k. The odds of NOT
623623
// colliding after k tries is 1-α^k.
624624
//
@@ -692,7 +692,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
692692
/// let mut book_reviews = HashMap::new();
693693
///
694694
/// // review some books.
695-
/// book_reviews.insert("Adventures of Hucklebury Fin", "My favorite book.");
695+
/// book_reviews.insert("Adventures of Huckleberry Finn", "My favorite book.");
696696
/// book_reviews.insert("Grimms' Fairy Tales", "Masterpiece.");
697697
/// book_reviews.insert("Pride and Prejudice", "Very enjoyable.");
698698
/// book_reviews.insert("The Adventures of Sherlock Holmes", "Eye lyked it alot.");
@@ -782,7 +782,7 @@ impl<K: TotalEq + Hash<S>, V, S, H: Hasher<S>> HashMap<K, V, H> {
782782
/// from its 'ideal' location.
783783
///
784784
/// In the cited blog posts above, this is called the "distance to
785-
/// inital bucket", or DIB.
785+
/// initial bucket", or DIB.
786786
fn bucket_distance(&self, index_of_elem: &table::FullIndex) -> uint {
787787
// where the hash of the element that happens to reside at
788788
// `index_of_elem` tried to place itself first.

branches/try2/src/libcollections/treemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ pub struct RevMutEntries<'a, K, V> {
308308
// (with many different `x`) below, so we need to optionally pass mut
309309
// as a tt, but the only thing we can do with a `tt` is pass them to
310310
// other macros, so this takes the `& <mutability> <operand>` token
311-
// sequence and forces their evalutation as an expression.
311+
// sequence and forces their evaluation as an expression.
312312
macro_rules! addr { ($e:expr) => { $e }}
313313
// putting an optional mut into type signatures
314314
macro_rules! item { ($i:item) => { $i }}

branches/try2/src/libcollections/trie.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<T> TrieMap<T> {
141141
// (with many different `x`) below, so we need to optionally pass mut
142142
// as a tt, but the only thing we can do with a `tt` is pass them to
143143
// other macros, so this takes the `& <mutability> <operand>` token
144-
// sequence and forces their evalutation as an expression. (see also
144+
// sequence and forces their evaluation as an expression. (see also
145145
// `item!` below.)
146146
macro_rules! addr { ($e:expr) => { $e } }
147147

branches/try2/src/libnum/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ macro_rules! impl_integer_for_int {
171171
/// `other`.
172172
#[inline]
173173
fn lcm(&self, other: &$T) -> $T {
174-
// should not have to recaluculate abs
174+
// should not have to recalculate abs
175175
((*self * *other) / self.gcd(other)).abs()
176176
}
177177

branches/try2/src/librustc/back/link.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,7 @@ fn link_args(sess: &Session,
11711171
// actually creates "invalid" objects [1] [2], but only for some
11721172
// introspection tools, not in terms of whether it can be loaded.
11731173
//
1174-
// Long story shory, passing this flag forces the linker to *not*
1174+
// Long story short, passing this flag forces the linker to *not*
11751175
// truncate section names (so we can find the metadata section after
11761176
// it's compiled). The real kicker is that rust compiled just fine on
11771177
// windows for quite a long time *without* this flag, so I have no idea
@@ -1491,7 +1491,7 @@ fn add_upstream_rust_crates(args: &mut Vec<~str>, sess: &Session,
14911491
}
14921492

14931493
// Link in all of our upstream crates' native dependencies. Remember that
1494-
// all of these upstream native depenencies are all non-static
1494+
// all of these upstream native dependencies are all non-static
14951495
// dependencies. We've got two cases then:
14961496
//
14971497
// 1. The upstream crate is an rlib. In this case we *must* link in the
@@ -1509,7 +1509,7 @@ fn add_upstream_rust_crates(args: &mut Vec<~str>, sess: &Session,
15091509
// be instantiated in the target crate, meaning that the native symbol must
15101510
// also be resolved in the target crate.
15111511
fn add_upstream_native_libraries(args: &mut Vec<~str>, sess: &Session) {
1512-
// Be sure to use a topological sorting of crates becuase there may be
1512+
// Be sure to use a topological sorting of crates because there may be
15131513
// interdependencies between native libraries. When passing -nodefaultlibs,
15141514
// for example, almost all native libraries depend on libc, so we have to
15151515
// make sure that's all the way at the right (liblibc is near the base of

branches/try2/src/librustc/back/svh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! such.
2121
//!
2222
//! The core of this problem is when an upstream dependency changes and
23-
//! downstream dependants are not recompiled. This causes compile errors because
23+
//! downstream dependents are not recompiled. This causes compile errors because
2424
//! the upstream crate's metadata has changed but the downstream crates are
2525
//! still referencing the older crate's metadata.
2626
//!

branches/try2/src/librustc/driver/driver.rs

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ pub fn phase_3_run_analysis_passes(sess: Session,
299299
last_private_map: last_private_map
300300
} =
301301
time(time_passes, "resolution", (), |_|
302-
middle::resolve::resolve_crate(&sess, lang_items, krate));
302+
middle::resolve::resolve_crate(&sess, &lang_items, krate));
303303

304304
// Discard MTWT tables that aren't required past resolution.
305305
syntax::ext::mtwt::clear_tables();
@@ -316,7 +316,7 @@ pub fn phase_3_run_analysis_passes(sess: Session,
316316
sess.diagnostic(), krate)));
317317

318318
let freevars = time(time_passes, "freevar finding", (), |_|
319-
freevars::annotate_freevars(def_map, krate));
319+
freevars::annotate_freevars(&def_map, krate));
320320

321321
let region_map = time(time_passes, "region resolution", (), |_|
322322
middle::region::resolve_crate(&sess, krate));
@@ -328,7 +328,7 @@ pub fn phase_3_run_analysis_passes(sess: Session,
328328
freevars, region_map, lang_items);
329329

330330
// passes are timed inside typeck
331-
let (method_map, vtable_map) = typeck::check_crate(&ty_cx, trait_map, krate);
331+
typeck::check_crate(&ty_cx, trait_map, krate);
332332

333333
time(time_passes, "check static items", (), |_|
334334
middle::check_static::check_crate(&ty_cx, krate));
@@ -338,56 +338,52 @@ pub fn phase_3_run_analysis_passes(sess: Session,
338338
middle::const_eval::process_crate(krate, &ty_cx));
339339

340340
time(time_passes, "const checking", (), |_|
341-
middle::check_const::check_crate(krate, def_map, method_map, &ty_cx));
341+
middle::check_const::check_crate(krate, &ty_cx));
342342

343343
let maps = (external_exports, last_private_map);
344344
let (exported_items, public_items) =
345345
time(time_passes, "privacy checking", maps, |(a, b)|
346-
middle::privacy::check_crate(&ty_cx, &method_map, &exp_map2,
347-
a, b, krate));
346+
middle::privacy::check_crate(&ty_cx, &exp_map2, a, b, krate));
348347

349348
time(time_passes, "effect checking", (), |_|
350-
middle::effect::check_crate(&ty_cx, method_map, krate));
349+
middle::effect::check_crate(&ty_cx, krate));
351350

352351
let middle::moves::MoveMaps {moves_map, moved_variables_set,
353352
capture_map} =
354353
time(time_passes, "compute moves", (), |_|
355-
middle::moves::compute_moves(&ty_cx, method_map, krate));
354+
middle::moves::compute_moves(&ty_cx, krate));
356355

357356
time(time_passes, "match checking", (), |_|
358-
middle::check_match::check_crate(&ty_cx, method_map,
359-
&moves_map, krate));
357+
middle::check_match::check_crate(&ty_cx, &moves_map, krate));
360358

361359
time(time_passes, "liveness checking", (), |_|
362-
middle::liveness::check_crate(&ty_cx, method_map,
363-
&capture_map, krate));
360+
middle::liveness::check_crate(&ty_cx, &capture_map, krate));
364361

365362
let root_map =
366363
time(time_passes, "borrow checking", (), |_|
367-
middle::borrowck::check_crate(&ty_cx, method_map,
368-
&moves_map, &moved_variables_set,
364+
middle::borrowck::check_crate(&ty_cx, &moves_map,
365+
&moved_variables_set,
369366
&capture_map, krate));
370367

371368
drop(moves_map);
372369
drop(moved_variables_set);
373370

374371
time(time_passes, "kind checking", (), |_|
375-
kind::check_crate(&ty_cx, method_map, krate));
372+
kind::check_crate(&ty_cx, krate));
376373

377374
let reachable_map =
378375
time(time_passes, "reachability checking", (), |_|
379-
reachable::find_reachable(&ty_cx, method_map, &exported_items));
376+
reachable::find_reachable(&ty_cx, &exported_items));
380377

381378
time(time_passes, "death checking", (), |_| {
382379
middle::dead::check_crate(&ty_cx,
383-
method_map,
384380
&exported_items,
385381
&reachable_map,
386382
krate)
387383
});
388384

389385
time(time_passes, "lint checking", (), |_|
390-
lint::check_crate(&ty_cx, method_map, &exported_items, krate));
386+
lint::check_crate(&ty_cx, &exported_items, krate));
391387

392388
CrateAnalysis {
393389
exp_map2: exp_map2,
@@ -396,8 +392,6 @@ pub fn phase_3_run_analysis_passes(sess: Session,
396392
public_items: public_items,
397393
maps: astencode::Maps {
398394
root_map: root_map,
399-
method_map: method_map,
400-
vtable_map: vtable_map,
401395
capture_map: RefCell::new(capture_map)
402396
},
403397
reachable: reachable_map

branches/try2/src/librustc/lib/llvm.rs

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,37 +1882,23 @@ impl TypeNames {
18821882

18831883
/* Memory-managed interface to target data. */
18841884

1885-
pub struct target_data_res {
1886-
pub td: TargetDataRef,
1885+
pub struct TargetData {
1886+
pub lltd: TargetDataRef
18871887
}
18881888

1889-
impl Drop for target_data_res {
1889+
impl Drop for TargetData {
18901890
fn drop(&mut self) {
18911891
unsafe {
1892-
llvm::LLVMDisposeTargetData(self.td);
1892+
llvm::LLVMDisposeTargetData(self.lltd);
18931893
}
18941894
}
18951895
}
18961896

1897-
pub fn target_data_res(td: TargetDataRef) -> target_data_res {
1898-
target_data_res {
1899-
td: td
1900-
}
1901-
}
1902-
1903-
pub struct TargetData {
1904-
pub lltd: TargetDataRef,
1905-
dtor: @target_data_res
1906-
}
1907-
19081897
pub fn mk_target_data(string_rep: &str) -> TargetData {
1909-
let lltd = string_rep.with_c_str(|buf| {
1910-
unsafe { llvm::LLVMCreateTargetData(buf) }
1911-
});
1912-
19131898
TargetData {
1914-
lltd: lltd,
1915-
dtor: @target_data_res(lltd)
1899+
lltd: string_rep.with_c_str(|buf| {
1900+
unsafe { llvm::LLVMCreateTargetData(buf) }
1901+
})
19161902
}
19171903
}
19181904

@@ -1949,35 +1935,22 @@ impl Drop for ObjectFile {
19491935

19501936
/* Memory-managed interface to section iterators. */
19511937

1952-
pub struct section_iter_res {
1953-
pub si: SectionIteratorRef,
1938+
pub struct SectionIter {
1939+
pub llsi: SectionIteratorRef
19541940
}
19551941

1956-
impl Drop for section_iter_res {
1942+
impl Drop for SectionIter {
19571943
fn drop(&mut self) {
19581944
unsafe {
1959-
llvm::LLVMDisposeSectionIterator(self.si);
1945+
llvm::LLVMDisposeSectionIterator(self.llsi);
19601946
}
19611947
}
19621948
}
19631949

1964-
pub fn section_iter_res(si: SectionIteratorRef) -> section_iter_res {
1965-
section_iter_res {
1966-
si: si
1967-
}
1968-
}
1969-
1970-
pub struct SectionIter {
1971-
pub llsi: SectionIteratorRef,
1972-
dtor: @section_iter_res
1973-
}
1974-
19751950
pub fn mk_section_iter(llof: ObjectFileRef) -> SectionIter {
19761951
unsafe {
1977-
let llsi = llvm::LLVMGetSections(llof);
19781952
SectionIter {
1979-
llsi: llsi,
1980-
dtor: @section_iter_res(llsi)
1953+
llsi: llvm::LLVMGetSections(llof)
19811954
}
19821955
}
19831956
}

0 commit comments

Comments
 (0)