Skip to content

Commit f9abf80

Browse files
committed
Renamed Exceptions to Tags
As per WebAssembly#161
1 parent 6032f22 commit f9abf80

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

proposals/exception-handling/Exceptions-formal-examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If anyone would like that I add another reduction trace, or other examples, plea
1212

1313
### notation
1414

15-
If `x` is an exception index, then `a_x` denotes its exception tag, i.e., `F.exception[x] = a_x`, where `F` is the current frame.
15+
If `x` is an exception tag index, then `a_x` denotes its exception tag address, i.e., `F.exception[x] = a_x`, where `F` is the current frame.
1616

1717
## example 0
1818

proposals/exception-handling/Exceptions-formal-overview.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This is an overview of the 3rd proposal's formal spec additions, to aid in discu
66

77
### Types
88

9-
Exception Types
9+
Tag Types
1010

1111
```
12-
exntype ::= [t*]→[]
12+
tagtype ::= [t*]→[]
1313
```
1414

1515
### Instructions
@@ -22,16 +22,16 @@ instr ::= ... | throw x | rethrow l
2222

2323
### Modules
2424

25-
Exceptions (definitions)
25+
Tags
2626

2727
```
28-
exception ::= export* exception exntype | export* exception exntype import
28+
tag ::= export* tag exntype | export* tag tagtype import
2929
```
3030

3131
Modules
3232

3333
```
34-
mod ::= module ... exception*
34+
mod ::= module ... tag*
3535
```
3636

3737
## Validation (Typing)
@@ -53,7 +53,7 @@ labels {result [t*], kind ε}
5353

5454

5555
```
56-
C.exceptions[x] = [t*]→[]
56+
C.tags[x] = [t*]→[]
5757
-----------------------------
5858
C ⊢ throw x : [t1* t*]→[t2*]
5959
@@ -65,7 +65,7 @@ C ⊢ rethrow l : [t1*]→[t2*]
6565
6666
C.types[bt] = [t1*]→[t2*]
6767
C, labels {result [t2*], kind try} ⊢ instr* : [t1*]→[t2*]
68-
(C.exceptions[x] = [t*]→[] ∧
68+
(C.tags[x] = [t*]→[] ∧
6969
C, labels { result [t2*], kind catch } ⊢ instr* : [t*]→[t2*])*
7070
(C, labels { result [t2*], kind catch } ⊢ instr'* : []→[t2*])?
7171
-----------------------------------------------------------------------------
@@ -86,19 +86,19 @@ C ⊢ try bt instr* delegate l : [t1*]→[t2*]
8686
Stores
8787

8888
```
89-
S ::= {..., exceptions exninst*}
89+
S ::= {..., tags exninst*}
9090
```
9191

92-
Exception Instances
92+
Tag Instances
9393

9494
```
95-
exninst ::= {type exntype}
95+
taginst ::= {type tagtype}
9696
```
9797

9898
Module Instances
9999

100100
```
101-
m ::= {..., exceptions a*}
101+
m ::= {..., tags a*}
102102
```
103103

104104
Administrative Instructions
@@ -108,7 +108,7 @@ instr ::= ... | throw a | catch_n{a? instr*}* instr* end
108108
| delegate{l} instr* end | caught_m{a val^n} instr* end
109109
```
110110

111-
Block Contexts and label kinds
111+
Block contexts and label kinds
112112

113113
So far block contexts are only used in the reduction of `br l` and `return`, and only include labels or values on the stack above the hole. If we want to be able to break jumping over try-catch and try-delegate blocks, we must allow for the new administrative control instructions to appear after labels in block contexts, mirroring the label kinds of labels in validation contexts.
114114

@@ -143,7 +143,7 @@ caught_m{a val^n} B^l[rethrow l] end
143143
caught_m{a val^n} val^m end ↪ val^m
144144
```
145145

146-
A missing exception tag (exnaddr) in a `catch_m` clause (i.e., `a? = ε`) represents a `catch_all`.
146+
A missing tagaddr in a `catch_m` clause (i.e., `a? = ε`) represents a `catch_all`.
147147

148148
```
149149
F; val^n (try bt instr* (catch x instr'*)* (catch_all instr''*)? end)
@@ -154,7 +154,7 @@ catch_m{a? instr*}* val^m end ↪ val^m
154154
155155
S; F; catch_m{a1? instr*}{a'? instr'*}* T[val^n (throw a)] end
156156
↪ S; F; caught_m{a val^n} (val^n)? instr* end
157-
(if (a1? = ε ∨ a1? = a) ∧ S.exceptions(a).type = [t^n]→[])
157+
(if (a1? = ε ∨ a1? = a) ∧ S.tags(a).type = [t^n]→[])
158158
159159
S; F; catch_m{a1? instr*}{a'? instr'*}* T[val^n (throw a)] end
160160
↪ S; F; catch_m{a'? instr'*}* T[val^n (throw a)] end
@@ -177,11 +177,11 @@ B^l[ delegate{l} T[val^n (throw a)] end ]
177177
### Typing rules for administrative instructions
178178

179179
```
180-
S.exceptions[a].type = [t2*]→[]
180+
S.tags[a].type = [t2*]→[]
181181
--------------------------------
182182
S;C ⊢ throw a : [t1* t2*]→[t*]
183183
184-
(S.exceptions[a].type = [t'*]→[] ∧
184+
(S.tags[a].type = [t'*]→[] ∧
185185
S;C, labels {result [t*], kind catch} ⊢ instr1* : [t'*]→[t*])*
186186
(S;C, labels {result [t*], kind catch} ⊢ instr2* : []→[t*])?
187187
S;C, labels {result [t*], kind try} ⊢ instr3* : []→[t*]
@@ -193,7 +193,7 @@ C.labels[l].kind = try
193193
-----------------------------------------------------------------------
194194
S;C, labels [t*] ⊢ delegate{l} instr* end : []→[t*]
195195
196-
S.exceptions[a].type = [t'*]→[]
196+
S.tags[a].type = [t'*]→[]
197197
(val:t')*
198198
S;C, labels {result [t*], kind catch} ⊢ instr* : []→[t*]
199199
--------------------------------------------------------------------------------

0 commit comments

Comments
 (0)