Skip to content

Commit 56cb53b

Browse files
committed
---
yaml --- r: 2550 b: refs/heads/master c: 8eaafda h: refs/heads/master v: v3
1 parent 7744591 commit 56cb53b

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: f33d490032cbfdfcf870fb86f192261c6e6628f2
2+
refs/heads/master: 8eaafdaa2d39e7f28885e527aa125759fd146d51

trunk/src/comp/middle/ty.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type ctxt = rec(@type_store ts,
5858
resolve::def_map def_map,
5959
creader_cache rcache,
6060
hashmap[t,str] short_names_cache);
61-
type ty_ctxt = ctxt; // Needed for disambiguation from Unify::ctxt.
61+
type ty_ctxt = ctxt; // Needed for disambiguation from unify::ctxt.
6262

6363
// Convert from method type to function type. Pretty easy; we just drop
6464
// 'ident'.
@@ -115,8 +115,8 @@ tag sty {
115115

116116
type unify_handler = obj {
117117
fn resolve_local(ast::def_id id) -> option::t[t];
118-
fn record_local(ast::def_id id, t ty); // TODO: -> Unify::result
119-
fn record_param(uint index, t binding) -> Unify::result;
118+
fn record_local(ast::def_id id, t ty); // TODO: -> unify::result
119+
fn record_param(uint index, t binding) -> unify::result;
120120
};
121121

122122
tag type_err {
@@ -1809,7 +1809,7 @@ fn is_lval(&@ast::expr expr) -> bool {
18091809
//
18101810
// http://www.cs.man.ac.uk/~hoderk/ubench/unification_full.pdf
18111811

1812-
mod Unify {
1812+
mod unify {
18131813
tag result {
18141814
ures_ok(t);
18151815
ures_err(type_err, t, t);

trunk/src/comp/middle/typeck.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ import middle::ty::type_is_integral;
3333
import middle::ty::type_is_scalar;
3434
import middle::ty::ty_param_count_and_ty;
3535
import middle::ty::ty_nil;
36-
import middle::ty::Unify::ures_ok;
37-
import middle::ty::Unify::ures_err;
36+
import middle::ty::unify::ures_ok;
37+
import middle::ty::unify::ures_err;
3838

3939
import std::_str;
4040
import std::_uint;
@@ -59,7 +59,7 @@ type ty_item_table = hashmap[ast::def_id,any_item];
5959
type fn_purity_table = hashmap[ast::def_id, ast::purity];
6060

6161
type unify_cache_entry = tup(ty::t,ty::t,vec[mutable ty::t]);
62-
type unify_cache = hashmap[unify_cache_entry,ty::Unify::result];
62+
type unify_cache = hashmap[unify_cache_entry,ty::unify::result];
6363

6464
type crate_ctxt = rec(session::session sess,
6565
ty::type_cache type_cache,
@@ -917,9 +917,9 @@ mod collect {
917917

918918
// Type unification
919919

920-
mod Unify {
920+
mod unify {
921921
fn simple(&@fn_ctxt fcx, &ty::t expected,
922-
&ty::t actual) -> ty::Unify::result {
922+
&ty::t actual) -> ty::unify::result {
923923
// FIXME: horrid botch
924924
let vec[mutable ty::t] param_substs =
925925
vec(mutable ty::mk_nil(fcx.ccx.tcx));
@@ -928,14 +928,14 @@ mod Unify {
928928
}
929929

930930
fn with_params(&@fn_ctxt fcx, &ty::t expected, &ty::t actual,
931-
&vec[mutable ty::t] param_substs) -> ty::Unify::result {
931+
&vec[mutable ty::t] param_substs) -> ty::unify::result {
932932
auto cache_key = tup(expected, actual, param_substs);
933933
alt (fcx.ccx.unify_cache.find(cache_key)) {
934-
case (some[ty::Unify::result](?r)) {
934+
case (some[ty::unify::result](?r)) {
935935
fcx.ccx.cache_hits += 1u;
936936
ret r;
937937
}
938-
case (none[ty::Unify::result]) {
938+
case (none[ty::unify::result]) {
939939
fcx.ccx.cache_misses += 1u;
940940
}
941941
}
@@ -979,7 +979,7 @@ mod Unify {
979979
unified_type);
980980
fcx.locals.insert(id, unified_type);
981981
}
982-
fn record_param(uint index, ty::t binding) -> ty::Unify::result {
982+
fn record_param(uint index, ty::t binding) -> ty::unify::result {
983983
// Unify with the appropriate type in the parameter
984984
// substitution list:
985985
auto old_subst = param_substs.(index);
@@ -998,7 +998,7 @@ mod Unify {
998998

999999

10001000
auto handler = unify_handler(fcx, param_substs);
1001-
auto result = ty::Unify::unify(expected, actual, handler,
1001+
auto result = ty::unify::unify(expected, actual, handler,
10021002
fcx.ccx.tcx);
10031003
fcx.ccx.unify_cache.insert(cache_key, result);
10041004
ret result;
@@ -1087,7 +1087,7 @@ mod Demand {
10871087
ty_param_substs += vec(mutable ty_param_subst);
10881088
}
10891089

1090-
alt (Unify::with_params(fcx, expected_1, actual_1, ty_param_substs)) {
1090+
alt (unify::with_params(fcx, expected_1, actual_1, ty_param_substs)) {
10911091
case (ures_ok(?t)) {
10921092
// TODO: Use "freeze", when we have it.
10931093
let vec[ty::t] result_ty_param_substs = vec();
@@ -1116,7 +1116,7 @@ mod Demand {
11161116

11171117
// Returns true if the two types unify and false if they don't.
11181118
fn are_compatible(&@fn_ctxt fcx, &ty::t expected, &ty::t actual) -> bool {
1119-
alt (Unify::simple(fcx, expected, actual)) {
1119+
alt (unify::simple(fcx, expected, actual)) {
11201120
case (ures_ok(_)) { ret true; }
11211121
case (ures_err(_, _, _)) { ret false; }
11221122
}
@@ -3302,7 +3302,7 @@ fn check_crate(&ty::ctxt tcx, &@ast::crate crate) -> typecheck_result {
33023302
auto hasher = hash_unify_cache_entry;
33033303
auto eqer = eq_unify_cache_entry;
33043304
auto unify_cache =
3305-
map::mk_hashmap[unify_cache_entry,ty::Unify::result](hasher, eqer);
3305+
map::mk_hashmap[unify_cache_entry,ty::unify::result](hasher, eqer);
33063306
auto fpt = mk_fn_purity_table(crate); // use a variation on collect
33073307
let node_type_table node_types = result._3;
33083308

0 commit comments

Comments
 (0)