Skip to content

Commit 0c04729

Browse files
committed
---
yaml --- r: 42206 b: refs/heads/master c: 70855f5 h: refs/heads/master v: v3
1 parent b633872 commit 0c04729

File tree

10 files changed

+24
-23
lines changed

10 files changed

+24
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9ba7114515db355ca36065d2730e3ee6c84cd6d1
2+
refs/heads/master: 70855f5a07bb17e6690c32832dec452cb211b18a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
55
refs/heads/try: 3d5418789064fdb463e872a4e651af1c628a3650

trunk/src/librustc/middle/lint.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ use core::uint;
3434
use core::vec;
3535
use std::map::{Map, HashMap};
3636
use std::map;
37-
use std::smallintmap::{Map, SmallIntMap};
38-
use std::smallintmap;
37+
use std::oldsmallintmap::{Map, SmallIntMap};
38+
use std::oldsmallintmap;
3939
use syntax::ast_util::{path_to_ident};
4040
use syntax::attr;
4141
use syntax::codemap::span;
@@ -248,7 +248,7 @@ pub type lint_settings = {
248248
};
249249

250250
pub fn mk_lint_settings() -> lint_settings {
251-
{default_settings: smallintmap::mk(),
251+
{default_settings: oldsmallintmap::mk(),
252252
settings_map: HashMap()}
253253
}
254254

@@ -273,7 +273,8 @@ pub fn get_lint_settings_level(settings: lint_settings,
273273
// This is kind of unfortunate. It should be somewhere else, or we should use
274274
// a persistent data structure...
275275
fn clone_lint_modes(modes: lint_modes) -> lint_modes {
276-
smallintmap::SmallIntMap_(@smallintmap::SmallIntMap_ { v: copy modes.v })
276+
oldsmallintmap::SmallIntMap_(@oldsmallintmap::SmallIntMap_
277+
{v: copy modes.v})
277278
}
278279

279280
type ctxt_ = {dict: lint_dict,
@@ -393,7 +394,7 @@ fn build_settings_item(i: @ast::item, &&cx: ctxt, v: visit::vt<ctxt>) {
393394

394395
pub fn build_settings_crate(sess: session::Session, crate: @ast::crate) {
395396
let cx = ctxt_({dict: get_lint_dict(),
396-
curr: smallintmap::mk(),
397+
curr: oldsmallintmap::mk(),
397398
is_default: true,
398399
sess: sess});
399400

trunk/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ use core::option::{is_none, is_some};
7676
use core::option;
7777
use core::uint;
7878
use std::map::HashMap;
79-
use std::smallintmap;
79+
use std::oldsmallintmap;
8080
use std::{map, time, list};
8181
use syntax::ast_map::{path, path_elt_to_str, path_mod, path_name};
8282
use syntax::ast_util::{def_id_of_def, local_def, path_to_ident};

trunk/src/librustc/middle/ty.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use core::to_bytes;
4242
use core::uint;
4343
use core::vec;
4444
use std::map::HashMap;
45-
use std::{map, smallintmap};
45+
use std::{map, oldsmallintmap};
4646
use syntax::ast::*;
4747
use syntax::ast_util::{is_local, local_def};
4848
use syntax::ast_util;
@@ -785,7 +785,7 @@ type type_cache = HashMap<ast::def_id, ty_param_bounds_and_ty>;
785785

786786
type constness_cache = HashMap<ast::def_id, const_eval::constness>;
787787

788-
pub type node_type_table = @smallintmap::SmallIntMap<t>;
788+
pub type node_type_table = @oldsmallintmap::SmallIntMap<t>;
789789

790790
fn mk_rcache() -> creader_cache {
791791
type val = {cnum: int, pos: uint, len: uint};
@@ -837,7 +837,7 @@ pub fn mk_ctxt(s: session::Session,
837837
def_map: dm,
838838
region_map: region_map,
839839
region_paramd_items: region_paramd_items,
840-
node_types: @smallintmap::mk(),
840+
node_types: @oldsmallintmap::mk(),
841841
node_type_substs: map::HashMap(),
842842
items: amap,
843843
intrinsic_defs: map::HashMap(),
@@ -2799,7 +2799,7 @@ pub fn br_hashmap<V:Copy>() -> HashMap<bound_region, V> {
27992799
28002800
pub fn node_id_to_type(cx: ctxt, id: ast::node_id) -> t {
28012801
//io::println(fmt!("%?/%?", id, cx.node_types.size()));
2802-
match smallintmap::find(*cx.node_types, id as uint) {
2802+
match oldsmallintmap::find(*cx.node_types, id as uint) {
28032803
Some(t) => t,
28042804
None => cx.sess.bug(
28052805
fmt!("node_id_to_type: no type for node `%s`",
@@ -3175,7 +3175,7 @@ pub fn expr_kind(tcx: ctxt,
31753175
}
31763176
31773177
ast::expr_cast(*) => {
3178-
match smallintmap::find(*tcx.node_types, expr.id as uint) {
3178+
match oldsmallintmap::find(*tcx.node_types, expr.id as uint) {
31793179
Some(t) => {
31803180
if ty::type_is_immediate(t) {
31813181
RvalueDatumExpr

trunk/src/librustc/middle/typeck/infer/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ use core::result;
281281
use core::vec;
282282
use std::list::Nil;
283283
use std::map::HashMap;
284-
use std::smallintmap;
284+
use std::oldsmallintmap;
285285
use syntax::ast::{ret_style, purity};
286286
use syntax::ast::{m_const, m_imm, m_mutbl};
287287
use syntax::ast::{unsafe_fn, impure_fn, pure_fn, extern_fn};
@@ -353,7 +353,7 @@ pub fn fixup_err_to_str(f: fixup_err) -> ~str {
353353

354354
fn new_ValsAndBindings<V:Copy, T:Copy>() -> ValsAndBindings<V, T> {
355355
ValsAndBindings {
356-
vals: smallintmap::mk(),
356+
vals: oldsmallintmap::mk(),
357357
mut bindings: ~[]
358358
}
359359
}

trunk/src/librustc/middle/typeck/infer/unify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use core::prelude::*;
1212
use core::result;
13-
use std::smallintmap::SmallIntMap;
13+
use std::oldsmallintmap::SmallIntMap;
1414

1515
use middle::ty::{Vid, expected_found, IntVarValue};
1616
use middle::ty;

trunk/src/librustc/middle/typeck/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ use std::list::{List, Nil, Cons};
6969
use std::list;
7070
use std::map::HashMap;
7171
use std::map;
72-
use std::smallintmap;
72+
use std::oldsmallintmap;
7373
use syntax::ast::{provided, required, spanned};
7474
use syntax::ast_map::node_id_to_str;
7575
use syntax::ast_util::{local_def, respan, split_trait_methods};
@@ -212,7 +212,7 @@ pub enum crate_ctxt {
212212
// Functions that write types into the node type table
213213
pub fn write_ty_to_tcx(tcx: ty::ctxt, node_id: ast::node_id, ty: ty::t) {
214214
debug!("write_ty_to_tcx(%d, %s)", node_id, ppaux::ty_to_str(tcx, ty));
215-
smallintmap::insert(*tcx.node_types, node_id as uint, ty);
215+
oldsmallintmap::insert(*tcx.node_types, node_id as uint, ty);
216216
}
217217
pub fn write_substs_to_tcx(tcx: ty::ctxt,
218218
node_id: ast::node_id,

trunk/src/libstd/smallintmap.rs renamed to trunk/src/libstd/oldsmallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl<V: Copy> SmallIntMap<V>: ops::Index<uint, V> {
172172

173173
#[cfg(test)]
174174
mod tests {
175-
use smallintmap::{mk, SmallIntMap};
175+
use super::{mk, SmallIntMap};
176176

177177
use core::option::None;
178178

trunk/src/libstd/std.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub mod list;
8282
pub mod map;
8383
pub mod priority_queue;
8484
pub mod rope;
85-
pub mod smallintmap;
85+
pub mod oldsmallintmap;
8686
pub mod sort;
8787
pub mod treemap;
8888

trunk/src/test/bench/std-smallintmap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Microbenchmark for the smallintmap library
11+
// Microbenchmark for the oldsmallintmap library
1212

1313
extern mod std;
14-
use std::smallintmap;
15-
use std::smallintmap::SmallIntMap;
14+
use std::oldsmallintmap;
15+
use std::oldsmallintmap::SmallIntMap;
1616
use io::WriterUtil;
1717

1818
fn append_sequential(min: uint, max: uint, map: SmallIntMap<uint>) {
@@ -43,7 +43,7 @@ fn main() {
4343
let mut appendf = 0.0;
4444

4545
for uint::range(0u, rep) |_r| {
46-
let map = smallintmap::mk();
46+
let map = oldsmallintmap::mk();
4747
let start = std::time::precise_time_s();
4848
append_sequential(0u, max, map);
4949
let mid = std::time::precise_time_s();

0 commit comments

Comments
 (0)