PageRenderTime 67ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 1ms

/compiler/cmm/CmmParse.hs

https://bitbucket.org/khibino/ghc-hack
Haskell | 2918 lines | 2369 code | 304 blank | 245 comment | 4 complexity | 90c8cd7fec70ee4facecca680ea27f78 MD5 | raw file
Possible License(s): BSD-3-Clause, BSD-2-Clause, LGPL-3.0
  1. {-# OPTIONS_GHC -w #-}
  2. {-# OPTIONS -fglasgow-exts -cpp #-}
  3. {-# LANGUAGE BangPatterns #-} -- required for versions of Happy before 1.18.6
  4. {-# OPTIONS -Wwarn -w #-}
  5. -- The above warning supression flag is a temporary kludge.
  6. -- While working on this module you are encouraged to remove it and fix
  7. -- any warnings in the module. See
  8. -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
  9. -- for details
  10. module CmmParse ( parseCmmFile ) where
  11. import CgMonad hiding (getDynFlags)
  12. import CgExtCode
  13. import CgHeapery
  14. import CgUtils
  15. import CgProf
  16. import CgTicky
  17. import CgInfoTbls
  18. import CgForeignCall
  19. import CgTailCall
  20. import CgStackery
  21. import ClosureInfo
  22. import CgCallConv
  23. import CgClosure
  24. import CostCentre
  25. import BlockId
  26. import OldCmm
  27. import OldPprCmm()
  28. import CmmUtils
  29. import CmmLex
  30. import CLabel
  31. import SMRep
  32. import Lexer
  33. import ForeignCall
  34. import Module
  35. import Literal
  36. import Unique
  37. import UniqFM
  38. import SrcLoc
  39. import DynFlags
  40. import StaticFlags
  41. import ErrUtils
  42. import StringBuffer
  43. import FastString
  44. import Panic
  45. import Constants
  46. import Outputable
  47. import BasicTypes
  48. import Bag ( emptyBag, unitBag )
  49. import Var
  50. import Control.Monad
  51. import Data.Array
  52. import Data.Char ( ord )
  53. import System.Exit
  54. #include "HsVersions.h"
  55. import qualified Data.Array as Happy_Data_Array
  56. import qualified GHC.Exts as Happy_GHC_Exts
  57. -- parser produced by Happy Version 1.18.6
  58. newtype HappyAbsSyn = HappyAbsSyn HappyAny
  59. #if __GLASGOW_HASKELL__ >= 607
  60. type HappyAny = Happy_GHC_Exts.Any
  61. #else
  62. type HappyAny = forall a . a
  63. #endif
  64. happyIn4 :: (ExtCode) -> (HappyAbsSyn )
  65. happyIn4 x = Happy_GHC_Exts.unsafeCoerce# x
  66. {-# INLINE happyIn4 #-}
  67. happyOut4 :: (HappyAbsSyn ) -> (ExtCode)
  68. happyOut4 x = Happy_GHC_Exts.unsafeCoerce# x
  69. {-# INLINE happyOut4 #-}
  70. happyIn5 :: (ExtCode) -> (HappyAbsSyn )
  71. happyIn5 x = Happy_GHC_Exts.unsafeCoerce# x
  72. {-# INLINE happyIn5 #-}
  73. happyOut5 :: (HappyAbsSyn ) -> (ExtCode)
  74. happyOut5 x = Happy_GHC_Exts.unsafeCoerce# x
  75. {-# INLINE happyOut5 #-}
  76. happyIn6 :: (ExtCode) -> (HappyAbsSyn )
  77. happyIn6 x = Happy_GHC_Exts.unsafeCoerce# x
  78. {-# INLINE happyIn6 #-}
  79. happyOut6 :: (HappyAbsSyn ) -> (ExtCode)
  80. happyOut6 x = Happy_GHC_Exts.unsafeCoerce# x
  81. {-# INLINE happyOut6 #-}
  82. happyIn7 :: (ExtFCode CLabel) -> (HappyAbsSyn )
  83. happyIn7 x = Happy_GHC_Exts.unsafeCoerce# x
  84. {-# INLINE happyIn7 #-}
  85. happyOut7 :: (HappyAbsSyn ) -> (ExtFCode CLabel)
  86. happyOut7 x = Happy_GHC_Exts.unsafeCoerce# x
  87. {-# INLINE happyOut7 #-}
  88. happyIn8 :: ([ExtFCode [CmmStatic]]) -> (HappyAbsSyn )
  89. happyIn8 x = Happy_GHC_Exts.unsafeCoerce# x
  90. {-# INLINE happyIn8 #-}
  91. happyOut8 :: (HappyAbsSyn ) -> ([ExtFCode [CmmStatic]])
  92. happyOut8 x = Happy_GHC_Exts.unsafeCoerce# x
  93. {-# INLINE happyOut8 #-}
  94. happyIn9 :: (ExtFCode [CmmStatic]) -> (HappyAbsSyn )
  95. happyIn9 x = Happy_GHC_Exts.unsafeCoerce# x
  96. {-# INLINE happyIn9 #-}
  97. happyOut9 :: (HappyAbsSyn ) -> (ExtFCode [CmmStatic])
  98. happyOut9 x = Happy_GHC_Exts.unsafeCoerce# x
  99. {-# INLINE happyOut9 #-}
  100. happyIn10 :: ([ExtFCode CmmExpr]) -> (HappyAbsSyn )
  101. happyIn10 x = Happy_GHC_Exts.unsafeCoerce# x
  102. {-# INLINE happyIn10 #-}
  103. happyOut10 :: (HappyAbsSyn ) -> ([ExtFCode CmmExpr])
  104. happyOut10 x = Happy_GHC_Exts.unsafeCoerce# x
  105. {-# INLINE happyOut10 #-}
  106. happyIn11 :: (ExtCode) -> (HappyAbsSyn )
  107. happyIn11 x = Happy_GHC_Exts.unsafeCoerce# x
  108. {-# INLINE happyIn11 #-}
  109. happyOut11 :: (HappyAbsSyn ) -> (ExtCode)
  110. happyOut11 x = Happy_GHC_Exts.unsafeCoerce# x
  111. {-# INLINE happyOut11 #-}
  112. happyIn12 :: (ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg])) -> (HappyAbsSyn )
  113. happyIn12 x = Happy_GHC_Exts.unsafeCoerce# x
  114. {-# INLINE happyIn12 #-}
  115. happyOut12 :: (HappyAbsSyn ) -> (ExtFCode (CLabel, CmmInfoTable, [Maybe LocalReg]))
  116. happyOut12 x = Happy_GHC_Exts.unsafeCoerce# x
  117. {-# INLINE happyOut12 #-}
  118. happyIn13 :: (ExtCode) -> (HappyAbsSyn )
  119. happyIn13 x = Happy_GHC_Exts.unsafeCoerce# x
  120. {-# INLINE happyIn13 #-}
  121. happyOut13 :: (HappyAbsSyn ) -> (ExtCode)
  122. happyOut13 x = Happy_GHC_Exts.unsafeCoerce# x
  123. {-# INLINE happyOut13 #-}
  124. happyIn14 :: (ExtCode) -> (HappyAbsSyn )
  125. happyIn14 x = Happy_GHC_Exts.unsafeCoerce# x
  126. {-# INLINE happyIn14 #-}
  127. happyOut14 :: (HappyAbsSyn ) -> (ExtCode)
  128. happyOut14 x = Happy_GHC_Exts.unsafeCoerce# x
  129. {-# INLINE happyOut14 #-}
  130. happyIn15 :: ([(FastString, CLabel)]) -> (HappyAbsSyn )
  131. happyIn15 x = Happy_GHC_Exts.unsafeCoerce# x
  132. {-# INLINE happyIn15 #-}
  133. happyOut15 :: (HappyAbsSyn ) -> ([(FastString, CLabel)])
  134. happyOut15 x = Happy_GHC_Exts.unsafeCoerce# x
  135. {-# INLINE happyOut15 #-}
  136. happyIn16 :: ((FastString, CLabel)) -> (HappyAbsSyn )
  137. happyIn16 x = Happy_GHC_Exts.unsafeCoerce# x
  138. {-# INLINE happyIn16 #-}
  139. happyOut16 :: (HappyAbsSyn ) -> ((FastString, CLabel))
  140. happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x
  141. {-# INLINE happyOut16 #-}
  142. happyIn17 :: ([FastString]) -> (HappyAbsSyn )
  143. happyIn17 x = Happy_GHC_Exts.unsafeCoerce# x
  144. {-# INLINE happyIn17 #-}
  145. happyOut17 :: (HappyAbsSyn ) -> ([FastString])
  146. happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x
  147. {-# INLINE happyOut17 #-}
  148. happyIn18 :: (ExtCode) -> (HappyAbsSyn )
  149. happyIn18 x = Happy_GHC_Exts.unsafeCoerce# x
  150. {-# INLINE happyIn18 #-}
  151. happyOut18 :: (HappyAbsSyn ) -> (ExtCode)
  152. happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x
  153. {-# INLINE happyOut18 #-}
  154. happyIn19 :: (CmmReturnInfo) -> (HappyAbsSyn )
  155. happyIn19 x = Happy_GHC_Exts.unsafeCoerce# x
  156. {-# INLINE happyIn19 #-}
  157. happyOut19 :: (HappyAbsSyn ) -> (CmmReturnInfo)
  158. happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x
  159. {-# INLINE happyOut19 #-}
  160. happyIn20 :: (ExtFCode BoolExpr) -> (HappyAbsSyn )
  161. happyIn20 x = Happy_GHC_Exts.unsafeCoerce# x
  162. {-# INLINE happyIn20 #-}
  163. happyOut20 :: (HappyAbsSyn ) -> (ExtFCode BoolExpr)
  164. happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x
  165. {-# INLINE happyOut20 #-}
  166. happyIn21 :: (ExtFCode BoolExpr) -> (HappyAbsSyn )
  167. happyIn21 x = Happy_GHC_Exts.unsafeCoerce# x
  168. {-# INLINE happyIn21 #-}
  169. happyOut21 :: (HappyAbsSyn ) -> (ExtFCode BoolExpr)
  170. happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x
  171. {-# INLINE happyOut21 #-}
  172. happyIn22 :: (CmmSafety) -> (HappyAbsSyn )
  173. happyIn22 x = Happy_GHC_Exts.unsafeCoerce# x
  174. {-# INLINE happyIn22 #-}
  175. happyOut22 :: (HappyAbsSyn ) -> (CmmSafety)
  176. happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x
  177. {-# INLINE happyOut22 #-}
  178. happyIn23 :: (Maybe [GlobalReg]) -> (HappyAbsSyn )
  179. happyIn23 x = Happy_GHC_Exts.unsafeCoerce# x
  180. {-# INLINE happyIn23 #-}
  181. happyOut23 :: (HappyAbsSyn ) -> (Maybe [GlobalReg])
  182. happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x
  183. {-# INLINE happyOut23 #-}
  184. happyIn24 :: ([GlobalReg]) -> (HappyAbsSyn )
  185. happyIn24 x = Happy_GHC_Exts.unsafeCoerce# x
  186. {-# INLINE happyIn24 #-}
  187. happyOut24 :: (HappyAbsSyn ) -> ([GlobalReg])
  188. happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x
  189. {-# INLINE happyOut24 #-}
  190. happyIn25 :: (Maybe (Int,Int)) -> (HappyAbsSyn )
  191. happyIn25 x = Happy_GHC_Exts.unsafeCoerce# x
  192. {-# INLINE happyIn25 #-}
  193. happyOut25 :: (HappyAbsSyn ) -> (Maybe (Int,Int))
  194. happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x
  195. {-# INLINE happyOut25 #-}
  196. happyIn26 :: ([ExtFCode ([Int],Either BlockId ExtCode)]) -> (HappyAbsSyn )
  197. happyIn26 x = Happy_GHC_Exts.unsafeCoerce# x
  198. {-# INLINE happyIn26 #-}
  199. happyOut26 :: (HappyAbsSyn ) -> ([ExtFCode ([Int],Either BlockId ExtCode)])
  200. happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x
  201. {-# INLINE happyOut26 #-}
  202. happyIn27 :: (ExtFCode ([Int],Either BlockId ExtCode)) -> (HappyAbsSyn )
  203. happyIn27 x = Happy_GHC_Exts.unsafeCoerce# x
  204. {-# INLINE happyIn27 #-}
  205. happyOut27 :: (HappyAbsSyn ) -> (ExtFCode ([Int],Either BlockId ExtCode))
  206. happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x
  207. {-# INLINE happyOut27 #-}
  208. happyIn28 :: (ExtFCode (Either BlockId ExtCode)) -> (HappyAbsSyn )
  209. happyIn28 x = Happy_GHC_Exts.unsafeCoerce# x
  210. {-# INLINE happyIn28 #-}
  211. happyOut28 :: (HappyAbsSyn ) -> (ExtFCode (Either BlockId ExtCode))
  212. happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x
  213. {-# INLINE happyOut28 #-}
  214. happyIn29 :: ([Int]) -> (HappyAbsSyn )
  215. happyIn29 x = Happy_GHC_Exts.unsafeCoerce# x
  216. {-# INLINE happyIn29 #-}
  217. happyOut29 :: (HappyAbsSyn ) -> ([Int])
  218. happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x
  219. {-# INLINE happyOut29 #-}
  220. happyIn30 :: (Maybe ExtCode) -> (HappyAbsSyn )
  221. happyIn30 x = Happy_GHC_Exts.unsafeCoerce# x
  222. {-# INLINE happyIn30 #-}
  223. happyOut30 :: (HappyAbsSyn ) -> (Maybe ExtCode)
  224. happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x
  225. {-# INLINE happyOut30 #-}
  226. happyIn31 :: (ExtCode) -> (HappyAbsSyn )
  227. happyIn31 x = Happy_GHC_Exts.unsafeCoerce# x
  228. {-# INLINE happyIn31 #-}
  229. happyOut31 :: (HappyAbsSyn ) -> (ExtCode)
  230. happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x
  231. {-# INLINE happyOut31 #-}
  232. happyIn32 :: (ExtFCode CmmExpr) -> (HappyAbsSyn )
  233. happyIn32 x = Happy_GHC_Exts.unsafeCoerce# x
  234. {-# INLINE happyIn32 #-}
  235. happyOut32 :: (HappyAbsSyn ) -> (ExtFCode CmmExpr)
  236. happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x
  237. {-# INLINE happyOut32 #-}
  238. happyIn33 :: (ExtFCode CmmExpr) -> (HappyAbsSyn )
  239. happyIn33 x = Happy_GHC_Exts.unsafeCoerce# x
  240. {-# INLINE happyIn33 #-}
  241. happyOut33 :: (HappyAbsSyn ) -> (ExtFCode CmmExpr)
  242. happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x
  243. {-# INLINE happyOut33 #-}
  244. happyIn34 :: (CmmType) -> (HappyAbsSyn )
  245. happyIn34 x = Happy_GHC_Exts.unsafeCoerce# x
  246. {-# INLINE happyIn34 #-}
  247. happyOut34 :: (HappyAbsSyn ) -> (CmmType)
  248. happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x
  249. {-# INLINE happyOut34 #-}
  250. happyIn35 :: ([ExtFCode HintedCmmActual]) -> (HappyAbsSyn )
  251. happyIn35 x = Happy_GHC_Exts.unsafeCoerce# x
  252. {-# INLINE happyIn35 #-}
  253. happyOut35 :: (HappyAbsSyn ) -> ([ExtFCode HintedCmmActual])
  254. happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x
  255. {-# INLINE happyOut35 #-}
  256. happyIn36 :: ([ExtFCode HintedCmmActual]) -> (HappyAbsSyn )
  257. happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x
  258. {-# INLINE happyIn36 #-}
  259. happyOut36 :: (HappyAbsSyn ) -> ([ExtFCode HintedCmmActual])
  260. happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x
  261. {-# INLINE happyOut36 #-}
  262. happyIn37 :: ([ExtFCode HintedCmmActual]) -> (HappyAbsSyn )
  263. happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x
  264. {-# INLINE happyIn37 #-}
  265. happyOut37 :: (HappyAbsSyn ) -> ([ExtFCode HintedCmmActual])
  266. happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x
  267. {-# INLINE happyOut37 #-}
  268. happyIn38 :: (ExtFCode HintedCmmActual) -> (HappyAbsSyn )
  269. happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x
  270. {-# INLINE happyIn38 #-}
  271. happyOut38 :: (HappyAbsSyn ) -> (ExtFCode HintedCmmActual)
  272. happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x
  273. {-# INLINE happyOut38 #-}
  274. happyIn39 :: ([ExtFCode CmmExpr]) -> (HappyAbsSyn )
  275. happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x
  276. {-# INLINE happyIn39 #-}
  277. happyOut39 :: (HappyAbsSyn ) -> ([ExtFCode CmmExpr])
  278. happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x
  279. {-# INLINE happyOut39 #-}
  280. happyIn40 :: ([ExtFCode CmmExpr]) -> (HappyAbsSyn )
  281. happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x
  282. {-# INLINE happyIn40 #-}
  283. happyOut40 :: (HappyAbsSyn ) -> ([ExtFCode CmmExpr])
  284. happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x
  285. {-# INLINE happyOut40 #-}
  286. happyIn41 :: (ExtFCode CmmExpr) -> (HappyAbsSyn )
  287. happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x
  288. {-# INLINE happyIn41 #-}
  289. happyOut41 :: (HappyAbsSyn ) -> (ExtFCode CmmExpr)
  290. happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x
  291. {-# INLINE happyOut41 #-}
  292. happyIn42 :: ([ExtFCode HintedCmmFormal]) -> (HappyAbsSyn )
  293. happyIn42 x = Happy_GHC_Exts.unsafeCoerce# x
  294. {-# INLINE happyIn42 #-}
  295. happyOut42 :: (HappyAbsSyn ) -> ([ExtFCode HintedCmmFormal])
  296. happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x
  297. {-# INLINE happyOut42 #-}
  298. happyIn43 :: ([ExtFCode HintedCmmFormal]) -> (HappyAbsSyn )
  299. happyIn43 x = Happy_GHC_Exts.unsafeCoerce# x
  300. {-# INLINE happyIn43 #-}
  301. happyOut43 :: (HappyAbsSyn ) -> ([ExtFCode HintedCmmFormal])
  302. happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x
  303. {-# INLINE happyOut43 #-}
  304. happyIn44 :: (ExtFCode HintedCmmFormal) -> (HappyAbsSyn )
  305. happyIn44 x = Happy_GHC_Exts.unsafeCoerce# x
  306. {-# INLINE happyIn44 #-}
  307. happyOut44 :: (HappyAbsSyn ) -> (ExtFCode HintedCmmFormal)
  308. happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x
  309. {-# INLINE happyOut44 #-}
  310. happyIn45 :: (ExtFCode LocalReg) -> (HappyAbsSyn )
  311. happyIn45 x = Happy_GHC_Exts.unsafeCoerce# x
  312. {-# INLINE happyIn45 #-}
  313. happyOut45 :: (HappyAbsSyn ) -> (ExtFCode LocalReg)
  314. happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x
  315. {-# INLINE happyOut45 #-}
  316. happyIn46 :: (ExtFCode CmmReg) -> (HappyAbsSyn )
  317. happyIn46 x = Happy_GHC_Exts.unsafeCoerce# x
  318. {-# INLINE happyIn46 #-}
  319. happyOut46 :: (HappyAbsSyn ) -> (ExtFCode CmmReg)
  320. happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x
  321. {-# INLINE happyOut46 #-}
  322. happyIn47 :: ([ExtFCode LocalReg]) -> (HappyAbsSyn )
  323. happyIn47 x = Happy_GHC_Exts.unsafeCoerce# x
  324. {-# INLINE happyIn47 #-}
  325. happyOut47 :: (HappyAbsSyn ) -> ([ExtFCode LocalReg])
  326. happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x
  327. {-# INLINE happyOut47 #-}
  328. happyIn48 :: ([ExtFCode LocalReg]) -> (HappyAbsSyn )
  329. happyIn48 x = Happy_GHC_Exts.unsafeCoerce# x
  330. {-# INLINE happyIn48 #-}
  331. happyOut48 :: (HappyAbsSyn ) -> ([ExtFCode LocalReg])
  332. happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x
  333. {-# INLINE happyOut48 #-}
  334. happyIn49 :: ([ExtFCode LocalReg]) -> (HappyAbsSyn )
  335. happyIn49 x = Happy_GHC_Exts.unsafeCoerce# x
  336. {-# INLINE happyIn49 #-}
  337. happyOut49 :: (HappyAbsSyn ) -> ([ExtFCode LocalReg])
  338. happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x
  339. {-# INLINE happyOut49 #-}
  340. happyIn50 :: (ExtFCode LocalReg) -> (HappyAbsSyn )
  341. happyIn50 x = Happy_GHC_Exts.unsafeCoerce# x
  342. {-# INLINE happyIn50 #-}
  343. happyOut50 :: (HappyAbsSyn ) -> (ExtFCode LocalReg)
  344. happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x
  345. {-# INLINE happyOut50 #-}
  346. happyIn51 :: (ExtFCode (Maybe UpdateFrame)) -> (HappyAbsSyn )
  347. happyIn51 x = Happy_GHC_Exts.unsafeCoerce# x
  348. {-# INLINE happyIn51 #-}
  349. happyOut51 :: (HappyAbsSyn ) -> (ExtFCode (Maybe UpdateFrame))
  350. happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x
  351. {-# INLINE happyOut51 #-}
  352. happyIn52 :: (ExtFCode (Maybe BlockId)) -> (HappyAbsSyn )
  353. happyIn52 x = Happy_GHC_Exts.unsafeCoerce# x
  354. {-# INLINE happyIn52 #-}
  355. happyOut52 :: (HappyAbsSyn ) -> (ExtFCode (Maybe BlockId))
  356. happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x
  357. {-# INLINE happyOut52 #-}
  358. happyIn53 :: (CmmType) -> (HappyAbsSyn )
  359. happyIn53 x = Happy_GHC_Exts.unsafeCoerce# x
  360. {-# INLINE happyIn53 #-}
  361. happyOut53 :: (HappyAbsSyn ) -> (CmmType)
  362. happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x
  363. {-# INLINE happyOut53 #-}
  364. happyIn54 :: (CmmType) -> (HappyAbsSyn )
  365. happyIn54 x = Happy_GHC_Exts.unsafeCoerce# x
  366. {-# INLINE happyIn54 #-}
  367. happyOut54 :: (HappyAbsSyn ) -> (CmmType)
  368. happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x
  369. {-# INLINE happyOut54 #-}
  370. happyInTok :: (Located CmmToken) -> (HappyAbsSyn )
  371. happyInTok x = Happy_GHC_Exts.unsafeCoerce# x
  372. {-# INLINE happyInTok #-}
  373. happyOutTok :: (HappyAbsSyn ) -> (Located CmmToken)
  374. happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x
  375. {-# INLINE happyOutTok #-}
  376. happyActOffsets :: HappyAddr
  377. happyActOffsets = HappyA# "\x37\x01\x00\x00\x34\x03\x37\x01\x00\x00\x00\x00\x6f\x03\x00\x00\x26\x03\x00\x00\x6e\x03\x6c\x03\x66\x03\x61\x03\x60\x03\x5e\x03\x23\x03\x1c\x03\x22\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x51\x03\x2b\x03\x94\x00\x54\x03\x37\x03\x00\x00\x15\x03\x44\x03\x3b\x03\x21\x03\x13\x03\x08\x03\x06\x03\x05\x03\x03\x03\xf8\x02\x33\x03\x05\x00\x00\x00\xf7\x02\x00\x00\xf3\x02\x00\x00\x20\x03\x17\x03\x12\x03\x11\x03\x07\x03\x01\x03\xe6\x02\x00\x00\xe3\x02\x00\x00\x22\x01\x00\x00\x10\x03\x00\x00\x00\x03\xd5\x02\xe5\x02\x0a\x03\x61\x00\x00\x00\x94\x00\x00\x00\x00\x00\x3c\x00\x02\x03\x00\x00\xc6\x02\xc3\x02\xb5\x02\xb4\x02\xa3\x02\xb3\x02\x00\x00\xf2\x02\x1a\x00\xf1\x02\xf0\x02\x0c\x00\xe7\x02\xe2\x02\xd7\x02\x00\x00\xe4\x02\x3c\x00\xff\xff\xe1\x02\xe0\x02\xde\x02\x00\x00\x27\x02\xcc\x02\x00\x00\xd8\x02\x61\x00\x61\x00\x98\x02\x61\x00\x00\x00\x00\x00\x00\x00\xbe\x02\xbe\x02\x1a\x00\xd1\x02\x1a\x00\x1a\x00\xe7\xff\xc4\x02\x0d\x00\x00\x00\x0b\x01\x93\x02\x54\x00\x61\x00\xc1\x02\xc2\x02\x00\x00\x14\x00\x00\x00\x94\x00\x00\x00\xd2\x00\xb6\x02\x00\x00\x3f\x02\x61\x00\x86\x02\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x61\x00\x02\x00\x77\x02\x83\x02\x94\x01\x00\x00\x00\x00\x00\x00\x81\x02\x76\x02\x73\x02\x00\x00\x94\x00\x65\x02\xab\x02\x61\x00\xa1\x02\x00\x00\x9a\x03\x96\x02\xa0\x02\xa5\x02\x92\x02\x90\x02\x87\x02\x00\x00\x91\x02\x80\x02\x52\x02\x89\x02\xc2\x03\xc2\x03\xc2\x03\xc2\x03\x7b\x00\x7b\x00\xc2\x03\xc2\x03\xd6\x03\xfc\x00\xdd\x03\xd2\x00\xd2\x00\x00\x00\x00\x00\x00\x00\x86\x03\x84\x02\x00\x00\x7b\x02\xdc\x01\x00\x00\x61\x00\x00\x00\x00\x00\x61\x00\x61\x00\x49\x02\x82\x02\x61\x00\x0e\x02\x08\x00\x00\x00\xae\x03\x54\x00\x54\x00\x75\x02\x61\x02\x5a\x02\x00\x00\x00\x00\x3a\x02\x61\x00\x61\x00\x21\x02\x53\x02\x00\x00\x00\x00\x00\x00\x17\x02\x61\x00\x80\x01\xc2\x01\x00\x00\x0b\x01\x4f\x02\x00\x00\x00\x00\x0d\x01\x4e\x02\x3f\x02\x1a\x00\x54\x00\x54\x00\x15\x02\x48\x02\x99\x00\x41\x02\x00\x00\x32\x02\x00\x00\x28\x02\xa8\x01\x37\x02\x36\x02\x00\x00\x43\x00\x00\x00\x61\x00\x3b\x02\x30\x02\x29\x02\x2e\x02\xee\x01\xe5\x01\xe4\x01\x00\x00\xe2\x01\x00\x00\x00\x00\x0f\x02\x03\x02\x02\x02\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x02\xe0\x01\xcc\x01\x61\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x01\xec\x01\x07\x02\x00\x00\x00\x00\x00\x00\xf7\x01\x00\x00\xf5\x01\xf8\x01\x61\x00\x61\x00\x61\x00\xd6\x01\x00\x00\xef\x01\xc6\x01\xbe\x01\xb1\x01\x00\x00\xa6\x01\xb0\x01\xa5\x01\xa4\x01\xce\x01\xcd\x01\xc5\x01\xd2\x01\xd7\x01\xc3\x01\x00\x00\xc9\x01\xcb\x01\x00\x00\x00\x00\xc8\x01\x6c\x01\xb9\x01\xb8\x01\x89\x01\x89\x01\x00\x00\x1a\x00\xaa\x01\x00\x00\x87\x01\x24\x00\x00\x00\x7e\x01\x7d\x01\x6b\x01\xa2\x01\x83\x01\x6f\x01\x00\x00\x1a\x00\x58\x01\x00\x00\x1a\x00\x93\x01\x7f\x01\x00\x00\x7f\x01\x81\x01\x06\x00\x46\x01\x00\x00\x66\x01\x64\x01\x5b\x01\x12\x01\x0c\x01\x00\x00\x45\x01\x41\x01\x00\x00\x00\x00\x00\x00\x3c\x01\x08\x01\x29\x01\x00\x00\x02\x01\x00\x00\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
  378. happyGotoOffsets :: HappyAddr
  379. happyGotoOffsets = HappyA# "\xb9\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x0e\x01\x00\x00\x1a\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x01\x00\x00\x10\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\x00\xee\x00\x3b\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe5\x00\x00\x00\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x01\x00\x00\x03\x01\x00\x00\xed\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x00\x00\x00\x5f\x03\x00\x00\x40\x00\x00\x00\x00\x00\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x01\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\xff\x5d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\x03\x4d\x03\x00\x00\x3f\x03\x00\x00\x00\x00\x00\x00\xdc\x00\xd7\x00\xf9\x00\x00\x00\xf7\x00\xe8\x00\x00\x00\x00\x00\xd9\x00\x00\x00\x95\x00\x00\x00\x33\x01\x3d\x03\xc3\x00\xcf\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x03\x00\x00\x7d\x02\x2d\x03\x1f\x03\x1d\x03\x0f\x03\x0d\x03\xff\x02\xfd\x02\xef\x02\xed\x02\xdf\x02\xdd\x02\xcf\x02\xcd\x02\xbf\x02\xbd\x02\xaf\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00\x00\x00\xad\x02\x00\x00\x00\x00\xd3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x02\x00\x00\x00\x00\x63\x02\x9f\x02\x00\x00\x00\x00\x51\x02\xb6\x00\x00\x00\x00\x00\x00\x00\x25\x01\x23\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x9d\x02\x8f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8d\x02\x00\x00\x00\x00\x00\x00\xf6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcd\x00\x15\x01\xf4\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf2\xff\x00\x00\x7f\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x00\x00\x00\x5c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x02\x43\x02\x20\x01\xa7\x00\x00\x00\x00\x00\xa5\x00\x4a\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x00\x0e\x00\x00\x00\xca\x00\x00\x00\x00\x00\x4e\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x00\x00\x00\x00\x00\xbb\x00\x00\x00\x1b\x00\x00\x00\x07\x00\x00\x00\x16\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
  380. happyDefActions :: HappyAddr
  381. happyDefActions = HappyA# "\xfe\xff\x00\x00\x00\x00\xfe\xff\xfb\xff\xfc\xff\x79\xff\xfa\xff\x00\x00\x6c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xff\x6b\xff\x6a\xff\x69\xff\x68\xff\x67\xff\x66\xff\x79\xff\x6f\xff\x77\xff\x00\x00\xdd\xff\xdb\xff\x00\x00\x00\x00\x00\x00\xd9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xff\xfd\xff\x71\xff\xeb\xff\x00\x00\xe0\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\x00\x00\xda\xff\x00\x00\xdf\xff\x00\x00\x76\xff\x74\xff\x00\x00\x71\xff\x00\x00\x00\x00\x72\xff\x75\xff\x78\xff\xdc\xff\xf6\xff\x00\x00\xd8\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xff\x00\x00\xe3\xff\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xff\x00\x00\xf6\xff\x00\x00\x6c\xff\x00\x00\x6d\xff\x73\xff\x00\x00\x9b\xff\x97\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\xff\x85\xff\x98\xff\x93\xff\x93\xff\xe3\xff\x00\x00\xe3\xff\xe3\xff\x00\x00\x00\x00\x00\x00\xd7\xff\x00\x00\x00\x00\x00\x00\x00\x00\x91\xff\xba\xff\x7a\xff\x7b\xff\x99\xff\x00\x00\x9a\xff\x9d\xff\x00\x00\x9e\xff\x00\x00\x00\x00\x00\x00\x89\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\xff\xf5\xff\xf8\xff\x00\x00\x00\x00\x00\x00\xe5\xff\x77\xff\x00\x00\x00\x00\x00\x00\x00\x00\xec\xff\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\xff\x00\x00\xee\xff\x00\x00\x00\x00\xa0\xff\x9f\xff\xa2\xff\xa4\xff\xa8\xff\xa9\xff\xa1\xff\xa3\xff\xa5\xff\xa6\xff\xa7\xff\xaa\xff\xab\xff\xac\xff\xad\xff\xae\xff\x87\xff\x00\x00\x88\xff\x00\x00\x00\x00\x94\xff\x89\xff\x92\xff\xd6\xff\x89\xff\x00\x00\x00\x00\x00\x00\x8f\xff\x91\xff\x00\x00\xc8\xff\xc7\xff\x00\x00\x00\x00\x00\x00\x00\x00\x81\xff\x7e\xff\x7c\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe1\xff\xe2\xff\xea\xff\x00\x00\x00\x00\x00\x00\x00\x00\x7d\xff\x80\xff\x00\x00\xcf\xff\xc4\xff\x00\x00\xc8\xff\xc7\xff\xe3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xff\x00\x00\x8e\xff\x8d\xff\xcd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x96\xff\x00\x00\x70\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\xff\x00\x00\xf9\xff\xed\xff\x00\x00\x00\x00\x00\x00\x00\x00\xf0\xff\xef\xff\xf2\xff\xf1\xff\x86\xff\x9c\xff\x95\xff\x00\x00\xb9\xff\x00\x00\x00\x00\x90\xff\x8a\xff\xce\xff\xcc\xff\xc5\xff\xc6\xff\x00\x00\xc3\xff\x82\xff\x7f\xff\x00\x00\xd5\xff\x00\x00\x00\x00\x8f\xff\x8f\xff\x00\x00\xb0\xff\x8c\xff\x00\x00\xb1\xff\xb9\xff\x00\x00\xd1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb4\xff\xb8\xff\x00\x00\x00\x00\xbb\xff\xcb\xff\x00\x00\x00\x00\x00\x00\x00\x00\xc2\xff\xc2\xff\xd4\xff\xe3\xff\x00\x00\xd0\xff\x00\x00\x00\x00\xe6\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\xff\xe3\xff\x00\x00\xb3\xff\xe3\xff\x00\x00\xc0\xff\xc1\xff\xc0\xff\x00\x00\x00\x00\xca\xff\xaf\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\xff\x00\x00\x00\x00\xb6\xff\xb5\xff\xb2\xff\x00\x00\x00\x00\x00\x00\xbf\xff\xbd\xff\xd2\xff\x00\x00\xbe\xff\xc9\xff\xd3\xff\xe7\xff\xe8\xff\xbc\xff"#
  382. happyCheck :: HappyAddr
  383. happyCheck = HappyA# "\xff\xff\x02\x00\x04\x00\x05\x00\x10\x00\x11\x00\x07\x00\x02\x00\x06\x00\x14\x00\x0b\x00\x03\x00\x06\x00\x0e\x00\x0f\x00\x1d\x00\x1c\x00\x1d\x00\x05\x00\x0f\x00\x08\x00\x01\x00\x2f\x00\x25\x00\x31\x00\x25\x00\x13\x00\x07\x00\x02\x00\x27\x00\x28\x00\x29\x00\x12\x00\x07\x00\x16\x00\x31\x00\x32\x00\x31\x00\x32\x00\x03\x00\x20\x00\x21\x00\x14\x00\x00\x00\x01\x00\x02\x00\x13\x00\x31\x00\x32\x00\x2c\x00\x07\x00\x08\x00\x2c\x00\x0a\x00\x18\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x29\x00\x42\x00\x3f\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x07\x00\x31\x00\x32\x00\x40\x00\x34\x00\x35\x00\x2c\x00\x0e\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x07\x00\x31\x00\x32\x00\x22\x00\x0b\x00\x16\x00\x17\x00\x0e\x00\x0f\x00\x2c\x00\x2d\x00\x2e\x00\x19\x00\x07\x00\x31\x00\x32\x00\x17\x00\x0b\x00\x2d\x00\x2e\x00\x0e\x00\x0f\x00\x31\x00\x32\x00\x19\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x12\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x04\x00\x05\x00\x16\x00\x17\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x00\x00\x01\x00\x02\x00\x27\x00\x28\x00\x29\x00\x1a\x00\x07\x00\x08\x00\x1b\x00\x0a\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x29\x00\x0e\x00\x06\x00\x0e\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x09\x00\x0a\x00\x1f\x00\x09\x00\x0a\x00\x0e\x00\x06\x00\x41\x00\x0e\x00\x31\x00\x32\x00\x0c\x00\x0d\x00\x0e\x00\x26\x00\x1f\x00\x26\x00\x15\x00\x2a\x00\x0d\x00\x2a\x00\x31\x00\x32\x00\x31\x00\x32\x00\x31\x00\x32\x00\x31\x00\x32\x00\x26\x00\x09\x00\x0a\x00\x26\x00\x2a\x00\x1e\x00\x0e\x00\x2a\x00\x0b\x00\x0c\x00\x1e\x00\x31\x00\x32\x00\x2f\x00\x31\x00\x32\x00\x09\x00\x0a\x00\x09\x00\x0a\x00\x06\x00\x0e\x00\x03\x00\x0e\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x26\x00\x09\x00\x0a\x00\x0d\x00\x2a\x00\x2f\x00\x0e\x00\x30\x00\x1a\x00\x1b\x00\x16\x00\x31\x00\x32\x00\x0b\x00\x0c\x00\x26\x00\x30\x00\x26\x00\x2b\x00\x2a\x00\x3f\x00\x2a\x00\x0d\x00\x10\x00\x11\x00\x0d\x00\x31\x00\x32\x00\x31\x00\x32\x00\x26\x00\x20\x00\x21\x00\x06\x00\x2a\x00\x1c\x00\x1d\x00\x10\x00\x11\x00\x10\x00\x11\x00\x31\x00\x32\x00\x2b\x00\x25\x00\x33\x00\x1c\x00\x1d\x00\x02\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x10\x00\x11\x00\x25\x00\x31\x00\x32\x00\x25\x00\x08\x00\x25\x00\x40\x00\x41\x00\x08\x00\x42\x00\x1c\x00\x1d\x00\x31\x00\x32\x00\x41\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x04\x00\x29\x00\x2a\x00\x40\x00\x41\x00\x31\x00\x32\x00\x02\x00\x2c\x00\x2d\x00\x2e\x00\x04\x00\x34\x00\x31\x00\x32\x00\x02\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x30\x00\x40\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x02\x00\x05\x00\x16\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x04\x00\x40\x00\x16\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x08\x00\x03\x00\x41\x00\x03\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x41\x00\x41\x00\x08\x00\x08\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x06\x00\x42\x00\x41\x00\x03\x00\x01\x00\x04\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x01\x00\x16\x00\x08\x00\x16\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x06\x00\x16\x00\x16\x00\x41\x00\x41\x00\x41\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x42\x00\x42\x00\x36\x00\x06\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x07\x00\x37\x00\x28\x00\x07\x00\x09\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x04\x00\x20\x00\x02\x00\x42\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x07\x00\x36\x00\x16\x00\x16\x00\x16\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x42\x00\x16\x00\x42\x00\x42\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x07\x00\x41\x00\x02\x00\x08\x00\x02\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x08\x00\x08\x00\x18\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x08\x00\x16\x00\x08\x00\x02\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x40\x00\x08\x00\x40\x00\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x1c\x00\x1d\x00\x0e\x00\x41\x00\x20\x00\x21\x00\x22\x00\x1c\x00\x1d\x00\x25\x00\x08\x00\x20\x00\x21\x00\x22\x00\x1c\x00\x1d\x00\x25\x00\x16\x00\x20\x00\x21\x00\x22\x00\x31\x00\x32\x00\x25\x00\x02\x00\x1c\x00\x1d\x00\x40\x00\x31\x00\x32\x00\x21\x00\x22\x00\x1c\x00\x1d\x00\x25\x00\x31\x00\x32\x00\x02\x00\x0a\x00\x23\x00\x24\x00\x25\x00\x1c\x00\x1d\x00\x42\x00\x08\x00\x31\x00\x32\x00\x06\x00\x23\x00\x24\x00\x25\x00\x41\x00\x31\x00\x32\x00\x16\x00\x06\x00\x02\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x16\x00\x31\x00\x32\x00\x23\x00\x24\x00\x25\x00\x24\x00\x25\x00\x04\x00\x16\x00\x42\x00\x16\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x08\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x08\x00\x25\x00\x42\x00\x16\x00\x40\x00\x42\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x07\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x42\x00\x25\x00\x42\x00\x40\x00\x05\x00\x07\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x09\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x04\x00\x0a\x00\x19\x00\x40\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x05\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x05\x00\x25\x00\x42\x00\x05\x00\x07\x00\x04\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x16\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x03\x00\x42\x00\x42\x00\x16\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x16\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x01\x00\x25\x00\x42\x00\x16\x00\x16\x00\x42\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x03\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x2e\x00\x25\x00\x40\x00\x16\x00\x16\x00\x08\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x16\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x2e\x00\x40\x00\x16\x00\x16\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x16\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x02\x00\x16\x00\x16\x00\x40\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x02\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x40\x00\x40\x00\x03\x00\x40\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x16\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x40\x00\x02\x00\x2c\x00\x07\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x41\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x40\x00\x25\x00\x07\x00\x40\x00\x07\x00\x07\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\x07\x00\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\x07\x00\x25\x00\x07\x00\x07\x00\xff\xff\x44\x00\x1c\x00\x1d\x00\x1c\x00\x1d\x00\xff\xff\x31\x00\x32\x00\x31\x00\x32\x00\x25\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x31\x00\x32\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\xff\xff\xff\xff\x1a\x00\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1a\x00\x1b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#
  384. happyTable :: HappyAddr
  385. happyTable = HappyA# "\x00\x00\x9e\x00\x9e\x00\x5c\x00\x23\x01\xd6\x00\x67\x00\x2f\x00\xb5\x00\x7d\x01\x68\x00\xf4\x00\x75\x01\x69\x00\x6a\x00\x19\x01\xd7\x00\x63\x00\xe1\x00\x71\x01\xa4\x00\xcf\x00\xe3\x00\x64\x00\xe4\x00\x64\x00\x62\x01\xd0\x00\x77\x00\x28\x01\xdc\x00\xdd\x00\x5f\x01\x78\x00\xa5\x00\x65\x00\x09\x00\x65\x00\x09\x00\x5b\x01\xf5\x00\xf6\x00\x73\x01\x2c\x00\x03\x00\x04\x00\x64\x01\x5d\x00\x5e\x00\x30\x00\x05\x00\x06\x00\xf7\x00\x07\x00\x59\x01\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x11\x00\xb6\x00\x76\x01\x79\x00\x7a\x00\x7b\x00\x83\xff\x67\x00\x83\xff\x7c\x00\x24\x00\x13\x00\x7d\x00\x5c\x01\x69\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x7e\x00\x7f\x00\xd9\x00\x08\x00\x09\x00\x60\x00\x68\x00\x41\x01\x34\x01\x69\x00\x6a\x00\xad\x00\x3e\x00\x3f\x00\x5c\x01\x67\x00\x40\x00\x09\x00\xda\x00\x68\x00\x61\x00\x3f\x00\x69\x00\x6a\x00\x40\x00\x09\x00\x3f\x01\x61\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x61\x01\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x5b\x00\x5c\x00\x33\x01\x34\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x02\x00\x03\x00\x04\x00\xdb\x00\xdc\x00\xdd\x00\x42\x01\x05\x00\x06\x00\x45\x01\x07\x00\x66\x01\x71\x00\x68\x01\x71\x00\xeb\x00\x72\x00\x07\x01\x72\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x5e\x01\x71\x00\xf7\x00\x25\x01\x71\x00\x72\x00\x0f\x01\x21\x01\x72\x00\x5d\x00\x5e\x00\x8a\x00\x8b\x00\x8c\x00\x73\x00\xd2\x00\x73\x00\xd0\x00\x74\x00\x2a\x00\x74\x00\xcd\x00\x09\x00\x08\x00\x09\x00\x75\x00\x09\x00\x75\x00\x09\x00\x73\x00\xe4\x00\x71\x00\x73\x00\x74\x00\x7f\x00\x72\x00\x74\x00\x47\x00\x1e\x00\x81\x00\x75\x00\x09\x00\x42\x00\x75\x00\x09\x00\xe5\x00\x71\x00\x70\x00\x71\x00\xa6\x00\x72\x00\x48\x00\x72\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x73\x00\xa8\x00\x71\x00\x4a\x00\x74\x00\x52\x00\x72\x00\x2d\x00\x94\x00\x95\x00\x78\x01\x75\x00\x09\x00\x1d\x00\x1e\x00\x73\x00\x41\x00\x73\x00\x1b\x00\x74\x00\x76\x01\x74\x00\x22\x00\x24\x01\xd6\x00\x2a\x00\x75\x00\x09\x00\x75\x00\x09\x00\x73\x00\xf5\x00\xf6\x00\x79\x01\x74\x00\xd7\x00\x63\x00\xef\x00\xd6\x00\xf0\x00\xf1\x00\x75\x00\x09\x00\x2b\x00\x64\x00\x7a\x01\x47\x01\x63\x00\x7b\x01\xd7\x00\x63\x00\xf2\x00\x63\x00\xd5\x00\xd6\x00\x64\x00\x65\x00\x09\x00\x64\x00\x7c\x01\x64\x00\xdf\x00\xe0\x00\x7d\x01\x6d\x01\xd7\x00\x63\x00\x65\x00\x09\x00\x6e\x01\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x6f\x01\x11\x00\x12\x00\x20\x00\x21\x00\x65\x00\x09\x00\x70\x01\x3d\x00\x3e\x00\x3f\x00\x71\x01\x13\x00\x40\x00\x09\x00\x4d\x01\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x73\x01\x1b\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x2b\x01\x77\x01\x64\x01\x6a\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\xb2\x00\x66\x01\x68\x01\x6b\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x6c\x01\x1d\x01\x57\x01\x5e\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x58\x01\x59\x01\x4b\x01\x4c\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x2a\x01\x41\x01\x61\x01\x4e\x01\x4f\x01\x50\x01\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x52\x01\x51\x01\x53\x01\x54\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x02\x01\x55\x01\x56\x01\x3c\x01\x3d\x01\x3f\x01\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x3e\x01\x41\x01\x36\x01\x45\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x2f\x01\x44\x01\x47\x01\x2e\x01\x30\x01\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x31\x01\xf5\x00\x37\x01\x33\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xd4\x00\x36\x01\x38\x01\x39\x01\x3a\x01\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x11\x01\x3b\x01\x12\x01\x13\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x89\x00\x14\x01\x15\x01\x16\x01\x17\x01\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x18\x01\x1b\x01\x1c\x01\x1e\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xcc\x00\x1f\x01\x20\x01\x22\x01\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x23\x01\x27\x01\x2d\x01\x28\x01\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\xf8\x00\x63\x00\xe8\x00\xe9\x00\x48\x01\xfa\x00\xfb\x00\xf8\x00\x63\x00\x64\x00\xee\x00\x49\x01\xfa\x00\xfb\x00\xf8\x00\x63\x00\x64\x00\xed\x00\xf9\x00\xfa\x00\xfb\x00\x65\x00\x09\x00\x64\x00\xef\x00\xf8\x00\x63\x00\xdf\x00\x65\x00\x09\x00\x31\x01\xfb\x00\xc6\x00\x63\x00\x64\x00\x65\x00\x09\x00\xfd\x00\x03\x01\xff\x00\xc8\x00\x64\x00\xc6\x00\x63\x00\xfe\x00\x04\x01\x65\x00\x09\x00\x06\x01\x00\x01\xc8\x00\x64\x00\x07\x01\x65\x00\x09\x00\xa8\x00\x09\x01\x0f\x01\xc6\x00\x63\x00\xc6\x00\x63\x00\x0a\x01\x65\x00\x09\x00\xc7\x00\xc8\x00\x64\x00\x18\x01\x64\x00\xaa\x00\x0b\x01\xad\x00\x0c\x01\x2b\x01\x63\x00\xe9\x00\x63\x00\x0d\x01\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\xac\x00\x64\x00\xaf\x00\x0e\x01\xb4\x00\xb0\x00\xea\x00\x63\x00\xfe\x00\x63\x00\xcd\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\xb1\x00\x64\x00\xb3\x00\xca\x00\xd2\x00\xd4\x00\xaa\x00\x63\x00\xb6\x00\x63\x00\xe2\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\xdb\x00\x64\x00\xe7\x00\x88\x00\x81\x00\x84\x00\xb7\x00\x63\x00\xb8\x00\x63\x00\x87\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x9a\x00\x64\x00\x56\x00\x9c\x00\x9b\x00\xa0\x00\xb9\x00\x63\x00\xba\x00\x63\x00\xa1\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x55\x00\x64\x00\x54\x00\x57\x00\x58\x00\xa2\x00\xbb\x00\x63\x00\xbc\x00\x63\x00\xa3\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x5b\x00\x64\x00\x59\x00\xa6\x00\xa8\x00\x5a\x00\xbd\x00\x63\x00\xbe\x00\x63\x00\x70\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x44\x00\x64\x00\x45\x00\x46\x00\x4c\x00\x47\x00\xbf\x00\x63\x00\xc0\x00\x63\x00\x4d\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x4a\x00\x64\x00\x44\x00\x24\x00\x4e\x00\x4f\x00\xc1\x00\x63\x00\xc2\x00\x63\x00\x50\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x52\x00\x64\x00\x31\x00\x51\x00\x38\x00\x32\x00\xc3\x00\x63\x00\xc4\x00\x63\x00\x39\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x33\x00\x64\x00\x34\x00\x35\x00\x3a\x00\x36\x00\xc5\x00\x63\x00\xca\x00\x63\x00\x3c\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x37\x00\x64\x00\x3b\x00\x3d\x00\x30\x00\x1d\x00\xd4\x00\x63\x00\x82\x00\x63\x00\x22\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x24\x00\x64\x00\x25\x00\x24\x00\x26\x00\x27\x00\x84\x00\x63\x00\x85\x00\x63\x00\x28\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x29\x00\x64\x00\x2a\x00\x1d\x00\x00\x00\xff\xff\x9c\x00\x63\x00\x62\x00\x63\x00\x00\x00\x65\x00\x09\x00\x65\x00\x09\x00\x64\x00\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x65\x00\x09\x00\x65\x00\x09\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x05\x01\x00\x00\x00\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x91\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\x8a\x00\x8b\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x00\x00\x94\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#
  386. happyReduceArr = Happy_Data_Array.array (1, 153) [
  387. (1 , happyReduce_1),
  388. (2 , happyReduce_2),
  389. (3 , happyReduce_3),
  390. (4 , happyReduce_4),
  391. (5 , happyReduce_5),
  392. (6 , happyReduce_6),
  393. (7 , happyReduce_7),
  394. (8 , happyReduce_8),
  395. (9 , happyReduce_9),
  396. (10 , happyReduce_10),
  397. (11 , happyReduce_11),
  398. (12 , happyReduce_12),
  399. (13 , happyReduce_13),
  400. (14 , happyReduce_14),
  401. (15 , happyReduce_15),
  402. (16 , happyReduce_16),
  403. (17 , happyReduce_17),
  404. (18 , happyReduce_18),
  405. (19 , happyReduce_19),
  406. (20 , happyReduce_20),
  407. (21 , happyReduce_21),
  408. (22 , happyReduce_22),
  409. (23 , happyReduce_23),
  410. (24 , happyReduce_24),
  411. (25 , happyReduce_25),
  412. (26 , happyReduce_26),
  413. (27 , happyReduce_27),
  414. (28 , happyReduce_28),
  415. (29 , happyReduce_29),
  416. (30 , happyReduce_30),
  417. (31 , happyReduce_31),
  418. (32 , happyReduce_32),
  419. (33 , happyReduce_33),
  420. (34 , happyReduce_34),
  421. (35 , happyReduce_35),
  422. (36 , happyReduce_36),
  423. (37 , happyReduce_37),
  424. (38 , happyReduce_38),
  425. (39 , happyReduce_39),
  426. (40 , happyReduce_40),
  427. (41 , happyReduce_41),
  428. (42 , happyReduce_42),
  429. (43 , happyReduce_43),
  430. (44 , happyReduce_44),
  431. (45 , happyReduce_45),
  432. (46 , happyReduce_46),
  433. (47 , happyReduce_47),
  434. (48 , happyReduce_48),
  435. (49 , happyReduce_49),
  436. (50 , happyReduce_50),
  437. (51 , happyReduce_51),
  438. (52 , happyReduce_52),
  439. (53 , happyReduce_53),
  440. (54 , happyReduce_54),
  441. (55 , happyReduce_55),
  442. (56 , happyReduce_56),
  443. (57 , happyReduce_57),
  444. (58 , happyReduce_58),
  445. (59 , happyReduce_59),
  446. (60 , happyReduce_60),
  447. (61 , happyReduce_61),
  448. (62 , happyReduce_62),
  449. (63 , happyReduce_63),
  450. (64 , happyReduce_64),
  451. (65 , happyReduce_65),
  452. (66 , happyReduce_66),
  453. (67 , happyReduce_67),
  454. (68 , happyReduce_68),
  455. (69 , happyReduce_69),
  456. (70 , happyReduce_70),
  457. (71 , happyReduce_71),
  458. (72 , happyReduce_72),
  459. (73 , happyReduce_73),
  460. (74 , happyReduce_74),
  461. (75 , happyReduce_75),
  462. (76 , happyReduce_76),
  463. (77 , happyReduce_77),
  464. (78 , happyReduce_78),
  465. (79 , happyReduce_79),
  466. (80 , happyReduce_80),
  467. (81 , happyReduce_81),
  468. (82 , happyReduce_82),
  469. (83 , happyReduce_83),
  470. (84 , happyReduce_84),
  471. (85 , happyReduce_85),
  472. (86 , happyReduce_86),
  473. (87 , happyReduce_87),
  474. (88 , happyReduce_88),
  475. (89 , happyReduce_89),
  476. (90 , happyReduce_90),
  477. (91 , happyReduce_91),
  478. (92 , happyReduce_92),
  479. (93 , happyReduce_93),
  480. (94 , happyReduce_94),
  481. (95 , happyReduce_95),
  482. (96 , happyReduce_96),
  483. (97 , happyReduce_97),
  484. (98 , happyReduce_98),
  485. (99 , happyReduce_99),
  486. (100 , happyReduce_100),
  487. (101 , happyReduce_101),
  488. (102 , happyReduce_102),
  489. (103 , happyReduce_103),
  490. (104 , happyReduce_104),
  491. (105 , happyReduce_105),
  492. (106 , happyReduce_106),
  493. (107 , happyReduce_107),
  494. (108 , happyReduce_108),
  495. (109 , happyReduce_109),
  496. (110 , happyReduce_110),
  497. (111 , happyReduce_111),
  498. (112 , happyReduce_112),
  499. (113 , happyReduce_113),
  500. (114 , happyReduce_114),
  501. (115 , happyReduce_115),
  502. (116 , happyReduce_116),
  503. (117 , happyReduce_117),
  504. (118 , happyReduce_118),
  505. (119 , happyReduce_119),
  506. (120 , happyReduce_120),
  507. (121 , happyReduce_121),
  508. (122 , happyReduce_122),
  509. (123 , happyReduce_123),
  510. (124 , happyReduce_124),
  511. (125 , happyReduce_125),
  512. (126 , happyReduce_126),
  513. (127 , happyReduce_127),
  514. (128 , happyReduce_128),
  515. (129 , happyReduce_129),
  516. (130 , happyReduce_130),
  517. (131 , happyReduce_131),
  518. (132 , happyReduce_132),
  519. (133 , happyReduce_133),
  520. (134 , happyReduce_134),
  521. (135 , happyReduce_135),
  522. (136 , happyReduce_136),
  523. (137 , happyReduce_137),
  524. (138 , happyReduce_138),
  525. (139 , happyReduce_139),
  526. (140 , happyReduce_140),
  527. (141 , happyReduce_141),
  528. (142 , happyReduce_142),
  529. (143 , happyReduce_143),
  530. (144 , happyReduce_144),
  531. (145 , happyReduce_145),
  532. (146 , happyReduce_146),
  533. (147 , happyReduce_147),
  534. (148 , happyReduce_148),
  535. (149 , happyReduce_149),
  536. (150 , happyReduce_150),
  537. (151 , happyReduce_151),
  538. (152 , happyReduce_152),
  539. (153 , happyReduce_153)
  540. ]
  541. happy_n_terms = 69 :: Int
  542. happy_n_nonterms = 51 :: Int
  543. happyReduce_1 = happySpecReduce_0 0# happyReduction_1
  544. happyReduction_1 = happyIn4
  545. (return ()
  546. )
  547. happyReduce_2 = happySpecReduce_2 0# happyReduction_2
  548. happyReduction_2 happy_x_2
  549. happy_x_1
  550. = case happyOut5 happy_x_1 of { happy_var_1 ->
  551. case happyOut4 happy_x_2 of { happy_var_2 ->
  552. happyIn4
  553. (do happy_var_1; happy_var_2
  554. )}}
  555. happyReduce_3 = happySpecReduce_1 1# happyReduction_3
  556. happyReduction_3 happy_x_1
  557. = case happyOut11 happy_x_1 of { happy_var_1 ->
  558. happyIn5
  559. (happy_var_1
  560. )}
  561. happyReduce_4 = happySpecReduce_1 1# happyReduction_4
  562. happyReduction_4 happy_x_1
  563. = case happyOut6 happy_x_1 of { happy_var_1 ->
  564. happyIn5
  565. (happy_var_1
  566. )}
  567. happyReduce_5 = happySpecReduce_1 1# happyReduction_5
  568. happyReduction_5 happy_x_1
  569. = case happyOut14 happy_x_1 of { happy_var_1 ->
  570. happyIn5
  571. (happy_var_1
  572. )}
  573. happyReduce_6 = happyMonadReduce 8# 1# happyReduction_6
  574. happyReduction_6 (happy_x_8 `HappyStk`
  575. happy_x_7 `HappyStk`
  576. happy_x_6 `HappyStk`
  577. happy_x_5 `HappyStk`
  578. happy_x_4 `HappyStk`
  579. happy_x_3 `HappyStk`
  580. happy_x_2 `HappyStk`
  581. happy_x_1 `HappyStk`
  582. happyRest) tk
  583. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  584. case happyOutTok happy_x_5 of { (L _ (CmmT_Name happy_var_5)) ->
  585. case happyOut10 happy_x_6 of { happy_var_6 ->
  586. ( withThisPackage $ \pkg ->
  587. do lits <- sequence happy_var_6;
  588. staticClosure pkg happy_var_3 happy_var_5 (map getLit lits))}}}
  589. ) (\r -> happyReturn (happyIn5 r))
  590. happyReduce_7 = happyReduce 6# 2# happyReduction_7
  591. happyReduction_7 (happy_x_6 `HappyStk`
  592. happy_x_5 `HappyStk`
  593. happy_x_4 `HappyStk`
  594. happy_x_3 `HappyStk`
  595. happy_x_2 `HappyStk`
  596. happy_x_1 `HappyStk`
  597. happyRest)
  598. = case happyOutTok happy_x_2 of { (L _ (CmmT_String happy_var_2)) ->
  599. case happyOut7 happy_x_4 of { happy_var_4 ->
  600. case happyOut8 happy_x_5 of { happy_var_5 ->
  601. happyIn6
  602. (do lbl <- happy_var_4;
  603. ss <- sequence happy_var_5;
  604. code (emitDecl (CmmData (section happy_var_2) (Statics lbl $ concat ss)))
  605. ) `HappyStk` happyRest}}}
  606. happyReduce_8 = happyMonadReduce 2# 3# happyReduction_8
  607. happyReduction_8 (happy_x_2 `HappyStk`
  608. happy_x_1 `HappyStk`
  609. happyRest) tk
  610. = happyThen (case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  611. ( withThisPackage $ \pkg ->
  612. return (mkCmmDataLabel pkg happy_var_1))}
  613. ) (\r -> happyReturn (happyIn7 r))
  614. happyReduce_9 = happySpecReduce_0 4# happyReduction_9
  615. happyReduction_9 = happyIn8
  616. ([]
  617. )
  618. happyReduce_10 = happySpecReduce_2 4# happyReduction_10
  619. happyReduction_10 happy_x_2
  620. happy_x_1
  621. = case happyOut9 happy_x_1 of { happy_var_1 ->
  622. case happyOut8 happy_x_2 of { happy_var_2 ->
  623. happyIn8
  624. (happy_var_1 : happy_var_2
  625. )}}
  626. happyReduce_11 = happySpecReduce_3 5# happyReduction_11
  627. happyReduction_11 happy_x_3
  628. happy_x_2
  629. happy_x_1
  630. = case happyOut32 happy_x_2 of { happy_var_2 ->
  631. happyIn9
  632. (do e <- happy_var_2;
  633. return [CmmStaticLit (getLit e)]
  634. )}
  635. happyReduce_12 = happySpecReduce_2 5# happyReduction_12
  636. happyReduction_12 happy_x_2
  637. happy_x_1
  638. = case happyOut53 happy_x_1 of { happy_var_1 ->
  639. happyIn9
  640. (return [CmmUninitialised
  641. (widthInBytes (typeWidth happy_var_1))]
  642. )}
  643. happyReduce_13 = happyReduce 5# 5# happyReduction_13
  644. happyReduction_13 (happy_x_5 `HappyStk`
  645. happy_x_4 `HappyStk`
  646. happy_x_3 `HappyStk`
  647. happy_x_2 `HappyStk`
  648. happy_x_1 `HappyStk`
  649. happyRest)
  650. = case happyOutTok happy_x_4 of { (L _ (CmmT_String happy_var_4)) ->
  651. happyIn9
  652. (return [mkString happy_var_4]
  653. ) `HappyStk` happyRest}
  654. happyReduce_14 = happyReduce 5# 5# happyReduction_14
  655. happyReduction_14 (happy_x_5 `HappyStk`
  656. happy_x_4 `HappyStk`
  657. happy_x_3 `HappyStk`
  658. happy_x_2 `HappyStk`
  659. happy_x_1 `HappyStk`
  660. happyRest)
  661. = case happyOutTok happy_x_3 of { (L _ (CmmT_Int happy_var_3)) ->
  662. happyIn9
  663. (return [CmmUninitialised
  664. (fromIntegral happy_var_3)]
  665. ) `HappyStk` happyRest}
  666. happyReduce_15 = happyReduce 5# 5# happyReduction_15
  667. happyReduction_15 (happy_x_5 `HappyStk`
  668. happy_x_4 `HappyStk`
  669. happy_x_3 `HappyStk`
  670. happy_x_2 `HappyStk`
  671. happy_x_1 `HappyStk`
  672. happyRest)
  673. = case happyOut54 happy_x_1 of { happy_var_1 ->
  674. case happyOutTok happy_x_3 of { (L _ (CmmT_Int happy_var_3)) ->
  675. happyIn9
  676. (return [CmmUninitialised
  677. (widthInBytes (typeWidth happy_var_1) *
  678. fromIntegral happy_var_3)]
  679. ) `HappyStk` happyRest}}
  680. happyReduce_16 = happyReduce 5# 5# happyReduction_16
  681. happyReduction_16 (happy_x_5 `HappyStk`
  682. happy_x_4 `HappyStk`
  683. happy_x_3 `HappyStk`
  684. happy_x_2 `HappyStk`
  685. happy_x_1 `HappyStk`
  686. happyRest)
  687. = case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  688. case happyOut10 happy_x_4 of { happy_var_4 ->
  689. happyIn9
  690. (do lits <- sequence happy_var_4;
  691. return $ map CmmStaticLit $
  692. mkStaticClosure (mkForeignLabel happy_var_3 Nothing ForeignLabelInExternalPackage IsData)
  693. -- mkForeignLabel because these are only used
  694. -- for CHARLIKE and INTLIKE closures in the RTS.
  695. dontCareCCS (map getLit lits) [] [] []
  696. ) `HappyStk` happyRest}}
  697. happyReduce_17 = happySpecReduce_0 6# happyReduction_17
  698. happyReduction_17 = happyIn10
  699. ([]
  700. )
  701. happyReduce_18 = happySpecReduce_3 6# happyReduction_18
  702. happyReduction_18 happy_x_3
  703. happy_x_2
  704. happy_x_1
  705. = case happyOut32 happy_x_2 of { happy_var_2 ->
  706. case happyOut10 happy_x_3 of { happy_var_3 ->
  707. happyIn10
  708. (happy_var_2 : happy_var_3
  709. )}}
  710. happyReduce_19 = happyReduce 7# 7# happyReduction_19
  711. happyReduction_19 (happy_x_7 `HappyStk`
  712. happy_x_6 `HappyStk`
  713. happy_x_5 `HappyStk`
  714. happy_x_4 `HappyStk`
  715. happy_x_3 `HappyStk`
  716. happy_x_2 `HappyStk`
  717. happy_x_1 `HappyStk`
  718. happyRest)
  719. = case happyOut12 happy_x_1 of { happy_var_1 ->
  720. case happyOut47 happy_x_2 of { happy_var_2 ->
  721. case happyOut52 happy_x_3 of { happy_var_3 ->
  722. case happyOut51 happy_x_4 of { happy_var_4 ->
  723. case happyOut13 happy_x_6 of { happy_var_6 ->
  724. happyIn11
  725. (do ((entry_ret_label, info, live, formals, gc_block, frame), stmts) <-
  726. getCgStmtsEC' $ loopDecls $ do {
  727. (entry_ret_label, info, live) <- happy_var_1;
  728. formals <- sequence happy_var_2;
  729. gc_block <- happy_var_3;
  730. frame <- happy_var_4;
  731. happy_var_6;
  732. return (entry_ret_label, info, live, formals, gc_block, frame) }
  733. blks <- code (cgStmtsToBlocks stmts)
  734. code (emitInfoTableAndCode entry_ret_label (CmmInfo gc_block frame info) formals blks)
  735. ) `HappyStk` happyRest}}}}}
  736. happyReduce_20 = happySpecReduce_3 7# happyReduction_20
  737. happyReduction_20 happy_x_3
  738. happy_x_2
  739. happy_x_1
  740. = case happyOut12 happy_x_1 of { happy_var_1 ->
  741. case happyOut47 happy_x_2 of { happy_var_2 ->
  742. happyIn11
  743. (do (entry_ret_label, info, live) <- happy_var_1;
  744. formals <- sequence happy_var_2;
  745. code (emitInfoTableAndCode entry_ret_label (CmmInfo Nothing Nothing info) formals [])
  746. )}}
  747. happyReduce_21 = happyMonadReduce 7# 7# happyReduction_21
  748. happyReduction_21 (happy_x_7 `HappyStk`
  749. happy_x_6 `HappyStk`
  750. happy_x_5 `HappyStk`
  751. happy_x_4 `HappyStk`
  752. happy_x_3 `HappyStk`
  753. happy_x_2 `HappyStk`
  754. happy_x_1 `HappyStk`
  755. happyRest) tk
  756. = happyThen (case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  757. case happyOut47 happy_x_2 of { happy_var_2 ->
  758. case happyOut52 happy_x_3 of { happy_var_3 ->
  759. case happyOut51 happy_x_4 of { happy_var_4 ->
  760. case happyOut13 happy_x_6 of { happy_var_6 ->
  761. ( withThisPackage $ \pkg ->
  762. do newFunctionName happy_var_1 pkg
  763. ((formals, gc_block, frame), stmts) <-
  764. getCgStmtsEC' $ loopDecls $ do {
  765. formals <- sequence happy_var_2;
  766. gc_block <- happy_var_3;
  767. frame <- happy_var_4;
  768. happy_var_6;
  769. return (formals, gc_block, frame) }
  770. blks <- code (cgStmtsToBlocks stmts)
  771. code (emitProc (CmmInfo gc_block frame CmmNonInfoTable) (mkCmmCodeLabel pkg happy_var_1) formals blks))}}}}}
  772. ) (\r -> happyReturn (happyIn11 r))
  773. happyReduce_22 = happyMonadReduce 14# 8# happyReduction_22
  774. happyReduction_22 (happy_x_14 `HappyStk`
  775. happy_x_13 `HappyStk`
  776. happy_x_12 `HappyStk`
  777. happy_x_11 `HappyStk`
  778. happy_x_10 `HappyStk`
  779. happy_x_9 `HappyStk`
  780. happy_x_8 `HappyStk`
  781. happy_x_7 `HappyStk`
  782. happy_x_6 `HappyStk`
  783. happy_x_5 `HappyStk`
  784. happy_x_4 `HappyStk`
  785. happy_x_3 `HappyStk`
  786. happy_x_2 `HappyStk`
  787. happy_x_1 `HappyStk`
  788. happyRest) tk
  789. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  790. case happyOutTok happy_x_5 of { (L _ (CmmT_Int happy_var_5)) ->
  791. case happyOutTok happy_x_7 of { (L _ (CmmT_Int happy_var_7)) ->
  792. case happyOutTok happy_x_9 of { (L _ (CmmT_Int happy_var_9)) ->
  793. case happyOutTok happy_x_11 of { (L _ (CmmT_String happy_var_11)) ->
  794. case happyOutTok happy_x_13 of { (L _ (CmmT_String happy_var_13)) ->
  795. ( withThisPackage $ \pkg ->
  796. do let prof = profilingInfo happy_var_11 happy_var_13
  797. rep = mkRTSRep (fromIntegral happy_var_9) $
  798. mkHeapRep False (fromIntegral happy_var_5)
  799. (fromIntegral happy_var_7) Thunk
  800. -- not really Thunk, but that makes the info table
  801. -- we want.
  802. return (mkCmmEntryLabel pkg happy_var_3,
  803. CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3
  804. , cit_rep = rep
  805. , cit_prof = prof, cit_srt = NoC_SRT },
  806. []))}}}}}}
  807. ) (\r -> happyReturn (happyIn12 r))
  808. happyReduce_23 = happyMonadReduce 16# 8# happyReduction_23
  809. happyReduction_23 (happy_x_16 `HappyStk`
  810. happy_x_15 `HappyStk`
  811. happy_x_14 `HappyStk`
  812. happy_x_13 `HappyStk`
  813. happy_x_12 `HappyStk`
  814. happy_x_11 `HappyStk`
  815. happy_x_10 `HappyStk`
  816. happy_x_9 `HappyStk`
  817. happy_x_8 `HappyStk`
  818. happy_x_7 `HappyStk`
  819. happy_x_6 `HappyStk`
  820. happy_x_5 `HappyStk`
  821. happy_x_4 `HappyStk`
  822. happy_x_3 `HappyStk`
  823. happy_x_2 `HappyStk`
  824. happy_x_1 `HappyStk`
  825. happyRest) tk
  826. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  827. case happyOutTok happy_x_5 of { (L _ (CmmT_Int happy_var_5)) ->
  828. case happyOutTok happy_x_7 of { (L _ (CmmT_Int happy_var_7)) ->
  829. case happyOutTok happy_x_9 of { (L _ (CmmT_Int happy_var_9)) ->
  830. case happyOutTok happy_x_11 of { (L _ (CmmT_String happy_var_11)) ->
  831. case happyOutTok happy_x_13 of { (L _ (CmmT_String happy_var_13)) ->
  832. case happyOutTok happy_x_15 of { (L _ (CmmT_Int happy_var_15)) ->
  833. ( withThisPackage $ \pkg ->
  834. do let prof = profilingInfo happy_var_11 happy_var_13
  835. ty = Fun 0 (ArgSpec (fromIntegral happy_var_15))
  836. -- Arity zero, arg_type happy_var_15
  837. rep = mkRTSRep (fromIntegral happy_var_9) $
  838. mkHeapRep False (fromIntegral happy_var_5)
  839. (fromIntegral happy_var_7) ty
  840. return (mkCmmEntryLabel pkg happy_var_3,
  841. CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3
  842. , cit_rep = rep
  843. , cit_prof = prof, cit_srt = NoC_SRT },
  844. []))}}}}}}}
  845. ) (\r -> happyReturn (happyIn12 r))
  846. happyReduce_24 = happyMonadReduce 16# 8# happyReduction_24
  847. happyReduction_24 (happy_x_16 `HappyStk`
  848. happy_x_15 `HappyStk`
  849. happy_x_14 `HappyStk`
  850. happy_x_13 `HappyStk`
  851. happy_x_12 `HappyStk`
  852. happy_x_11 `HappyStk`
  853. happy_x_10 `HappyStk`
  854. happy_x_9 `HappyStk`
  855. happy_x_8 `HappyStk`
  856. happy_x_7 `HappyStk`
  857. happy_x_6 `HappyStk`
  858. happy_x_5 `HappyStk`
  859. happy_x_4 `HappyStk`
  860. happy_x_3 `HappyStk`
  861. happy_x_2 `HappyStk`
  862. happy_x_1 `HappyStk`
  863. happyRest) tk
  864. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  865. case happyOutTok happy_x_5 of { (L _ (CmmT_Int happy_var_5)) ->
  866. case happyOutTok happy_x_7 of { (L _ (CmmT_Int happy_var_7)) ->
  867. case happyOutTok happy_x_9 of { (L _ (CmmT_Int happy_var_9)) ->
  868. case happyOutTok happy_x_11 of { (L _ (CmmT_Int happy_var_11)) ->
  869. case happyOutTok happy_x_13 of { (L _ (CmmT_String happy_var_13)) ->
  870. case happyOutTok happy_x_15 of { (L _ (CmmT_String happy_var_15)) ->
  871. ( withThisPackage $ \pkg ->
  872. do let prof = profilingInfo happy_var_13 happy_var_15
  873. ty = Constr (fromIntegral happy_var_9) -- Tag
  874. (stringToWord8s happy_var_13)
  875. rep = mkRTSRep (fromIntegral happy_var_11) $
  876. mkHeapRep False (fromIntegral happy_var_5)
  877. (fromIntegral happy_var_7) ty
  878. return (mkCmmEntryLabel pkg happy_var_3,
  879. CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3
  880. , cit_rep = rep
  881. , cit_prof = prof, cit_srt = NoC_SRT },
  882. []))}}}}}}}
  883. ) (\r -> happyReturn (happyIn12 r))
  884. happyReduce_25 = happyMonadReduce 12# 8# happyReduction_25
  885. happyReduction_25 (happy_x_12 `HappyStk`
  886. happy_x_11 `HappyStk`
  887. happy_x_10 `HappyStk`
  888. happy_x_9 `HappyStk`
  889. happy_x_8 `HappyStk`
  890. happy_x_7 `HappyStk`
  891. happy_x_6 `HappyStk`
  892. happy_x_5 `HappyStk`
  893. happy_x_4 `HappyStk`
  894. happy_x_3 `HappyStk`
  895. happy_x_2 `HappyStk`
  896. happy_x_1 `HappyStk`
  897. happyRest) tk
  898. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  899. case happyOutTok happy_x_5 of { (L _ (CmmT_Int happy_var_5)) ->
  900. case happyOutTok happy_x_7 of { (L _ (CmmT_Int happy_var_7)) ->
  901. case happyOutTok happy_x_9 of { (L _ (CmmT_String happy_var_9)) ->
  902. case happyOutTok happy_x_11 of { (L _ (CmmT_String happy_var_11)) ->
  903. ( withThisPackage $ \pkg ->
  904. do let prof = profilingInfo happy_var_9 happy_var_11
  905. ty = ThunkSelector (fromIntegral happy_var_5)
  906. rep = mkRTSRep (fromIntegral happy_var_7) $
  907. mkHeapRep False 0 0 ty
  908. return (mkCmmEntryLabel pkg happy_var_3,
  909. CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3
  910. , cit_rep = rep
  911. , cit_prof = prof, cit_srt = NoC_SRT },
  912. []))}}}}}
  913. ) (\r -> happyReturn (happyIn12 r))
  914. happyReduce_26 = happyMonadReduce 6# 8# happyReduction_26
  915. happyReduction_26 (happy_x_6 `HappyStk`
  916. happy_x_5 `HappyStk`
  917. happy_x_4 `HappyStk`
  918. happy_x_3 `HappyStk`
  919. happy_x_2 `HappyStk`
  920. happy_x_1 `HappyStk`
  921. happyRest) tk
  922. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  923. case happyOutTok happy_x_5 of { (L _ (CmmT_Int happy_var_5)) ->
  924. ( withThisPackage $ \pkg ->
  925. do let prof = NoProfilingInfo
  926. rep = mkRTSRep (fromIntegral happy_var_5) $ mkStackRep []
  927. return (mkCmmRetLabel pkg happy_var_3,
  928. CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3
  929. , cit_rep = rep
  930. , cit_prof = prof, cit_srt = NoC_SRT },
  931. []))}}
  932. ) (\r -> happyReturn (happyIn12 r))
  933. happyReduce_27 = happyMonadReduce 8# 8# happyReduction_27
  934. happyReduction_27 (happy_x_8 `HappyStk`
  935. happy_x_7 `HappyStk`
  936. happy_x_6 `HappyStk`
  937. happy_x_5 `HappyStk`
  938. happy_x_4 `HappyStk`
  939. happy_x_3 `HappyStk`
  940. happy_x_2 `HappyStk`
  941. happy_x_1 `HappyStk`
  942. happyRest) tk
  943. = happyThen (case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  944. case happyOutTok happy_x_5 of { (L _ (CmmT_Int happy_var_5)) ->
  945. case happyOut48 happy_x_7 of { happy_var_7 ->
  946. ( withThisPackage $ \pkg ->
  947. do live <- sequence (map (liftM Just) happy_var_7)
  948. let prof = NoProfilingInfo
  949. bitmap = mkLiveness live
  950. rep = mkRTSRep (fromIntegral happy_var_5) $ mkStackRep bitmap
  951. return (mkCmmRetLabel pkg happy_var_3,
  952. CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3
  953. , cit_rep = rep
  954. , cit_prof = prof, cit_srt = NoC_SRT },
  955. []))}}}
  956. ) (\r -> happyReturn (happyIn12 r))
  957. happyReduce_28 = happySpecReduce_0 9# happyReduction_28
  958. happyReduction_28 = happyIn13
  959. (return ()
  960. )
  961. happyReduce_29 = happySpecReduce_2 9# happyReduction_29
  962. happyReduction_29 happy_x_2
  963. happy_x_1
  964. = case happyOut14 happy_x_1 of { happy_var_1 ->
  965. case happyOut13 happy_x_2 of { happy_var_2 ->
  966. happyIn13
  967. (do happy_var_1; happy_var_2
  968. )}}
  969. happyReduce_30 = happySpecReduce_2 9# happyReduction_30
  970. happyReduction_30 happy_x_2
  971. happy_x_1
  972. = case happyOut18 happy_x_1 of { happy_var_1 ->
  973. case happyOut13 happy_x_2 of { happy_var_2 ->
  974. happyIn13
  975. (do happy_var_1; happy_var_2
  976. )}}
  977. happyReduce_31 = happySpecReduce_3 10# happyReduction_31
  978. happyReduction_31 happy_x_3
  979. happy_x_2
  980. happy_x_1
  981. = case happyOut53 happy_x_1 of { happy_var_1 ->
  982. case happyOut17 happy_x_2 of { happy_var_2 ->
  983. happyIn14
  984. (mapM_ (newLocal happy_var_1) happy_var_2
  985. )}}
  986. happyReduce_32 = happySpecReduce_3 10# happyReduction_32
  987. happyReduction_32 happy_x_3
  988. happy_x_2
  989. happy_x_1
  990. = case happyOut15 happy_x_2 of { happy_var_2 ->
  991. happyIn14
  992. (mapM_ newImport happy_var_2
  993. )}
  994. happyReduce_33 = happySpecReduce_3 10# happyReduction_33
  995. happyReduction_33 happy_x_3
  996. happy_x_2
  997. happy_x_1
  998. = happyIn14
  999. (return ()
  1000. )
  1001. happyReduce_34 = happySpecReduce_1 11# happyReduction_34
  1002. happyReduction_34 happy_x_1
  1003. = case happyOut16 happy_x_1 of { happy_var_1 ->
  1004. happyIn15
  1005. ([happy_var_1]
  1006. )}
  1007. happyReduce_35 = happySpecReduce_3 11# happyReduction_35
  1008. happyReduction_35 happy_x_3
  1009. happy_x_2
  1010. happy_x_1
  1011. = case happyOut16 happy_x_1 of { happy_var_1 ->
  1012. case happyOut15 happy_x_3 of { happy_var_3 ->
  1013. happyIn15
  1014. (happy_var_1 : happy_var_3
  1015. )}}
  1016. happyReduce_36 = happySpecReduce_1 12# happyReduction_36
  1017. happyReduction_36 happy_x_1
  1018. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1019. happyIn16
  1020. ((happy_var_1, mkForeignLabel happy_var_1 Nothing ForeignLabelInExternalPackage IsFunction)
  1021. )}
  1022. happyReduce_37 = happySpecReduce_2 12# happyReduction_37
  1023. happyReduction_37 happy_x_2
  1024. happy_x_1
  1025. = case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) ->
  1026. case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) ->
  1027. happyIn16
  1028. ((happy_var_2, mkCmmCodeLabel (fsToPackageId (mkFastString happy_var_1)) happy_var_2)
  1029. )}}
  1030. happyReduce_38 = happySpecReduce_1 13# happyReduction_38
  1031. happyReduction_38 happy_x_1
  1032. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1033. happyIn17
  1034. ([happy_var_1]
  1035. )}
  1036. happyReduce_39 = happySpecReduce_3 13# happyReduction_39
  1037. happyReduction_39 happy_x_3
  1038. happy_x_2
  1039. happy_x_1
  1040. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1041. case happyOut17 happy_x_3 of { happy_var_3 ->
  1042. happyIn17
  1043. (happy_var_1 : happy_var_3
  1044. )}}
  1045. happyReduce_40 = happySpecReduce_1 14# happyReduction_40
  1046. happyReduction_40 happy_x_1
  1047. = happyIn18
  1048. (nopEC
  1049. )
  1050. happyReduce_41 = happySpecReduce_2 14# happyReduction_41
  1051. happyReduction_41 happy_x_2
  1052. happy_x_1
  1053. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1054. happyIn18
  1055. (do l <- newLabel happy_var_1; code (labelC l)
  1056. )}
  1057. happyReduce_42 = happyReduce 4# 14# happyReduction_42
  1058. happyReduction_42 (happy_x_4 `HappyStk`
  1059. happy_x_3 `HappyStk`
  1060. happy_x_2 `HappyStk`
  1061. happy_x_1 `HappyStk`
  1062. happyRest)
  1063. = case happyOut46 happy_x_1 of { happy_var_1 ->
  1064. case happyOut32 happy_x_3 of { happy_var_3 ->
  1065. happyIn18
  1066. (do reg <- happy_var_1; e <- happy_var_3; stmtEC (CmmAssign reg e)
  1067. ) `HappyStk` happyRest}}
  1068. happyReduce_43 = happyReduce 7# 14# happyReduction_43
  1069. happyReduction_43 (happy_x_7 `HappyStk`
  1070. happy_x_6 `HappyStk`
  1071. happy_x_5 `HappyStk`
  1072. happy_x_4 `HappyStk`
  1073. happy_x_3 `HappyStk`
  1074. happy_x_2 `HappyStk`
  1075. happy_x_1 `HappyStk`
  1076. happyRest)
  1077. = case happyOut53 happy_x_1 of { happy_var_1 ->
  1078. case happyOut32 happy_x_3 of { happy_var_3 ->
  1079. case happyOut32 happy_x_6 of { happy_var_6 ->
  1080. happyIn18
  1081. (doStore happy_var_1 happy_var_3 happy_var_6
  1082. ) `HappyStk` happyRest}}}
  1083. happyReduce_44 = happyMonadReduce 11# 14# happyReduction_44
  1084. happyReduction_44 (happy_x_11 `HappyStk`
  1085. happy_x_10 `HappyStk`
  1086. happy_x_9 `HappyStk`
  1087. happy_x_8 `HappyStk`
  1088. happy_x_7 `HappyStk`
  1089. happy_x_6 `HappyStk`
  1090. happy_x_5 `HappyStk`
  1091. happy_x_4 `HappyStk`
  1092. happy_x_3 `HappyStk`
  1093. happy_x_2 `HappyStk`
  1094. happy_x_1 `HappyStk`
  1095. happyRest) tk
  1096. = happyThen (case happyOut42 happy_x_1 of { happy_var_1 ->
  1097. case happyOutTok happy_x_3 of { (L _ (CmmT_String happy_var_3)) ->
  1098. case happyOut32 happy_x_4 of { happy_var_4 ->
  1099. case happyOut36 happy_x_6 of { happy_var_6 ->
  1100. case happyOut22 happy_x_8 of { happy_var_8 ->
  1101. case happyOut23 happy_x_9 of { happy_var_9 ->
  1102. case happyOut19 happy_x_10 of { happy_var_10 ->
  1103. ( foreignCall happy_var_3 happy_var_1 happy_var_4 happy_var_6 happy_var_9 happy_var_8 happy_var_10)}}}}}}}
  1104. ) (\r -> happyReturn (happyIn18 r))
  1105. happyReduce_45 = happyMonadReduce 10# 14# happyReduction_45
  1106. happyReduction_45 (happy_x_10 `HappyStk`
  1107. happy_x_9 `HappyStk`
  1108. happy_x_8 `HappyStk`
  1109. happy_x_7 `HappyStk`
  1110. happy_x_6 `HappyStk`
  1111. happy_x_5 `HappyStk`
  1112. happy_x_4 `HappyStk`
  1113. happy_x_3 `HappyStk`
  1114. happy_x_2 `HappyStk`
  1115. happy_x_1 `HappyStk`
  1116. happyRest) tk
  1117. = happyThen (case happyOut42 happy_x_1 of { happy_var_1 ->
  1118. case happyOutTok happy_x_4 of { (L _ (CmmT_Name happy_var_4)) ->
  1119. case happyOut36 happy_x_6 of { happy_var_6 ->
  1120. case happyOut22 happy_x_8 of { happy_var_8 ->
  1121. case happyOut23 happy_x_9 of { happy_var_9 ->
  1122. ( primCall happy_var_1 happy_var_4 happy_var_6 happy_var_9 happy_var_8)}}}}}
  1123. ) (\r -> happyReturn (happyIn18 r))
  1124. happyReduce_46 = happyMonadReduce 5# 14# happyReduction_46
  1125. happyReduction_46 (happy_x_5 `HappyStk`
  1126. happy_x_4 `HappyStk`
  1127. happy_x_3 `HappyStk`
  1128. happy_x_2 `HappyStk`
  1129. happy_x_1 `HappyStk`
  1130. happyRest) tk
  1131. = happyThen (case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1132. case happyOut39 happy_x_3 of { happy_var_3 ->
  1133. ( stmtMacro happy_var_1 happy_var_3)}}
  1134. ) (\r -> happyReturn (happyIn18 r))
  1135. happyReduce_47 = happyReduce 7# 14# happyReduction_47
  1136. happyReduction_47 (happy_x_7 `HappyStk`
  1137. happy_x_6 `HappyStk`
  1138. happy_x_5 `HappyStk`
  1139. happy_x_4 `HappyStk`
  1140. happy_x_3 `HappyStk`
  1141. happy_x_2 `HappyStk`
  1142. happy_x_1 `HappyStk`
  1143. happyRest)
  1144. = case happyOut25 happy_x_2 of { happy_var_2 ->
  1145. case happyOut32 happy_x_3 of { happy_var_3 ->
  1146. case happyOut26 happy_x_5 of { happy_var_5 ->
  1147. case happyOut30 happy_x_6 of { happy_var_6 ->
  1148. happyIn18
  1149. (do as <- sequence happy_var_5; doSwitch happy_var_2 happy_var_3 as happy_var_6
  1150. ) `HappyStk` happyRest}}}}
  1151. happyReduce_48 = happySpecReduce_3 14# happyReduction_48
  1152. happyReduction_48 happy_x_3
  1153. happy_x_2
  1154. happy_x_1
  1155. = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) ->
  1156. happyIn18
  1157. (do l <- lookupLabel happy_var_2; stmtEC (CmmBranch l)
  1158. )}
  1159. happyReduce_49 = happyReduce 4# 14# happyReduction_49
  1160. happyReduction_49 (happy_x_4 `HappyStk`
  1161. happy_x_3 `HappyStk`
  1162. happy_x_2 `HappyStk`
  1163. happy_x_1 `HappyStk`
  1164. happyRest)
  1165. = case happyOut32 happy_x_2 of { happy_var_2 ->
  1166. case happyOut35 happy_x_3 of { happy_var_3 ->
  1167. happyIn18
  1168. (do e1 <- happy_var_2; e2 <- sequence happy_var_3; stmtEC (CmmJump e1 e2)
  1169. ) `HappyStk` happyRest}}
  1170. happyReduce_50 = happySpecReduce_3 14# happyReduction_50
  1171. happyReduction_50 happy_x_3
  1172. happy_x_2
  1173. happy_x_1
  1174. = case happyOut35 happy_x_2 of { happy_var_2 ->
  1175. happyIn18
  1176. (do e <- sequence happy_var_2; stmtEC (CmmReturn e)
  1177. )}
  1178. happyReduce_51 = happyReduce 4# 14# happyReduction_51
  1179. happyReduction_51 (happy_x_4 `HappyStk`
  1180. happy_x_3 `HappyStk`
  1181. happy_x_2 `HappyStk`
  1182. happy_x_1 `HappyStk`
  1183. happyRest)
  1184. = case happyOut20 happy_x_2 of { happy_var_2 ->
  1185. case happyOutTok happy_x_4 of { (L _ (CmmT_Name happy_var_4)) ->
  1186. happyIn18
  1187. (do l <- lookupLabel happy_var_4; cmmRawIf happy_var_2 l
  1188. ) `HappyStk` happyRest}}
  1189. happyReduce_52 = happyReduce 6# 14# happyReduction_52
  1190. happyReduction_52 (happy_x_6 `HappyStk`
  1191. happy_x_5 `HappyStk`
  1192. happy_x_4 `HappyStk`
  1193. happy_x_3 `HappyStk`
  1194. happy_x_2 `HappyStk`
  1195. happy_x_1 `HappyStk`
  1196. happyRest)
  1197. = case happyOut20 happy_x_2 of { happy_var_2 ->
  1198. case happyOut13 happy_x_4 of { happy_var_4 ->
  1199. case happyOut31 happy_x_6 of { happy_var_6 ->
  1200. happyIn18
  1201. (cmmIfThenElse happy_var_2 happy_var_4 happy_var_6
  1202. ) `HappyStk` happyRest}}}
  1203. happyReduce_53 = happySpecReduce_0 15# happyReduction_53
  1204. happyReduction_53 = happyIn19
  1205. (CmmMayReturn
  1206. )
  1207. happyReduce_54 = happySpecReduce_2 15# happyReduction_54
  1208. happyReduction_54 happy_x_2
  1209. happy_x_1
  1210. = happyIn19
  1211. (CmmNeverReturns
  1212. )
  1213. happyReduce_55 = happySpecReduce_1 16# happyReduction_55
  1214. happyReduction_55 happy_x_1
  1215. = case happyOut21 happy_x_1 of { happy_var_1 ->
  1216. happyIn20
  1217. (happy_var_1
  1218. )}
  1219. happyReduce_56 = happySpecReduce_1 16# happyReduction_56
  1220. happyReduction_56 happy_x_1
  1221. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1222. happyIn20
  1223. (do e <- happy_var_1; return (BoolTest e)
  1224. )}
  1225. happyReduce_57 = happySpecReduce_3 17# happyReduction_57
  1226. happyReduction_57 happy_x_3
  1227. happy_x_2
  1228. happy_x_1
  1229. = case happyOut20 happy_x_1 of { happy_var_1 ->
  1230. case happyOut20 happy_x_3 of { happy_var_3 ->
  1231. happyIn21
  1232. (do e1 <- happy_var_1; e2 <- happy_var_3;
  1233. return (BoolAnd e1 e2)
  1234. )}}
  1235. happyReduce_58 = happySpecReduce_3 17# happyReduction_58
  1236. happyReduction_58 happy_x_3
  1237. happy_x_2
  1238. happy_x_1
  1239. = case happyOut20 happy_x_1 of { happy_var_1 ->
  1240. case happyOut20 happy_x_3 of { happy_var_3 ->
  1241. happyIn21
  1242. (do e1 <- happy_var_1; e2 <- happy_var_3;
  1243. return (BoolOr e1 e2)
  1244. )}}
  1245. happyReduce_59 = happySpecReduce_2 17# happyReduction_59
  1246. happyReduction_59 happy_x_2
  1247. happy_x_1
  1248. = case happyOut20 happy_x_2 of { happy_var_2 ->
  1249. happyIn21
  1250. (do e <- happy_var_2; return (BoolNot e)
  1251. )}
  1252. happyReduce_60 = happySpecReduce_3 17# happyReduction_60
  1253. happyReduction_60 happy_x_3
  1254. happy_x_2
  1255. happy_x_1
  1256. = case happyOut21 happy_x_2 of { happy_var_2 ->
  1257. happyIn21
  1258. (happy_var_2
  1259. )}
  1260. happyReduce_61 = happySpecReduce_0 18# happyReduction_61
  1261. happyReduction_61 = happyIn22
  1262. (CmmUnsafe
  1263. )
  1264. happyReduce_62 = happyMonadReduce 1# 18# happyReduction_62
  1265. happyReduction_62 (happy_x_1 `HappyStk`
  1266. happyRest) tk
  1267. = happyThen (case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) ->
  1268. ( parseSafety happy_var_1)}
  1269. ) (\r -> happyReturn (happyIn22 r))
  1270. happyReduce_63 = happySpecReduce_0 19# happyReduction_63
  1271. happyReduction_63 = happyIn23
  1272. (Nothing
  1273. )
  1274. happyReduce_64 = happySpecReduce_2 19# happyReduction_64
  1275. happyReduction_64 happy_x_2
  1276. happy_x_1
  1277. = happyIn23
  1278. (Just []
  1279. )
  1280. happyReduce_65 = happySpecReduce_3 19# happyReduction_65
  1281. happyReduction_65 happy_x_3
  1282. happy_x_2
  1283. happy_x_1
  1284. = case happyOut24 happy_x_2 of { happy_var_2 ->
  1285. happyIn23
  1286. (Just happy_var_2
  1287. )}
  1288. happyReduce_66 = happySpecReduce_1 20# happyReduction_66
  1289. happyReduction_66 happy_x_1
  1290. = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) ->
  1291. happyIn24
  1292. ([happy_var_1]
  1293. )}
  1294. happyReduce_67 = happySpecReduce_3 20# happyReduction_67
  1295. happyReduction_67 happy_x_3
  1296. happy_x_2
  1297. happy_x_1
  1298. = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) ->
  1299. case happyOut24 happy_x_3 of { happy_var_3 ->
  1300. happyIn24
  1301. (happy_var_1 : happy_var_3
  1302. )}}
  1303. happyReduce_68 = happyReduce 5# 21# happyReduction_68
  1304. happyReduction_68 (happy_x_5 `HappyStk`
  1305. happy_x_4 `HappyStk`
  1306. happy_x_3 `HappyStk`
  1307. happy_x_2 `HappyStk`
  1308. happy_x_1 `HappyStk`
  1309. happyRest)
  1310. = case happyOutTok happy_x_2 of { (L _ (CmmT_Int happy_var_2)) ->
  1311. case happyOutTok happy_x_4 of { (L _ (CmmT_Int happy_var_4)) ->
  1312. happyIn25
  1313. (Just (fromIntegral happy_var_2, fromIntegral happy_var_4)
  1314. ) `HappyStk` happyRest}}
  1315. happyReduce_69 = happySpecReduce_0 21# happyReduction_69
  1316. happyReduction_69 = happyIn25
  1317. (Nothing
  1318. )
  1319. happyReduce_70 = happySpecReduce_0 22# happyReduction_70
  1320. happyReduction_70 = happyIn26
  1321. ([]
  1322. )
  1323. happyReduce_71 = happySpecReduce_2 22# happyReduction_71
  1324. happyReduction_71 happy_x_2
  1325. happy_x_1
  1326. = case happyOut27 happy_x_1 of { happy_var_1 ->
  1327. case happyOut26 happy_x_2 of { happy_var_2 ->
  1328. happyIn26
  1329. (happy_var_1 : happy_var_2
  1330. )}}
  1331. happyReduce_72 = happyReduce 4# 23# happyReduction_72
  1332. happyReduction_72 (happy_x_4 `HappyStk`
  1333. happy_x_3 `HappyStk`
  1334. happy_x_2 `HappyStk`
  1335. happy_x_1 `HappyStk`
  1336. happyRest)
  1337. = case happyOut29 happy_x_2 of { happy_var_2 ->
  1338. case happyOut28 happy_x_4 of { happy_var_4 ->
  1339. happyIn27
  1340. (do b <- happy_var_4; return (happy_var_2, b)
  1341. ) `HappyStk` happyRest}}
  1342. happyReduce_73 = happySpecReduce_3 24# happyReduction_73
  1343. happyReduction_73 happy_x_3
  1344. happy_x_2
  1345. happy_x_1
  1346. = case happyOut13 happy_x_2 of { happy_var_2 ->
  1347. happyIn28
  1348. (return (Right happy_var_2)
  1349. )}
  1350. happyReduce_74 = happySpecReduce_3 24# happyReduction_74
  1351. happyReduction_74 happy_x_3
  1352. happy_x_2
  1353. happy_x_1
  1354. = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) ->
  1355. happyIn28
  1356. (do l <- lookupLabel happy_var_2; return (Left l)
  1357. )}
  1358. happyReduce_75 = happySpecReduce_1 25# happyReduction_75
  1359. happyReduction_75 happy_x_1
  1360. = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) ->
  1361. happyIn29
  1362. ([ fromIntegral happy_var_1 ]
  1363. )}
  1364. happyReduce_76 = happySpecReduce_3 25# happyReduction_76
  1365. happyReduction_76 happy_x_3
  1366. happy_x_2
  1367. happy_x_1
  1368. = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) ->
  1369. case happyOut29 happy_x_3 of { happy_var_3 ->
  1370. happyIn29
  1371. (fromIntegral happy_var_1 : happy_var_3
  1372. )}}
  1373. happyReduce_77 = happyReduce 5# 26# happyReduction_77
  1374. happyReduction_77 (happy_x_5 `HappyStk`
  1375. happy_x_4 `HappyStk`
  1376. happy_x_3 `HappyStk`
  1377. happy_x_2 `HappyStk`
  1378. happy_x_1 `HappyStk`
  1379. happyRest)
  1380. = case happyOut13 happy_x_4 of { happy_var_4 ->
  1381. happyIn30
  1382. (Just happy_var_4
  1383. ) `HappyStk` happyRest}
  1384. happyReduce_78 = happySpecReduce_0 26# happyReduction_78
  1385. happyReduction_78 = happyIn30
  1386. (Nothing
  1387. )
  1388. happyReduce_79 = happySpecReduce_0 27# happyReduction_79
  1389. happyReduction_79 = happyIn31
  1390. (nopEC
  1391. )
  1392. happyReduce_80 = happyReduce 4# 27# happyReduction_80
  1393. happyReduction_80 (happy_x_4 `HappyStk`
  1394. happy_x_3 `HappyStk`
  1395. happy_x_2 `HappyStk`
  1396. happy_x_1 `HappyStk`
  1397. happyRest)
  1398. = case happyOut13 happy_x_3 of { happy_var_3 ->
  1399. happyIn31
  1400. (happy_var_3
  1401. ) `HappyStk` happyRest}
  1402. happyReduce_81 = happySpecReduce_3 28# happyReduction_81
  1403. happyReduction_81 happy_x_3
  1404. happy_x_2
  1405. happy_x_1
  1406. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1407. case happyOut32 happy_x_3 of { happy_var_3 ->
  1408. happyIn32
  1409. (mkMachOp MO_U_Quot [happy_var_1,happy_var_3]
  1410. )}}
  1411. happyReduce_82 = happySpecReduce_3 28# happyReduction_82
  1412. happyReduction_82 happy_x_3
  1413. happy_x_2
  1414. happy_x_1
  1415. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1416. case happyOut32 happy_x_3 of { happy_var_3 ->
  1417. happyIn32
  1418. (mkMachOp MO_Mul [happy_var_1,happy_var_3]
  1419. )}}
  1420. happyReduce_83 = happySpecReduce_3 28# happyReduction_83
  1421. happyReduction_83 happy_x_3
  1422. happy_x_2
  1423. happy_x_1
  1424. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1425. case happyOut32 happy_x_3 of { happy_var_3 ->
  1426. happyIn32
  1427. (mkMachOp MO_U_Rem [happy_var_1,happy_var_3]
  1428. )}}
  1429. happyReduce_84 = happySpecReduce_3 28# happyReduction_84
  1430. happyReduction_84 happy_x_3
  1431. happy_x_2
  1432. happy_x_1
  1433. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1434. case happyOut32 happy_x_3 of { happy_var_3 ->
  1435. happyIn32
  1436. (mkMachOp MO_Sub [happy_var_1,happy_var_3]
  1437. )}}
  1438. happyReduce_85 = happySpecReduce_3 28# happyReduction_85
  1439. happyReduction_85 happy_x_3
  1440. happy_x_2
  1441. happy_x_1
  1442. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1443. case happyOut32 happy_x_3 of { happy_var_3 ->
  1444. happyIn32
  1445. (mkMachOp MO_Add [happy_var_1,happy_var_3]
  1446. )}}
  1447. happyReduce_86 = happySpecReduce_3 28# happyReduction_86
  1448. happyReduction_86 happy_x_3
  1449. happy_x_2
  1450. happy_x_1
  1451. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1452. case happyOut32 happy_x_3 of { happy_var_3 ->
  1453. happyIn32
  1454. (mkMachOp MO_U_Shr [happy_var_1,happy_var_3]
  1455. )}}
  1456. happyReduce_87 = happySpecReduce_3 28# happyReduction_87
  1457. happyReduction_87 happy_x_3
  1458. happy_x_2
  1459. happy_x_1
  1460. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1461. case happyOut32 happy_x_3 of { happy_var_3 ->
  1462. happyIn32
  1463. (mkMachOp MO_Shl [happy_var_1,happy_var_3]
  1464. )}}
  1465. happyReduce_88 = happySpecReduce_3 28# happyReduction_88
  1466. happyReduction_88 happy_x_3
  1467. happy_x_2
  1468. happy_x_1
  1469. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1470. case happyOut32 happy_x_3 of { happy_var_3 ->
  1471. happyIn32
  1472. (mkMachOp MO_And [happy_var_1,happy_var_3]
  1473. )}}
  1474. happyReduce_89 = happySpecReduce_3 28# happyReduction_89
  1475. happyReduction_89 happy_x_3
  1476. happy_x_2
  1477. happy_x_1
  1478. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1479. case happyOut32 happy_x_3 of { happy_var_3 ->
  1480. happyIn32
  1481. (mkMachOp MO_Xor [happy_var_1,happy_var_3]
  1482. )}}
  1483. happyReduce_90 = happySpecReduce_3 28# happyReduction_90
  1484. happyReduction_90 happy_x_3
  1485. happy_x_2
  1486. happy_x_1
  1487. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1488. case happyOut32 happy_x_3 of { happy_var_3 ->
  1489. happyIn32
  1490. (mkMachOp MO_Or [happy_var_1,happy_var_3]
  1491. )}}
  1492. happyReduce_91 = happySpecReduce_3 28# happyReduction_91
  1493. happyReduction_91 happy_x_3
  1494. happy_x_2
  1495. happy_x_1
  1496. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1497. case happyOut32 happy_x_3 of { happy_var_3 ->
  1498. happyIn32
  1499. (mkMachOp MO_U_Ge [happy_var_1,happy_var_3]
  1500. )}}
  1501. happyReduce_92 = happySpecReduce_3 28# happyReduction_92
  1502. happyReduction_92 happy_x_3
  1503. happy_x_2
  1504. happy_x_1
  1505. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1506. case happyOut32 happy_x_3 of { happy_var_3 ->
  1507. happyIn32
  1508. (mkMachOp MO_U_Gt [happy_var_1,happy_var_3]
  1509. )}}
  1510. happyReduce_93 = happySpecReduce_3 28# happyReduction_93
  1511. happyReduction_93 happy_x_3
  1512. happy_x_2
  1513. happy_x_1
  1514. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1515. case happyOut32 happy_x_3 of { happy_var_3 ->
  1516. happyIn32
  1517. (mkMachOp MO_U_Le [happy_var_1,happy_var_3]
  1518. )}}
  1519. happyReduce_94 = happySpecReduce_3 28# happyReduction_94
  1520. happyReduction_94 happy_x_3
  1521. happy_x_2
  1522. happy_x_1
  1523. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1524. case happyOut32 happy_x_3 of { happy_var_3 ->
  1525. happyIn32
  1526. (mkMachOp MO_U_Lt [happy_var_1,happy_var_3]
  1527. )}}
  1528. happyReduce_95 = happySpecReduce_3 28# happyReduction_95
  1529. happyReduction_95 happy_x_3
  1530. happy_x_2
  1531. happy_x_1
  1532. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1533. case happyOut32 happy_x_3 of { happy_var_3 ->
  1534. happyIn32
  1535. (mkMachOp MO_Ne [happy_var_1,happy_var_3]
  1536. )}}
  1537. happyReduce_96 = happySpecReduce_3 28# happyReduction_96
  1538. happyReduction_96 happy_x_3
  1539. happy_x_2
  1540. happy_x_1
  1541. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1542. case happyOut32 happy_x_3 of { happy_var_3 ->
  1543. happyIn32
  1544. (mkMachOp MO_Eq [happy_var_1,happy_var_3]
  1545. )}}
  1546. happyReduce_97 = happySpecReduce_2 28# happyReduction_97
  1547. happyReduction_97 happy_x_2
  1548. happy_x_1
  1549. = case happyOut32 happy_x_2 of { happy_var_2 ->
  1550. happyIn32
  1551. (mkMachOp MO_Not [happy_var_2]
  1552. )}
  1553. happyReduce_98 = happySpecReduce_2 28# happyReduction_98
  1554. happyReduction_98 happy_x_2
  1555. happy_x_1
  1556. = case happyOut32 happy_x_2 of { happy_var_2 ->
  1557. happyIn32
  1558. (mkMachOp MO_S_Neg [happy_var_2]
  1559. )}
  1560. happyReduce_99 = happyMonadReduce 5# 28# happyReduction_99
  1561. happyReduction_99 (happy_x_5 `HappyStk`
  1562. happy_x_4 `HappyStk`
  1563. happy_x_3 `HappyStk`
  1564. happy_x_2 `HappyStk`
  1565. happy_x_1 `HappyStk`
  1566. happyRest) tk
  1567. = happyThen (case happyOut33 happy_x_1 of { happy_var_1 ->
  1568. case happyOutTok happy_x_3 of { (L _ (CmmT_Name happy_var_3)) ->
  1569. case happyOut33 happy_x_5 of { happy_var_5 ->
  1570. ( do { mo <- nameToMachOp happy_var_3 ;
  1571. return (mkMachOp mo [happy_var_1,happy_var_5]) })}}}
  1572. ) (\r -> happyReturn (happyIn32 r))
  1573. happyReduce_100 = happySpecReduce_1 28# happyReduction_100
  1574. happyReduction_100 happy_x_1
  1575. = case happyOut33 happy_x_1 of { happy_var_1 ->
  1576. happyIn32
  1577. (happy_var_1
  1578. )}
  1579. happyReduce_101 = happySpecReduce_2 29# happyReduction_101
  1580. happyReduction_101 happy_x_2
  1581. happy_x_1
  1582. = case happyOutTok happy_x_1 of { (L _ (CmmT_Int happy_var_1)) ->
  1583. case happyOut34 happy_x_2 of { happy_var_2 ->
  1584. happyIn33
  1585. (return (CmmLit (CmmInt happy_var_1 (typeWidth happy_var_2)))
  1586. )}}
  1587. happyReduce_102 = happySpecReduce_2 29# happyReduction_102
  1588. happyReduction_102 happy_x_2
  1589. happy_x_1
  1590. = case happyOutTok happy_x_1 of { (L _ (CmmT_Float happy_var_1)) ->
  1591. case happyOut34 happy_x_2 of { happy_var_2 ->
  1592. happyIn33
  1593. (return (CmmLit (CmmFloat happy_var_1 (typeWidth happy_var_2)))
  1594. )}}
  1595. happyReduce_103 = happySpecReduce_1 29# happyReduction_103
  1596. happyReduction_103 happy_x_1
  1597. = case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) ->
  1598. happyIn33
  1599. (do s <- code (newStringCLit happy_var_1);
  1600. return (CmmLit s)
  1601. )}
  1602. happyReduce_104 = happySpecReduce_1 29# happyReduction_104
  1603. happyReduction_104 happy_x_1
  1604. = case happyOut41 happy_x_1 of { happy_var_1 ->
  1605. happyIn33
  1606. (happy_var_1
  1607. )}
  1608. happyReduce_105 = happyReduce 4# 29# happyReduction_105
  1609. happyReduction_105 (happy_x_4 `HappyStk`
  1610. happy_x_3 `HappyStk`
  1611. happy_x_2 `HappyStk`
  1612. happy_x_1 `HappyStk`
  1613. happyRest)
  1614. = case happyOut53 happy_x_1 of { happy_var_1 ->
  1615. case happyOut32 happy_x_3 of { happy_var_3 ->
  1616. happyIn33
  1617. (do e <- happy_var_3; return (CmmLoad e happy_var_1)
  1618. ) `HappyStk` happyRest}}
  1619. happyReduce_106 = happyMonadReduce 5# 29# happyReduction_106
  1620. happyReduction_106 (happy_x_5 `HappyStk`
  1621. happy_x_4 `HappyStk`
  1622. happy_x_3 `HappyStk`
  1623. happy_x_2 `HappyStk`
  1624. happy_x_1 `HappyStk`
  1625. happyRest) tk
  1626. = happyThen (case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) ->
  1627. case happyOut39 happy_x_4 of { happy_var_4 ->
  1628. ( exprOp happy_var_2 happy_var_4)}}
  1629. ) (\r -> happyReturn (happyIn33 r))
  1630. happyReduce_107 = happySpecReduce_3 29# happyReduction_107
  1631. happyReduction_107 happy_x_3
  1632. happy_x_2
  1633. happy_x_1
  1634. = case happyOut32 happy_x_2 of { happy_var_2 ->
  1635. happyIn33
  1636. (happy_var_2
  1637. )}
  1638. happyReduce_108 = happySpecReduce_0 30# happyReduction_108
  1639. happyReduction_108 = happyIn34
  1640. (bWord
  1641. )
  1642. happyReduce_109 = happySpecReduce_2 30# happyReduction_109
  1643. happyReduction_109 happy_x_2
  1644. happy_x_1
  1645. = case happyOut53 happy_x_2 of { happy_var_2 ->
  1646. happyIn34
  1647. (happy_var_2
  1648. )}
  1649. happyReduce_110 = happySpecReduce_0 31# happyReduction_110
  1650. happyReduction_110 = happyIn35
  1651. ([]
  1652. )
  1653. happyReduce_111 = happySpecReduce_3 31# happyReduction_111
  1654. happyReduction_111 happy_x_3
  1655. happy_x_2
  1656. happy_x_1
  1657. = case happyOut36 happy_x_2 of { happy_var_2 ->
  1658. happyIn35
  1659. (happy_var_2
  1660. )}
  1661. happyReduce_112 = happySpecReduce_0 32# happyReduction_112
  1662. happyReduction_112 = happyIn36
  1663. ([]
  1664. )
  1665. happyReduce_113 = happySpecReduce_1 32# happyReduction_113
  1666. happyReduction_113 happy_x_1
  1667. = case happyOut37 happy_x_1 of { happy_var_1 ->
  1668. happyIn36
  1669. (happy_var_1
  1670. )}
  1671. happyReduce_114 = happySpecReduce_1 33# happyReduction_114
  1672. happyReduction_114 happy_x_1
  1673. = case happyOut38 happy_x_1 of { happy_var_1 ->
  1674. happyIn37
  1675. ([happy_var_1]
  1676. )}
  1677. happyReduce_115 = happySpecReduce_3 33# happyReduction_115
  1678. happyReduction_115 happy_x_3
  1679. happy_x_2
  1680. happy_x_1
  1681. = case happyOut38 happy_x_1 of { happy_var_1 ->
  1682. case happyOut37 happy_x_3 of { happy_var_3 ->
  1683. happyIn37
  1684. (happy_var_1 : happy_var_3
  1685. )}}
  1686. happyReduce_116 = happySpecReduce_1 34# happyReduction_116
  1687. happyReduction_116 happy_x_1
  1688. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1689. happyIn38
  1690. (do e <- happy_var_1; return (CmmHinted e (inferCmmHint e))
  1691. )}
  1692. happyReduce_117 = happyMonadReduce 2# 34# happyReduction_117
  1693. happyReduction_117 (happy_x_2 `HappyStk`
  1694. happy_x_1 `HappyStk`
  1695. happyRest) tk
  1696. = happyThen (case happyOut32 happy_x_1 of { happy_var_1 ->
  1697. case happyOutTok happy_x_2 of { (L _ (CmmT_String happy_var_2)) ->
  1698. ( do h <- parseCmmHint happy_var_2;
  1699. return $ do
  1700. e <- happy_var_1; return (CmmHinted e h))}}
  1701. ) (\r -> happyReturn (happyIn38 r))
  1702. happyReduce_118 = happySpecReduce_0 35# happyReduction_118
  1703. happyReduction_118 = happyIn39
  1704. ([]
  1705. )
  1706. happyReduce_119 = happySpecReduce_1 35# happyReduction_119
  1707. happyReduction_119 happy_x_1
  1708. = case happyOut40 happy_x_1 of { happy_var_1 ->
  1709. happyIn39
  1710. (happy_var_1
  1711. )}
  1712. happyReduce_120 = happySpecReduce_1 36# happyReduction_120
  1713. happyReduction_120 happy_x_1
  1714. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1715. happyIn40
  1716. ([ happy_var_1 ]
  1717. )}
  1718. happyReduce_121 = happySpecReduce_3 36# happyReduction_121
  1719. happyReduction_121 happy_x_3
  1720. happy_x_2
  1721. happy_x_1
  1722. = case happyOut32 happy_x_1 of { happy_var_1 ->
  1723. case happyOut40 happy_x_3 of { happy_var_3 ->
  1724. happyIn40
  1725. (happy_var_1 : happy_var_3
  1726. )}}
  1727. happyReduce_122 = happySpecReduce_1 37# happyReduction_122
  1728. happyReduction_122 happy_x_1
  1729. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1730. happyIn41
  1731. (lookupName happy_var_1
  1732. )}
  1733. happyReduce_123 = happySpecReduce_1 37# happyReduction_123
  1734. happyReduction_123 happy_x_1
  1735. = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) ->
  1736. happyIn41
  1737. (return (CmmReg (CmmGlobal happy_var_1))
  1738. )}
  1739. happyReduce_124 = happySpecReduce_0 38# happyReduction_124
  1740. happyReduction_124 = happyIn42
  1741. ([]
  1742. )
  1743. happyReduce_125 = happyReduce 4# 38# happyReduction_125
  1744. happyReduction_125 (happy_x_4 `HappyStk`
  1745. happy_x_3 `HappyStk`
  1746. happy_x_2 `HappyStk`
  1747. happy_x_1 `HappyStk`
  1748. happyRest)
  1749. = case happyOut43 happy_x_2 of { happy_var_2 ->
  1750. happyIn42
  1751. (happy_var_2
  1752. ) `HappyStk` happyRest}
  1753. happyReduce_126 = happySpecReduce_1 39# happyReduction_126
  1754. happyReduction_126 happy_x_1
  1755. = case happyOut44 happy_x_1 of { happy_var_1 ->
  1756. happyIn43
  1757. ([happy_var_1]
  1758. )}
  1759. happyReduce_127 = happySpecReduce_2 39# happyReduction_127
  1760. happyReduction_127 happy_x_2
  1761. happy_x_1
  1762. = case happyOut44 happy_x_1 of { happy_var_1 ->
  1763. happyIn43
  1764. ([happy_var_1]
  1765. )}
  1766. happyReduce_128 = happySpecReduce_3 39# happyReduction_128
  1767. happyReduction_128 happy_x_3
  1768. happy_x_2
  1769. happy_x_1
  1770. = case happyOut44 happy_x_1 of { happy_var_1 ->
  1771. case happyOut43 happy_x_3 of { happy_var_3 ->
  1772. happyIn43
  1773. (happy_var_1 : happy_var_3
  1774. )}}
  1775. happyReduce_129 = happySpecReduce_1 40# happyReduction_129
  1776. happyReduction_129 happy_x_1
  1777. = case happyOut45 happy_x_1 of { happy_var_1 ->
  1778. happyIn44
  1779. (do e <- happy_var_1; return (CmmHinted e (inferCmmHint (CmmReg (CmmLocal e))))
  1780. )}
  1781. happyReduce_130 = happyMonadReduce 2# 40# happyReduction_130
  1782. happyReduction_130 (happy_x_2 `HappyStk`
  1783. happy_x_1 `HappyStk`
  1784. happyRest) tk
  1785. = happyThen (case happyOutTok happy_x_1 of { (L _ (CmmT_String happy_var_1)) ->
  1786. case happyOut45 happy_x_2 of { happy_var_2 ->
  1787. ( do h <- parseCmmHint happy_var_1;
  1788. return $ do
  1789. e <- happy_var_2; return (CmmHinted e h))}}
  1790. ) (\r -> happyReturn (happyIn44 r))
  1791. happyReduce_131 = happySpecReduce_1 41# happyReduction_131
  1792. happyReduction_131 happy_x_1
  1793. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1794. happyIn45
  1795. (do e <- lookupName happy_var_1;
  1796. return $
  1797. case e of
  1798. CmmReg (CmmLocal r) -> r
  1799. other -> pprPanic "CmmParse:" (ftext happy_var_1 <> text " not a local register")
  1800. )}
  1801. happyReduce_132 = happySpecReduce_1 42# happyReduction_132
  1802. happyReduction_132 happy_x_1
  1803. = case happyOutTok happy_x_1 of { (L _ (CmmT_Name happy_var_1)) ->
  1804. happyIn46
  1805. (do e <- lookupName happy_var_1;
  1806. return $
  1807. case e of
  1808. CmmReg r -> r
  1809. other -> pprPanic "CmmParse:" (ftext happy_var_1 <> text " not a register")
  1810. )}
  1811. happyReduce_133 = happySpecReduce_1 42# happyReduction_133
  1812. happyReduction_133 happy_x_1
  1813. = case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg happy_var_1)) ->
  1814. happyIn46
  1815. (return (CmmGlobal happy_var_1)
  1816. )}
  1817. happyReduce_134 = happySpecReduce_0 43# happyReduction_134
  1818. happyReduction_134 = happyIn47
  1819. ([]
  1820. )
  1821. happyReduce_135 = happySpecReduce_3 43# happyReduction_135
  1822. happyReduction_135 happy_x_3
  1823. happy_x_2
  1824. happy_x_1
  1825. = case happyOut48 happy_x_2 of { happy_var_2 ->
  1826. happyIn47
  1827. (happy_var_2
  1828. )}
  1829. happyReduce_136 = happySpecReduce_0 44# happyReduction_136
  1830. happyReduction_136 = happyIn48
  1831. ([]
  1832. )
  1833. happyReduce_137 = happySpecReduce_1 44# happyReduction_137
  1834. happyReduction_137 happy_x_1
  1835. = case happyOut49 happy_x_1 of { happy_var_1 ->
  1836. happyIn48
  1837. (happy_var_1
  1838. )}
  1839. happyReduce_138 = happySpecReduce_2 45# happyReduction_138
  1840. happyReduction_138 happy_x_2
  1841. happy_x_1
  1842. = case happyOut50 happy_x_1 of { happy_var_1 ->
  1843. happyIn49
  1844. ([happy_var_1]
  1845. )}
  1846. happyReduce_139 = happySpecReduce_1 45# happyReduction_139
  1847. happyReduction_139 happy_x_1
  1848. = case happyOut50 happy_x_1 of { happy_var_1 ->
  1849. happyIn49
  1850. ([happy_var_1]
  1851. )}
  1852. happyReduce_140 = happySpecReduce_3 45# happyReduction_140
  1853. happyReduction_140 happy_x_3
  1854. happy_x_2
  1855. happy_x_1
  1856. = case happyOut50 happy_x_1 of { happy_var_1 ->
  1857. case happyOut49 happy_x_3 of { happy_var_3 ->
  1858. happyIn49
  1859. (happy_var_1 : happy_var_3
  1860. )}}
  1861. happyReduce_141 = happySpecReduce_2 46# happyReduction_141
  1862. happyReduction_141 happy_x_2
  1863. happy_x_1
  1864. = case happyOut53 happy_x_1 of { happy_var_1 ->
  1865. case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) ->
  1866. happyIn50
  1867. (newLocal happy_var_1 happy_var_2
  1868. )}}
  1869. happyReduce_142 = happySpecReduce_0 47# happyReduction_142
  1870. happyReduction_142 = happyIn51
  1871. (return Nothing
  1872. )
  1873. happyReduce_143 = happyReduce 5# 47# happyReduction_143
  1874. happyReduction_143 (happy_x_5 `HappyStk`
  1875. happy_x_4 `HappyStk`
  1876. happy_x_3 `HappyStk`
  1877. happy_x_2 `HappyStk`
  1878. happy_x_1 `HappyStk`
  1879. happyRest)
  1880. = case happyOut32 happy_x_2 of { happy_var_2 ->
  1881. case happyOut39 happy_x_4 of { happy_var_4 ->
  1882. happyIn51
  1883. (do { target <- happy_var_2;
  1884. args <- sequence happy_var_4;
  1885. return $ Just (UpdateFrame target args) }
  1886. ) `HappyStk` happyRest}}
  1887. happyReduce_144 = happySpecReduce_0 48# happyReduction_144
  1888. happyReduction_144 = happyIn52
  1889. (return Nothing
  1890. )
  1891. happyReduce_145 = happySpecReduce_2 48# happyReduction_145
  1892. happyReduction_145 happy_x_2
  1893. happy_x_1
  1894. = case happyOutTok happy_x_2 of { (L _ (CmmT_Name happy_var_2)) ->
  1895. happyIn52
  1896. (do l <- lookupLabel happy_var_2; return (Just l)
  1897. )}
  1898. happyReduce_146 = happySpecReduce_1 49# happyReduction_146
  1899. happyReduction_146 happy_x_1
  1900. = happyIn53
  1901. (b8
  1902. )
  1903. happyReduce_147 = happySpecReduce_1 49# happyReduction_147
  1904. happyReduction_147 happy_x_1
  1905. = case happyOut54 happy_x_1 of { happy_var_1 ->
  1906. happyIn53
  1907. (happy_var_1
  1908. )}
  1909. happyReduce_148 = happySpecReduce_1 50# happyReduction_148
  1910. happyReduction_148 happy_x_1
  1911. = happyIn54
  1912. (b16
  1913. )
  1914. happyReduce_149 = happySpecReduce_1 50# happyReduction_149
  1915. happyReduction_149 happy_x_1
  1916. = happyIn54
  1917. (b32
  1918. )
  1919. happyReduce_150 = happySpecReduce_1 50# happyReduction_150
  1920. happyReduction_150 happy_x_1
  1921. = happyIn54
  1922. (b64
  1923. )
  1924. happyReduce_151 = happySpecReduce_1 50# happyReduction_151
  1925. happyReduction_151 happy_x_1
  1926. = happyIn54
  1927. (f32
  1928. )
  1929. happyReduce_152 = happySpecReduce_1 50# happyReduction_152
  1930. happyReduction_152 happy_x_1
  1931. = happyIn54
  1932. (f64
  1933. )
  1934. happyReduce_153 = happySpecReduce_1 50# happyReduction_153
  1935. happyReduction_153 happy_x_1
  1936. = happyIn54
  1937. (gcWord
  1938. )
  1939. happyNewToken action sts stk
  1940. = cmmlex(\tk ->
  1941. let cont i = happyDoAction i tk action sts stk in
  1942. case tk of {
  1943. L _ CmmT_EOF -> happyDoAction 68# tk action sts stk;
  1944. L _ (CmmT_SpecChar ':') -> cont 1#;
  1945. L _ (CmmT_SpecChar ';') -> cont 2#;
  1946. L _ (CmmT_SpecChar '{') -> cont 3#;
  1947. L _ (CmmT_SpecChar '}') -> cont 4#;
  1948. L _ (CmmT_SpecChar '[') -> cont 5#;
  1949. L _ (CmmT_SpecChar ']') -> cont 6#;
  1950. L _ (CmmT_SpecChar '(') -> cont 7#;
  1951. L _ (CmmT_SpecChar ')') -> cont 8#;
  1952. L _ (CmmT_SpecChar '=') -> cont 9#;
  1953. L _ (CmmT_SpecChar '`') -> cont 10#;
  1954. L _ (CmmT_SpecChar '~') -> cont 11#;
  1955. L _ (CmmT_SpecChar '/') -> cont 12#;
  1956. L _ (CmmT_SpecChar '*') -> cont 13#;
  1957. L _ (CmmT_SpecChar '%') -> cont 14#;
  1958. L _ (CmmT_SpecChar '-') -> cont 15#;
  1959. L _ (CmmT_SpecChar '+') -> cont 16#;
  1960. L _ (CmmT_SpecChar '&') -> cont 17#;
  1961. L _ (CmmT_SpecChar '^') -> cont 18#;
  1962. L _ (CmmT_SpecChar '|') -> cont 19#;
  1963. L _ (CmmT_SpecChar '>') -> cont 20#;
  1964. L _ (CmmT_SpecChar '<') -> cont 21#;
  1965. L _ (CmmT_SpecChar ',') -> cont 22#;
  1966. L _ (CmmT_SpecChar '!') -> cont 23#;
  1967. L _ (CmmT_DotDot) -> cont 24#;
  1968. L _ (CmmT_DoubleColon) -> cont 25#;
  1969. L _ (CmmT_Shr) -> cont 26#;
  1970. L _ (CmmT_Shl) -> cont 27#;
  1971. L _ (CmmT_Ge) -> cont 28#;
  1972. L _ (CmmT_Le) -> cont 29#;
  1973. L _ (CmmT_Eq) -> cont 30#;
  1974. L _ (CmmT_Ne) -> cont 31#;
  1975. L _ (CmmT_BoolAnd) -> cont 32#;
  1976. L _ (CmmT_BoolOr) -> cont 33#;
  1977. L _ (CmmT_CLOSURE) -> cont 34#;
  1978. L _ (CmmT_INFO_TABLE) -> cont 35#;
  1979. L _ (CmmT_INFO_TABLE_RET) -> cont 36#;
  1980. L _ (CmmT_INFO_TABLE_FUN) -> cont 37#;
  1981. L _ (CmmT_INFO_TABLE_CONSTR) -> cont 38#;
  1982. L _ (CmmT_INFO_TABLE_SELECTOR) -> cont 39#;
  1983. L _ (CmmT_else) -> cont 40#;
  1984. L _ (CmmT_export) -> cont 41#;
  1985. L _ (CmmT_section) -> cont 42#;
  1986. L _ (CmmT_align) -> cont 43#;
  1987. L _ (CmmT_goto) -> cont 44#;
  1988. L _ (CmmT_if) -> cont 45#;
  1989. L _ (CmmT_jump) -> cont 46#;
  1990. L _ (CmmT_foreign) -> cont 47#;
  1991. L _ (CmmT_never) -> cont 48#;
  1992. L _ (CmmT_prim) -> cont 49#;
  1993. L _ (CmmT_return) -> cont 50#;
  1994. L _ (CmmT_returns) -> cont 51#;
  1995. L _ (CmmT_import) -> cont 52#;
  1996. L _ (CmmT_switch) -> cont 53#;
  1997. L _ (CmmT_case) -> cont 54#;
  1998. L _ (CmmT_default) -> cont 55#;
  1999. L _ (CmmT_bits8) -> cont 56#;
  2000. L _ (CmmT_bits16) -> cont 57#;
  2001. L _ (CmmT_bits32) -> cont 58#;
  2002. L _ (CmmT_bits64) -> cont 59#;
  2003. L _ (CmmT_float32) -> cont 60#;
  2004. L _ (CmmT_float64) -> cont 61#;
  2005. L _ (CmmT_gcptr) -> cont 62#;
  2006. L _ (CmmT_GlobalReg happy_dollar_dollar) -> cont 63#;
  2007. L _ (CmmT_Name happy_dollar_dollar) -> cont 64#;
  2008. L _ (CmmT_String happy_dollar_dollar) -> cont 65#;
  2009. L _ (CmmT_Int happy_dollar_dollar) -> cont 66#;
  2010. L _ (CmmT_Float happy_dollar_dollar) -> cont 67#;
  2011. _ -> happyError' tk
  2012. })
  2013. happyError_ tk = happyError' tk
  2014. happyThen :: () => P a -> (a -> P b) -> P b
  2015. happyThen = (>>=)
  2016. happyReturn :: () => a -> P a
  2017. happyReturn = (return)
  2018. happyThen1 = happyThen
  2019. happyReturn1 :: () => a -> P a
  2020. happyReturn1 = happyReturn
  2021. happyError' :: () => (Located CmmToken) -> P a
  2022. happyError' tk = (\token -> happyError) tk
  2023. cmmParse = happySomeParser where
  2024. happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (happyOut4 x))
  2025. happySeq = happyDoSeq
  2026. section :: String -> Section
  2027. section "text" = Text
  2028. section "data" = Data
  2029. section "rodata" = ReadOnlyData
  2030. section "relrodata" = RelocatableReadOnlyData
  2031. section "bss" = UninitialisedData
  2032. section s = OtherSection s
  2033. mkString :: String -> CmmStatic
  2034. mkString s = CmmString (map (fromIntegral.ord) s)
  2035. -- mkMachOp infers the type of the MachOp from the type of its first
  2036. -- argument. We assume that this is correct: for MachOps that don't have
  2037. -- symmetrical args (e.g. shift ops), the first arg determines the type of
  2038. -- the op.
  2039. mkMachOp :: (Width -> MachOp) -> [ExtFCode CmmExpr] -> ExtFCode CmmExpr
  2040. mkMachOp fn args = do
  2041. arg_exprs <- sequence args
  2042. return (CmmMachOp (fn (typeWidth (cmmExprType (head arg_exprs)))) arg_exprs)
  2043. getLit :: CmmExpr -> CmmLit
  2044. getLit (CmmLit l) = l
  2045. getLit (CmmMachOp (MO_S_Neg _) [CmmLit (CmmInt i r)]) = CmmInt (negate i) r
  2046. getLit _ = panic "invalid literal" -- TODO messy failure
  2047. nameToMachOp :: FastString -> P (Width -> MachOp)
  2048. nameToMachOp name =
  2049. case lookupUFM machOps name of
  2050. Nothing -> fail ("unknown primitive " ++ unpackFS name)
  2051. Just m -> return m
  2052. exprOp :: FastString -> [ExtFCode CmmExpr] -> P (ExtFCode CmmExpr)
  2053. exprOp name args_code =
  2054. case lookupUFM exprMacros name of
  2055. Just f -> return $ do
  2056. args <- sequence args_code
  2057. return (f args)
  2058. Nothing -> do
  2059. mo <- nameToMachOp name
  2060. return $ mkMachOp mo args_code
  2061. exprMacros :: UniqFM ([CmmExpr] -> CmmExpr)
  2062. exprMacros = listToUFM [
  2063. ( fsLit "ENTRY_CODE", \ [x] -> entryCode x ),
  2064. ( fsLit "INFO_PTR", \ [x] -> closureInfoPtr x ),
  2065. ( fsLit "STD_INFO", \ [x] -> infoTable x ),
  2066. ( fsLit "FUN_INFO", \ [x] -> funInfoTable x ),
  2067. ( fsLit "GET_ENTRY", \ [x] -> entryCode (closureInfoPtr x) ),
  2068. ( fsLit "GET_STD_INFO", \ [x] -> infoTable (closureInfoPtr x) ),
  2069. ( fsLit "GET_FUN_INFO", \ [x] -> funInfoTable (closureInfoPtr x) ),
  2070. ( fsLit "INFO_TYPE", \ [x] -> infoTableClosureType x ),
  2071. ( fsLit "INFO_PTRS", \ [x] -> infoTablePtrs x ),
  2072. ( fsLit "INFO_NPTRS", \ [x] -> infoTableNonPtrs x )
  2073. ]
  2074. -- we understand a subset of C-- primitives:
  2075. machOps = listToUFM $
  2076. map (\(x, y) -> (mkFastString x, y)) [
  2077. ( "add", MO_Add ),
  2078. ( "sub", MO_Sub ),
  2079. ( "eq", MO_Eq ),
  2080. ( "ne", MO_Ne ),
  2081. ( "mul", MO_Mul ),
  2082. ( "neg", MO_S_Neg ),
  2083. ( "quot", MO_S_Quot ),
  2084. ( "rem", MO_S_Rem ),
  2085. ( "divu", MO_U_Quot ),
  2086. ( "modu", MO_U_Rem ),
  2087. ( "ge", MO_S_Ge ),
  2088. ( "le", MO_S_Le ),
  2089. ( "gt", MO_S_Gt ),
  2090. ( "lt", MO_S_Lt ),
  2091. ( "geu", MO_U_Ge ),
  2092. ( "leu", MO_U_Le ),
  2093. ( "gtu", MO_U_Gt ),
  2094. ( "ltu", MO_U_Lt ),
  2095. ( "and", MO_And ),
  2096. ( "or", MO_Or ),
  2097. ( "xor", MO_Xor ),
  2098. ( "com", MO_Not ),
  2099. ( "shl", MO_Shl ),
  2100. ( "shrl", MO_U_Shr ),
  2101. ( "shra", MO_S_Shr ),
  2102. ( "fadd", MO_F_Add ),
  2103. ( "fsub", MO_F_Sub ),
  2104. ( "fneg", MO_F_Neg ),
  2105. ( "fmul", MO_F_Mul ),
  2106. ( "fquot", MO_F_Quot ),
  2107. ( "feq", MO_F_Eq ),
  2108. ( "fne", MO_F_Ne ),
  2109. ( "fge", MO_F_Ge ),
  2110. ( "fle", MO_F_Le ),
  2111. ( "fgt", MO_F_Gt ),
  2112. ( "flt", MO_F_Lt ),
  2113. ( "lobits8", flip MO_UU_Conv W8 ),
  2114. ( "lobits16", flip MO_UU_Conv W16 ),
  2115. ( "lobits32", flip MO_UU_Conv W32 ),
  2116. ( "lobits64", flip MO_UU_Conv W64 ),
  2117. ( "zx16", flip MO_UU_Conv W16 ),
  2118. ( "zx32", flip MO_UU_Conv W32 ),
  2119. ( "zx64", flip MO_UU_Conv W64 ),
  2120. ( "sx16", flip MO_SS_Conv W16 ),
  2121. ( "sx32", flip MO_SS_Conv W32 ),
  2122. ( "sx64", flip MO_SS_Conv W64 ),
  2123. ( "f2f32", flip MO_FF_Conv W32 ), -- TODO; rounding mode
  2124. ( "f2f64", flip MO_FF_Conv W64 ), -- TODO; rounding mode
  2125. ( "f2i8", flip MO_FS_Conv W8 ),
  2126. ( "f2i16", flip MO_FS_Conv W16 ),
  2127. ( "f2i32", flip MO_FS_Conv W32 ),
  2128. ( "f2i64", flip MO_FS_Conv W64 ),
  2129. ( "i2f32", flip MO_SF_Conv W32 ),
  2130. ( "i2f64", flip MO_SF_Conv W64 )
  2131. ]
  2132. callishMachOps = listToUFM $
  2133. map (\(x, y) -> (mkFastString x, y)) [
  2134. ( "write_barrier", MO_WriteBarrier ),
  2135. ( "memcpy", MO_Memcpy ),
  2136. ( "memset", MO_Memset ),
  2137. ( "memmove", MO_Memmove )
  2138. -- ToDo: the rest, maybe
  2139. ]
  2140. parseSafety :: String -> P CmmSafety
  2141. parseSafety "safe" = return (CmmSafe NoC_SRT)
  2142. parseSafety "unsafe" = return CmmUnsafe
  2143. parseSafety "interruptible" = return CmmInterruptible
  2144. parseSafety str = fail ("unrecognised safety: " ++ str)
  2145. parseCmmHint :: String -> P ForeignHint
  2146. parseCmmHint "ptr" = return AddrHint
  2147. parseCmmHint "signed" = return SignedHint
  2148. parseCmmHint str = fail ("unrecognised hint: " ++ str)
  2149. -- labels are always pointers, so we might as well infer the hint
  2150. inferCmmHint :: CmmExpr -> ForeignHint
  2151. inferCmmHint (CmmLit (CmmLabel _)) = AddrHint
  2152. inferCmmHint (CmmReg (CmmGlobal g)) | isPtrGlobalReg g = AddrHint
  2153. inferCmmHint _ = NoHint
  2154. isPtrGlobalReg Sp = True
  2155. isPtrGlobalReg SpLim = True
  2156. isPtrGlobalReg Hp = True
  2157. isPtrGlobalReg HpLim = True
  2158. isPtrGlobalReg CCCS = True
  2159. isPtrGlobalReg CurrentTSO = True
  2160. isPtrGlobalReg CurrentNursery = True
  2161. isPtrGlobalReg (VanillaReg _ VGcPtr) = True
  2162. isPtrGlobalReg _ = False
  2163. happyError :: P a
  2164. happyError = srcParseFail
  2165. -- -----------------------------------------------------------------------------
  2166. -- Statement-level macros
  2167. stmtMacro :: FastString -> [ExtFCode CmmExpr] -> P ExtCode
  2168. stmtMacro fun args_code = do
  2169. case lookupUFM stmtMacros fun of
  2170. Nothing -> fail ("unknown macro: " ++ unpackFS fun)
  2171. Just fcode -> return $ do
  2172. args <- sequence args_code
  2173. code (fcode args)
  2174. stmtMacros :: UniqFM ([CmmExpr] -> Code)
  2175. stmtMacros = listToUFM [
  2176. ( fsLit "CCS_ALLOC", \[words,ccs] -> profAlloc words ccs ),
  2177. ( fsLit "CLOSE_NURSERY", \[] -> emitCloseNursery ),
  2178. ( fsLit "ENTER_CCS_THUNK", \[e] -> enterCostCentreThunk e ),
  2179. ( fsLit "HP_CHK_GEN", \[words,liveness,reentry] ->
  2180. hpChkGen words liveness reentry ),
  2181. ( fsLit "HP_CHK_NP_ASSIGN_SP0", \[e,f] -> hpChkNodePointsAssignSp0 e f ),
  2182. ( fsLit "LOAD_THREAD_STATE", \[] -> emitLoadThreadState ),
  2183. ( fsLit "LDV_ENTER", \[e] -> ldvEnter e ),
  2184. ( fsLit "LDV_RECORD_CREATE", \[e] -> ldvRecordCreate e ),
  2185. ( fsLit "OPEN_NURSERY", \[] -> emitOpenNursery ),
  2186. ( fsLit "PUSH_UPD_FRAME", \[sp,e] -> emitPushUpdateFrame sp e ),
  2187. ( fsLit "SAVE_THREAD_STATE", \[] -> emitSaveThreadState ),
  2188. ( fsLit "SET_HDR", \[ptr,info,ccs] ->
  2189. emitSetDynHdr ptr info ccs ),
  2190. ( fsLit "STK_CHK_GEN", \[words,liveness,reentry] ->
  2191. stkChkGen words liveness reentry ),
  2192. ( fsLit "STK_CHK_NP", \[e] -> stkChkNodePoints e ),
  2193. ( fsLit "TICK_ALLOC_PRIM", \[hdr,goods,slop] ->
  2194. tickyAllocPrim hdr goods slop ),
  2195. ( fsLit "TICK_ALLOC_PAP", \[goods,slop] ->
  2196. tickyAllocPAP goods slop ),
  2197. ( fsLit "TICK_ALLOC_UP_THK", \[goods,slop] ->
  2198. tickyAllocThunk goods slop ),
  2199. ( fsLit "UPD_BH_UPDATABLE", \[] -> emitBlackHoleCode False ),
  2200. ( fsLit "UPD_BH_SINGLE_ENTRY", \[] -> emitBlackHoleCode True ),
  2201. ( fsLit "RET_P", \[a] -> emitRetUT [(PtrArg,a)]),
  2202. ( fsLit "RET_N", \[a] -> emitRetUT [(NonPtrArg,a)]),
  2203. ( fsLit "RET_PP", \[a,b] -> emitRetUT [(PtrArg,a),(PtrArg,b)]),
  2204. ( fsLit "RET_NN", \[a,b] -> emitRetUT [(NonPtrArg,a),(NonPtrArg,b)]),
  2205. ( fsLit "RET_NP", \[a,b] -> emitRetUT [(NonPtrArg,a),(PtrArg,b)]),
  2206. ( fsLit "RET_PPP", \[a,b,c] -> emitRetUT [(PtrArg,a),(PtrArg,b),(PtrArg,c)]),
  2207. ( fsLit "RET_NPP", \[a,b,c] -> emitRetUT [(NonPtrArg,a),(PtrArg,b),(PtrArg,c)]),
  2208. ( fsLit "RET_NNP", \[a,b,c] -> emitRetUT [(NonPtrArg,a),(NonPtrArg,b),(PtrArg,c)]),
  2209. ( fsLit "RET_NNN", \[a,b,c] -> emitRetUT [(NonPtrArg,a),(NonPtrArg,b),(NonPtrArg,c)]),
  2210. ( fsLit "RET_NNNN", \[a,b,c,d] -> emitRetUT [(NonPtrArg,a),(NonPtrArg,b),(NonPtrArg,c),(NonPtrArg,d)]),
  2211. ( fsLit "RET_NNNP", \[a,b,c,d] -> emitRetUT [(NonPtrArg,a),(NonPtrArg,b),(NonPtrArg,c),(PtrArg,d)]),
  2212. ( fsLit "RET_NPNP", \[a,b,c,d] -> emitRetUT [(NonPtrArg,a),(PtrArg,b),(NonPtrArg,c),(PtrArg,d)])
  2213. ]
  2214. profilingInfo desc_str ty_str
  2215. | not opt_SccProfilingOn = NoProfilingInfo
  2216. | otherwise = ProfilingInfo (stringToWord8s desc_str)
  2217. (stringToWord8s ty_str)
  2218. staticClosure :: PackageId -> FastString -> FastString -> [CmmLit] -> ExtCode
  2219. staticClosure pkg cl_label info payload
  2220. = code $ emitDataLits (mkCmmDataLabel pkg cl_label) lits
  2221. where lits = mkStaticClosure (mkCmmInfoLabel pkg info) dontCareCCS payload [] [] []
  2222. foreignCall
  2223. :: String
  2224. -> [ExtFCode HintedCmmFormal]
  2225. -> ExtFCode CmmExpr
  2226. -> [ExtFCode HintedCmmActual]
  2227. -> Maybe [GlobalReg]
  2228. -> CmmSafety
  2229. -> CmmReturnInfo
  2230. -> P ExtCode
  2231. foreignCall conv_string results_code expr_code args_code vols safety ret
  2232. = do convention <- case conv_string of
  2233. "C" -> return CCallConv
  2234. "stdcall" -> return StdCallConv
  2235. "C--" -> return CmmCallConv
  2236. _ -> fail ("unknown calling convention: " ++ conv_string)
  2237. return $ do
  2238. results <- sequence results_code
  2239. expr <- expr_code
  2240. args <- sequence args_code
  2241. case convention of
  2242. -- Temporary hack so at least some functions are CmmSafe
  2243. CmmCallConv -> code (stmtC (CmmCall (CmmCallee expr convention) results args ret))
  2244. _ ->
  2245. let expr' = adjCallTarget convention expr args in
  2246. case safety of
  2247. CmmUnsafe ->
  2248. code (emitForeignCall' PlayRisky results
  2249. (CmmCallee expr' convention) args vols NoC_SRT ret)
  2250. CmmSafe srt ->
  2251. code (emitForeignCall' PlaySafe results
  2252. (CmmCallee expr' convention) args vols NoC_SRT ret) where
  2253. CmmInterruptible ->
  2254. code (emitForeignCall' PlayInterruptible results
  2255. (CmmCallee expr' convention) args vols NoC_SRT ret)
  2256. adjCallTarget :: CCallConv -> CmmExpr -> [CmmHinted CmmExpr] -> CmmExpr
  2257. #ifdef mingw32_TARGET_OS
  2258. -- On Windows, we have to add the '@N' suffix to the label when making
  2259. -- a call with the stdcall calling convention.
  2260. adjCallTarget StdCallConv (CmmLit (CmmLabel lbl)) args
  2261. = CmmLit (CmmLabel (addLabelSize lbl (sum (map size args))))
  2262. where size (CmmHinted e _) = max wORD_SIZE (widthInBytes (typeWidth (cmmExprType e)))
  2263. -- c.f. CgForeignCall.emitForeignCall
  2264. #endif
  2265. adjCallTarget _ expr _
  2266. = expr
  2267. primCall
  2268. :: [ExtFCode HintedCmmFormal]
  2269. -> FastString
  2270. -> [ExtFCode HintedCmmActual]
  2271. -> Maybe [GlobalReg]
  2272. -> CmmSafety
  2273. -> P ExtCode
  2274. primCall results_code name args_code vols safety
  2275. = case lookupUFM callishMachOps name of
  2276. Nothing -> fail ("unknown primitive " ++ unpackFS name)
  2277. Just p -> return $ do
  2278. results <- sequence results_code
  2279. args <- sequence args_code
  2280. case safety of
  2281. CmmUnsafe ->
  2282. code (emitForeignCall' PlayRisky results
  2283. (CmmPrim p) args vols NoC_SRT CmmMayReturn)
  2284. CmmSafe srt ->
  2285. code (emitForeignCall' PlaySafe results
  2286. (CmmPrim p) args vols NoC_SRT CmmMayReturn) where
  2287. CmmInterruptible ->
  2288. code (emitForeignCall' PlayInterruptible results
  2289. (CmmPrim p) args vols NoC_SRT CmmMayReturn)
  2290. doStore :: CmmType -> ExtFCode CmmExpr -> ExtFCode CmmExpr -> ExtCode
  2291. doStore rep addr_code val_code
  2292. = do addr <- addr_code
  2293. val <- val_code
  2294. -- if the specified store type does not match the type of the expr
  2295. -- on the rhs, then we insert a coercion that will cause the type
  2296. -- mismatch to be flagged by cmm-lint. If we don't do this, then
  2297. -- the store will happen at the wrong type, and the error will not
  2298. -- be noticed.
  2299. let val_width = typeWidth (cmmExprType val)
  2300. rep_width = typeWidth rep
  2301. let coerce_val
  2302. | val_width /= rep_width = CmmMachOp (MO_UU_Conv val_width rep_width) [val]
  2303. | otherwise = val
  2304. stmtEC (CmmStore addr coerce_val)
  2305. -- Return an unboxed tuple.
  2306. emitRetUT :: [(CgRep,CmmExpr)] -> Code
  2307. emitRetUT args = do
  2308. tickyUnboxedTupleReturn (length args) -- TICK
  2309. (sp, stmts) <- pushUnboxedTuple 0 args
  2310. emitSimultaneously stmts -- NB. the args might overlap with the stack slots
  2311. -- or regs that we assign to, so better use
  2312. -- simultaneous assignments here (#3546)
  2313. when (sp /= 0) $ stmtC (CmmAssign spReg (cmmRegOffW spReg (-sp)))
  2314. stmtC (CmmJump (entryCode (CmmLoad (cmmRegOffW spReg sp) bWord)) [])
  2315. -- TODO (when using CPS): emitStmt (CmmReturn (map snd args))
  2316. -- -----------------------------------------------------------------------------
  2317. -- If-then-else and boolean expressions
  2318. data BoolExpr
  2319. = BoolExpr `BoolAnd` BoolExpr
  2320. | BoolExpr `BoolOr` BoolExpr
  2321. | BoolNot BoolExpr
  2322. | BoolTest CmmExpr
  2323. -- ToDo: smart constructors which simplify the boolean expression.
  2324. cmmIfThenElse cond then_part else_part = do
  2325. then_id <- code newLabelC
  2326. join_id <- code newLabelC
  2327. c <- cond
  2328. emitCond c then_id
  2329. else_part
  2330. stmtEC (CmmBranch join_id)
  2331. code (labelC then_id)
  2332. then_part
  2333. -- fall through to join
  2334. code (labelC join_id)
  2335. cmmRawIf cond then_id = do
  2336. c <- cond
  2337. emitCond c then_id
  2338. -- 'emitCond cond true_id' emits code to test whether the cond is true,
  2339. -- branching to true_id if so, and falling through otherwise.
  2340. emitCond (BoolTest e) then_id = do
  2341. stmtEC (CmmCondBranch e then_id)
  2342. emitCond (BoolNot (BoolTest (CmmMachOp op args))) then_id
  2343. | Just op' <- maybeInvertComparison op
  2344. = emitCond (BoolTest (CmmMachOp op' args)) then_id
  2345. emitCond (BoolNot e) then_id = do
  2346. else_id <- code newLabelC
  2347. emitCond e else_id
  2348. stmtEC (CmmBranch then_id)
  2349. code (labelC else_id)
  2350. emitCond (e1 `BoolOr` e2) then_id = do
  2351. emitCond e1 then_id
  2352. emitCond e2 then_id
  2353. emitCond (e1 `BoolAnd` e2) then_id = do
  2354. -- we'd like to invert one of the conditionals here to avoid an
  2355. -- extra branch instruction, but we can't use maybeInvertComparison
  2356. -- here because we can't look too closely at the expression since
  2357. -- we're in a loop.
  2358. and_id <- code newLabelC
  2359. else_id <- code newLabelC
  2360. emitCond e1 and_id
  2361. stmtEC (CmmBranch else_id)
  2362. code (labelC and_id)
  2363. emitCond e2 then_id
  2364. code (labelC else_id)
  2365. -- -----------------------------------------------------------------------------
  2366. -- Table jumps
  2367. -- We use a simplified form of C-- switch statements for now. A
  2368. -- switch statement always compiles to a table jump. Each arm can
  2369. -- specify a list of values (not ranges), and there can be a single
  2370. -- default branch. The range of the table is given either by the
  2371. -- optional range on the switch (eg. switch [0..7] {...}), or by
  2372. -- the minimum/maximum values from the branches.
  2373. doSwitch :: Maybe (Int,Int) -> ExtFCode CmmExpr -> [([Int],Either BlockId ExtCode)]
  2374. -> Maybe ExtCode -> ExtCode
  2375. doSwitch mb_range scrut arms deflt
  2376. = do
  2377. -- Compile code for the default branch
  2378. dflt_entry <-
  2379. case deflt of
  2380. Nothing -> return Nothing
  2381. Just e -> do b <- forkLabelledCodeEC e; return (Just b)
  2382. -- Compile each case branch
  2383. table_entries <- mapM emitArm arms
  2384. -- Construct the table
  2385. let
  2386. all_entries = concat table_entries
  2387. ixs = map fst all_entries
  2388. (min,max)
  2389. | Just (l,u) <- mb_range = (l,u)
  2390. | otherwise = (minimum ixs, maximum ixs)
  2391. entries = elems (accumArray (\_ a -> Just a) dflt_entry (min,max)
  2392. all_entries)
  2393. expr <- scrut
  2394. -- ToDo: check for out of range and jump to default if necessary
  2395. stmtEC (CmmSwitch expr entries)
  2396. where
  2397. emitArm :: ([Int],Either BlockId ExtCode) -> ExtFCode [(Int,BlockId)]
  2398. emitArm (ints,Left blockid) = return [ (i,blockid) | i <- ints ]
  2399. emitArm (ints,Right code) = do
  2400. blockid <- forkLabelledCodeEC code
  2401. return [ (i,blockid) | i <- ints ]
  2402. -- -----------------------------------------------------------------------------
  2403. -- Putting it all together
  2404. -- The initial environment: we define some constants that the compiler
  2405. -- knows about here.
  2406. initEnv :: Env
  2407. initEnv = listToUFM [
  2408. ( fsLit "SIZEOF_StgHeader",
  2409. VarN (CmmLit (CmmInt (fromIntegral (fixedHdrSize * wORD_SIZE)) wordWidth) )),
  2410. ( fsLit "SIZEOF_StgInfoTable",
  2411. VarN (CmmLit (CmmInt (fromIntegral stdInfoTableSizeB) wordWidth) ))
  2412. ]
  2413. parseCmmFile :: DynFlags -> FilePath -> IO (Messages, Maybe CmmGroup)
  2414. parseCmmFile dflags filename = do
  2415. showPass dflags "ParseCmm"
  2416. buf <- hGetStringBuffer filename
  2417. let
  2418. init_loc = mkRealSrcLoc (mkFastString filename) 1 1
  2419. init_state = (mkPState dflags buf init_loc) { lex_state = [0] }
  2420. -- reset the lex_state: the Lexer monad leaves some stuff
  2421. -- in there we don't want.
  2422. case unP cmmParse init_state of
  2423. PFailed span err -> do
  2424. let msg = mkPlainErrMsg span err
  2425. return ((emptyBag, unitBag msg), Nothing)
  2426. POk pst code -> do
  2427. cmm <- initC dflags no_module (getCmm (unEC code initEnv [] >> return ()))
  2428. let ms = getMessages pst
  2429. if (errorsFound dflags ms)
  2430. then return (ms, Nothing)
  2431. else do
  2432. dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprPlatform (targetPlatform dflags) cmm)
  2433. return (ms, Just cmm)
  2434. where
  2435. no_module = panic "parseCmmFile: no module"
  2436. {-# LINE 1 "templates/GenericTemplate.hs" #-}
  2437. {-# LINE 1 "templates/GenericTemplate.hs" #-}
  2438. {-# LINE 1 "<built-in>" #-}
  2439. {-# LINE 1 "<command-line>" #-}
  2440. {-# LINE 1 "templates/GenericTemplate.hs" #-}
  2441. -- Id: GenericTemplate.hs,v 1.26 2005/01/14 14:47:22 simonmar Exp
  2442. {-# LINE 30 "templates/GenericTemplate.hs" #-}
  2443. data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList
  2444. {-# LINE 51 "templates/GenericTemplate.hs" #-}
  2445. {-# LINE 61 "templates/GenericTemplate.hs" #-}
  2446. {-# LINE 70 "templates/GenericTemplate.hs" #-}
  2447. infixr 9 `HappyStk`
  2448. data HappyStk a = HappyStk a (HappyStk a)
  2449. -----------------------------------------------------------------------------
  2450. -- starting the parse
  2451. happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll
  2452. -----------------------------------------------------------------------------
  2453. -- Accepting the parse
  2454. -- If the current token is 0#, it means we've just accepted a partial
  2455. -- parse (a %partial parser). We must ignore the saved token on the top of
  2456. -- the stack in this case.
  2457. happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =
  2458. happyReturn1 ans
  2459. happyAccept j tk st sts (HappyStk ans _) =
  2460. (happyTcHack j (happyTcHack st)) (happyReturn1 ans)
  2461. -----------------------------------------------------------------------------
  2462. -- Arrays only: do the next action
  2463. happyDoAction i tk st
  2464. = {- nothing -}
  2465. case action of
  2466. 0# -> {- nothing -}
  2467. happyFail i tk st
  2468. -1# -> {- nothing -}
  2469. happyAccept i tk st
  2470. n | (n Happy_GHC_Exts.<# (0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}
  2471. (happyReduceArr Happy_Data_Array.! rule) i tk st
  2472. where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))
  2473. n -> {- nothing -}
  2474. happyShift new_state i tk st
  2475. where (new_state) = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))
  2476. where (off) = indexShortOffAddr happyActOffsets st
  2477. (off_i) = (off Happy_GHC_Exts.+# i)
  2478. check = if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#))
  2479. then (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i)
  2480. else False
  2481. (action)
  2482. | check = indexShortOffAddr happyTable off_i
  2483. | otherwise = indexShortOffAddr happyDefActions st
  2484. {-# LINE 130 "templates/GenericTemplate.hs" #-}
  2485. indexShortOffAddr (HappyA# arr) off =
  2486. Happy_GHC_Exts.narrow16Int# i
  2487. where
  2488. i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)
  2489. high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))
  2490. low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))
  2491. off' = off Happy_GHC_Exts.*# 2#
  2492. data HappyAddr = HappyA# Happy_GHC_Exts.Addr#
  2493. -----------------------------------------------------------------------------
  2494. -- HappyState data type (not arrays)
  2495. {-# LINE 163 "templates/GenericTemplate.hs" #-}
  2496. -----------------------------------------------------------------------------
  2497. -- Shifting a token
  2498. happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =
  2499. let (i) = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in
  2500. -- trace "shifting the error token" $
  2501. happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)
  2502. happyShift new_state i tk st sts stk =
  2503. happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)
  2504. -- happyReduce is specialised for the common cases.
  2505. happySpecReduce_0 i fn 0# tk st sts stk
  2506. = happyFail 0# tk st sts stk
  2507. happySpecReduce_0 nt fn j tk st@((action)) sts stk
  2508. = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)
  2509. happySpecReduce_1 i fn 0# tk st sts stk
  2510. = happyFail 0# tk st sts stk
  2511. happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')
  2512. = let r = fn v1 in
  2513. happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
  2514. happySpecReduce_2 i fn 0# tk st sts stk
  2515. = happyFail 0# tk st sts stk
  2516. happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')
  2517. = let r = fn v1 v2 in
  2518. happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
  2519. happySpecReduce_3 i fn 0# tk st sts stk
  2520. = happyFail 0# tk st sts stk
  2521. happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')
  2522. = let r = fn v1 v2 v3 in
  2523. happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))
  2524. happyReduce k i fn 0# tk st sts stk
  2525. = happyFail 0# tk st sts stk
  2526. happyReduce k nt fn j tk st sts stk
  2527. = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of
  2528. sts1@((HappyCons (st1@(action)) (_))) ->
  2529. let r = fn stk in -- it doesn't hurt to always seq here...
  2530. happyDoSeq r (happyGoto nt j tk st1 sts1 r)
  2531. happyMonadReduce k nt fn 0# tk st sts stk
  2532. = happyFail 0# tk st sts stk
  2533. happyMonadReduce k nt fn j tk st sts stk =
  2534. happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))
  2535. where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))
  2536. drop_stk = happyDropStk k stk
  2537. happyMonad2Reduce k nt fn 0# tk st sts stk
  2538. = happyFail 0# tk st sts stk
  2539. happyMonad2Reduce k nt fn j tk st sts stk =
  2540. happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))
  2541. where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))
  2542. drop_stk = happyDropStk k stk
  2543. (off) = indexShortOffAddr happyGotoOffsets st1
  2544. (off_i) = (off Happy_GHC_Exts.+# nt)
  2545. (new_state) = indexShortOffAddr happyTable off_i
  2546. happyDrop 0# l = l
  2547. happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t
  2548. happyDropStk 0# l = l
  2549. happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs
  2550. -----------------------------------------------------------------------------
  2551. -- Moving to a new state after a reduction
  2552. happyGoto nt j tk st =
  2553. {- nothing -}
  2554. happyDoAction j tk new_state
  2555. where (off) = indexShortOffAddr happyGotoOffsets st
  2556. (off_i) = (off Happy_GHC_Exts.+# nt)
  2557. (new_state) = indexShortOffAddr happyTable off_i
  2558. -----------------------------------------------------------------------------
  2559. -- Error recovery (0# is the error token)
  2560. -- parse error if we are in recovery and we fail again
  2561. happyFail 0# tk old_st _ stk =
  2562. -- trace "failing" $
  2563. happyError_ tk
  2564. {- We don't need state discarding for our restricted implementation of
  2565. "error". In fact, it can cause some bogus parses, so I've disabled it
  2566. for now --SDM
  2567. -- discard a state
  2568. happyFail 0# tk old_st (HappyCons ((action)) (sts))
  2569. (saved_tok `HappyStk` _ `HappyStk` stk) =
  2570. -- trace ("discarding state, depth " ++ show (length stk)) $
  2571. happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))
  2572. -}
  2573. -- Enter error recovery: generate an error token,
  2574. -- save the old token and carry on.
  2575. happyFail i tk (action) sts stk =
  2576. -- trace "entering error recovery" $
  2577. happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)
  2578. -- Internal happy errors:
  2579. notHappyAtAll :: a
  2580. notHappyAtAll = error "Internal Happy error\n"
  2581. -----------------------------------------------------------------------------
  2582. -- Hack to get the typechecker to accept our action functions
  2583. happyTcHack :: Happy_GHC_Exts.Int# -> a -> a
  2584. happyTcHack x y = y
  2585. {-# INLINE happyTcHack #-}
  2586. -----------------------------------------------------------------------------
  2587. -- Seq-ing. If the --strict flag is given, then Happy emits
  2588. -- happySeq = happyDoSeq
  2589. -- otherwise it emits
  2590. -- happySeq = happyDontSeq
  2591. happyDoSeq, happyDontSeq :: a -> b -> b
  2592. happyDoSeq a b = a `seq` b
  2593. happyDontSeq a b = b
  2594. -----------------------------------------------------------------------------
  2595. -- Don't inline any functions from the template. GHC has a nasty habit
  2596. -- of deciding to inline happyGoto everywhere, which increases the size of
  2597. -- the generated parser quite a bit.
  2598. {-# NOINLINE happyDoAction #-}
  2599. {-# NOINLINE happyTable #-}
  2600. {-# NOINLINE happyCheck #-}
  2601. {-# NOINLINE happyActOffsets #-}
  2602. {-# NOINLINE happyGotoOffsets #-}
  2603. {-# NOINLINE happyDefActions #-}
  2604. {-# NOINLINE happyShift #-}
  2605. {-# NOINLINE happySpecReduce_0 #-}
  2606. {-# NOINLINE happySpecReduce_1 #-}
  2607. {-# NOINLINE happySpecReduce_2 #-}
  2608. {-# NOINLINE happySpecReduce_3 #-}
  2609. {-# NOINLINE happyReduce #-}
  2610. {-# NOINLINE happyMonadReduce #-}
  2611. {-# NOINLINE happyGoto #-}
  2612. {-# NOINLINE happyFail #-}
  2613. -- end of Happy Template.