Skip to content

Commit 398dd75

Browse files
committed
Rename RawCatch to CatchClause
1 parent d9a2882 commit 398dd75

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

include/wabt/binary-reader-logging.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ class BinaryReaderLogging : public BinaryReaderDelegate {
234234
Result OnThrowExpr(Index tag_index) override;
235235
Result OnThrowRefExpr() override;
236236
Result OnTryExpr(Type sig_type) override;
237-
Result OnTryTableExpr(Type sig_type, const RawCatchVector& catches) override;
237+
Result OnTryTableExpr(Type sig_type,
238+
const CatchClauseVector& catches) override;
238239
Result OnUnaryExpr(Opcode opcode) override;
239240
Result OnTernaryExpr(Opcode opcode) override;
240241
Result OnUnreachableExpr() override;

include/wabt/binary-reader-nop.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ class BinaryReaderNop : public BinaryReaderDelegate {
321321
Result OnThrowExpr(Index depth) override { return Result::Ok; }
322322
Result OnThrowRefExpr() override { return Result::Ok; }
323323
Result OnTryExpr(Type sig_type) override { return Result::Ok; }
324-
Result OnTryTableExpr(Type sig_type, const RawCatchVector& catches) override {
324+
Result OnTryTableExpr(Type sig_type,
325+
const CatchClauseVector& catches) override {
325326
return Result::Ok;
326327
}
327328
Result OnUnaryExpr(Opcode opcode) override { return Result::Ok; }

include/wabt/binary-reader.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ struct TypeMut {
5959
};
6060
using TypeMutVector = std::vector<TypeMut>;
6161

62-
struct RawCatch {
62+
struct CatchClause {
6363
CatchKind kind;
6464
Index tag;
6565
Index depth;
6666
};
67-
using RawCatchVector = std::vector<RawCatch>;
67+
using CatchClauseVector = std::vector<CatchClause>;
6868

6969
class BinaryReaderDelegate {
7070
public:
@@ -312,7 +312,7 @@ class BinaryReaderDelegate {
312312
virtual Result OnThrowRefExpr() = 0;
313313
virtual Result OnTryExpr(Type sig_type) = 0;
314314
virtual Result OnTryTableExpr(Type sig_type,
315-
const RawCatchVector& catches) = 0;
315+
const CatchClauseVector& catches) = 0;
316316

317317
virtual Result OnUnaryExpr(Opcode opcode) = 0;
318318
virtual Result OnTernaryExpr(Opcode opcode) = 0;

src/binary-reader-ir.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ class BinaryReaderIR : public BinaryReaderNop {
260260
Result OnThrowExpr(Index tag_index) override;
261261
Result OnThrowRefExpr() override;
262262
Result OnTryExpr(Type sig_type) override;
263-
Result OnTryTableExpr(Type sig_type, const RawCatchVector& catches) override;
263+
Result OnTryTableExpr(Type sig_type,
264+
const CatchClauseVector& catches) override;
264265
Result OnUnaryExpr(Opcode opcode) override;
265266
Result OnTernaryExpr(Opcode opcode) override;
266267
Result OnUnreachableExpr() override;
@@ -1259,7 +1260,7 @@ Result BinaryReaderIR::OnCatchAllExpr() {
12591260
}
12601261

12611262
Result BinaryReaderIR::OnTryTableExpr(Type sig_type,
1262-
const RawCatchVector& catches) {
1263+
const CatchClauseVector& catches) {
12631264
auto expr_ptr = std::make_unique<TryTableExpr>();
12641265
TryTableExpr* expr = expr_ptr.get();
12651266
expr->catches.reserve(catches.size());

src/binary-reader-logging.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Result BinaryReaderLogging::OnTryExpr(Type sig_type) {
395395
}
396396

397397
Result BinaryReaderLogging::OnTryTableExpr(Type sig_type,
398-
const RawCatchVector& catches) {
398+
const CatchClauseVector& catches) {
399399
LOGF("OnTryTableExpr(sig: ");
400400
LogType(sig_type);
401401
Index count = catches.size();

src/binary-reader-objdump.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ class BinaryReaderObjdumpDisassemble : public BinaryReaderObjdumpBase {
548548
Result OnOpcodeBlockSig(Type sig_type) override;
549549
Result OnOpcodeType(Type type) override;
550550

551-
Result OnTryTableExpr(Type sig_type, const RawCatchVector& catches) override;
551+
Result OnTryTableExpr(Type sig_type,
552+
const CatchClauseVector& catches) override;
552553
Result OnBrTableExpr(Index num_targets,
553554
Index* target_depths,
554555
Index default_target_depth) override;
@@ -906,7 +907,7 @@ Result BinaryReaderObjdumpDisassemble::OnOpcodeType(Type type) {
906907

907908
Result BinaryReaderObjdumpDisassemble::OnTryTableExpr(
908909
Type sig_type,
909-
const RawCatchVector& catches) {
910+
const CatchClauseVector& catches) {
910911
if (!in_function_body) {
911912
return Result::Ok;
912913
}

src/binary-reader.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class BinaryReader {
192192
TypeVector result_types_;
193193
TypeMutVector fields_;
194194
std::vector<Index> target_depths_;
195-
RawCatchVector catches_;
195+
CatchClauseVector catches_;
196196
const ReadBinaryOptions& options_;
197197
BinarySection last_known_section_ = BinarySection::Invalid;
198198
bool did_read_names_section_ = false;
@@ -1546,7 +1546,7 @@ Result BinaryReader::ReadInstructions(Offset end_offset, const char* context) {
15461546
}
15471547
Index depth;
15481548
CHECK_RESULT(ReadIndex(&depth, "catch depth"));
1549-
RawCatch catch_;
1549+
CatchClause catch_;
15501550
catch_.kind = CatchKind(handler);
15511551
catch_.tag = tag;
15521552
catch_.depth = depth;

0 commit comments

Comments
 (0)