Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
6eec7bc5
Commit
6eec7bc5
authored
Sep 17, 2013
by
Jan Stolarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trailing whitespaces
parent
03e44ee7
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
132 additions
and
133 deletions
+132
-133
compiler/ghc.cabal.in
compiler/ghc.cabal.in
+0
-1
compiler/ghc.mk
compiler/ghc.mk
+2
-2
compiler/main/BreakArray.hs
compiler/main/BreakArray.hs
+14
-14
compiler/prelude/primops.txt.pp
compiler/prelude/primops.txt.pp
+105
-105
compiler/utils/Binary.hs
compiler/utils/Binary.hs
+3
-3
compiler/utils/FastString.lhs
compiler/utils/FastString.lhs
+3
-3
compiler/utils/FastTypes.lhs
compiler/utils/FastTypes.lhs
+5
-5
No files found.
compiler/ghc.cabal.in
View file @
6eec7bc5
...
...
@@ -459,7 +459,6 @@ Library
Vectorise
Hoopl.Dataflow
Hoopl
-- CgInfoTbls used in ghci/DebuggerUtils
-- CgHeapery mkVirtHeapOffsets used in ghci
...
...
compiler/ghc.mk
View file @
6eec7bc5
...
...
@@ -238,7 +238,7 @@ compiler/stage3/$(PLATFORM_H) : compiler/stage2/$(PLATFORM_H)
"
$(CP)
"
$<
$@
# ----------------------------------------------------------------------------
# Generate supporting stuff for prelude/PrimOp.lhs
# Generate supporting stuff for prelude/PrimOp.lhs
# from prelude/primops.txt
PRIMOP_BITS_NAMES
=
primop-data-decl.hs-incl
\
...
...
@@ -291,7 +291,7 @@ compiler/stage$1/build/primop-fixity.hs-incl: compiler/stage$1/build/primops.txt
compiler/stage$1/build/primop-primop-info.hs-incl
:
compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE)
"
$
$(genprimopcode_INPLACE)
"
--primop-primop-info
<
$$
<
>
$$
@
# Usages aren't used any more; but the generator
# Usages aren't used any more; but the generator
# can still generate them if we want them back
compiler/stage$1/build/primop-usage.hs-incl
:
compiler/stage$1/build/primops.txt $$$$(genprimopcode_INPLACE)
"
$
$(genprimopcode_INPLACE)
"
--usage
<
$$
<
>
$$
@
...
...
compiler/main/BreakArray.hs
View file @
6eec7bc5
...
...
@@ -18,8 +18,8 @@ module BreakArray
#
endif
,
newBreakArray
#
ifdef
GHCI
,
getBreak
,
setBreakOn
,
getBreak
,
setBreakOn
,
setBreakOff
,
showBreakArray
#
endif
...
...
@@ -49,22 +49,22 @@ showBreakArray dflags array = do
setBreakOn
::
DynFlags
->
BreakArray
->
Int
->
IO
Bool
setBreakOn
dflags
array
index
|
safeIndex
dflags
array
index
=
do
writeBreakArray
array
index
breakOn
writeBreakArray
array
index
breakOn
return
True
|
otherwise
=
return
False
|
otherwise
=
return
False
setBreakOff
::
DynFlags
->
BreakArray
->
Int
->
IO
Bool
setBreakOff
dflags
array
index
|
safeIndex
dflags
array
index
=
do
writeBreakArray
array
index
breakOff
return
True
|
otherwise
=
return
False
|
otherwise
=
return
False
getBreak
::
DynFlags
->
BreakArray
->
Int
->
IO
(
Maybe
Word
)
getBreak
dflags
array
index
|
safeIndex
dflags
array
index
=
do
val
<-
readBreakArray
array
index
return
$
Just
val
val
<-
readBreakArray
array
index
return
$
Just
val
|
otherwise
=
return
Nothing
safeIndex
::
DynFlags
->
BreakArray
->
Int
->
Bool
...
...
@@ -73,7 +73,7 @@ safeIndex dflags array index = index < size dflags array && index >= 0
size
::
DynFlags
->
BreakArray
->
Int
size
dflags
(
BA
array
)
=
(
I
#
(
sizeofMutableByteArray
#
array
))
`
div
`
wORD_SIZE
dflags
allocBA
::
Int
->
IO
BreakArray
allocBA
::
Int
->
IO
BreakArray
allocBA
(
I
#
sz
)
=
IO
$
\
s1
->
case
newByteArray
#
sz
s1
of
{
(
#
s2
,
array
#
)
->
(
#
s2
,
BA
array
#
)
}
...
...
@@ -81,11 +81,11 @@ allocBA (I# sz) = IO $ \s1 ->
newBreakArray
::
DynFlags
->
Int
->
IO
BreakArray
newBreakArray
dflags
entries
@
(
I
#
sz
)
=
do
BA
array
<-
allocBA
(
entries
*
wORD_SIZE
dflags
)
case
breakOff
of
case
breakOff
of
W
#
off
->
do
-- Todo: there must be a better way to write zero as a Word!
let
loop
n
|
n
==#
sz
=
return
()
|
otherwise
=
do
writeBA
#
array
n
off
writeBA
#
array
n
off
loop
(
n
+#
1
#
)
loop
0
#
return
$
BA
array
...
...
@@ -95,13 +95,13 @@ writeBA# array i word = IO $ \s ->
case
writeWordArray
#
array
i
word
s
of
{
s
->
(
#
s
,
()
#
)
}
writeBreakArray
::
BreakArray
->
Int
->
Word
->
IO
()
writeBreakArray
(
BA
array
)
(
I
#
i
)
(
W
#
word
)
=
writeBA
#
array
i
word
writeBreakArray
(
BA
array
)
(
I
#
i
)
(
W
#
word
)
=
writeBA
#
array
i
word
readBA
#
::
MutableByteArray
#
RealWorld
->
Int
#
->
IO
Word
readBA
#
array
i
=
IO
$
\
s
->
readBA
#
::
MutableByteArray
#
RealWorld
->
Int
#
->
IO
Word
readBA
#
array
i
=
IO
$
\
s
->
case
readWordArray
#
array
i
s
of
{
(
#
s
,
c
#
)
->
(
#
s
,
W
#
c
#
)
}
readBreakArray
::
BreakArray
->
Int
->
IO
Word
readBreakArray
::
BreakArray
->
Int
->
IO
Word
readBreakArray
(
BA
array
)
(
I
#
i
)
=
readBA
#
array
i
#
else
/*
!
GHCI
*/
...
...
compiler/prelude/primops.txt.pp
View file @
6eec7bc5
This diff is collapsed.
Click to expand it.
compiler/utils/Binary.hs
View file @
6eec7bc5
...
...
@@ -234,7 +234,7 @@ expandBin (BinMem _ _ sz_r arr_r) off = do
arr'
<-
mallocForeignPtrBytes
sz'
withForeignPtr
arr
$
\
old
->
withForeignPtr
arr'
$
\
new
->
copyBytes
new
old
sz
copyBytes
new
old
sz
writeFastMutInt
sz_r
sz'
writeIORef
arr_r
arr'
...
...
@@ -628,8 +628,8 @@ newReadState get_name get_fs
ud_put_name
=
undef
"put_name"
,
ud_put_fs
=
undef
"put_fs"
}
newWriteState
::
(
BinHandle
->
Name
->
IO
()
)
newWriteState
::
(
BinHandle
->
Name
->
IO
()
)
->
(
BinHandle
->
FastString
->
IO
()
)
->
UserData
newWriteState
put_name
put_fs
...
...
compiler/utils/FastString.lhs
View file @
6eec7bc5
...
...
@@ -79,17 +79,17 @@ module FastString
-- * LitStrings
LitString,
-- ** Construction
sLit,
#if defined(__GLASGOW_HASKELL__)
mkLitString#,
#endif
mkLitString,
-- ** Deconstruction
unpackLitString,
-- ** Operations
lengthLS
) where
...
...
compiler/utils/FastTypes.lhs
View file @
6eec7bc5
...
...
@@ -14,10 +14,10 @@
module FastTypes (
-- * FastInt
FastInt,
-- ** Getting in and out of FastInt
_ILIT, iBox, iUnbox,
-- ** Arithmetic on FastInt
(+#), (-#), (*#), quotFastInt, negateFastInt,
--quotRemFastInt is difficult because unboxed values can't
...
...
@@ -51,11 +51,11 @@ module FastTypes (
--character values above the range of Unicode
-- * FastPtr
FastPtr,
FastPtr,
-- ** Getting in and out of FastPtr
pBox, pUnbox,
-- ** Casting FastPtrs
castFastPtr
) where
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment