aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-20 20:19:22 -0700
committerGraydon Hoare <[email protected]>2010-09-20 20:19:22 -0700
commitc17964c06d24300e5f9073f0b7ab4ffaffd78a89 (patch)
tree7996174fc01f36e5434dd57c68b323c7806025bf /src/boot/me
parentAdd issue #163 testcase to str-append testcase. (diff)
downloadrust-c17964c06d24300e5f9073f0b7ab4ffaffd78a89.tar.xz
rust-c17964c06d24300e5f9073f0b7ab4ffaffd78a89.zip
Use name_base in plval base.
Diffstat (limited to 'src/boot/me')
-rw-r--r--src/boot/me/resolve.ml10
-rw-r--r--src/boot/me/semant.ml9
-rw-r--r--src/boot/me/walk.ml4
3 files changed, 10 insertions, 13 deletions
diff --git a/src/boot/me/resolve.ml b/src/boot/me/resolve.ml
index 3c355c1c..cb40dfc9 100644
--- a/src/boot/me/resolve.ml
+++ b/src/boot/me/resolve.ml
@@ -492,9 +492,9 @@ let type_resolving_visitor
inner.Walk.visit_pexp_post p;
let rebuild_plval pl =
match pl with
- Ast.PLVAL_ident _ -> pl
- | Ast.PLVAL_app (id, tys) ->
- Ast.PLVAL_app (id, Array.map resolve_ty tys)
+ Ast.PLVAL_base (Ast.BASE_app (id, tys)) ->
+ Ast.PLVAL_base (Ast.BASE_app (id, Array.map resolve_ty tys))
+ | Ast.PLVAL_base _ -> pl
| Ast.PLVAL_ext_name (pexp, nc) ->
let pexp = get_rebuilt_pexp pexp in
let nc =
@@ -668,8 +668,8 @@ let lval_base_resolving_visitor
Ast.PEXP_lval pl ->
begin
match pl with
- (Ast.PLVAL_ident ident)
- | (Ast.PLVAL_app (ident, _)) ->
+ (Ast.PLVAL_base (Ast.BASE_ident ident))
+ | (Ast.PLVAL_base (Ast.BASE_app (ident, _))) ->
let id = lookup_defn_by_ident p.id ident in
iflog cx
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml
index 01457454..0d350bc5 100644
--- a/src/boot/me/semant.ml
+++ b/src/boot/me/semant.ml
@@ -579,10 +579,8 @@ let rec lval_to_name (lv:Ast.lval) : Ast.name =
let rec plval_to_name (pl:Ast.plval) : Ast.name =
match pl with
- Ast.PLVAL_ident ident ->
- Ast.NAME_base (Ast.BASE_ident ident)
- | Ast.PLVAL_app (ident, tys) ->
- Ast.NAME_base (Ast.BASE_app (ident, tys))
+ Ast.PLVAL_base nb ->
+ Ast.NAME_base nb
| Ast.PLVAL_ext_name ({node = Ast.PEXP_lval pl}, nc) ->
Ast.NAME_ext (plval_to_name pl, nc)
| _ -> bug () "plval_to_name with plval that contains non-name components"
@@ -1431,8 +1429,7 @@ let rec pexp_is_const (cx:ctxt) (pexp:Ast.pexp) : bool =
and plval_is_const (cx:ctxt) (plval:Ast.plval) : bool =
match plval with
- Ast.PLVAL_ident _
- | Ast.PLVAL_app _ ->
+ Ast.PLVAL_base _ ->
bug () "Semant.plval_is_const on plval base"
| Ast.PLVAL_ext_name (pexp, _) ->
diff --git a/src/boot/me/walk.ml b/src/boot/me/walk.ml
index 73bb3dff..eb469dfb 100644
--- a/src/boot/me/walk.ml
+++ b/src/boot/me/walk.ml
@@ -631,9 +631,9 @@ and walk_plval
: unit =
let children _ =
match p with
- Ast.PLVAL_ident _ -> ()
- | Ast.PLVAL_app (_, tys) ->
+ | Ast.PLVAL_base (Ast.BASE_app (_, tys)) ->
Array.iter (walk_ty v) tys
+ | Ast.PLVAL_base _ -> ()
| Ast.PLVAL_ext_name (pexp, _) ->
walk_pexp v pexp
| Ast.PLVAL_ext_pexp (a, b) ->