Changeset 208719 in webkit for trunk/Source/JavaScriptCore/wasm/WasmValidate.cpp
- Timestamp:
- Nov 14, 2016, 5:09:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/wasm/WasmValidate.cpp
r208402 r208719 94 94 bool WARN_UNUSED_RETURN binaryOp(BinaryOpType, ExpressionType left, ExpressionType right, ExpressionType& result); 95 95 bool WARN_UNUSED_RETURN unaryOp(UnaryOpType, ExpressionType arg, ExpressionType& result); 96 bool WARN_UNUSED_RETURN addSelect(ExpressionType condition, ExpressionType nonZero, ExpressionType zero, ExpressionType& result); 96 97 97 98 // Control flow … … 181 182 { 182 183 return ControlData(BlockType::Loop, signature); 184 } 185 186 bool Validate::addSelect(ExpressionType condition, ExpressionType nonZero, ExpressionType zero, ExpressionType& result) 187 { 188 if (condition != I32) { 189 m_errorMessage = makeString("Attempting to use ", toString(condition), " as the condition for select"); 190 return false; 191 } 192 193 if (nonZero != zero) { 194 m_errorMessage = makeString("Result types of select don't match. Got: ", toString(nonZero), " and ", toString(zero)); 195 return false; 196 } 197 198 result = zero; 199 return true; 183 200 } 184 201
Note:
See TracChangeset
for help on using the changeset viewer.