Skip to content

Commit 1e0e935

Browse files
committed
---
yaml --- r: 104621 b: refs/heads/snap-stage3 c: ff22e47 h: refs/heads/master i: 104619: 4554368 v: v3
1 parent 597622d commit 1e0e935

File tree

11 files changed

+561
-565
lines changed

11 files changed

+561
-565
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 53f3442ef7ee2852e6e59158f47ae7dbefb2f175
4+
refs/heads/snap-stage3: ff22e47c1915d6cdc545deb341c83d877a8825e6
55
refs/heads/try: db814977d07bd798feb24f6b74c00800ef458a13
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "July 2013" "rustc 0.7" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.10-pre" "User Commands"
22
.SH NAME
33
rustc \- rust compiler
44
.SH SYNOPSIS

branches/snap-stage3/man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "July 2013" "rustdoc 0.7" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.10-pre" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

branches/snap-stage3/src/librustc/middle/resolve.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ use middle::pat_util::pat_bindings;
1919

2020
use syntax::ast::*;
2121
use syntax::ast;
22-
use syntax::ast_util::{def_id_of_def, local_def, mtwt_resolve};
22+
use syntax::ast_util::{def_id_of_def, local_def};
2323
use syntax::ast_util::{path_to_ident, walk_pat, trait_method_to_ty_method};
24+
use syntax::ext::mtwt;
2425
use syntax::parse::token::special_idents;
2526
use syntax::parse::token;
2627
use syntax::print::pprust::path_to_str;
@@ -4176,7 +4177,7 @@ impl Resolver {
41764177
fn binding_mode_map(&mut self, pat: @Pat) -> BindingMap {
41774178
let mut result = HashMap::new();
41784179
pat_bindings(self.def_map, pat, |binding_mode, _id, sp, path| {
4179-
let name = mtwt_resolve(path_to_ident(path));
4180+
let name = mtwt::resolve(path_to_ident(path));
41804181
result.insert(name,
41814182
binding_info {span: sp,
41824183
binding_mode: binding_mode});
@@ -4411,7 +4412,7 @@ impl Resolver {
44114412
// what you want).
44124413

44134414
let ident = path.segments.get(0).identifier;
4414-
let renamed = mtwt_resolve(ident);
4415+
let renamed = mtwt::resolve(ident);
44154416

44164417
match self.resolve_bare_identifier_pattern(ident) {
44174418
FoundStructOrEnumVariant(def, lp)
@@ -4965,7 +4966,7 @@ impl Resolver {
49654966
let search_result;
49664967
match namespace {
49674968
ValueNS => {
4968-
let renamed = mtwt_resolve(ident);
4969+
let renamed = mtwt::resolve(ident);
49694970
let mut value_ribs = self.value_ribs.borrow_mut();
49704971
search_result = self.search_ribs(value_ribs.get(),
49714972
renamed,
@@ -5213,7 +5214,7 @@ impl Resolver {
52135214
let rib = label_ribs.get()[label_ribs.get().len() -
52145215
1];
52155216
let mut bindings = rib.bindings.borrow_mut();
5216-
let renamed = mtwt_resolve(label);
5217+
let renamed = mtwt::resolve(label);
52175218
bindings.get().insert(renamed, def_like);
52185219
}
52195220

@@ -5225,7 +5226,7 @@ impl Resolver {
52255226

52265227
ExprBreak(Some(label)) | ExprAgain(Some(label)) => {
52275228
let mut label_ribs = self.label_ribs.borrow_mut();
5228-
let renamed = mtwt_resolve(label);
5229+
let renamed = mtwt::resolve(label);
52295230
match self.search_ribs(label_ribs.get(), renamed, expr.span) {
52305231
None =>
52315232
self.resolve_error(expr.span,

branches/snap-stage3/src/libsyntax/ast.rs

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ use parse::token;
1919

2020
use std::fmt;
2121
use std::fmt::Show;
22-
use std::cell::RefCell;
23-
use collections::HashMap;
2422
use std::option::Option;
2523
use std::rc::Rc;
2624
use std::vec_ng::Vec;
@@ -42,7 +40,10 @@ pub fn P<T: 'static>(value: T) -> P<T> {
4240
// macro expansion per Flatt et al., "Macros
4341
// That Work Together"
4442
#[deriving(Clone, Hash, TotalEq, TotalOrd, Show)]
45-
pub struct Ident { name: Name, ctxt: SyntaxContext }
43+
pub struct Ident {
44+
name: Name,
45+
ctxt: SyntaxContext
46+
}
4647

4748
impl Ident {
4849
/// Construct an identifier with the given name and an empty context:
@@ -88,43 +89,9 @@ impl Eq for Ident {
8889
// this uint is a reference to a table stored in thread-local
8990
// storage.
9091
pub type SyntaxContext = u32;
91-
92-
// the SCTable contains a table of SyntaxContext_'s. It
93-
// represents a flattened tree structure, to avoid having
94-
// managed pointers everywhere (that caused an ICE).
95-
// the mark_memo and rename_memo fields are side-tables
96-
// that ensure that adding the same mark to the same context
97-
// gives you back the same context as before. This shouldn't
98-
// change the semantics--everything here is immutable--but
99-
// it should cut down on memory use *a lot*; applying a mark
100-
// to a tree containing 50 identifiers would otherwise generate
101-
pub struct SCTable {
102-
table: RefCell<Vec<SyntaxContext_> >,
103-
mark_memo: RefCell<HashMap<(SyntaxContext,Mrk),SyntaxContext>>,
104-
rename_memo: RefCell<HashMap<(SyntaxContext,Ident,Name),SyntaxContext>>,
105-
}
106-
107-
// NB: these must be placed in any SCTable...
10892
pub static EMPTY_CTXT : SyntaxContext = 0;
10993
pub static ILLEGAL_CTXT : SyntaxContext = 1;
11094

111-
#[deriving(Eq, Encodable, Decodable, Hash)]
112-
pub enum SyntaxContext_ {
113-
EmptyCtxt,
114-
Mark (Mrk,SyntaxContext),
115-
// flattening the name and syntaxcontext into the rename...
116-
// HIDDEN INVARIANTS:
117-
// 1) the first name in a Rename node
118-
// can only be a programmer-supplied name.
119-
// 2) Every Rename node with a given Name in the
120-
// "to" slot must have the same name and context
121-
// in the "from" slot. In essence, they're all
122-
// pointers to a single "rename" event node.
123-
Rename (Ident,Name,SyntaxContext),
124-
// actually, IllegalCtxt may not be necessary.
125-
IllegalCtxt
126-
}
127-
12895
/// A name is a part of an identifier, representing a string or gensym. It's
12996
/// the result of interning.
13097
pub type Name = u32;

0 commit comments

Comments
 (0)