Skip to content

Commit 0df99a1

Browse files
committed
---
yaml --- r: 85503 b: refs/heads/dist-snap c: ed6694a h: refs/heads/master i: 85501: 9e5551b 85499: 3d24669 85495: d1dfcb8 85487: 8841bd5 85471: a6e5cd6 85439: 65d3e81 85375: 20d38de 85247: bb765cb 84991: 97420ac v: v3
1 parent 04988a6 commit 0df99a1

Some content is hidden

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

79 files changed

+276
-2538
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: e185b049af214cc7900beaae557a12863f4b3ce3
9+
refs/heads/dist-snap: ed6694a9b5049ec066db45965b40351744df80bc
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ a referencing source file, or by the name of the crate itself.
582582

583583
Each source file contains a sequence of zero or more `item` definitions,
584584
and may optionally begin with any number of `attributes` that apply to the containing module.
585-
Attributes on the anonymous crate module define important metadata that influences
585+
Atributes on the anonymous crate module define important metadata that influences
586586
the behavior of the compiler.
587587

588588
~~~~~~~~
@@ -1273,7 +1273,7 @@ since the typechecker checks that any type with an implementation of `Circle` al
12731273

12741274
In type-parameterized functions,
12751275
methods of the supertrait may be called on values of subtrait-bound type parameters.
1276-
Referring to the previous example of `trait Circle : Shape`:
1276+
Refering to the previous example of `trait Circle : Shape`:
12771277

12781278
~~~
12791279
# trait Shape { fn area(&self) -> float; }
@@ -1914,7 +1914,7 @@ A field access on a record is an [lvalue](#lvalues-rvalues-and-temporaries) refe
19141914
When the field is mutable, it can be [assigned](#assignment-expressions) to.
19151915

19161916
When the type of the expression to the left of the dot is a pointer to a record or structure,
1917-
it is automatically dereferenced to make the field access possible.
1917+
it is automatically derferenced to make the field access possible.
19181918

19191919

19201920
### Vector expressions

branches/dist-snap/src/etc/cmathconsts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <math.h>
1414
#include <stdio.h>
1515

16-
// must match std::ctypes
16+
// must match core::ctypes
1717

1818
#define C_FLT(x) (float)x
1919
#define C_DBL(x) (double)x

branches/dist-snap/src/etc/ziggurat_tables.py

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

44
# This creates the tables used for distributions implemented using the
5-
# ziggurat algorithm in `std::rand::distributions;`. They are
5+
# ziggurat algorithm in `core::rand::distributions;`. They are
66
# (basically) the tables as used in the ZIGNOR variant (Doornik 2005).
77
# They are changed rarely, so the generated file should be checked in
88
# to git.

branches/dist-snap/src/etc/zsh/_rust

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _rustc_opts_lint=(
3636
'path-statement[path statements with no effect]'
3737
'missing-trait-doc[detects missing documentation for traits]'
3838
'missing-struct-doc[detects missing documentation for structs]'
39-
'ctypes[proper use of std::libc types in foreign modules]'
39+
'ctypes[proper use of core::libc types in foreign modules]'
4040
"unused-mut[detect mut variables which don't need to be mutable]"
4141
'unused-imports[imports that are never used]'
4242
'heap-memory[use of any (~ type or @ type) heap memory]'

branches/dist-snap/src/libextra/crypto/cryptoutil.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub fn add_bytes_to_bits_tuple
176176
/// method that modifies the buffer directory or provides the caller with bytes that can be modifies
177177
/// results in those bytes being marked as used by the buffer.
178178
pub trait FixedBuffer {
179-
/// Input a vector of bytes. If the buffer becomes full, process it with the provided
179+
/// Input a vector of bytes. If the buffer becomes full, proccess it with the provided
180180
/// function and then clear the buffer.
181181
fn input(&mut self, input: &[u8], func: &fn(&[u8]));
182182

branches/dist-snap/src/libextra/crypto/digest.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ pub trait Digest {
4747
fn output_bits(&self) -> uint;
4848

4949
/**
50-
* Convenience function that feeds a string into a digest.
50+
* Convenience functon that feeds a string into a digest
5151
*
5252
* # Arguments
5353
*
54-
* * `input` The string to feed into the digest
54+
* * in The string to feed into the digest
5555
*/
5656
fn input_str(&mut self, input: &str) {
5757
self.input(input.as_bytes());
5858
}
5959

6060
/**
61-
* Convenience function that retrieves the result of a digest as a
61+
* Convenience functon that retrieves the result of a digest as a
6262
* ~str in hexadecimal format.
6363
*/
6464
fn result_str(&mut self) -> ~str {

branches/dist-snap/src/libextra/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct EnumSet<E> {
1818
priv bits: uint
1919
}
2020

21-
/// An interface for casting C-like enum to uint and back.
21+
/// An iterface for casting C-like enum to uint and back.
2222
pub trait CLike {
2323
/// Converts C-like enum to uint.
2424
fn to_uint(&self) -> uint;

branches/dist-snap/src/libextra/fileinput.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl FileInput {
156156
/**
157157
Create a `FileInput` object from a vec of files. An empty
158158
vec means lines are read from `stdin` (use `from_vec_raw` to stop
159-
this behaviour). Any occurrence of `None` represents `stdin`.
159+
this behaviour). Any occurence of `None` represents `stdin`.
160160
*/
161161
pub fn from_vec(files: ~[Option<Path>]) -> FileInput {
162162
FileInput::from_vec_raw(

branches/dist-snap/src/libextra/flatpipes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Constructors for flat pipes that send POD types using memcpy.
166166
167167
This module is currently unsafe because it uses `Clone + Send` as a type
168168
parameter bounds meaning POD (plain old data), but `Clone + Send` and
169-
POD are not equivalent.
169+
POD are not equivelant.
170170
171171
*/
172172
pub mod pod {

branches/dist-snap/src/libextra/stats.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ pub fn write_boxplot(w: @io::Writer, s: &Summary, width_hint: uint) {
365365
w.write_str(histr);
366366
}
367367

368-
/// Returns a HashMap with the number of occurrences of every element in the
368+
/// Returns a HashMap with the number of occurences of every element in the
369369
/// sequence that the iterator exposes.
370370
pub fn freq_count<T: Iterator<U>, U: Eq+Hash>(mut iter: T) -> hashmap::HashMap<U, uint> {
371371
let mut map = hashmap::HashMap::new::<U, uint>();

branches/dist-snap/src/libextra/term.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Terminal {
157157
/// If the color is a bright color, but the terminal only supports 8 colors,
158158
/// the corresponding normal color will be used instead.
159159
///
160-
/// Returns true if the color was set, false otherwise.
160+
/// Rturns true if the color was set, false otherwise.
161161
pub fn bg(&self, color: color::Color) -> bool {
162162
let color = self.dim_if_necessary(color);
163163
if self.num_colors > color {

branches/dist-snap/src/libextra/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub mod rustrt {
3434
}
3535

3636
/// A record specifying a time value in seconds and nanoseconds.
37-
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
37+
#[deriving(Eq, Encodable, Decodable)]
3838
pub struct Timespec { sec: i64, nsec: i32 }
3939

4040
/*
@@ -100,7 +100,7 @@ pub fn tzset() {
100100
}
101101
}
102102

103-
#[deriving(Clone, DeepClone, Eq, Encodable, Decodable)]
103+
#[deriving(Eq, Encodable, Decodable)]
104104
pub struct Tm {
105105
tm_sec: i32, // seconds after the minute ~[0-60]
106106
tm_min: i32, // minutes after the hour ~[0-59]

branches/dist-snap/src/librustc/back/link.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ use std::c_str::ToCStr;
2626
use std::char;
2727
use std::hash::Streaming;
2828
use std::hash;
29+
use std::io;
2930
use std::libc::{c_int, c_uint};
3031
use std::os::consts::{macos, freebsd, linux, android, win32};
3132
use std::os;
@@ -858,6 +859,10 @@ pub fn link_binary(sess: Session,
858859
debug!("output: %s", output.to_str());
859860
let cc_args = link_args(sess, obj_filename, out_filename, lm);
860861
debug!("%s link args: %s", cc_prog, cc_args.connect(" "));
862+
if (sess.opts.debugging_opts & session::print_link_args) != 0 {
863+
io::println(fmt!("%s link args: %s", cc_prog, cc_args.connect(" ")));
864+
}
865+
861866
// We run 'cc' here
862867
let prog = run::process_output(cc_prog, cc_args);
863868
if 0 != prog.status {

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -691,14 +691,6 @@ pub fn build_session_options(binary: @str,
691691
let extra_debuginfo = debugging_opts & session::extra_debug_info != 0;
692692
let debuginfo = debugging_opts & session::debug_info != 0 ||
693693
extra_debuginfo;
694-
695-
// If debugging info is generated, do not collapse monomorphized function instances.
696-
// Functions with equivalent llvm code still need separate debugging descriptions because names
697-
// might differ.
698-
if debuginfo {
699-
debugging_opts |= session::no_monomorphic_collapse;
700-
}
701-
702694
let statik = debugging_opts & session::statik != 0;
703695

704696
let addl_lib_search_paths = getopts::opt_strs(matches, "L").map(|s| Path(*s));

branches/dist-snap/src/librustc/lib/llvm.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,16 +2086,6 @@ pub mod llvm {
20862086

20872087
#[fast_ffi]
20882088
pub fn LLVMSetUnnamedAddr(GlobalVar: ValueRef, UnnamedAddr: Bool);
2089-
2090-
#[fast_ffi]
2091-
pub fn LLVMDIBuilderCreateTemplateTypeParameter(Builder: DIBuilderRef,
2092-
Scope: ValueRef,
2093-
Name: *c_char,
2094-
Ty: ValueRef,
2095-
File: ValueRef,
2096-
LineNo: c_uint,
2097-
ColumnNo: c_uint)
2098-
-> ValueRef;
20992089
}
21002090
}
21012091

branches/dist-snap/src/librustc/middle/trans/_match.rs

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -399,17 +399,10 @@ struct ArmData<'self> {
399399
bindings_map: @BindingsMap
400400
}
401401

402-
/**
403-
* Info about Match.
404-
* If all `pats` are matched then arm `data` will be executed.
405-
* As we proceed `bound_ptrs` are filled with pointers to values to be bound,
406-
* these pointers are stored in llmatch variables just before executing `data` arm.
407-
*/
408402
#[deriving(Clone)]
409403
struct Match<'self> {
410404
pats: ~[@ast::pat],
411-
data: ArmData<'self>,
412-
bound_ptrs: ~[(ident, ValueRef)]
405+
data: ArmData<'self>
413406
}
414407

415408
impl<'self> Repr for Match<'self> {
@@ -454,13 +447,14 @@ fn expand_nested_bindings<'r>(bcx: @mut Block,
454447
br.pats.slice(col + 1u,
455448
br.pats.len())));
456449

457-
let mut res = Match {
450+
let binding_info =
451+
br.data.bindings_map.get(&path_to_ident(path));
452+
453+
Store(bcx, val, binding_info.llmatch);
454+
Match {
458455
pats: pats,
459-
data: br.data.clone(),
460-
bound_ptrs: br.bound_ptrs.clone()
461-
};
462-
res.bound_ptrs.push((path_to_ident(path), val));
463-
res
456+
data: br.data.clone()
457+
}
464458
}
465459
_ => (*br).clone(),
466460
}
@@ -502,20 +496,21 @@ fn enter_match<'r>(bcx: @mut Block,
502496
br.pats.slice(col + 1u, br.pats.len()));
503497

504498
let this = br.pats[col];
505-
let mut bound_ptrs = br.bound_ptrs.clone();
506499
match this.node {
507500
ast::pat_ident(_, ref path, None) => {
508501
if pat_is_binding(dm, this) {
509-
bound_ptrs.push((path_to_ident(path), val));
502+
let binding_info =
503+
br.data.bindings_map.get(
504+
&path_to_ident(path));
505+
Store(bcx, val, binding_info.llmatch);
510506
}
511507
}
512508
_ => {}
513509
}
514510

515511
result.push(Match {
516512
pats: pats,
517-
data: br.data.clone(),
518-
bound_ptrs: bound_ptrs
513+
data: br.data.clone()
519514
});
520515
}
521516
None => ()
@@ -1299,14 +1294,18 @@ fn store_non_ref_bindings(bcx: @mut Block,
12991294

13001295
fn insert_lllocals(bcx: @mut Block,
13011296
bindings_map: &BindingsMap,
1297+
binding_mode: IrrefutablePatternBindingMode,
13021298
add_cleans: bool) -> @mut Block {
13031299
/*!
13041300
* For each binding in `data.bindings_map`, adds an appropriate entry into
13051301
* the `fcx.lllocals` map. If add_cleans is true, then adds cleanups for
13061302
* the bindings.
13071303
*/
13081304

1309-
let llmap = bcx.fcx.lllocals;
1305+
let llmap = match binding_mode {
1306+
BindLocal => bcx.fcx.lllocals,
1307+
BindArgument => bcx.fcx.llargs
1308+
};
13101309

13111310
for (&ident, &binding_info) in bindings_map.iter() {
13121311
let llval = match binding_info.trmode {
@@ -1359,7 +1358,7 @@ fn compile_guard(bcx: @mut Block,
13591358
bcx = store_non_ref_bindings(bcx,
13601359
data.bindings_map,
13611360
Some(&mut temp_cleanups));
1362-
bcx = insert_lllocals(bcx, data.bindings_map, false);
1361+
bcx = insert_lllocals(bcx, data.bindings_map, BindLocal, false);
13631362

13641363
let val = unpack_result!(bcx, {
13651364
do with_scope_result(bcx, guard_expr.info(),
@@ -1419,10 +1418,6 @@ fn compile_submatch(bcx: @mut Block,
14191418
}
14201419
if m[0].pats.len() == 0u {
14211420
let data = &m[0].data;
1422-
for &(ref ident, ref value_ptr) in m[0].bound_ptrs.iter() {
1423-
let llmatch = data.bindings_map.get(ident).llmatch;
1424-
Store(bcx, *value_ptr, llmatch);
1425-
}
14261421
match data.arm.guard {
14271422
Some(guard_expr) => {
14281423
bcx = compile_guard(bcx,
@@ -1848,7 +1843,6 @@ fn trans_match_inner(scope_cx: @mut Block,
18481843
matches.push(Match {
18491844
pats: ~[*p],
18501845
data: arm_data.clone(),
1851-
bound_ptrs: ~[],
18521846
});
18531847
}
18541848
}
@@ -1881,7 +1875,7 @@ fn trans_match_inner(scope_cx: @mut Block,
18811875
}
18821876

18831877
// insert bindings into the lllocals map and add cleanups
1884-
bcx = insert_lllocals(bcx, arm_data.bindings_map, true);
1878+
bcx = insert_lllocals(bcx, arm_data.bindings_map, BindLocal, true);
18851879

18861880
bcx = controlflow::trans_block(bcx, &arm_data.arm.body, dest);
18871881
bcx = trans_block_cleanups(bcx, block_cleanups(arm_data.bodycx));

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pub fn push_ctxt(s: &'static str) -> _InsnCtxt {
133133

134134
fn fcx_has_nonzero_span(fcx: &FunctionContext) -> bool {
135135
match fcx.span {
136-
None => false,
136+
None => true,
137137
Some(span) => *span.lo != 0 || *span.hi != 0
138138
}
139139
}
@@ -1739,10 +1739,6 @@ pub fn copy_args_to_allocas(fcx: @mut FunctionContext,
17391739

17401740
fcx.llself = Some(ValSelfData {v: self_val, ..slf});
17411741
add_clean(bcx, self_val, slf.t);
1742-
1743-
if fcx.ccx.sess.opts.extra_debuginfo && fcx_has_nonzero_span(fcx) {
1744-
debuginfo::create_self_argument_metadata(bcx, slf.t, self_val);
1745-
}
17461742
}
17471743
_ => {}
17481744
}
@@ -1863,10 +1859,6 @@ pub fn trans_closure(ccx: @mut CrateContext,
18631859
set_fixed_stack_segment(fcx.llfn);
18641860
}
18651861

1866-
if ccx.sess.opts.debuginfo && fcx_has_nonzero_span(fcx) {
1867-
debuginfo::create_function_metadata(fcx);
1868-
}
1869-
18701862
// Create the first basic block in the function and keep a handle on it to
18711863
// pass to finish_fn later.
18721864
let bcx_top = fcx.entry_bcx.unwrap();
@@ -1937,7 +1929,12 @@ pub fn trans_fn(ccx: @mut CrateContext,
19371929
id,
19381930
attrs,
19391931
output_type,
1940-
|_fcx| { });
1932+
|fcx| {
1933+
if ccx.sess.opts.debuginfo
1934+
&& fcx_has_nonzero_span(fcx) {
1935+
debuginfo::create_function_metadata(fcx);
1936+
}
1937+
});
19411938
}
19421939

19431940
fn insert_synthetic_type_entries(bcx: @mut Block,

0 commit comments

Comments
 (0)