Operators.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  1. /*
  2. * Copyright (c) 2021-2023, Ali Mohammad Pur <mpfard@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/BitCast.h>
  8. #include <AK/BuiltinWrappers.h>
  9. #include <AK/Result.h>
  10. #include <AK/SIMD.h>
  11. #include <AK/StringView.h>
  12. #include <AK/Types.h>
  13. #include <limits.h>
  14. #include <math.h>
  15. namespace Wasm::Operators {
  16. using namespace AK::SIMD;
  17. #define DEFINE_BINARY_OPERATOR(Name, operation) \
  18. struct Name { \
  19. template<typename Lhs, typename Rhs> \
  20. auto operator()(Lhs lhs, Rhs rhs) const \
  21. { \
  22. return lhs operation rhs; \
  23. } \
  24. \
  25. static StringView name() \
  26. { \
  27. return #operation##sv; \
  28. } \
  29. }
  30. DEFINE_BINARY_OPERATOR(Equals, ==);
  31. DEFINE_BINARY_OPERATOR(NotEquals, !=);
  32. DEFINE_BINARY_OPERATOR(GreaterThan, >);
  33. DEFINE_BINARY_OPERATOR(LessThan, <);
  34. DEFINE_BINARY_OPERATOR(LessThanOrEquals, <=);
  35. DEFINE_BINARY_OPERATOR(GreaterThanOrEquals, >=);
  36. DEFINE_BINARY_OPERATOR(Add, +);
  37. DEFINE_BINARY_OPERATOR(Subtract, -);
  38. DEFINE_BINARY_OPERATOR(Multiply, *);
  39. DEFINE_BINARY_OPERATOR(BitAnd, &);
  40. DEFINE_BINARY_OPERATOR(BitOr, |);
  41. DEFINE_BINARY_OPERATOR(BitXor, ^);
  42. #undef DEFINE_BINARY_OPERATOR
  43. struct Divide {
  44. template<typename Lhs, typename Rhs>
  45. auto operator()(Lhs lhs, Rhs rhs) const
  46. {
  47. if constexpr (IsFloatingPoint<Lhs>) {
  48. return lhs / rhs;
  49. } else {
  50. Checked value(lhs);
  51. value /= rhs;
  52. if (value.has_overflow())
  53. return AK::ErrorOr<Lhs, StringView>("Integer division overflow"sv);
  54. return AK::ErrorOr<Lhs, StringView>(value.value());
  55. }
  56. }
  57. static StringView name() { return "/"sv; }
  58. };
  59. struct Modulo {
  60. template<typename Lhs, typename Rhs>
  61. auto operator()(Lhs lhs, Rhs rhs) const
  62. {
  63. if (rhs == 0)
  64. return AK::ErrorOr<Lhs, StringView>("Integer division overflow"sv);
  65. if constexpr (IsSigned<Lhs>) {
  66. if (rhs == -1)
  67. return AK::ErrorOr<Lhs, StringView>(0); // Spec weirdness right here, signed division overflow is ignored.
  68. }
  69. return AK::ErrorOr<Lhs, StringView>(lhs % rhs);
  70. }
  71. static StringView name() { return "%"sv; }
  72. };
  73. struct BitShiftLeft {
  74. template<typename Lhs, typename Rhs>
  75. auto operator()(Lhs lhs, Rhs rhs) const { return lhs << (rhs % (sizeof(lhs) * 8)); }
  76. static StringView name() { return "<<"sv; }
  77. };
  78. struct BitShiftRight {
  79. template<typename Lhs, typename Rhs>
  80. auto operator()(Lhs lhs, Rhs rhs) const { return lhs >> (rhs % (sizeof(lhs) * 8)); }
  81. static StringView name() { return ">>"sv; }
  82. };
  83. struct BitRotateLeft {
  84. template<typename Lhs, typename Rhs>
  85. auto operator()(Lhs lhs, Rhs rhs) const
  86. {
  87. // generates a single 'rol' instruction if shift is positive
  88. // otherwise generate a `ror`
  89. auto const mask = CHAR_BIT * sizeof(Lhs) - 1;
  90. rhs &= mask;
  91. return (lhs << rhs) | (lhs >> ((-rhs) & mask));
  92. }
  93. static StringView name() { return "rotate_left"sv; }
  94. };
  95. struct BitRotateRight {
  96. template<typename Lhs, typename Rhs>
  97. auto operator()(Lhs lhs, Rhs rhs) const
  98. {
  99. // generates a single 'ror' instruction if shift is positive
  100. // otherwise generate a `rol`
  101. auto const mask = CHAR_BIT * sizeof(Lhs) - 1;
  102. rhs &= mask;
  103. return (lhs >> rhs) | (lhs << ((-rhs) & mask));
  104. }
  105. static StringView name() { return "rotate_right"sv; }
  106. };
  107. template<size_t VectorSize>
  108. struct VectorShiftLeft {
  109. auto operator()(u128 lhs, i32 rhs) const
  110. {
  111. auto shift_value = rhs % (sizeof(lhs) * 8 / VectorSize);
  112. return bit_cast<u128>(bit_cast<Native128ByteVectorOf<NativeIntegralType<128 / VectorSize>, MakeUnsigned>>(lhs) << shift_value);
  113. }
  114. static StringView name()
  115. {
  116. switch (VectorSize) {
  117. case 16:
  118. return "vec(8x16)<<"sv;
  119. case 8:
  120. return "vec(16x8)<<"sv;
  121. case 4:
  122. return "vec(32x4)<<"sv;
  123. case 2:
  124. return "vec(64x2)<<"sv;
  125. default:
  126. VERIFY_NOT_REACHED();
  127. }
  128. }
  129. };
  130. template<size_t VectorSize, template<typename> typename SetSign>
  131. struct VectorShiftRight {
  132. auto operator()(u128 lhs, i32 rhs) const
  133. {
  134. auto shift_value = rhs % (sizeof(lhs) * 8 / VectorSize);
  135. return bit_cast<u128>(bit_cast<Native128ByteVectorOf<NativeIntegralType<128 / VectorSize>, SetSign>>(lhs) >> shift_value);
  136. }
  137. static StringView name()
  138. {
  139. switch (VectorSize) {
  140. case 16:
  141. return "vec(8x16)>>"sv;
  142. case 8:
  143. return "vec(16x8)>>"sv;
  144. case 4:
  145. return "vec(32x4)>>"sv;
  146. case 2:
  147. return "vec(64x2)>>"sv;
  148. default:
  149. VERIFY_NOT_REACHED();
  150. }
  151. }
  152. };
  153. struct VectorSwizzle {
  154. auto operator()(u128 c1, u128 c2) const
  155. {
  156. // https://webassembly.github.io/spec/core/bikeshed/#-mathsfi8x16hrefsyntax-instr-vecmathsfswizzle%E2%91%A0
  157. auto i = bit_cast<Native128ByteVectorOf<i8, MakeSigned>>(c2);
  158. auto j = bit_cast<Native128ByteVectorOf<i8, MakeSigned>>(c1);
  159. auto result = AK::SIMD::shuffle(i, j);
  160. return bit_cast<u128>(result);
  161. }
  162. static StringView name() { return "vec(8x16).swizzle"sv; }
  163. };
  164. template<size_t VectorSize, template<typename> typename SetSign>
  165. struct VectorExtractLane {
  166. size_t lane;
  167. auto operator()(u128 c) const
  168. {
  169. auto result = bit_cast<Native128ByteVectorOf<NativeIntegralType<128 / VectorSize>, SetSign>>(c);
  170. return result[lane];
  171. }
  172. static StringView name()
  173. {
  174. switch (VectorSize) {
  175. case 16:
  176. return "vec(8x16).extract_lane"sv;
  177. case 8:
  178. return "vec(16x8).extract_lane"sv;
  179. case 4:
  180. return "vec(32x4).extract_lane"sv;
  181. case 2:
  182. return "vec(64x2).extract_lane"sv;
  183. default:
  184. VERIFY_NOT_REACHED();
  185. }
  186. }
  187. };
  188. template<size_t VectorSize>
  189. struct VectorExtractLaneFloat {
  190. size_t lane;
  191. auto operator()(u128 c) const
  192. {
  193. auto result = bit_cast<NativeFloatingVectorType<128 / VectorSize, VectorSize>>(c);
  194. return result[lane];
  195. }
  196. static StringView name()
  197. {
  198. switch (VectorSize) {
  199. case 16:
  200. return "vec(8x16).extract_lane"sv;
  201. case 8:
  202. return "vec(16x8).extract_lane"sv;
  203. case 4:
  204. return "vec(32x4).extract_lane"sv;
  205. case 2:
  206. return "vec(64x2).extract_lane"sv;
  207. default:
  208. VERIFY_NOT_REACHED();
  209. }
  210. }
  211. };
  212. template<size_t VectorSize, typename TrueValueType = NativeIntegralType<128 / VectorSize>>
  213. struct VectorReplaceLane {
  214. size_t lane;
  215. using ValueType = Conditional<IsFloatingPoint<TrueValueType>, NativeFloatingType<128 / VectorSize>, NativeIntegralType<128 / VectorSize>>;
  216. auto operator()(u128 c, TrueValueType value) const
  217. {
  218. auto result = bit_cast<Native128ByteVectorOf<ValueType, MakeUnsigned>>(c);
  219. result[lane] = static_cast<ValueType>(value);
  220. return bit_cast<u128>(result);
  221. }
  222. static StringView name()
  223. {
  224. switch (VectorSize) {
  225. case 16:
  226. return "vec(8x16).replace_lane"sv;
  227. case 8:
  228. return "vec(16x8).replace_lane"sv;
  229. case 4:
  230. return "vec(32x4).replace_lane"sv;
  231. case 2:
  232. return "vec(64x2).replace_lane"sv;
  233. default:
  234. VERIFY_NOT_REACHED();
  235. }
  236. }
  237. };
  238. template<size_t VectorSize, typename Op, template<typename> typename SetSign = MakeSigned>
  239. struct VectorCmpOp {
  240. auto operator()(u128 c1, u128 c2) const
  241. {
  242. using ElementType = NativeIntegralType<128 / VectorSize>;
  243. auto result = bit_cast<Native128ByteVectorOf<ElementType, SetSign>>(c1);
  244. auto other = bit_cast<Native128ByteVectorOf<ElementType, SetSign>>(c2);
  245. Op op;
  246. for (size_t i = 0; i < VectorSize; ++i)
  247. result[i] = op(result[i], other[i]) ? static_cast<MakeUnsigned<ElementType>>(-1) : 0;
  248. return bit_cast<u128>(result);
  249. }
  250. static StringView name()
  251. {
  252. switch (VectorSize) {
  253. case 16:
  254. return "vec(8x16).cmp"sv;
  255. case 8:
  256. return "vec(16x8).cmp"sv;
  257. case 4:
  258. return "vec(32x4).cmp"sv;
  259. case 2:
  260. return "vec(64x2).cmp"sv;
  261. default:
  262. VERIFY_NOT_REACHED();
  263. }
  264. }
  265. };
  266. template<size_t VectorSize, typename Op>
  267. struct VectorFloatCmpOp {
  268. auto operator()(u128 c1, u128 c2) const
  269. {
  270. auto first = bit_cast<NativeFloatingVectorType<128, VectorSize, NativeFloatingType<128 / VectorSize>>>(c1);
  271. auto other = bit_cast<NativeFloatingVectorType<128, VectorSize, NativeFloatingType<128 / VectorSize>>>(c2);
  272. using ElementType = NativeIntegralType<128 / VectorSize>;
  273. Native128ByteVectorOf<ElementType, MakeUnsigned> result;
  274. Op op;
  275. for (size_t i = 0; i < VectorSize; ++i)
  276. result[i] = op(first[i], other[i]) ? static_cast<ElementType>(-1) : 0;
  277. return bit_cast<u128>(result);
  278. }
  279. static StringView name()
  280. {
  281. switch (VectorSize) {
  282. case 4:
  283. return "vecf(32x4).cmp"sv;
  284. case 2:
  285. return "vecf(64x2).cmp"sv;
  286. default:
  287. VERIFY_NOT_REACHED();
  288. }
  289. }
  290. };
  291. struct Minimum {
  292. template<typename Lhs, typename Rhs>
  293. auto operator()(Lhs lhs, Rhs rhs) const
  294. {
  295. if constexpr (IsFloatingPoint<Lhs> || IsFloatingPoint<Rhs>) {
  296. if (isnan(lhs))
  297. return lhs;
  298. if (isnan(rhs))
  299. return rhs;
  300. if (isinf(lhs))
  301. return lhs > 0 ? rhs : lhs;
  302. if (isinf(rhs))
  303. return rhs > 0 ? lhs : rhs;
  304. }
  305. return min(lhs, rhs);
  306. }
  307. static StringView name() { return "minimum"sv; }
  308. };
  309. struct Maximum {
  310. template<typename Lhs, typename Rhs>
  311. auto operator()(Lhs lhs, Rhs rhs) const
  312. {
  313. if constexpr (IsFloatingPoint<Lhs> || IsFloatingPoint<Rhs>) {
  314. if (isnan(lhs))
  315. return lhs;
  316. if (isnan(rhs))
  317. return rhs;
  318. if (isinf(lhs))
  319. return lhs > 0 ? lhs : rhs;
  320. if (isinf(rhs))
  321. return rhs > 0 ? rhs : lhs;
  322. }
  323. return max(lhs, rhs);
  324. }
  325. static StringView name() { return "maximum"sv; }
  326. };
  327. struct CopySign {
  328. template<typename Lhs, typename Rhs>
  329. auto operator()(Lhs lhs, Rhs rhs) const
  330. {
  331. if constexpr (IsSame<Lhs, float>)
  332. return copysignf(lhs, rhs);
  333. else if constexpr (IsSame<Lhs, double>)
  334. return copysign(lhs, rhs);
  335. else
  336. static_assert(DependentFalse<Lhs, Rhs>, "Invalid types to CopySign");
  337. }
  338. static StringView name() { return "copysign"sv; }
  339. };
  340. // Unary
  341. struct EqualsZero {
  342. template<typename Lhs>
  343. auto operator()(Lhs lhs) const { return lhs == 0; }
  344. static StringView name() { return "== 0"sv; }
  345. };
  346. struct CountLeadingZeros {
  347. template<typename Lhs>
  348. i32 operator()(Lhs lhs) const
  349. {
  350. if (lhs == 0)
  351. return sizeof(Lhs) * CHAR_BIT;
  352. if constexpr (sizeof(Lhs) == 4 || sizeof(Lhs) == 8)
  353. return count_leading_zeroes(MakeUnsigned<Lhs>(lhs));
  354. else
  355. VERIFY_NOT_REACHED();
  356. }
  357. static StringView name() { return "clz"sv; }
  358. };
  359. struct CountTrailingZeros {
  360. template<typename Lhs>
  361. i32 operator()(Lhs lhs) const
  362. {
  363. if (lhs == 0)
  364. return sizeof(Lhs) * CHAR_BIT;
  365. if constexpr (sizeof(Lhs) == 4 || sizeof(Lhs) == 8)
  366. return count_trailing_zeroes(MakeUnsigned<Lhs>(lhs));
  367. else
  368. VERIFY_NOT_REACHED();
  369. }
  370. static StringView name() { return "ctz"sv; }
  371. };
  372. struct PopCount {
  373. template<typename Lhs>
  374. auto operator()(Lhs lhs) const
  375. {
  376. if constexpr (sizeof(Lhs) == 4 || sizeof(Lhs) == 8)
  377. return popcount(MakeUnsigned<Lhs>(lhs));
  378. else
  379. VERIFY_NOT_REACHED();
  380. }
  381. static StringView name() { return "popcnt"sv; }
  382. };
  383. struct Absolute {
  384. template<typename Lhs>
  385. auto operator()(Lhs lhs) const { return AK::abs(lhs); }
  386. static StringView name() { return "abs"sv; }
  387. };
  388. struct Negate {
  389. template<typename Lhs>
  390. auto operator()(Lhs lhs) const { return -lhs; }
  391. static StringView name() { return "== 0"sv; }
  392. };
  393. struct Ceil {
  394. template<typename Lhs>
  395. auto operator()(Lhs lhs) const
  396. {
  397. if constexpr (IsSame<Lhs, float>)
  398. return ceilf(lhs);
  399. else if constexpr (IsSame<Lhs, double>)
  400. return ceil(lhs);
  401. else
  402. VERIFY_NOT_REACHED();
  403. }
  404. static StringView name() { return "ceil"sv; }
  405. };
  406. struct Floor {
  407. template<typename Lhs>
  408. auto operator()(Lhs lhs) const
  409. {
  410. if constexpr (IsSame<Lhs, float>)
  411. return floorf(lhs);
  412. else if constexpr (IsSame<Lhs, double>)
  413. return floor(lhs);
  414. else
  415. VERIFY_NOT_REACHED();
  416. }
  417. static StringView name() { return "floor"sv; }
  418. };
  419. struct Truncate {
  420. template<typename Lhs>
  421. AK::ErrorOr<Lhs, StringView> operator()(Lhs lhs) const
  422. {
  423. if constexpr (IsSame<Lhs, float>)
  424. return truncf(lhs);
  425. else if constexpr (IsSame<Lhs, double>)
  426. return trunc(lhs);
  427. else
  428. VERIFY_NOT_REACHED();
  429. }
  430. static StringView name() { return "truncate"sv; }
  431. };
  432. struct NearbyIntegral {
  433. template<typename Lhs>
  434. auto operator()(Lhs lhs) const
  435. {
  436. if constexpr (IsSame<Lhs, float>)
  437. return nearbyintf(lhs);
  438. else if constexpr (IsSame<Lhs, double>)
  439. return nearbyint(lhs);
  440. else
  441. VERIFY_NOT_REACHED();
  442. }
  443. static StringView name() { return "round"sv; }
  444. };
  445. struct SquareRoot {
  446. template<typename Lhs>
  447. auto operator()(Lhs lhs) const
  448. {
  449. if constexpr (IsSame<Lhs, float>)
  450. return sqrtf(lhs);
  451. else if constexpr (IsSame<Lhs, double>)
  452. return sqrt(lhs);
  453. else
  454. VERIFY_NOT_REACHED();
  455. }
  456. static StringView name() { return "sqrt"sv; }
  457. };
  458. template<typename Result>
  459. struct Wrap {
  460. template<typename Lhs>
  461. Result operator()(Lhs lhs) const
  462. {
  463. return static_cast<MakeUnsigned<Result>>(bit_cast<MakeUnsigned<Lhs>>(lhs));
  464. }
  465. static StringView name() { return "wrap"sv; }
  466. };
  467. template<typename ResultT>
  468. struct CheckedTruncate {
  469. template<typename Lhs>
  470. AK::ErrorOr<ResultT, StringView> operator()(Lhs lhs) const
  471. {
  472. if (isnan(lhs) || isinf(lhs)) // "undefined", let's just trap.
  473. return "Truncation undefined behavior"sv;
  474. Lhs truncated;
  475. if constexpr (IsSame<float, Lhs>)
  476. truncated = truncf(lhs);
  477. else if constexpr (IsSame<double, Lhs>)
  478. truncated = trunc(lhs);
  479. else
  480. VERIFY_NOT_REACHED();
  481. // FIXME: This function assumes that all values of ResultT are representable in Lhs
  482. // the assumption comes from the fact that this was used exclusively by LibJS,
  483. // which only considers values that are all representable in 'double'.
  484. if (!AK::is_within_range<ResultT>(truncated))
  485. return "Truncation out of range"sv;
  486. return static_cast<ResultT>(truncated);
  487. }
  488. static StringView name() { return "truncate.checked"sv; }
  489. };
  490. template<typename ResultT>
  491. struct Extend {
  492. template<typename Lhs>
  493. ResultT operator()(Lhs lhs) const
  494. {
  495. return lhs;
  496. }
  497. static StringView name() { return "extend"sv; }
  498. };
  499. template<typename ResultT>
  500. struct Convert {
  501. template<typename Lhs>
  502. ResultT operator()(Lhs lhs) const
  503. {
  504. auto signed_interpretation = bit_cast<MakeSigned<Lhs>>(lhs);
  505. return static_cast<ResultT>(signed_interpretation);
  506. }
  507. static StringView name() { return "convert"sv; }
  508. };
  509. template<typename ResultT>
  510. struct Reinterpret {
  511. template<typename Lhs>
  512. ResultT operator()(Lhs lhs) const
  513. {
  514. return bit_cast<ResultT>(lhs);
  515. }
  516. static StringView name() { return "reinterpret"sv; }
  517. };
  518. struct Promote {
  519. double operator()(float lhs) const
  520. {
  521. if (isnan(lhs))
  522. return nan(""); // FIXME: Ensure canonical NaN remains canonical
  523. return static_cast<double>(lhs);
  524. }
  525. static StringView name() { return "promote"sv; }
  526. };
  527. struct Demote {
  528. float operator()(double lhs) const
  529. {
  530. if (isnan(lhs))
  531. return nanf(""); // FIXME: Ensure canonical NaN remains canonical
  532. if (isinf(lhs))
  533. return __builtin_huge_valf();
  534. return static_cast<float>(lhs);
  535. }
  536. static StringView name() { return "demote"sv; }
  537. };
  538. template<typename InitialType>
  539. struct SignExtend {
  540. template<typename Lhs>
  541. Lhs operator()(Lhs lhs) const
  542. {
  543. auto unsigned_representation = bit_cast<MakeUnsigned<Lhs>>(lhs);
  544. auto truncated_unsigned_representation = static_cast<MakeUnsigned<InitialType>>(unsigned_representation);
  545. auto initial_value = bit_cast<InitialType>(truncated_unsigned_representation);
  546. return static_cast<Lhs>(initial_value);
  547. }
  548. static StringView name() { return "extend"sv; }
  549. };
  550. template<typename ResultT>
  551. struct SaturatingTruncate {
  552. template<typename Lhs>
  553. ResultT operator()(Lhs lhs) const
  554. {
  555. if (isnan(lhs))
  556. return 0;
  557. if (isinf(lhs)) {
  558. if (lhs < 0)
  559. return NumericLimits<ResultT>::min();
  560. return NumericLimits<ResultT>::max();
  561. }
  562. // FIXME: This assumes that all values in ResultT are representable in 'double'.
  563. // that assumption is not correct, which makes this function yield incorrect values
  564. // for 'edge' values of type i64.
  565. constexpr auto convert = []<typename ConvertT>(ConvertT truncated_value) {
  566. if (truncated_value < NumericLimits<ResultT>::min())
  567. return NumericLimits<ResultT>::min();
  568. if constexpr (IsSame<ConvertT, float>) {
  569. if (truncated_value >= static_cast<ConvertT>(NumericLimits<ResultT>::max()))
  570. return NumericLimits<ResultT>::max();
  571. } else {
  572. if (static_cast<double>(truncated_value) >= static_cast<double>(NumericLimits<ResultT>::max()))
  573. return NumericLimits<ResultT>::max();
  574. }
  575. return static_cast<ResultT>(truncated_value);
  576. };
  577. if constexpr (IsSame<Lhs, float>)
  578. return convert(truncf(lhs));
  579. else
  580. return convert(trunc(lhs));
  581. }
  582. static StringView name() { return "truncate.saturating"sv; }
  583. };
  584. }