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
Iterations
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
haskell-wasm
GHC
Commits
0c42e301
Commit
0c42e301
authored
12 years ago
by
Simon Marlow
Browse files
Options
Downloads
Patches
Plain Diff
remove unnecessary size field in BCO (#7518)
parent
f838d2f3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
compiler/ghci/ByteCodeAsm.lhs
+2
-6
2 additions, 6 deletions
compiler/ghci/ByteCodeAsm.lhs
rts/Interpreter.c
+1
-3
1 addition, 3 deletions
rts/Interpreter.c
with
3 additions
and
9 deletions
compiler/ghci/ByteCodeAsm.lhs
+
2
−
6
View file @
0c42e301
...
...
@@ -129,10 +129,7 @@ assembleBCO dflags (ProtoBCO nm instrs bitmap bsize arity _origin _malloced) = d
-- pass 1: collect up the offsets of the local labels.
let asm = mapM_ (assembleI dflags) instrs
-- Remember that the first insn starts at offset
-- sizeOf Word / sizeOf Word16
-- since offset 0 (eventually) will hold the total # of insns.
initial_offset = largeArg16s dflags
initial_offset = 0
-- Jump instructions are variable-sized, there are long and short variants
-- depending on the magnitude of the offset. However, we can't tell what
...
...
@@ -153,8 +150,7 @@ assembleBCO dflags (ProtoBCO nm instrs bitmap bsize arity _origin _malloced) = d
(Map.lookup lbl lbl_map)
-- pass 2: run assembler and generate instructions, literals and pointers
let initial_insns = addListToSS emptySS $ largeArg dflags n_insns
let initial_state = (initial_insns, emptySS, emptySS)
let initial_state = (emptySS, emptySS, emptySS)
(final_insns, final_lits, final_ptrs) <- execState initial_state $ runAsm dflags long_jumps env asm
-- precomputed size should be equal to final size
...
...
This diff is collapsed.
Click to expand it.
rts/Interpreter.c
+
1
−
3
View file @
0c42e301
...
...
@@ -788,9 +788,7 @@ run_BCO:
register
StgPtr
*
ptrs
=
(
StgPtr
*
)(
&
bco
->
ptrs
->
payload
[
0
]);
#ifdef DEBUG
int
bcoSize
;
bcoSize
=
BCO_READ_NEXT_WORD
;
#else
BCO_NEXT_WORD
;
bcoSize
=
bco
->
instrs
->
bytes
/
sizeof
(
StgWord16
);
#endif
IF_DEBUG
(
interpreter
,
debugBelch
(
"bcoSize = %d
\n
"
,
bcoSize
));
...
...
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