Skip to content

Commit 36292e6

Browse files
committed
---
yaml --- r: 1005 b: refs/heads/master c: a98b2eb h: refs/heads/master i: 1003: 0fb0190 v: v3
1 parent d74daec commit 36292e6

File tree

15 files changed

+106
-106
lines changed

15 files changed

+106
-106
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: 7bdb93266d3a88e407f7996d374a8364b84b8e01
2+
refs/heads/master: a98b2ebb4ad090d3d7eaa9ab3b1d98be0867e990

trunk/src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ BE_MLS := $(addprefix boot/be/, x86.ml ra.ml pe.ml elf.ml \
265265
macho.ml)
266266
IL_MLS := $(addprefix boot/be/, asm.ml il.ml abi.ml)
267267
ME_MLS := $(addprefix boot/me/, walk.ml semant.ml resolve.ml alias.ml \
268-
simplify.ml type.ml dead.ml stratum.ml effect.ml typestate.ml \
268+
simplify.ml type.ml dead.ml layer.ml effect.ml typestate.ml \
269269
loop.ml layout.ml transutil.ml trans.ml dwarf.ml)
270270
FE_MLS := $(addprefix boot/fe/, ast.ml token.ml lexer.ml parser.ml \
271271
extfmt.ml pexp.ml item.ml cexp.ml fuzz.ml)

trunk/src/boot/driver/llvm/glue.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let alt_pipeline sess sem_cx crate =
1818
Simplify.process_crate;
1919
Type.process_crate;
2020
Typestate.process_crate;
21-
Stratum.process_crate;
21+
Layer.process_crate;
2222
Effect.process_crate;
2323
Loop.process_crate;
2424
Alias.process_crate;

trunk/src/boot/driver/main.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let (sess:Session.sess) =
3838
Session.sess_log_resolve = false;
3939
Session.sess_log_type = false;
4040
Session.sess_log_simplify = false;
41-
Session.sess_log_stratum = false;
41+
Session.sess_log_layer = false;
4242
Session.sess_log_effect = false;
4343
Session.sess_log_typestate = false;
4444
Session.sess_log_loop = false;
@@ -180,8 +180,8 @@ let argspecs =
180180
"-ltype" "log type checking");
181181
(flag (fun _ -> sess.Session.sess_log_simplify <- true)
182182
"-lsimplify" "log simplification");
183-
(flag (fun _ -> sess.Session.sess_log_stratum <- true)
184-
"-lstratum" "log stratum checking");
183+
(flag (fun _ -> sess.Session.sess_log_layer <- true)
184+
"-llayer" "log layer checking");
185185
(flag (fun _ -> sess.Session.sess_log_effect <- true)
186186
"-leffect" "log effect checking");
187187
(flag (fun _ -> sess.Session.sess_log_typestate <- true)
@@ -396,7 +396,7 @@ let main_pipeline _ =
396396
Simplify.process_crate;
397397
Type.process_crate;
398398
Typestate.process_crate;
399-
Stratum.process_crate;
399+
Layer.process_crate;
400400
Effect.process_crate;
401401
Loop.process_crate;
402402
Alias.process_crate;

trunk/src/boot/driver/session.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ type sess =
2424
mutable sess_log_resolve: bool;
2525
mutable sess_log_type: bool;
2626
mutable sess_log_simplify: bool;
27-
mutable sess_log_stratum: bool;
27+
mutable sess_log_layer: bool;
2828
mutable sess_log_effect: bool;
2929
mutable sess_log_typestate: bool;
3030
mutable sess_log_dead: bool;

trunk/src/boot/fe/ast.ml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ type effect =
3434
| EFF_unsafe
3535
;;
3636

37-
type stratum =
38-
STRAT_value
39-
| STRAT_state
40-
| STRAT_gc
37+
type layer =
38+
LAYER_value
39+
| LAYER_state
40+
| LAYER_gc
4141
;;
4242

4343
type opacity =
@@ -94,7 +94,7 @@ and ty =
9494
| TY_task
9595

9696
| TY_native of opaque_id
97-
| TY_param of (ty_param_idx * stratum)
97+
| TY_param of (ty_param_idx * layer)
9898
| TY_named of name
9999
| TY_type
100100

@@ -181,7 +181,7 @@ and ty_fn = (ty_sig * ty_fn_aux)
181181

182182
and ty_obj_header = (slot array * constrs)
183183

184-
and ty_obj = (stratum * ((ident,ty_fn) Hashtbl.t))
184+
and ty_obj = (layer * ((ident,ty_fn) Hashtbl.t))
185185

186186
and check_calls = (lval * (atom array)) array
187187

@@ -434,7 +434,7 @@ and fn =
434434
and obj =
435435
{
436436
obj_state: header_slots;
437-
obj_stratum: stratum;
437+
obj_layer: layer;
438438
obj_constrs: constrs;
439439
obj_fns: (ident,fn identified) Hashtbl.t;
440440
obj_drop: block option;
@@ -449,10 +449,10 @@ and obj =
449449
* even if it's a type that's bound by a quantifier in its environment.
450450
*)
451451

452-
and ty_param = ident * (ty_param_idx * stratum)
452+
and ty_param = ident * (ty_param_idx * layer)
453453

454454
and mod_item' =
455-
MOD_ITEM_type of (stratum * ty)
455+
MOD_ITEM_type of (layer * ty)
456456
| MOD_ITEM_tag of (header_slots * opaque_id * int)
457457
| MOD_ITEM_mod of (mod_view * mod_items)
458458
| MOD_ITEM_fn of fn
@@ -723,21 +723,21 @@ and fmt_effect_qual
723723
fmt_effect ff e;
724724
if e <> EFF_pure then fmt ff " ";
725725

726-
and fmt_stratum
726+
and fmt_layer
727727
(ff:Format.formatter)
728-
(strat:stratum)
728+
(la:layer)
729729
: unit =
730-
match strat with
731-
STRAT_value -> ()
732-
| STRAT_state -> fmt ff "state"
733-
| STRAT_gc -> fmt ff "gc"
730+
match la with
731+
LAYER_value -> ()
732+
| LAYER_state -> fmt ff "state"
733+
| LAYER_gc -> fmt ff "gc"
734734

735-
and fmt_stratum_qual
735+
and fmt_layer_qual
736736
(ff:Format.formatter)
737-
(s:stratum)
737+
(s:layer)
738738
: unit =
739-
fmt_stratum ff s;
740-
if s <> STRAT_value then fmt ff " ";
739+
fmt_layer ff s;
740+
if s <> LAYER_value then fmt ff " ";
741741

742742
and fmt_opacity
743743
(ff:Format.formatter)
@@ -810,7 +810,7 @@ and fmt_ty (ff:Format.formatter) (t:ty) : unit =
810810
fmt_ident_tys ff entries;
811811
fmt ff "@]"
812812

813-
| TY_param (i, s) -> (fmt_stratum_qual ff s;
813+
| TY_param (i, s) -> (fmt_layer_qual ff s;
814814
fmt ff "<p#%d>" i)
815815
| TY_native oid -> fmt ff "<native#%d>" (int_of_opaque oid)
816816
| TY_named n -> fmt_name ff n
@@ -833,9 +833,9 @@ and fmt_ty (ff:Format.formatter) (t:ty) : unit =
833833

834834
| TY_constrained ctrd -> fmt_constrained ff ctrd
835835

836-
| TY_obj (stratum, fns) ->
836+
| TY_obj (layer, fns) ->
837837
fmt_obox ff;
838-
fmt_stratum_qual ff stratum;
838+
fmt_layer_qual ff layer;
839839
fmt ff "obj ";
840840
fmt_obr ff;
841841
Hashtbl.iter
@@ -1629,7 +1629,7 @@ and fmt_slice (ff:Format.formatter) (slice:slice) : unit =
16291629

16301630
and fmt_decl_param (ff:Format.formatter) (param:ty_param) : unit =
16311631
let (ident, (i, s)) = param in
1632-
fmt_stratum_qual ff s;
1632+
fmt_layer_qual ff s;
16331633
fmt_ident ff ident;
16341634
fmt ff "=<p#%d>" i
16351635

@@ -1683,7 +1683,7 @@ and fmt_obj
16831683
(obj:obj)
16841684
: unit =
16851685
fmt_obox ff;
1686-
fmt_stratum_qual ff obj.obj_stratum;
1686+
fmt_layer_qual ff obj.obj_layer;
16871687
fmt ff "obj ";
16881688
fmt_ident_and_params ff id params;
16891689
fmt_header_slots ff obj.obj_state;
@@ -1720,7 +1720,7 @@ and fmt_mod_item (ff:Format.formatter) (id:ident) (item:mod_item) : unit =
17201720
begin
17211721
match item.node.decl_item with
17221722
MOD_ITEM_type (s, ty) ->
1723-
fmt_stratum_qual ff s;
1723+
fmt_layer_qual ff s;
17241724
fmt ff "type ";
17251725
fmt_ident_and_params ff id params;
17261726
fmt ff " = ";

trunk/src/boot/fe/fuzz.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ let rec generate_mod_item (mis:mod_items) (cx:ctxt) : unit =
104104
match Random.int 2 with
105105
0 ->
106106
let ty = generate_ty cx in
107-
let st = Ast.STRAT_value in
107+
let st = Ast.LAYER_value in
108108
decl (MOD_ITEM_type (st, ty))
109109
| _ ->
110110
let mis' = Hashtbl.create 0 in

trunk/src/boot/fe/item.ml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array =
692692
and parse_ty_param (iref:int ref) (ps:pstate) : Ast.ty_param identified =
693693
let apos = lexpos ps in
694694
let _ = Pexp.parse_opacity ps in
695-
let s = Pexp.parse_stratum ps in
695+
let s = Pexp.parse_layer ps in
696696
let ident = Pexp.parse_ident ps in
697697
let i = !iref in
698698
let bpos = lexpos ps in
@@ -842,7 +842,7 @@ and parse_optional_meta_pat (ps:pstate) (ident:Ast.ident) : Ast.meta_pat =
842842
and parse_obj_item
843843
(ps:pstate)
844844
(apos:pos)
845-
(stratum:Ast.stratum)
845+
(layer:Ast.layer)
846846
: (Ast.ident * Ast.mod_item) =
847847
expect ps OBJ;
848848
let (ident, params) = parse_ident_and_params ps "obj" in
@@ -871,7 +871,7 @@ and parse_obj_item
871871
expect ps RBRACE;
872872
let bpos = lexpos ps in
873873
let obj = { Ast.obj_state = state;
874-
Ast.obj_stratum = stratum;
874+
Ast.obj_layer = layer;
875875
Ast.obj_constrs = constrs;
876876
Ast.obj_fns = fns;
877877
Ast.obj_drop = !drop }
@@ -883,7 +883,7 @@ and parse_obj_item
883883
and parse_tag_item
884884
(ps:pstate)
885885
(apos:pos)
886-
(stratum:Ast.stratum)
886+
(layer:Ast.layer)
887887
: (Ast.ident * Ast.mod_item) array =
888888
expect ps TAG;
889889
let (ident, params) = parse_ident_and_params ps "tag" in
@@ -945,22 +945,22 @@ and parse_tag_item
945945
let ty_item =
946946
(ident,
947947
span ps apos bpos
948-
(decl params (Ast.MOD_ITEM_type (stratum, ty))))
948+
(decl params (Ast.MOD_ITEM_type (layer, ty))))
949949
in
950950
Array.append [| ty_item |] constructors
951951

952952
and parse_type_item
953953
(ps:pstate)
954954
(apos:pos)
955-
(stratum:Ast.stratum)
955+
(layer:Ast.layer)
956956
: (Ast.ident * Ast.mod_item) =
957957
expect ps TYPE;
958958
let (ident, params) = parse_ident_and_params ps "type" in
959959
let _ = expect ps EQ in
960960
let ty = ctxt "mod type item: ty" Pexp.parse_ty ps in
961961
let _ = expect ps SEMI in
962962
let bpos = lexpos ps in
963-
let item = Ast.MOD_ITEM_type (stratum, ty) in
963+
let item = Ast.MOD_ITEM_type (layer, ty) in
964964
(ident, span ps apos bpos (decl params item))
965965

966966
and parse_mod_item (ps:pstate)
@@ -992,25 +992,25 @@ and parse_mod_item (ps:pstate)
992992
STATE | GC | IMPURE | UNSAFE | ABS
993993
| TYPE | OBJ | TAG | FN | ITER ->
994994
let _ = Pexp.parse_opacity ps in
995-
let stratum = Pexp.parse_stratum ps in
995+
let layer = Pexp.parse_layer ps in
996996
let effect = Pexp.parse_effect ps in
997997
begin
998998
match peek ps with
999999
OBJ ->
10001000
if effect <> Ast.EFF_pure
10011001
then raise (err "effect specified for obj" ps);
1002-
[| parse_obj_item ps apos stratum |]
1002+
[| parse_obj_item ps apos layer |]
10031003
| TAG ->
10041004
if effect <> Ast.EFF_pure
10051005
then raise (err "effect specified for tag" ps);
1006-
parse_tag_item ps apos stratum
1006+
parse_tag_item ps apos layer
10071007
| TYPE ->
10081008
if effect <> Ast.EFF_pure
10091009
then raise (err "effect specified for type" ps);
1010-
[| parse_type_item ps apos stratum |]
1010+
[| parse_type_item ps apos layer |]
10111011
| _ ->
1012-
if stratum <> Ast.STRAT_value
1013-
then raise (err "stratum specified for fn or iter" ps);
1012+
if layer <> Ast.LAYER_value
1013+
then raise (err "layer specified for fn or iter" ps);
10141014
let is_iter = (peek ps) = ITER in
10151015
bump ps;
10161016
let (ident, params) = parse_ident_and_params ps "fn" in
@@ -1159,7 +1159,7 @@ and parse_native_mod_item_from_signature (ps:pstate)
11591159
expect ps SEMI;
11601160
let bpos = lexpos ps in
11611161
[| (ident, span ps apos bpos
1162-
(decl params (Ast.MOD_ITEM_type (Ast.STRAT_value, t)))) |]
1162+
(decl params (Ast.MOD_ITEM_type (Ast.LAYER_value, t)))) |]
11631163

11641164
| _ -> raise (unexpected ps)
11651165

trunk/src/boot/fe/pexp.ml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ and parse_opacity (ps:pstate) : Ast.opacity =
145145
ABS -> bump ps; Ast.OPA_abstract
146146
| _ -> Ast.OPA_transparent
147147

148-
and parse_stratum (ps:pstate) : Ast.stratum =
148+
and parse_layer (ps:pstate) : Ast.layer =
149149
match peek ps with
150-
STATE -> bump ps; Ast.STRAT_state
151-
| GC -> bump ps; Ast.STRAT_gc
152-
| _ -> Ast.STRAT_value
150+
STATE -> bump ps; Ast.LAYER_state
151+
| GC -> bump ps; Ast.LAYER_gc
152+
| _ -> Ast.LAYER_value
153153

154154
and parse_effect (ps:pstate) : Ast.effect =
155155
match peek ps with
@@ -274,7 +274,7 @@ and parse_atomic_ty (ps:pstate) : Ast.ty =
274274
Ast.TY_mach m
275275

276276
| STATE | GC | IMPURE | UNSAFE | OBJ | FN | ITER ->
277-
let stratum = parse_stratum ps in
277+
let layer = parse_layer ps in
278278
let effect = parse_effect ps in
279279
begin
280280
match peek ps with
@@ -295,11 +295,11 @@ and parse_atomic_ty (ps:pstate) : Ast.ty =
295295
in
296296
ignore (bracketed_zero_or_more LBRACE RBRACE
297297
None parse_method ps);
298-
Ast.TY_obj (stratum, methods)
298+
Ast.TY_obj (layer, methods)
299299

300300
| FN | ITER ->
301-
if stratum <> Ast.STRAT_value
302-
then raise (err "stratum specified for fn or iter" ps);
301+
if layer <> Ast.LAYER_value
302+
then raise (err "layer specified for fn or iter" ps);
303303
Ast.TY_fn (fst (parse_ty_fn effect ps))
304304
| _ -> raise (unexpected ps)
305305
end

trunk/src/boot/fe/token.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type token =
8383
(* Opacity keywords *)
8484
| ABS
8585

86-
(* Stratum keywords *)
86+
(* Layer keywords *)
8787
| STATE
8888
| GC
8989

@@ -246,7 +246,7 @@ let rec string_of_tok t =
246246
(* Opacity keywords *)
247247
| ABS -> "abs"
248248

249-
(* Stratum keywords *)
249+
(* Layer keywords *)
250250
| STATE -> "state"
251251
| GC -> "gc"
252252

0 commit comments

Comments
 (0)