File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -61,18 +61,17 @@ ALEX_ENDIF
61
61
alexIndexInt16OffAddr :: AlexAddr -> Int # -> Int #
62
62
alexIndexInt16OffAddr (AlexA # arr) off =
63
63
ALEX_IF_BIGENDIAN
64
- ALEX_IF_GHC_GT_901
65
64
narrow16Int# i
66
- ALEX_ELSE
67
- int16ToInt# i
68
- ALEX_ENDIF
69
65
where
70
66
i = word2Int# ((high `uncheckedShiftL# ` 8 # ) `or # ` low)
71
67
high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1 # )))
72
68
low = int2Word# (ord# (indexCharOffAddr# arr off'))
73
69
off' = off *# 2 #
74
70
ALEX_ELSE
75
- indexInt16OffAddr# arr off
71
+ ALEX_IF_GHC_GT_901
72
+ int16ToInt#
73
+ ALEX_ENDIF
74
+ (indexInt16OffAddr# arr off)
76
75
ALEX_ENDIF
77
76
#else
78
77
alexIndexInt16OffAddr arr off = arr ! off
@@ -83,11 +82,7 @@ alexIndexInt16OffAddr arr off = arr ! off
83
82
alexIndexInt32OffAddr :: AlexAddr -> Int # -> Int #
84
83
alexIndexInt32OffAddr (AlexA # arr) off =
85
84
ALEX_IF_BIGENDIAN
86
- ALEX_IF_GHC_GT_901
87
85
narrow32Int# i
88
- ALEX_ELSE
89
- int32ToInt# i
90
- ALEX_ENDIF
91
86
where
92
87
i = word2Int# ((b3 `uncheckedShiftL# ` 24 # ) `or # `
93
88
(b2 `uncheckedShiftL# ` 16 # ) `or # `
@@ -98,7 +93,10 @@ ALEX_ENDIF
98
93
b0 = int2Word# (ord# (indexCharOffAddr# arr off'))
99
94
off' = off *# 4 #
100
95
ALEX_ELSE
101
- indexInt32OffAddr# arr off
96
+ ALEX_IF_GHC_GT_901
97
+ int32ToInt#
98
+ ALEX_ENDIF
99
+ (indexInt32OffAddr# arr off)
102
100
ALEX_ENDIF
103
101
#else
104
102
alexIndexInt32OffAddr arr off = arr ! off
You can’t perform that action at this time.
0 commit comments