goscript 0.0.34 → 0.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (358) hide show
  1. package/compiler/analysis.go +28 -20
  2. package/compiler/analysis_test.go +14 -0
  3. package/compiler/assignment.go +19 -7
  4. package/compiler/compiler.go +15 -99
  5. package/compiler/composite-lit.go +60 -17
  6. package/compiler/decl.go +1 -1
  7. package/compiler/expr-call.go +233 -35
  8. package/compiler/expr-selector.go +28 -2
  9. package/compiler/expr.go +13 -37
  10. package/compiler/lit.go +111 -2
  11. package/compiler/primitive.go +6 -6
  12. package/compiler/protobuf.go +0 -5
  13. package/compiler/sanitize.go +101 -0
  14. package/compiler/spec-struct.go +41 -8
  15. package/compiler/spec-value.go +29 -18
  16. package/compiler/stmt-assign.go +22 -1
  17. package/compiler/stmt.go +26 -9
  18. package/compiler/type.go +3 -3
  19. package/dist/gs/builtin/builtin.d.ts +3 -2
  20. package/dist/gs/builtin/builtin.js +2 -1
  21. package/dist/gs/builtin/builtin.js.map +1 -1
  22. package/dist/gs/builtin/map.js.map +1 -1
  23. package/dist/gs/builtin/slice.d.ts +7 -1
  24. package/dist/gs/builtin/slice.js +112 -22
  25. package/dist/gs/builtin/slice.js.map +1 -1
  26. package/dist/gs/github.com/pkg/errors/errors.d.ts +13 -0
  27. package/dist/gs/github.com/pkg/errors/errors.js +232 -0
  28. package/dist/gs/github.com/pkg/errors/errors.js.map +1 -0
  29. package/dist/gs/github.com/pkg/errors/go113.d.ts +4 -0
  30. package/dist/gs/github.com/pkg/errors/go113.js +34 -0
  31. package/dist/gs/github.com/pkg/errors/go113.js.map +1 -0
  32. package/dist/gs/github.com/pkg/errors/index.d.ts +3 -0
  33. package/dist/gs/github.com/pkg/errors/index.js +4 -0
  34. package/dist/gs/github.com/pkg/errors/index.js.map +1 -0
  35. package/dist/gs/github.com/pkg/errors/stack.d.ts +32 -0
  36. package/dist/gs/github.com/pkg/errors/stack.js +111 -0
  37. package/dist/gs/github.com/pkg/errors/stack.js.map +1 -0
  38. package/dist/gs/maps/index.d.ts +2 -2
  39. package/dist/gs/maps/index.js +2 -2
  40. package/dist/gs/maps/index.js.map +1 -1
  41. package/dist/gs/maps/iter.d.ts +7 -0
  42. package/dist/gs/maps/iter.js +57 -0
  43. package/dist/gs/maps/iter.js.map +1 -0
  44. package/dist/gs/maps/maps.d.ts +7 -0
  45. package/dist/gs/maps/maps.js +67 -0
  46. package/dist/gs/maps/maps.js.map +1 -0
  47. package/dist/gs/math/abs.gs.d.ts +1 -0
  48. package/dist/gs/math/abs.gs.js +10 -0
  49. package/dist/gs/math/abs.gs.js.map +1 -0
  50. package/dist/gs/math/acosh.gs.d.ts +2 -0
  51. package/dist/gs/math/acosh.gs.js +14 -0
  52. package/dist/gs/math/acosh.gs.js.map +1 -0
  53. package/dist/gs/math/asin.gs.d.ts +4 -0
  54. package/dist/gs/math/asin.gs.js +24 -0
  55. package/dist/gs/math/asin.gs.js.map +1 -0
  56. package/dist/gs/math/asinh.gs.d.ts +2 -0
  57. package/dist/gs/math/asinh.gs.js +14 -0
  58. package/dist/gs/math/asinh.gs.js.map +1 -0
  59. package/dist/gs/math/atan.gs.d.ts +4 -0
  60. package/dist/gs/math/atan.gs.js +22 -0
  61. package/dist/gs/math/atan.gs.js.map +1 -0
  62. package/dist/gs/math/atan2.gs.d.ts +2 -0
  63. package/dist/gs/math/atan2.gs.js +30 -0
  64. package/dist/gs/math/atan2.gs.js.map +1 -0
  65. package/dist/gs/math/atanh.gs.d.ts +2 -0
  66. package/dist/gs/math/atanh.gs.js +16 -0
  67. package/dist/gs/math/atanh.gs.js.map +1 -0
  68. package/dist/gs/math/bits.gs.d.ts +5 -0
  69. package/dist/gs/math/bits.gs.js +46 -0
  70. package/dist/gs/math/bits.gs.js.map +1 -0
  71. package/dist/gs/math/cbrt.gs.d.ts +2 -0
  72. package/dist/gs/math/cbrt.gs.js +14 -0
  73. package/dist/gs/math/cbrt.gs.js.map +1 -0
  74. package/dist/gs/math/const.gs.d.ts +30 -0
  75. package/dist/gs/math/const.gs.js +61 -0
  76. package/dist/gs/math/const.gs.js.map +1 -0
  77. package/dist/gs/math/copysign.gs.d.ts +1 -0
  78. package/dist/gs/math/copysign.gs.js +20 -0
  79. package/dist/gs/math/copysign.gs.js.map +1 -0
  80. package/dist/gs/math/dim.gs.d.ts +5 -0
  81. package/dist/gs/math/dim.gs.js +69 -0
  82. package/dist/gs/math/dim.gs.js.map +1 -0
  83. package/dist/gs/math/erf.gs.d.ts +4 -0
  84. package/dist/gs/math/erf.gs.js +336 -0
  85. package/dist/gs/math/erf.gs.js.map +1 -0
  86. package/dist/gs/math/erfinv.gs.d.ts +2 -0
  87. package/dist/gs/math/erfinv.gs.js +118 -0
  88. package/dist/gs/math/erfinv.gs.js.map +1 -0
  89. package/dist/gs/math/exp.gs.d.ts +5 -0
  90. package/dist/gs/math/exp.gs.js +30 -0
  91. package/dist/gs/math/exp.gs.js.map +1 -0
  92. package/dist/gs/math/expm1.gs.d.ts +2 -0
  93. package/dist/gs/math/expm1.gs.js +17 -0
  94. package/dist/gs/math/expm1.gs.js.map +1 -0
  95. package/dist/gs/math/floor.gs.d.ts +8 -0
  96. package/dist/gs/math/floor.gs.js +75 -0
  97. package/dist/gs/math/floor.gs.js.map +1 -0
  98. package/dist/gs/math/fma.gs.d.ts +1 -0
  99. package/dist/gs/math/fma.gs.js +8 -0
  100. package/dist/gs/math/fma.gs.js.map +1 -0
  101. package/dist/gs/math/frexp.gs.d.ts +2 -0
  102. package/dist/gs/math/frexp.gs.js +28 -0
  103. package/dist/gs/math/frexp.gs.js.map +1 -0
  104. package/dist/gs/math/gamma.gs.d.ts +3 -0
  105. package/dist/gs/math/gamma.gs.js +149 -0
  106. package/dist/gs/math/gamma.gs.js.map +1 -0
  107. package/dist/gs/math/hypot.gs.d.ts +2 -0
  108. package/dist/gs/math/hypot.gs.js +16 -0
  109. package/dist/gs/math/hypot.gs.js.map +1 -0
  110. package/dist/gs/math/index.d.ts +44 -0
  111. package/dist/gs/math/index.js +45 -0
  112. package/dist/gs/math/index.js.map +1 -0
  113. package/dist/gs/math/j0.gs.d.ts +4 -0
  114. package/dist/gs/math/j0.gs.js +228 -0
  115. package/dist/gs/math/j0.gs.js.map +1 -0
  116. package/dist/gs/math/j1.gs.d.ts +4 -0
  117. package/dist/gs/math/j1.gs.js +211 -0
  118. package/dist/gs/math/j1.gs.js.map +1 -0
  119. package/dist/gs/math/jn.gs.d.ts +2 -0
  120. package/dist/gs/math/jn.gs.js +412 -0
  121. package/dist/gs/math/jn.gs.js.map +1 -0
  122. package/dist/gs/math/ldexp.gs.d.ts +2 -0
  123. package/dist/gs/math/ldexp.gs.js +20 -0
  124. package/dist/gs/math/ldexp.gs.js.map +1 -0
  125. package/dist/gs/math/lgamma.gs.d.ts +2 -0
  126. package/dist/gs/math/lgamma.gs.js +243 -0
  127. package/dist/gs/math/lgamma.gs.js.map +1 -0
  128. package/dist/gs/math/log.gs.d.ts +2 -0
  129. package/dist/gs/math/log.gs.js +16 -0
  130. package/dist/gs/math/log.gs.js.map +1 -0
  131. package/dist/gs/math/log10.gs.d.ts +4 -0
  132. package/dist/gs/math/log10.gs.js +17 -0
  133. package/dist/gs/math/log10.gs.js.map +1 -0
  134. package/dist/gs/math/log1p.gs.d.ts +2 -0
  135. package/dist/gs/math/log1p.gs.js +17 -0
  136. package/dist/gs/math/log1p.gs.js.map +1 -0
  137. package/dist/gs/math/logb.gs.d.ts +3 -0
  138. package/dist/gs/math/logb.gs.js +43 -0
  139. package/dist/gs/math/logb.gs.js.map +1 -0
  140. package/dist/gs/math/mod.gs.d.ts +2 -0
  141. package/dist/gs/math/mod.gs.js +26 -0
  142. package/dist/gs/math/mod.gs.js.map +1 -0
  143. package/dist/gs/math/modf.gs.d.ts +2 -0
  144. package/dist/gs/math/modf.gs.js +24 -0
  145. package/dist/gs/math/modf.gs.js.map +1 -0
  146. package/dist/gs/math/nextafter.gs.d.ts +2 -0
  147. package/dist/gs/math/nextafter.gs.js +66 -0
  148. package/dist/gs/math/nextafter.gs.js.map +1 -0
  149. package/dist/gs/math/pow.gs.d.ts +3 -0
  150. package/dist/gs/math/pow.gs.js +40 -0
  151. package/dist/gs/math/pow.gs.js.map +1 -0
  152. package/dist/gs/math/pow10.gs.d.ts +1 -0
  153. package/dist/gs/math/pow10.gs.js +14 -0
  154. package/dist/gs/math/pow10.gs.js.map +1 -0
  155. package/dist/gs/math/remainder.gs.d.ts +2 -0
  156. package/dist/gs/math/remainder.gs.js +25 -0
  157. package/dist/gs/math/remainder.gs.js.map +1 -0
  158. package/dist/gs/math/signbit.gs.d.ts +1 -0
  159. package/dist/gs/math/signbit.gs.js +5 -0
  160. package/dist/gs/math/signbit.gs.js.map +1 -0
  161. package/dist/gs/math/sin.gs.d.ts +4 -0
  162. package/dist/gs/math/sin.gs.js +29 -0
  163. package/dist/gs/math/sin.gs.js.map +1 -0
  164. package/dist/gs/math/sincos.gs.d.ts +1 -0
  165. package/dist/gs/math/sincos.gs.js +11 -0
  166. package/dist/gs/math/sincos.gs.js.map +1 -0
  167. package/dist/gs/math/sinh.gs.d.ts +4 -0
  168. package/dist/gs/math/sinh.gs.js +27 -0
  169. package/dist/gs/math/sinh.gs.js.map +1 -0
  170. package/dist/gs/math/sqrt.gs.d.ts +2 -0
  171. package/dist/gs/math/sqrt.gs.js +15 -0
  172. package/dist/gs/math/sqrt.gs.js.map +1 -0
  173. package/dist/gs/math/tan.gs.d.ts +2 -0
  174. package/dist/gs/math/tan.gs.js +17 -0
  175. package/dist/gs/math/tan.gs.js.map +1 -0
  176. package/dist/gs/math/tanh.gs.d.ts +2 -0
  177. package/dist/gs/math/tanh.gs.js +17 -0
  178. package/dist/gs/math/tanh.gs.js.map +1 -0
  179. package/dist/gs/math/trig_reduce.gs.d.ts +1 -0
  180. package/dist/gs/math/trig_reduce.gs.js +62 -0
  181. package/dist/gs/math/trig_reduce.gs.js.map +1 -0
  182. package/dist/gs/math/unsafe.gs.d.ts +4 -0
  183. package/dist/gs/math/unsafe.gs.js +47 -0
  184. package/dist/gs/math/unsafe.gs.js.map +1 -0
  185. package/dist/gs/strconv/atob.gs.d.ts +4 -0
  186. package/dist/gs/strconv/atob.gs.js +42 -0
  187. package/dist/gs/strconv/atob.gs.js.map +1 -0
  188. package/dist/gs/strconv/atof.gs.d.ts +2 -0
  189. package/dist/gs/strconv/atof.gs.js +51 -0
  190. package/dist/gs/strconv/atof.gs.js.map +1 -0
  191. package/dist/gs/strconv/atoi.gs.d.ts +33 -0
  192. package/dist/gs/strconv/atoi.gs.js +200 -0
  193. package/dist/gs/strconv/atoi.gs.js.map +1 -0
  194. package/dist/gs/strconv/doc.gs.d.ts +1 -0
  195. package/dist/gs/strconv/doc.gs.js +2 -0
  196. package/dist/gs/strconv/doc.gs.js.map +1 -0
  197. package/dist/gs/strconv/ftoa.gs.d.ts +3 -0
  198. package/dist/gs/strconv/ftoa.gs.js +58 -0
  199. package/dist/gs/strconv/ftoa.gs.js.map +1 -0
  200. package/dist/gs/strconv/index.d.ts +6 -0
  201. package/dist/gs/strconv/index.js +7 -0
  202. package/dist/gs/strconv/index.js.map +1 -0
  203. package/dist/gs/strconv/itoa.gs.d.ts +6 -0
  204. package/dist/gs/strconv/itoa.gs.js +37 -0
  205. package/dist/gs/strconv/itoa.gs.js.map +1 -0
  206. package/dist/gs/strconv/quote.gs.d.ts +19 -0
  207. package/dist/gs/strconv/quote.gs.js +217 -0
  208. package/dist/gs/strconv/quote.gs.js.map +1 -0
  209. package/dist/gs/strings/index.d.ts +3 -0
  210. package/dist/gs/strings/index.js +4 -0
  211. package/dist/gs/strings/index.js.map +1 -1
  212. package/dist/gs/strings/replace.d.ts +0 -74
  213. package/dist/gs/strings/replace.js +6 -204
  214. package/dist/gs/strings/replace.js.map +1 -1
  215. package/dist/gs/strings/search.d.ts +0 -1
  216. package/dist/gs/strings/search.js +0 -21
  217. package/dist/gs/strings/search.js.map +1 -1
  218. package/dist/gs/sync/atomic/doc.gs.d.ts +28 -0
  219. package/dist/gs/sync/atomic/doc.gs.js +265 -0
  220. package/dist/gs/sync/atomic/doc.gs.js.map +1 -0
  221. package/dist/gs/sync/atomic/doc_64.gs.d.ts +15 -0
  222. package/dist/gs/sync/atomic/doc_64.gs.js +165 -0
  223. package/dist/gs/sync/atomic/doc_64.gs.js.map +1 -0
  224. package/dist/gs/sync/atomic/index.d.ts +4 -0
  225. package/dist/gs/sync/atomic/index.js +5 -0
  226. package/dist/gs/sync/atomic/index.js.map +1 -0
  227. package/dist/gs/sync/atomic/type.gs.d.ts +130 -0
  228. package/dist/gs/sync/atomic/type.gs.js +433 -0
  229. package/dist/gs/sync/atomic/type.gs.js.map +1 -0
  230. package/dist/gs/sync/atomic/value.gs.d.ts +19 -0
  231. package/dist/gs/sync/atomic/value.gs.js +116 -0
  232. package/dist/gs/sync/atomic/value.gs.js.map +1 -0
  233. package/dist/gs/unsafe/unsafe.d.ts +1 -0
  234. package/dist/gs/unsafe/unsafe.js +5 -0
  235. package/dist/gs/unsafe/unsafe.js.map +1 -1
  236. package/gs/builtin/builtin.ts +9 -7
  237. package/gs/builtin/map.ts +5 -1
  238. package/gs/builtin/slice.ts +152 -24
  239. package/gs/github.com/pkg/errors/errors.ts +307 -0
  240. package/gs/github.com/pkg/errors/go113.ts +39 -0
  241. package/gs/github.com/pkg/errors/index.ts +3 -0
  242. package/gs/github.com/pkg/errors/stack.ts +127 -0
  243. package/gs/maps/index.ts +2 -2
  244. package/gs/maps/iter.ts +67 -0
  245. package/gs/maps/maps.ts +89 -0
  246. package/gs/math/TODO.md +156 -0
  247. package/gs/math/abs.gs.test.ts +29 -0
  248. package/gs/math/abs.gs.ts +13 -0
  249. package/gs/math/acosh.gs.test.ts +39 -0
  250. package/gs/math/acosh.gs.ts +21 -0
  251. package/gs/math/asin.gs.test.ts +66 -0
  252. package/gs/math/asin.gs.ts +27 -0
  253. package/gs/math/asinh.gs.test.ts +37 -0
  254. package/gs/math/asinh.gs.ts +21 -0
  255. package/gs/math/atan.gs.test.ts +49 -0
  256. package/gs/math/atan.gs.ts +27 -0
  257. package/gs/math/atan2.gs.test.ts +55 -0
  258. package/gs/math/atan2.gs.ts +37 -0
  259. package/gs/math/atanh.gs.test.ts +47 -0
  260. package/gs/math/atanh.gs.ts +21 -0
  261. package/gs/math/bits.gs.test.ts +88 -0
  262. package/gs/math/bits.gs.ts +61 -0
  263. package/gs/math/cbrt.gs.test.ts +57 -0
  264. package/gs/math/cbrt.gs.ts +20 -0
  265. package/gs/math/const.gs.test.ts +54 -0
  266. package/gs/math/const.gs.ts +93 -0
  267. package/gs/math/copysign.gs.test.ts +44 -0
  268. package/gs/math/copysign.gs.ts +27 -0
  269. package/gs/math/dim.gs.test.ts +102 -0
  270. package/gs/math/dim.gs.ts +84 -0
  271. package/gs/math/erf.gs.test.ts +92 -0
  272. package/gs/math/erf.gs.ts +409 -0
  273. package/gs/math/erfinv.gs.test.ts +104 -0
  274. package/gs/math/erfinv.gs.ts +169 -0
  275. package/gs/math/exp.gs.test.ts +82 -0
  276. package/gs/math/exp.gs.ts +39 -0
  277. package/gs/math/expm1.gs.test.ts +48 -0
  278. package/gs/math/expm1.gs.ts +23 -0
  279. package/gs/math/floor.gs.test.ts +146 -0
  280. package/gs/math/floor.gs.ts +88 -0
  281. package/gs/math/fma.gs.test.ts +83 -0
  282. package/gs/math/fma.gs.ts +7 -0
  283. package/gs/math/frexp.gs.test.ts +146 -0
  284. package/gs/math/frexp.gs.ts +37 -0
  285. package/gs/math/gamma.gs.test.ts +66 -0
  286. package/gs/math/gamma.gs.ts +158 -0
  287. package/gs/math/hypot.gs.test.ts +73 -0
  288. package/gs/math/hypot.gs.ts +23 -0
  289. package/gs/math/index.ts +44 -0
  290. package/gs/math/j0.gs.test.ts +74 -0
  291. package/gs/math/j0.gs.ts +257 -0
  292. package/gs/math/j1.gs.test.ts +81 -0
  293. package/gs/math/j1.gs.ts +231 -0
  294. package/gs/math/jn.gs.test.ts +133 -0
  295. package/gs/math/jn.gs.ts +447 -0
  296. package/gs/math/ldexp.gs.test.ts +128 -0
  297. package/gs/math/ldexp.gs.ts +28 -0
  298. package/gs/math/lgamma.gs.test.ts +102 -0
  299. package/gs/math/lgamma.gs.ts +251 -0
  300. package/gs/math/log.gs.test.ts +40 -0
  301. package/gs/math/log.gs.ts +21 -0
  302. package/gs/math/log10.gs.test.ts +80 -0
  303. package/gs/math/log10.gs.ts +25 -0
  304. package/gs/math/log1p.gs.test.ts +55 -0
  305. package/gs/math/log1p.gs.ts +24 -0
  306. package/gs/math/logb.gs.test.ts +87 -0
  307. package/gs/math/logb.gs.ts +54 -0
  308. package/gs/math/mod.gs.test.ts +64 -0
  309. package/gs/math/mod.gs.ts +36 -0
  310. package/gs/math/modf.gs.test.ts +80 -0
  311. package/gs/math/modf.gs.ts +32 -0
  312. package/gs/math/nextafter.gs.test.ts +107 -0
  313. package/gs/math/nextafter.gs.ts +71 -0
  314. package/gs/math/pow.gs.test.ts +103 -0
  315. package/gs/math/pow.gs.ts +55 -0
  316. package/gs/math/pow10.gs.test.ts +58 -0
  317. package/gs/math/pow10.gs.ts +19 -0
  318. package/gs/math/remainder.gs.test.ts +70 -0
  319. package/gs/math/remainder.gs.ts +33 -0
  320. package/gs/math/signbit.gs.test.ts +33 -0
  321. package/gs/math/signbit.gs.ts +8 -0
  322. package/gs/math/sin.gs.test.ts +83 -0
  323. package/gs/math/sin.gs.ts +38 -0
  324. package/gs/math/sincos.gs.test.ts +91 -0
  325. package/gs/math/sincos.gs.ts +15 -0
  326. package/gs/math/sinh.gs.test.ts +66 -0
  327. package/gs/math/sinh.gs.ts +34 -0
  328. package/gs/math/sqrt.gs.test.ts +49 -0
  329. package/gs/math/sqrt.gs.ts +20 -0
  330. package/gs/math/tan.gs.test.ts +50 -0
  331. package/gs/math/tan.gs.ts +23 -0
  332. package/gs/math/tanh.gs.test.ts +52 -0
  333. package/gs/math/tanh.gs.ts +23 -0
  334. package/gs/math/trig_reduce.gs.ts +66 -0
  335. package/gs/math/unsafe.gs.ts +52 -0
  336. package/gs/strconv/atob.gs.ts +45 -0
  337. package/gs/strconv/atof.gs.ts +60 -0
  338. package/gs/strconv/atoi.gs.ts +243 -0
  339. package/gs/strconv/doc.gs.ts +2 -0
  340. package/gs/strconv/ftoa.gs.ts +66 -0
  341. package/gs/strconv/index.ts +6 -0
  342. package/gs/strconv/itoa.gs.ts +41 -0
  343. package/gs/strconv/quote.gs.ts +245 -0
  344. package/gs/strings/index.ts +4 -0
  345. package/gs/strings/replace.ts +9 -237
  346. package/gs/strings/search.ts +0 -28
  347. package/gs/sync/atomic/doc.gs.ts +276 -0
  348. package/gs/sync/atomic/doc_64.gs.ts +168 -0
  349. package/gs/sync/atomic/index.ts +4 -0
  350. package/gs/sync/atomic/type.gs.ts +596 -0
  351. package/gs/sync/atomic/value.gs.ts +158 -0
  352. package/gs/unsafe/unsafe.ts +6 -0
  353. package/package.json +1 -1
  354. package/gs/maps/iter.gs.ts +0 -71
  355. package/gs/maps/maps.gs.ts +0 -87
  356. package/gs/stringslite/godoc.txt +0 -17
  357. package/gs/stringslite/index.ts +0 -1
  358. package/gs/stringslite/strings.ts +0 -82
@@ -0,0 +1,596 @@
1
+ import * as $ from "@goscript/builtin/builtin.js";
2
+ import { AddInt32, AddUint32, AddUintptr, AndInt32, AndUint32, AndUintptr, CompareAndSwapInt32, CompareAndSwapPointer, CompareAndSwapUint32, CompareAndSwapUintptr, LoadInt32, LoadPointer, LoadUint32, LoadUintptr, OrInt32, OrUint32, OrUintptr, StoreInt32, StorePointer, StoreUint32, StoreUintptr, SwapInt32, SwapPointer, SwapUint32, SwapUintptr, uintptr } from "./doc.gs.js";
3
+ import { AddInt64, AddUint64, AndInt64, AndUint64, CompareAndSwapInt64, CompareAndSwapUint64, LoadInt64, LoadUint64, OrInt64, OrUint64, StoreInt64, StoreUint64, SwapInt64, SwapUint64 } from "./doc_64.gs.js";
4
+
5
+ import * as unsafe from "@goscript/unsafe/index.js"
6
+
7
+ export class Bool {
8
+ public get v(): number {
9
+ return this._fields.v.value
10
+ }
11
+ public set v(value: number) {
12
+ this._fields.v.value = value
13
+ }
14
+
15
+ public _fields: {
16
+ v: $.VarRef<number>;
17
+ }
18
+
19
+ constructor(init?: Partial<{v?: number}>) {
20
+ this._fields = {
21
+ v: $.varRef(init?.v ?? 0)
22
+ }
23
+ }
24
+
25
+ public clone(): Bool {
26
+ const cloned = new Bool()
27
+ cloned._fields = {
28
+ v: $.varRef(this._fields.v.value)
29
+ }
30
+ return cloned
31
+ }
32
+
33
+ // Load atomically loads and returns the value stored in x.
34
+ public Load(): boolean {
35
+ const x = this
36
+ return LoadUint32(x._fields.v) != 0
37
+ }
38
+
39
+ // Store atomically stores val into x.
40
+ public Store(val: boolean): void {
41
+ const x = this
42
+ StoreUint32(x._fields.v, b32(val))
43
+ }
44
+
45
+ // Swap atomically stores new into x and returns the previous value.
46
+ public Swap(_new: boolean): boolean {
47
+ const x = this
48
+ return SwapUint32(x._fields.v, b32(_new)) != 0
49
+ }
50
+
51
+ // CompareAndSwap executes the compare-and-swap operation for the boolean value x.
52
+ public CompareAndSwap(old: boolean, _new: boolean): boolean {
53
+ const x = this
54
+ return CompareAndSwapUint32(x._fields.v, b32(old), b32(_new))
55
+ }
56
+
57
+ // Register this type with the runtime type system
58
+ static __typeInfo = $.registerStructType(
59
+ 'Bool',
60
+ new Bool(),
61
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Basic, name: "boolean" } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Basic, name: "boolean" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Basic, name: "boolean" } }, { name: "new", type: { kind: $.TypeKind.Basic, name: "boolean" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }],
62
+ Bool,
63
+ {"v": { kind: $.TypeKind.Basic, name: "number" }}
64
+ );
65
+ }
66
+
67
+ // b32 returns a uint32 0 or 1 representing b.
68
+ export function b32(b: boolean): number {
69
+ if (b) {
70
+ return 1
71
+ }
72
+ return 0
73
+ }
74
+
75
+
76
+ export class Pointer<T> {
77
+ public get v(): $.VarRef<T> | null {
78
+ return this._fields.v.value
79
+ }
80
+ public set v(value: $.VarRef<T> | null) {
81
+ this._fields.v.value = value
82
+ }
83
+
84
+ public _fields: {
85
+ v: $.VarRef<$.VarRef<T> | null>;
86
+ }
87
+
88
+ constructor(init?: Partial<{v?: $.VarRef<T> | null}>) {
89
+ this._fields = {
90
+ v: $.varRef(init?.v ?? null)
91
+ }
92
+ }
93
+
94
+ public clone(): Pointer<T> {
95
+ const cloned = new Pointer<T>()
96
+ cloned._fields = {
97
+ v: $.varRef(this._fields.v.value)
98
+ }
99
+ return cloned
100
+ }
101
+
102
+ // Load atomically loads and returns the value stored in x.
103
+ public Load(): $.VarRef<T> | null {
104
+ const x = this
105
+ return LoadPointer(x._fields.v) as $.VarRef<T> | null
106
+ }
107
+
108
+ // Store atomically stores val into x.
109
+ public Store(val: T): void {
110
+ const x = this
111
+ const varRef = $.varRef(val)
112
+ StorePointer(x._fields.v, unsafe.Pointer(varRef))
113
+ }
114
+
115
+ // Swap atomically stores new into x and returns the previous value.
116
+ public Swap(_new: T): $.VarRef<T> | null {
117
+ const x = this
118
+ const varRef = $.varRef(_new)
119
+ return SwapPointer(x._fields.v, unsafe.Pointer(varRef)) as $.VarRef<T> | null
120
+ }
121
+
122
+ // CompareAndSwap executes the compare-and-swap operation for x.
123
+ public CompareAndSwap(old: T, _new: T): boolean {
124
+ const x = this
125
+ const oldVarRef = $.varRef(old)
126
+ const newVarRef = $.varRef(_new)
127
+ return CompareAndSwapPointer(x._fields.v, unsafe.Pointer(oldVarRef), unsafe.Pointer(newVarRef))
128
+ }
129
+
130
+ // Register this type with the runtime type system
131
+ static __typeInfo = $.registerStructType(
132
+ 'Pointer',
133
+ new Pointer(),
134
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Pointer, elemType: { kind: $.TypeKind.Interface, methods: [] } } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Pointer, elemType: { kind: $.TypeKind.Interface, methods: [] } } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Pointer, elemType: { kind: $.TypeKind.Interface, methods: [] } } }], returns: [{ type: { kind: $.TypeKind.Pointer, elemType: { kind: $.TypeKind.Interface, methods: [] } } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Pointer, elemType: { kind: $.TypeKind.Interface, methods: [] } } }, { name: "new", type: { kind: $.TypeKind.Pointer, elemType: { kind: $.TypeKind.Interface, methods: [] } } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }],
135
+ Pointer,
136
+ {"v": { kind: $.TypeKind.Basic, name: "Pointer" }}
137
+ );
138
+ }
139
+
140
+ export class Int32 {
141
+ public get v(): number {
142
+ return this._fields.v.value
143
+ }
144
+ public set v(value: number) {
145
+ this._fields.v.value = value
146
+ }
147
+
148
+ public _fields: {
149
+ v: $.VarRef<number>;
150
+ }
151
+
152
+ constructor(init?: Partial<{v?: number}>) {
153
+ this._fields = {
154
+ v: $.varRef(init?.v ?? 0)
155
+ }
156
+ }
157
+
158
+ public clone(): Int32 {
159
+ const cloned = new Int32()
160
+ cloned._fields = {
161
+ v: $.varRef(this._fields.v.value)
162
+ }
163
+ return cloned
164
+ }
165
+
166
+ // Load atomically loads and returns the value stored in x.
167
+ public Load(): number {
168
+ const x = this
169
+ return LoadInt32(x._fields.v)
170
+ }
171
+
172
+ // Store atomically stores val into x.
173
+ public Store(val: number): void {
174
+ const x = this
175
+ StoreInt32(x._fields.v, val)
176
+ }
177
+
178
+ // Swap atomically stores new into x and returns the previous value.
179
+ public Swap(_new: number): number {
180
+ const x = this
181
+ return SwapInt32(x._fields.v, _new)
182
+ }
183
+
184
+ // CompareAndSwap executes the compare-and-swap operation for x.
185
+ public CompareAndSwap(old: number, _new: number): boolean {
186
+ const x = this
187
+ return CompareAndSwapInt32(x._fields.v, old, _new)
188
+ }
189
+
190
+ // Add atomically adds delta to x and returns the new value.
191
+ public Add(delta: number): number {
192
+ const x = this
193
+ return AddInt32(x._fields.v, delta)
194
+ }
195
+
196
+ // And atomically performs a bitwise AND operation on x using the bitmask
197
+ // provided as mask and returns the old value.
198
+ public And(mask: number): number {
199
+ const x = this
200
+ return AndInt32(x._fields.v, mask)
201
+ }
202
+
203
+ // Or atomically performs a bitwise OR operation on x using the bitmask
204
+ // provided as mask and returns the old value.
205
+ public Or(mask: number): number {
206
+ const x = this
207
+ return OrInt32(x._fields.v, mask)
208
+ }
209
+
210
+ // Register this type with the runtime type system
211
+ static __typeInfo = $.registerStructType(
212
+ 'Int32',
213
+ new Int32(),
214
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Basic, name: "number" } }, { name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "Add", args: [{ name: "delta", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "And", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Or", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }],
215
+ Int32,
216
+ {"v": { kind: $.TypeKind.Basic, name: "number" }}
217
+ );
218
+ }
219
+
220
+ export class Int64 {
221
+ public get v(): number {
222
+ return this._fields.v.value
223
+ }
224
+ public set v(value: number) {
225
+ this._fields.v.value = value
226
+ }
227
+
228
+ public _fields: {
229
+ v: $.VarRef<number>;
230
+ }
231
+
232
+ constructor(init?: Partial<{v?: number}>) {
233
+ this._fields = {
234
+ v: $.varRef(init?.v ?? 0)
235
+ }
236
+ }
237
+
238
+ public clone(): Int64 {
239
+ const cloned = new Int64()
240
+ cloned._fields = {
241
+ v: $.varRef(this._fields.v.value)
242
+ }
243
+ return cloned
244
+ }
245
+
246
+ // Load atomically loads and returns the value stored in x.
247
+ public Load(): number {
248
+ const x = this
249
+ return LoadInt64(x._fields.v)
250
+ }
251
+
252
+ // Store atomically stores val into x.
253
+ public Store(val: number): void {
254
+ const x = this
255
+ StoreInt64(x._fields.v, val)
256
+ }
257
+
258
+ // Swap atomically stores new into x and returns the previous value.
259
+ public Swap(_new: number): number {
260
+ const x = this
261
+ return SwapInt64(x._fields.v, _new)
262
+ }
263
+
264
+ // CompareAndSwap executes the compare-and-swap operation for x.
265
+ public CompareAndSwap(old: number, _new: number): boolean {
266
+ const x = this
267
+ return CompareAndSwapInt64(x._fields.v, old, _new)
268
+ }
269
+
270
+ // Add atomically adds delta to x and returns the new value.
271
+ public Add(delta: number): number {
272
+ const x = this
273
+ return AddInt64(x._fields.v, delta)
274
+ }
275
+
276
+ // And atomically performs a bitwise AND operation on x using the bitmask
277
+ // provided as mask and returns the old value.
278
+ public And(mask: number): number {
279
+ const x = this
280
+ return AndInt64(x._fields.v, mask)
281
+ }
282
+
283
+ // Or atomically performs a bitwise OR operation on x using the bitmask
284
+ // provided as mask and returns the old value.
285
+ public Or(mask: number): number {
286
+ const x = this
287
+ return OrInt64(x._fields.v, mask)
288
+ }
289
+
290
+ // Register this type with the runtime type system
291
+ static __typeInfo = $.registerStructType(
292
+ 'Int64',
293
+ new Int64(),
294
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Basic, name: "number" } }, { name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "Add", args: [{ name: "delta", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "And", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Or", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }],
295
+ Int64,
296
+ {"v": { kind: $.TypeKind.Basic, name: "number" }}
297
+ );
298
+ }
299
+
300
+ export class Uint32 {
301
+ public get v(): number {
302
+ return this._fields.v.value
303
+ }
304
+ public set v(value: number) {
305
+ this._fields.v.value = value
306
+ }
307
+
308
+ public _fields: {
309
+ v: $.VarRef<number>;
310
+ }
311
+
312
+ constructor(init?: Partial<{v?: number}>) {
313
+ this._fields = {
314
+ v: $.varRef(init?.v ?? 0)
315
+ }
316
+ }
317
+
318
+ public clone(): Uint32 {
319
+ const cloned = new Uint32()
320
+ cloned._fields = {
321
+ v: $.varRef(this._fields.v.value)
322
+ }
323
+ return cloned
324
+ }
325
+
326
+ // Load atomically loads and returns the value stored in x.
327
+ public Load(): number {
328
+ const x = this
329
+ return LoadUint32(x._fields.v)
330
+ }
331
+
332
+ // Store atomically stores val into x.
333
+ public Store(val: number): void {
334
+ const x = this
335
+ StoreUint32(x._fields.v, val)
336
+ }
337
+
338
+ // Swap atomically stores new into x and returns the previous value.
339
+ public Swap(_new: number): number {
340
+ const x = this
341
+ return SwapUint32(x._fields.v, _new)
342
+ }
343
+
344
+ // CompareAndSwap executes the compare-and-swap operation for x.
345
+ public CompareAndSwap(old: number, _new: number): boolean {
346
+ const x = this
347
+ return CompareAndSwapUint32(x._fields.v, old, _new)
348
+ }
349
+
350
+ // Add atomically adds delta to x and returns the new value.
351
+ public Add(delta: number): number {
352
+ const x = this
353
+ return AddUint32(x._fields.v, delta)
354
+ }
355
+
356
+ // And atomically performs a bitwise AND operation on x using the bitmask
357
+ // provided as mask and returns the old value.
358
+ public And(mask: number): number {
359
+ const x = this
360
+ return AndUint32(x._fields.v, mask)
361
+ }
362
+
363
+ // Or atomically performs a bitwise OR operation on x using the bitmask
364
+ // provided as mask and returns the old value.
365
+ public Or(mask: number): number {
366
+ const x = this
367
+ return OrUint32(x._fields.v, mask)
368
+ }
369
+
370
+ // Register this type with the runtime type system
371
+ static __typeInfo = $.registerStructType(
372
+ 'Uint32',
373
+ new Uint32(),
374
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Basic, name: "number" } }, { name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "Add", args: [{ name: "delta", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "And", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Or", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }],
375
+ Uint32,
376
+ {"v": { kind: $.TypeKind.Basic, name: "number" }}
377
+ );
378
+ }
379
+
380
+ export class Uint64 {
381
+ public get v(): number {
382
+ return this._fields.v.value
383
+ }
384
+ public set v(value: number) {
385
+ this._fields.v.value = value
386
+ }
387
+
388
+ public _fields: {
389
+ v: $.VarRef<number>;
390
+ }
391
+
392
+ constructor(init?: Partial<{v?: number}>) {
393
+ this._fields = {
394
+ v: $.varRef(init?.v ?? 0)
395
+ }
396
+ }
397
+
398
+ public clone(): Uint64 {
399
+ const cloned = new Uint64()
400
+ cloned._fields = {
401
+ v: $.varRef(this._fields.v.value)
402
+ }
403
+ return cloned
404
+ }
405
+
406
+ // Load atomically loads and returns the value stored in x.
407
+ public Load(): number {
408
+ const x = this
409
+ return LoadUint64(x._fields.v)
410
+ }
411
+
412
+ // Store atomically stores val into x.
413
+ public Store(val: number): void {
414
+ const x = this
415
+ StoreUint64(x._fields.v, val)
416
+ }
417
+
418
+ // Swap atomically stores new into x and returns the previous value.
419
+ public Swap(_new: number): number {
420
+ const x = this
421
+ return SwapUint64(x._fields.v, _new)
422
+ }
423
+
424
+ // CompareAndSwap executes the compare-and-swap operation for x.
425
+ public CompareAndSwap(old: number, _new: number): boolean {
426
+ const x = this
427
+ return CompareAndSwapUint64(x._fields.v, old, _new)
428
+ }
429
+
430
+ // Add atomically adds delta to x and returns the new value.
431
+ public Add(delta: number): number {
432
+ const x = this
433
+ return AddUint64(x._fields.v, delta)
434
+ }
435
+
436
+ // And atomically performs a bitwise AND operation on x using the bitmask
437
+ // provided as mask and returns the old value.
438
+ public And(mask: number): number {
439
+ const x = this
440
+ return AndUint64(x._fields.v, mask)
441
+ }
442
+
443
+ // Or atomically performs a bitwise OR operation on x using the bitmask
444
+ // provided as mask and returns the old value.
445
+ public Or(mask: number): number {
446
+ const x = this
447
+ return OrUint64(x._fields.v, mask)
448
+ }
449
+
450
+ // Register this type with the runtime type system
451
+ static __typeInfo = $.registerStructType(
452
+ 'Uint64',
453
+ new Uint64(),
454
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Basic, name: "number" } }, { name: "new", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "Add", args: [{ name: "delta", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "And", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }, { name: "Or", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "number" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "number" } }] }],
455
+ Uint64,
456
+ {"v": { kind: $.TypeKind.Basic, name: "number" }}
457
+ );
458
+ }
459
+
460
+ export class Uintptr {
461
+ public get v(): uintptr {
462
+ return this._fields.v.value
463
+ }
464
+ public set v(value: uintptr) {
465
+ this._fields.v.value = value
466
+ }
467
+
468
+ public _fields: {
469
+ v: $.VarRef<uintptr>;
470
+ }
471
+
472
+ constructor(init?: Partial<{v?: uintptr}>) {
473
+ this._fields = {
474
+ v: $.varRef(init?.v ?? 0)
475
+ }
476
+ }
477
+
478
+ public clone(): Uintptr {
479
+ const cloned = new Uintptr()
480
+ cloned._fields = {
481
+ v: $.varRef(this._fields.v.value)
482
+ }
483
+ return cloned
484
+ }
485
+
486
+ // Load atomically loads and returns the value stored in x.
487
+ public Load(): uintptr {
488
+ const x = this
489
+ return LoadUintptr(x._fields.v)
490
+ }
491
+
492
+ // Store atomically stores val into x.
493
+ public Store(val: uintptr): void {
494
+ const x = this
495
+ StoreUintptr(x._fields.v, val)
496
+ }
497
+
498
+ // Swap atomically stores new into x and returns the previous value.
499
+ public Swap(_new: uintptr): uintptr {
500
+ const x = this
501
+ return SwapUintptr(x._fields.v, _new)
502
+ }
503
+
504
+ // CompareAndSwap executes the compare-and-swap operation for x.
505
+ public CompareAndSwap(old: uintptr, _new: uintptr): boolean {
506
+ const x = this
507
+ return CompareAndSwapUintptr(x._fields.v, old, _new)
508
+ }
509
+
510
+ // Add atomically adds delta to x and returns the new value.
511
+ public Add(delta: uintptr): uintptr {
512
+ const x = this
513
+ return AddUintptr(x._fields.v, delta)
514
+ }
515
+
516
+ // And atomically performs a bitwise AND operation on x using the bitmask
517
+ // provided as mask and returns the old value.
518
+ public And(mask: uintptr): uintptr {
519
+ const x = this
520
+ return AndUintptr(x._fields.v, mask)
521
+ }
522
+
523
+ // Or atomically performs a bitwise OR operation on x using the bitmask
524
+ // provided as mask and returns the updated value after the OR operation.
525
+ public Or(mask: uintptr): uintptr {
526
+ const x = this
527
+ return OrUintptr(x._fields.v, mask)
528
+ }
529
+
530
+ // Register this type with the runtime type system
531
+ static __typeInfo = $.registerStructType(
532
+ 'Uintptr',
533
+ new Uintptr(),
534
+ [{ name: "Load", args: [], returns: [{ type: { kind: $.TypeKind.Basic, name: "uintptr" } }] }, { name: "Store", args: [{ name: "val", type: { kind: $.TypeKind.Basic, name: "uintptr" } }], returns: [] }, { name: "Swap", args: [{ name: "new", type: { kind: $.TypeKind.Basic, name: "uintptr" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "uintptr" } }] }, { name: "CompareAndSwap", args: [{ name: "old", type: { kind: $.TypeKind.Basic, name: "uintptr" } }, { name: "new", type: { kind: $.TypeKind.Basic, name: "uintptr" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "boolean" } }] }, { name: "Add", args: [{ name: "delta", type: { kind: $.TypeKind.Basic, name: "uintptr" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "uintptr" } }] }, { name: "And", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "uintptr" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "uintptr" } }] }, { name: "Or", args: [{ name: "mask", type: { kind: $.TypeKind.Basic, name: "uintptr" } }], returns: [{ type: { kind: $.TypeKind.Basic, name: "uintptr" } }] }],
535
+ Uintptr,
536
+ {"v": { kind: $.TypeKind.Basic, name: "uintptr" }}
537
+ );
538
+ }
539
+
540
+ class noCopy {
541
+ public _fields: {
542
+ }
543
+
544
+ constructor(init?: Partial<{}>) {
545
+ this._fields = {}
546
+ }
547
+
548
+ public clone(): noCopy {
549
+ const cloned = new noCopy()
550
+ cloned._fields = {
551
+ }
552
+ return cloned
553
+ }
554
+
555
+ // Lock is a no-op used by -copylocks checker from `go vet`.
556
+ public Lock(): void {
557
+ }
558
+
559
+ public Unlock(): void {
560
+ }
561
+
562
+ // Register this type with the runtime type system
563
+ static __typeInfo = $.registerStructType(
564
+ 'noCopy',
565
+ new noCopy(),
566
+ [{ name: "Lock", args: [], returns: [] }, { name: "Unlock", args: [], returns: [] }],
567
+ noCopy,
568
+ {}
569
+ );
570
+ }
571
+
572
+ class align64 {
573
+ public _fields: {
574
+ }
575
+
576
+ constructor(init?: Partial<{}>) {
577
+ this._fields = {}
578
+ }
579
+
580
+ public clone(): align64 {
581
+ const cloned = new align64()
582
+ cloned._fields = {
583
+ }
584
+ return cloned
585
+ }
586
+
587
+ // Register this type with the runtime type system
588
+ static __typeInfo = $.registerStructType(
589
+ 'align64',
590
+ new align64(),
591
+ [],
592
+ align64,
593
+ {}
594
+ );
595
+ }
596
+