Skip to content

Commit dbe0545

Browse files
committed
---
yaml --- r: 147592 b: refs/heads/try2 c: 43aee50 h: refs/heads/master v: v3
1 parent 8ec8032 commit dbe0545

File tree

7 files changed

+30
-29
lines changed

7 files changed

+30
-29
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: 79d97ca4aad2add186526d7f5b5d87a473fa3f4a
8+
refs/heads/try2: 43aee50798d78a2e33410fcac462ded792c4c7b7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ pub fn build_session_(sopts: @session::options,
854854
let target_cfg = build_target_config(sopts, demitter);
855855
let p_s = parse::new_parse_sess_special_handler(span_diagnostic_handler,
856856
cm);
857-
let cstore = @mut CStore::new(token::get_ident_interner());
857+
let cstore = @CStore::new(token::get_ident_interner());
858858
let filesearch = filesearch::mk_filesearch(
859859
&sopts.maybe_sysroot,
860860
sopts.target_triple,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub enum OutputStyle {
201201
pub struct Session_ {
202202
targ_cfg: @config,
203203
opts: @options,
204-
cstore: @mut metadata::cstore::CStore,
204+
cstore: @metadata::cstore::CStore,
205205
parse_sess: @mut ParseSess,
206206
codemap: @codemap::CodeMap,
207207
// For a library crate, this is always none

branches/try2/src/librustc/metadata/csearch.rs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@ pub struct StaticMethodInfo {
3030
vis: ast::visibility,
3131
}
3232

33-
pub fn get_symbol(cstore: @mut cstore::CStore, def: ast::DefId) -> ~str {
33+
pub fn get_symbol(cstore: @cstore::CStore, def: ast::DefId) -> ~str {
3434
let cdata = cstore.get_crate_data(def.crate).data();
3535
return decoder::get_symbol(cdata, def.node);
3636
}
3737

38-
pub fn get_type_param_count(cstore: @mut cstore::CStore, def: ast::DefId)
38+
pub fn get_type_param_count(cstore: @cstore::CStore, def: ast::DefId)
3939
-> uint {
4040
let cdata = cstore.get_crate_data(def.crate).data();
4141
return decoder::get_type_param_count(cdata, def.node);
4242
}
4343

4444
/// Iterates over all the language items in the given crate.
45-
pub fn each_lang_item(cstore: @mut cstore::CStore,
45+
pub fn each_lang_item(cstore: @cstore::CStore,
4646
cnum: ast::CrateNum,
4747
f: |ast::NodeId, uint| -> bool)
4848
-> bool {
@@ -51,7 +51,7 @@ pub fn each_lang_item(cstore: @mut cstore::CStore,
5151
}
5252

5353
/// Iterates over each child of the given item.
54-
pub fn each_child_of_item(cstore: @mut cstore::CStore,
54+
pub fn each_child_of_item(cstore: @cstore::CStore,
5555
def_id: ast::DefId,
5656
callback: |decoder::DefLike,
5757
ast::Ident,
@@ -68,7 +68,7 @@ pub fn each_child_of_item(cstore: @mut cstore::CStore,
6868
}
6969

7070
/// Iterates over each top-level crate item.
71-
pub fn each_top_level_item_of_crate(cstore: @mut cstore::CStore,
71+
pub fn each_top_level_item_of_crate(cstore: @cstore::CStore,
7272
cnum: ast::CrateNum,
7373
callback: |decoder::DefLike,
7474
ast::Ident,
@@ -131,21 +131,21 @@ pub fn get_method(tcx: ty::ctxt, def: ast::DefId) -> ty::Method {
131131
decoder::get_method(tcx.cstore.intr, cdata, def.node, tcx)
132132
}
133133

134-
pub fn get_method_name_and_explicit_self(cstore: @mut cstore::CStore,
134+
pub fn get_method_name_and_explicit_self(cstore: @cstore::CStore,
135135
def: ast::DefId)
136136
-> (ast::Ident, ast::explicit_self_)
137137
{
138138
let cdata = cstore.get_crate_data(def.crate);
139139
decoder::get_method_name_and_explicit_self(cstore.intr, cdata, def.node)
140140
}
141141

142-
pub fn get_trait_method_def_ids(cstore: @mut cstore::CStore,
142+
pub fn get_trait_method_def_ids(cstore: @cstore::CStore,
143143
def: ast::DefId) -> ~[ast::DefId] {
144144
let cdata = cstore.get_crate_data(def.crate);
145145
decoder::get_trait_method_def_ids(cdata, def.node)
146146
}
147147

148-
pub fn get_item_variances(cstore: @mut cstore::CStore,
148+
pub fn get_item_variances(cstore: @cstore::CStore,
149149
def: ast::DefId) -> ty::ItemVariances {
150150
let cdata = cstore.get_crate_data(def.crate);
151151
decoder::get_item_variances(cdata, def.node)
@@ -165,27 +165,27 @@ pub fn get_supertraits(tcx: ty::ctxt, def: ast::DefId) -> ~[@ty::TraitRef] {
165165
decoder::get_supertraits(cdata, def.node, tcx)
166166
}
167167

168-
pub fn get_type_name_if_impl(cstore: @mut cstore::CStore, def: ast::DefId)
168+
pub fn get_type_name_if_impl(cstore: @cstore::CStore, def: ast::DefId)
169169
-> Option<ast::Ident> {
170170
let cdata = cstore.get_crate_data(def.crate);
171171
decoder::get_type_name_if_impl(cdata, def.node)
172172
}
173173

174-
pub fn get_static_methods_if_impl(cstore: @mut cstore::CStore,
174+
pub fn get_static_methods_if_impl(cstore: @cstore::CStore,
175175
def: ast::DefId)
176176
-> Option<~[StaticMethodInfo]> {
177177
let cdata = cstore.get_crate_data(def.crate);
178178
decoder::get_static_methods_if_impl(cstore.intr, cdata, def.node)
179179
}
180180

181-
pub fn get_item_attrs(cstore: @mut cstore::CStore,
181+
pub fn get_item_attrs(cstore: @cstore::CStore,
182182
def_id: ast::DefId,
183183
f: |~[@ast::MetaItem]|) {
184184
let cdata = cstore.get_crate_data(def_id.crate);
185185
decoder::get_item_attrs(cdata, def_id.node, f)
186186
}
187187

188-
pub fn get_struct_fields(cstore: @mut cstore::CStore,
188+
pub fn get_struct_fields(cstore: @cstore::CStore,
189189
def: ast::DefId)
190190
-> ~[ty::field_ty] {
191191
let cdata = cstore.get_crate_data(def.crate);
@@ -247,43 +247,43 @@ pub fn get_impl_vtables(tcx: ty::ctxt,
247247
decoder::get_impl_vtables(cdata, def.node, tcx)
248248
}
249249

250-
pub fn get_impl_method(cstore: @mut cstore::CStore,
250+
pub fn get_impl_method(cstore: @cstore::CStore,
251251
def: ast::DefId,
252252
mname: ast::Ident)
253253
-> Option<ast::DefId> {
254254
let cdata = cstore.get_crate_data(def.crate);
255255
decoder::get_impl_method(cstore.intr, cdata, def.node, mname)
256256
}
257257

258-
pub fn get_item_visibility(cstore: @mut cstore::CStore,
258+
pub fn get_item_visibility(cstore: @cstore::CStore,
259259
def_id: ast::DefId)
260260
-> ast::visibility {
261261
let cdata = cstore.get_crate_data(def_id.crate);
262262
decoder::get_item_visibility(cdata, def_id.node)
263263
}
264264

265-
pub fn get_native_libraries(cstore: @mut cstore::CStore,
265+
pub fn get_native_libraries(cstore: @cstore::CStore,
266266
crate_num: ast::CrateNum)
267267
-> ~[(cstore::NativeLibaryKind, ~str)] {
268268
let cdata = cstore.get_crate_data(crate_num);
269269
decoder::get_native_libraries(cdata)
270270
}
271271

272-
pub fn each_impl(cstore: @mut cstore::CStore,
272+
pub fn each_impl(cstore: @cstore::CStore,
273273
crate_num: ast::CrateNum,
274274
callback: |ast::DefId|) {
275275
let cdata = cstore.get_crate_data(crate_num);
276276
decoder::each_impl(cdata, callback)
277277
}
278278

279-
pub fn each_implementation_for_type(cstore: @mut cstore::CStore,
279+
pub fn each_implementation_for_type(cstore: @cstore::CStore,
280280
def_id: ast::DefId,
281281
callback: |ast::DefId|) {
282282
let cdata = cstore.get_crate_data(def_id.crate);
283283
decoder::each_implementation_for_type(cdata, def_id.node, callback)
284284
}
285285

286-
pub fn each_implementation_for_trait(cstore: @mut cstore::CStore,
286+
pub fn each_implementation_for_trait(cstore: @cstore::CStore,
287287
def_id: ast::DefId,
288288
callback: |ast::DefId|) {
289289
let cdata = cstore.get_crate_data(def_id.crate);
@@ -293,7 +293,7 @@ pub fn each_implementation_for_trait(cstore: @mut cstore::CStore,
293293
/// If the given def ID describes a method belonging to a trait (either a
294294
/// default method or an implementation of a trait method), returns the ID of
295295
/// the trait that the method belongs to. Otherwise, returns `None`.
296-
pub fn get_trait_of_method(cstore: @mut cstore::CStore,
296+
pub fn get_trait_of_method(cstore: @cstore::CStore,
297297
def_id: ast::DefId,
298298
tcx: ty::ctxt)
299299
-> Option<ast::DefId> {

branches/try2/src/librustc/metadata/cstore.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl CStore {
9999
decoder::get_crate_vers(cdata.data())
100100
}
101101

102-
pub fn set_crate_data(&mut self, cnum: ast::CrateNum, data: @crate_metadata) {
102+
pub fn set_crate_data(&self, cnum: ast::CrateNum, data: @crate_metadata) {
103103
let mut metas = self.metas.borrow_mut();
104104
metas.get().insert(cnum, data);
105105
}
@@ -116,7 +116,7 @@ impl CStore {
116116
}
117117
}
118118

119-
pub fn add_used_crate_source(&mut self, src: CrateSource) {
119+
pub fn add_used_crate_source(&self, src: CrateSource) {
120120
let mut used_crate_sources = self.used_crate_sources.borrow_mut();
121121
if !used_crate_sources.get().contains(&src) {
122122
used_crate_sources.get().push(src);
@@ -135,7 +135,8 @@ impl CStore {
135135
.collect()
136136
}
137137

138-
pub fn add_used_library(&mut self, lib: ~str, kind: NativeLibaryKind) -> bool {
138+
pub fn add_used_library(&self, lib: ~str, kind: NativeLibaryKind)
139+
-> bool {
139140
assert!(!lib.is_empty());
140141
let mut used_libraries = self.used_libraries.borrow_mut();
141142
if used_libraries.get().iter().any(|&(ref x, _)| x == &lib) {
@@ -150,7 +151,7 @@ impl CStore {
150151
&self.used_libraries
151152
}
152153

153-
pub fn add_used_link_args(&mut self, args: &str) {
154+
pub fn add_used_link_args(&self, args: &str) {
154155
let mut used_link_args = self.used_link_args.borrow_mut();
155156
for s in args.split(' ') {
156157
used_link_args.get().push(s.to_owned());
@@ -161,7 +162,7 @@ impl CStore {
161162
&self.used_link_args
162163
}
163164

164-
pub fn add_extern_mod_stmt_cnum(&mut self,
165+
pub fn add_extern_mod_stmt_cnum(&self,
165166
emod_id: ast::NodeId,
166167
cnum: ast::CrateNum) {
167168
let mut extern_mod_crate_map = self.extern_mod_crate_map.borrow_mut();

branches/try2/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ pub struct EncodeParams<'a> {
6363
item_symbols: &'a RefCell<HashMap<ast::NodeId, ~str>>,
6464
non_inlineable_statics: &'a RefCell<HashSet<ast::NodeId>>,
6565
link_meta: &'a LinkMeta,
66-
cstore: @mut cstore::CStore,
66+
cstore: @cstore::CStore,
6767
encode_inlined_item: encode_inlined_item<'a>,
6868
reachable: @mut HashSet<ast::NodeId>,
6969
}

branches/try2/src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ struct ctxt_ {
266266
diag: @mut syntax::diagnostic::span_handler,
267267
interner: RefCell<HashMap<intern_key, ~t_box_>>,
268268
next_id: @mut uint,
269-
cstore: @mut metadata::cstore::CStore,
269+
cstore: @metadata::cstore::CStore,
270270
sess: session::Session,
271271
def_map: resolve::DefMap,
272272

0 commit comments

Comments
 (0)