Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
d98b11f7
Commit
d98b11f7
authored
24 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 2000-08-21 14:11:35 by simonmar]
make this file independent of the actual word size.
parent
c76fd55c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/prelude/PrimRep.lhs
+15
-16
15 additions, 16 deletions
ghc/compiler/prelude/PrimRep.lhs
with
15 additions
and
16 deletions
ghc/compiler/prelude/PrimRep.lhs
+
15
−
16
View file @
d98b11f7
...
...
@@ -25,8 +25,7 @@ module PrimRep
#include "HsVersions.h"
import Constants ( dOUBLE_SIZE, iNT64_SIZE, wORD64_SIZE )
import Util
import Constants ( dOUBLE_SIZE, iNT64_SIZE, wORD64_SIZE, wORD_SIZE )
import Outputable
\end{code}
...
...
@@ -175,7 +174,7 @@ getPrimRepSize other = 1
retPrimRepSize = getPrimRepSize RetRep
-- size in bytes
, ToDo: cpp in the right vals
.
-- size
s
in bytes.
-- (used in some settings to figure out how many bytes
-- we have to push onto the stack when calling external
-- entry points (e.g., stdcalling on win32)
...
...
@@ -184,19 +183,19 @@ getPrimRepSizeInBytes pr =
case pr of
CharRep -> 4
Int8Rep -> 1
IntRep ->
4
AddrRep ->
4
FloatRep ->
4
DoubleRep ->
8
Word64Rep ->
8
Int64Rep ->
8
WeakPtrRep ->
4
ForeignObjRep ->
4
StablePtrRep ->
4
StableNameRep ->
4
ArrayRep ->
4
ByteArrayRep ->
4
_ -> panic "getPrimRepSize: ouch - this wasn't supposed to happen!"
IntRep ->
wORD_SIZE
AddrRep ->
wORD_SIZE
FloatRep ->
wORD_SIZE
DoubleRep ->
dOUBLE_SIZE * wORD_SIZE
Word64Rep ->
wORD64_SIZE * wORD_SIZE
Int64Rep ->
iNT64_SIZE * wORD_SIZE
WeakPtrRep ->
wORD_SIZE
ForeignObjRep ->
wORD_SIZE
StablePtrRep ->
wORD_SIZE
StableNameRep ->
wORD_SIZE
ArrayRep ->
wORD_SIZE
ByteArrayRep ->
wORD_SIZE
_ ->
panic "getPrimRepSize: ouch - this wasn't supposed to happen!"
\end{code}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment