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
4,262
Issues
4,262
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
404
Merge Requests
404
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
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
Glasgow Haskell Compiler
GHC
Commits
a7e145c0
Commit
a7e145c0
authored
Jul 30, 2009
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some redundant fromIntegral's
parent
b7fe69ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
compiler/ghci/ByteCodeAsm.lhs
compiler/ghci/ByteCodeAsm.lhs
+1
-1
compiler/ghci/ByteCodeGen.lhs
compiler/ghci/ByteCodeGen.lhs
+2
-2
No files found.
compiler/ghci/ByteCodeAsm.lhs
View file @
a7e145c0
...
@@ -174,7 +174,7 @@ mkBitmapArray bsize bitmap
...
@@ -174,7 +174,7 @@ mkBitmapArray bsize bitmap
mkInstrArray :: Word16 -> [Word16] -> UArray Word16 Word16
mkInstrArray :: Word16 -> [Word16] -> UArray Word16 Word16
mkInstrArray n_insns asm_insns
mkInstrArray n_insns asm_insns
= listArray (0, n_insns) (
fromIntegral
n_insns : asm_insns)
= listArray (0, n_insns) (n_insns : asm_insns)
-- instrs nonptrs ptrs
-- instrs nonptrs ptrs
type AsmState = (SizedSeq Word16,
type AsmState = (SizedSeq Word16,
...
...
compiler/ghci/ByteCodeGen.lhs
View file @
a7e145c0
...
@@ -438,7 +438,7 @@ schemeE d s p (AnnLet binds (_,body))
...
@@ -438,7 +438,7 @@ schemeE d s p (AnnLet binds (_,body))
compile_bind d' fvs x rhs size arity off = do
compile_bind d' fvs x rhs size arity off = do
bco <- schemeR fvs (x,rhs)
bco <- schemeR fvs (x,rhs)
build_thunk
(fromIntegral d')
fvs size bco off arity
build_thunk
d'
fvs size bco off arity
compile_binds =
compile_binds =
[ compile_bind d' fvs x rhs size arity n
[ compile_bind d' fvs x rhs size arity n
...
@@ -1203,7 +1203,7 @@ pushAtom d p (AnnVar v)
...
@@ -1203,7 +1203,7 @@ pushAtom d p (AnnVar v)
= return (unitOL (PUSH_PRIMOP primop), 1)
= return (unitOL (PUSH_PRIMOP primop), 1)
| Just d_v <- lookupBCEnv_maybe p v -- v is a local variable
| Just d_v <- lookupBCEnv_maybe p v -- v is a local variable
= let l = d -
fromIntegral
d_v + sz - 2
= let l = d - d_v + sz - 2
in return (toOL (genericReplicate sz (PUSH_L l)), sz)
in return (toOL (genericReplicate sz (PUSH_L l)), sz)
-- d - d_v the number of words between the TOS
-- d - d_v the number of words between the TOS
-- and the 1st slot of the object
-- and the 1st slot of the object
...
...
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