summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2018-12-18 11:40:00 -0800
committerGitHub <noreply@github.com>2018-12-18 11:40:00 -0800
commitaf0ff220fd5bd4aa05b2472f3d6e98e08175f517 (patch)
treefd2de5366bb45cd20e7a2343a49639b335437224 /src/wasm/wasm-validator.cpp
parent6974dbb4a6184c88792557fb5dfb59265a6c4a56 (diff)
downloadbinaryen-af0ff220fd5bd4aa05b2472f3d6e98e08175f517.tar.gz
binaryen-af0ff220fd5bd4aa05b2472f3d6e98e08175f517.tar.bz2
binaryen-af0ff220fd5bd4aa05b2472f3d6e98e08175f517.zip
Rename `idx` to `index` in SIMD code for consistency (#1836)
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 7137e0860..ef4d90fbd 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -590,7 +590,7 @@ void FunctionValidator::visitSIMDExtract(SIMDExtract* curr) {
case ExtractLaneVecF64x2: lane_t = f64; lanes = 2; break;
}
shouldBeEqualOrFirstIsUnreachable(curr->type, lane_t, curr, "extract_lane must have same type as vector lane");
- shouldBeTrue(curr->idx < lanes, curr, "invalid lane index");
+ shouldBeTrue(curr->index < lanes, curr, "invalid lane index");
}
void FunctionValidator::visitSIMDReplace(SIMDReplace* curr) {
@@ -608,7 +608,7 @@ void FunctionValidator::visitSIMDReplace(SIMDReplace* curr) {
case ReplaceLaneVecF64x2: lane_t = f64; lanes = 2; break;
}
shouldBeEqualOrFirstIsUnreachable(curr->value->type, lane_t, curr, "unexpected value type");
- shouldBeTrue(curr->idx < lanes, curr, "invalid lane index");
+ shouldBeTrue(curr->index < lanes, curr, "invalid lane index");
}
void FunctionValidator::visitSIMDShuffle(SIMDShuffle* curr) {
@@ -616,8 +616,8 @@ void FunctionValidator::visitSIMDShuffle(SIMDShuffle* curr) {
shouldBeEqualOrFirstIsUnreachable(curr->type, v128, curr, "v128.shuffle must have type v128");
shouldBeEqualOrFirstIsUnreachable(curr->left->type, v128, curr, "expected operand of type v128");
shouldBeEqualOrFirstIsUnreachable(curr->right->type, v128, curr, "expected operand of type v128");
- for (uint8_t idx : curr->mask) {
- shouldBeTrue(idx < 32, curr, "Invalid lane index in mask");
+ for (uint8_t index : curr->mask) {
+ shouldBeTrue(index < 32, curr, "Invalid lane index in mask");
}
}