Skip to content

Commit cdab4ef

Browse files
authored
Rename except_ref type to exnref (#2224)
In WebAssembly/exception-handling#79 we agreed to rename `except_ref` type to `exnref`.
1 parent 8d13b5a commit cdab4ef

34 files changed

+101
-101
lines changed

build-js.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export_function "_BinaryenTypeInt64"
184184
export_function "_BinaryenTypeFloat32"
185185
export_function "_BinaryenTypeFloat64"
186186
export_function "_BinaryenTypeVec128"
187-
export_function "_BinaryenTypeExceptRef"
187+
export_function "_BinaryenTypeExnref"
188188
export_function "_BinaryenTypeUnreachable"
189189
export_function "_BinaryenTypeAuto"
190190

src/asmjs/asm_v_wasm.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ AsmType wasmToAsmType(Type type) {
5353
return ASM_INT64;
5454
case v128:
5555
assert(false && "v128 not implemented yet");
56-
case except_ref:
57-
assert(false && "except_ref is not in asm2wasm");
56+
case exnref:
57+
assert(false && "exnref is not in asm2wasm");
5858
case none:
5959
return ASM_NONE;
6060
case unreachable:
@@ -75,7 +75,7 @@ char getSig(Type type) {
7575
return 'd';
7676
case v128:
7777
return 'V';
78-
case except_ref:
78+
case exnref:
7979
return 'e';
8080
case none:
8181
return 'v';
@@ -106,7 +106,7 @@ Type sigToType(char sig) {
106106
case 'V':
107107
return v128;
108108
case 'e':
109-
return except_ref;
109+
return exnref;
110110
case 'v':
111111
return none;
112112
default:

src/binaryen-c.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ BinaryenLiteral toBinaryenLiteral(Literal x) {
7070
break;
7171
}
7272

73-
case Type::except_ref: // there's no except_ref literals
73+
case Type::exnref: // there's no exnref literals
7474
case Type::none:
7575
case Type::unreachable:
7676
WASM_UNREACHABLE();
@@ -90,7 +90,7 @@ Literal fromBinaryenLiteral(BinaryenLiteral x) {
9090
return Literal(x.i64).castToF64();
9191
case Type::v128:
9292
return Literal(x.v128);
93-
case Type::except_ref: // there's no except_ref literals
93+
case Type::exnref: // there's no exnref literals
9494
case Type::none:
9595
case Type::unreachable:
9696
WASM_UNREACHABLE();
@@ -210,7 +210,7 @@ void printArg(std::ostream& setup, std::ostream& out, BinaryenLiteral arg) {
210210
out << "BinaryenLiteralVec128(" << array << ")";
211211
break;
212212
}
213-
case Type::except_ref: // there's no except_ref literals
213+
case Type::exnref: // there's no exnref literals
214214
case Type::none:
215215
case Type::unreachable:
216216
WASM_UNREACHABLE();
@@ -265,7 +265,7 @@ BinaryenType BinaryenTypeInt64(void) { return i64; }
265265
BinaryenType BinaryenTypeFloat32(void) { return f32; }
266266
BinaryenType BinaryenTypeFloat64(void) { return f64; }
267267
BinaryenType BinaryenTypeVec128(void) { return v128; }
268-
BinaryenType BinaryenTypeExceptRef(void) { return except_ref; }
268+
BinaryenType BinaryenTypeExnref(void) { return exnref; }
269269
BinaryenType BinaryenTypeUnreachable(void) { return unreachable; }
270270
BinaryenType BinaryenTypeAuto(void) { return uint32_t(-1); }
271271

src/binaryen-c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ BinaryenType BinaryenTypeInt64(void);
7474
BinaryenType BinaryenTypeFloat32(void);
7575
BinaryenType BinaryenTypeFloat64(void);
7676
BinaryenType BinaryenTypeVec128(void);
77-
BinaryenType BinaryenTypeExceptRef(void);
77+
BinaryenType BinaryenTypeExnref(void);
7878
BinaryenType BinaryenTypeUnreachable(void);
7979
// Not a real type. Used as the last parameter to BinaryenBlock to let
8080
// the API figure out the type instead of providing one.

src/ir/abstract.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ inline UnaryOp getUnary(Type type, Op op) {
8181
assert(false && "v128 not implemented yet");
8282
WASM_UNREACHABLE();
8383
}
84-
case except_ref: // there's no unary instructions for except_ref
84+
case exnref: // there's no unary instructions for exnref
8585
case none:
8686
case unreachable: {
8787
return InvalidUnary;
@@ -212,7 +212,7 @@ inline BinaryOp getBinary(Type type, Op op) {
212212
assert(false && "v128 not implemented yet");
213213
WASM_UNREACHABLE();
214214
}
215-
case except_ref: // there's no binary instructions for except_ref
215+
case exnref: // there's no binary instructions for exnref
216216
case none:
217217
case unreachable: {
218218
return InvalidBinary;

src/js/binaryen.js-post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Module['i64'] = Module['_BinaryenTypeInt64']();
3737
Module['f32'] = Module['_BinaryenTypeFloat32']();
3838
Module['f64'] = Module['_BinaryenTypeFloat64']();
3939
Module['v128'] = Module['_BinaryenTypeVec128']();
40-
Module['except_ref'] = Module['_BinaryenTypeExceptRef']();
40+
Module['exnref'] = Module['_BinaryenTypeExnref']();
4141
Module['unreachable'] = Module['_BinaryenTypeUnreachable']();
4242
Module['auto'] = /* deprecated */ Module['undefined'] = Module['_BinaryenTypeAuto']();
4343

src/literal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Literal {
8080
Literal(int32_t(0)),
8181
Literal(int32_t(0)),
8282
Literal(int32_t(0))}});
83-
case Type::except_ref: // there's no except_ref literals
83+
case Type::exnref: // there's no exnref literals
8484
case none:
8585
case unreachable:
8686
WASM_UNREACHABLE();
@@ -430,7 +430,7 @@ template<> struct less<wasm::Literal> {
430430
return a.reinterpreti64() < b.reinterpreti64();
431431
case wasm::Type::v128:
432432
return memcmp(a.getv128Ptr(), b.getv128Ptr(), 16) < 0;
433-
case wasm::Type::except_ref: // except_ref is an opaque value
433+
case wasm::Type::exnref: // exnref is an opaque value
434434
case wasm::Type::none:
435435
case wasm::Type::unreachable:
436436
return false;

src/parsing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ parseConst(cashew::IString s, Type type, MixedArena& allocator) {
263263
break;
264264
}
265265
case v128:
266-
case except_ref: // there's no except_ref.const
266+
case exnref: // there's no exnref.const
267267
WASM_UNREACHABLE();
268268
case none:
269269
case unreachable: {

src/passes/ConstHoisting.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ struct ConstHoisting : public WalkerPass<PostWalker<ConstHoisting>> {
9595
// v128 not implemented yet
9696
return false;
9797
}
98-
case except_ref: {
99-
// except_ref cannot have literals
98+
case exnref: {
99+
// exnref cannot have literals
100100
return false;
101101
}
102102
case none:

src/passes/FuncCastEmulation.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ static Expression* toABI(Expression* value, Module* module) {
6666
assert(false && "v128 not implemented yet");
6767
WASM_UNREACHABLE();
6868
}
69-
case except_ref: {
70-
assert(false && "except_ref cannot be converted to i64");
69+
case exnref: {
70+
assert(false && "exnref cannot be converted to i64");
7171
WASM_UNREACHABLE();
7272
}
7373
case none: {
@@ -108,8 +108,8 @@ static Expression* fromABI(Expression* value, Type type, Module* module) {
108108
assert(false && "v128 not implemented yet");
109109
WASM_UNREACHABLE();
110110
}
111-
case except_ref: {
112-
assert(false && "except_ref cannot be converted from i64");
111+
case exnref: {
112+
assert(false && "exnref cannot be converted from i64");
113113
WASM_UNREACHABLE();
114114
}
115115
case none: {

0 commit comments

Comments
 (0)