From af0ff220fd5bd4aa05b2472f3d6e98e08175f517 Mon Sep 17 00:00:00 2001 From: Thomas Lively <7121787+tlively@users.noreply.github.com> Date: Tue, 18 Dec 2018 11:40:00 -0800 Subject: Rename `idx` to `index` in SIMD code for consistency (#1836) --- src/wasm/wasm-validator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/wasm/wasm-validator.cpp') 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"); } } -- cgit v1.2.3