Remove half-baked 'opacity' layer qualifier.
This commit is contained in:
parent
b7d680b57d
commit
3d9cf15d0b
11 changed files with 4 additions and 69 deletions
|
@ -678,7 +678,6 @@ The keywords are:
|
||||||
@tab @code{auto}
|
@tab @code{auto}
|
||||||
@item @code{state}
|
@item @code{state}
|
||||||
@tab @code{gc}
|
@tab @code{gc}
|
||||||
@tab @code{abs}
|
|
||||||
@tab @code{const}
|
@tab @code{const}
|
||||||
@tab @code{thread}
|
@tab @code{thread}
|
||||||
@item @code{auth}
|
@item @code{auth}
|
||||||
|
|
|
@ -37,11 +37,6 @@ type layer =
|
||||||
| LAYER_gc
|
| LAYER_gc
|
||||||
;;
|
;;
|
||||||
|
|
||||||
type opacity =
|
|
||||||
OPA_transparent
|
|
||||||
| OPA_abstract
|
|
||||||
;;
|
|
||||||
|
|
||||||
type mutability =
|
type mutability =
|
||||||
MUT_mutable
|
MUT_mutable
|
||||||
| MUT_immutable
|
| MUT_immutable
|
||||||
|
@ -720,22 +715,6 @@ and fmt_layer_qual
|
||||||
fmt_layer ff s;
|
fmt_layer ff s;
|
||||||
if s <> LAYER_value then fmt ff " ";
|
if s <> LAYER_value then fmt ff " ";
|
||||||
|
|
||||||
and fmt_opacity
|
|
||||||
(ff:Format.formatter)
|
|
||||||
(opa:opacity)
|
|
||||||
: unit =
|
|
||||||
match opa with
|
|
||||||
OPA_transparent -> ()
|
|
||||||
| OPA_abstract -> fmt ff "abs"
|
|
||||||
|
|
||||||
and fmt_opacity_qual
|
|
||||||
(ff:Format.formatter)
|
|
||||||
(op:opacity)
|
|
||||||
: unit =
|
|
||||||
fmt_opacity ff op;
|
|
||||||
if op <> OPA_transparent then fmt ff " ";
|
|
||||||
|
|
||||||
|
|
||||||
and fmt_ty_fn
|
and fmt_ty_fn
|
||||||
(ff:Format.formatter)
|
(ff:Format.formatter)
|
||||||
(ident_and_params:(ident * ty_param array) option)
|
(ident_and_params:(ident * ty_param array) option)
|
||||||
|
|
|
@ -609,8 +609,7 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array =
|
||||||
spans ps stmts apos (Ast.STMT_join lval)
|
spans ps stmts apos (Ast.STMT_join lval)
|
||||||
|
|
||||||
|
|
||||||
| STATE | GC
|
| STATE | GC | NATIVE
|
||||||
| ABS | NATIVE
|
|
||||||
| MOD | OBJ | TAG | TYPE | FN | USE ->
|
| MOD | OBJ | TAG | TYPE | FN | USE ->
|
||||||
let items = ctxt "stmt: decl" parse_mod_item ps in
|
let items = ctxt "stmt: decl" parse_mod_item ps in
|
||||||
let bpos = lexpos ps in
|
let bpos = lexpos ps in
|
||||||
|
@ -695,7 +694,6 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array =
|
||||||
|
|
||||||
and parse_ty_param (iref:int ref) (ps:pstate) : Ast.ty_param identified =
|
and parse_ty_param (iref:int ref) (ps:pstate) : Ast.ty_param identified =
|
||||||
let apos = lexpos ps in
|
let apos = lexpos ps in
|
||||||
let _ = Pexp.parse_opacity ps in
|
|
||||||
let s = Pexp.parse_layer ps in
|
let s = Pexp.parse_layer ps in
|
||||||
let ident = Pexp.parse_ident ps in
|
let ident = Pexp.parse_ident ps in
|
||||||
let i = !iref in
|
let i = !iref in
|
||||||
|
@ -990,9 +988,8 @@ and parse_mod_item (ps:pstate)
|
||||||
|
|
||||||
match peek ps with
|
match peek ps with
|
||||||
|
|
||||||
STATE | GC | ABS
|
STATE | GC
|
||||||
| TYPE | OBJ | TAG | FN | ITER ->
|
| TYPE | OBJ | TAG | FN | ITER ->
|
||||||
let _ = Pexp.parse_opacity ps in
|
|
||||||
let layer = Pexp.parse_layer ps in
|
let layer = Pexp.parse_layer ps in
|
||||||
begin
|
begin
|
||||||
match peek ps with
|
match peek ps with
|
||||||
|
|
|
@ -95,8 +95,6 @@
|
||||||
("claim", CLAIM);
|
("claim", CLAIM);
|
||||||
("prove", PROVE);
|
("prove", PROVE);
|
||||||
|
|
||||||
("abs", ABS);
|
|
||||||
|
|
||||||
("state", STATE);
|
("state", STATE);
|
||||||
("gc", GC);
|
("gc", GC);
|
||||||
|
|
||||||
|
|
|
@ -140,11 +140,6 @@ and parse_optional_trailing_constrs (ps:pstate) : Ast.constrs =
|
||||||
COLON -> (bump ps; parse_constrs ps)
|
COLON -> (bump ps; parse_constrs ps)
|
||||||
| _ -> [| |]
|
| _ -> [| |]
|
||||||
|
|
||||||
and parse_opacity (ps:pstate) : Ast.opacity =
|
|
||||||
match peek ps with
|
|
||||||
ABS -> bump ps; Ast.OPA_abstract
|
|
||||||
| _ -> Ast.OPA_transparent
|
|
||||||
|
|
||||||
and parse_layer (ps:pstate) : Ast.layer =
|
and parse_layer (ps:pstate) : Ast.layer =
|
||||||
match peek ps with
|
match peek ps with
|
||||||
STATE -> bump ps; Ast.LAYER_state
|
STATE -> bump ps; Ast.LAYER_state
|
||||||
|
|
|
@ -80,9 +80,6 @@ type token =
|
||||||
| CLAIM
|
| CLAIM
|
||||||
| PROVE
|
| PROVE
|
||||||
|
|
||||||
(* Opacity keywords *)
|
|
||||||
| ABS
|
|
||||||
|
|
||||||
(* Layer keywords *)
|
(* Layer keywords *)
|
||||||
| STATE
|
| STATE
|
||||||
| GC
|
| GC
|
||||||
|
@ -243,9 +240,6 @@ let rec string_of_tok t =
|
||||||
| CLAIM -> "claim"
|
| CLAIM -> "claim"
|
||||||
| PROVE -> "prove"
|
| PROVE -> "prove"
|
||||||
|
|
||||||
(* Opacity keywords *)
|
|
||||||
| ABS -> "abs"
|
|
||||||
|
|
||||||
(* Layer keywords *)
|
(* Layer keywords *)
|
||||||
| STATE -> "state"
|
| STATE -> "state"
|
||||||
| GC -> "gc"
|
| GC -> "gc"
|
||||||
|
|
|
@ -119,11 +119,6 @@ tag mutability {
|
||||||
maybe_mut;
|
maybe_mut;
|
||||||
}
|
}
|
||||||
|
|
||||||
tag opacity {
|
|
||||||
op_abstract;
|
|
||||||
op_transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
tag layer {
|
tag layer {
|
||||||
layer_value;
|
layer_value;
|
||||||
layer_state;
|
layer_state;
|
||||||
|
|
|
@ -130,8 +130,6 @@ fn keyword_table() -> std.map.hashmap[str, token.token] {
|
||||||
keywords.insert("claim", token.CLAIM);
|
keywords.insert("claim", token.CLAIM);
|
||||||
keywords.insert("prove", token.PROVE);
|
keywords.insert("prove", token.PROVE);
|
||||||
|
|
||||||
keywords.insert("abs", token.ABS);
|
|
||||||
|
|
||||||
keywords.insert("state", token.STATE);
|
keywords.insert("state", token.STATE);
|
||||||
keywords.insert("gc", token.GC);
|
keywords.insert("gc", token.GC);
|
||||||
|
|
||||||
|
|
|
@ -1951,7 +1951,6 @@ fn parse_item_native_fn(parser p) -> @ast.native_item {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_native_item(parser p) -> @ast.native_item {
|
fn parse_native_item(parser p) -> @ast.native_item {
|
||||||
let ast.opacity opa = parse_opacity(p);
|
|
||||||
let ast.layer lyr = parse_layer(p);
|
let ast.layer lyr = parse_layer(p);
|
||||||
alt (p.peek()) {
|
alt (p.peek()) {
|
||||||
case (token.TYPE) {
|
case (token.TYPE) {
|
||||||
|
@ -2106,18 +2105,6 @@ fn parse_item_tag(parser p) -> @ast.item {
|
||||||
ret @spanned(lo, hi, item);
|
ret @spanned(lo, hi, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_opacity(parser p) -> ast.opacity {
|
|
||||||
alt (p.peek()) {
|
|
||||||
case (token.ABS) {
|
|
||||||
p.bump();
|
|
||||||
ret ast.op_abstract;
|
|
||||||
}
|
|
||||||
case (_) {
|
|
||||||
ret ast.op_transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
fn parse_layer(parser p) -> ast.layer {
|
fn parse_layer(parser p) -> ast.layer {
|
||||||
alt (p.peek()) {
|
alt (p.peek()) {
|
||||||
|
@ -2167,7 +2154,6 @@ fn peeking_at_item(parser p) -> bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_item(parser p) -> @ast.item {
|
fn parse_item(parser p) -> @ast.item {
|
||||||
let ast.opacity opa = parse_opacity(p);
|
|
||||||
let ast.layer lyr = parse_layer(p);
|
let ast.layer lyr = parse_layer(p);
|
||||||
|
|
||||||
alt (p.peek()) {
|
alt (p.peek()) {
|
||||||
|
|
|
@ -93,9 +93,6 @@ tag token {
|
||||||
CLAIM;
|
CLAIM;
|
||||||
PROVE;
|
PROVE;
|
||||||
|
|
||||||
/* Opacity keywords */
|
|
||||||
ABS;
|
|
||||||
|
|
||||||
/* Layer keywords */
|
/* Layer keywords */
|
||||||
STATE;
|
STATE;
|
||||||
GC;
|
GC;
|
||||||
|
@ -265,9 +262,6 @@ fn to_str(token t) -> str {
|
||||||
case (CLAIM) { ret "claim"; }
|
case (CLAIM) { ret "claim"; }
|
||||||
case (PROVE) { ret "prove"; }
|
case (PROVE) { ret "prove"; }
|
||||||
|
|
||||||
/* Opacity keywords */
|
|
||||||
case (ABS) { ret "abs"; }
|
|
||||||
|
|
||||||
/* Layer keywords */
|
/* Layer keywords */
|
||||||
case (STATE) { ret "state"; }
|
case (STATE) { ret "state"; }
|
||||||
case (GC) { ret "gc"; }
|
case (GC) { ret "gc"; }
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
type hashfn[K] = fn(&K) -> uint;
|
type hashfn[K] = fn(&K) -> uint;
|
||||||
type eqfn[K] = fn(&K, &K) -> bool;
|
type eqfn[K] = fn(&K, &K) -> bool;
|
||||||
|
|
||||||
abs state type hashmap[K, V] = state obj {
|
state type hashmap[K, V] = state obj {
|
||||||
fn size() -> uint;
|
fn size() -> uint;
|
||||||
fn insert(&K key, &V val) -> bool;
|
fn insert(&K key, &V val) -> bool;
|
||||||
fn contains_key(&K key) -> bool;
|
fn contains_key(&K key) -> bool;
|
||||||
|
@ -241,5 +241,5 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] {
|
||||||
// indent-tabs-mode: nil
|
// indent-tabs-mode: nil
|
||||||
// c-basic-offset: 4
|
// c-basic-offset: 4
|
||||||
// buffer-file-coding-system: utf-8-unix
|
// buffer-file-coding-system: utf-8-unix
|
||||||
// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
|
||||||
// End:
|
// End:
|
||||||
|
|
Loading…
Add table
Reference in a new issue