#1365: -fbyte-code is ignored in a OPTIONS_GHC pragma
-----------------------------+----------------------------------------------
Reporter: mnislaih | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 6.10 branch
Component: GHCi | Version: 6.6.1
Severity: minor | Resolution:
Keywords: | Difficulty: Moderate (1 day)
Testcase: | Architecture: Multiple
Os: Multiple |
-----------------------------+----------------------------------------------
Changes (by simonmar):
* difficulty: Unknown => Moderate (1 day)
* os: MacOS X => Multiple
* architecture: x86 => Multiple
Comment:
I looked into doing this. It's almost possible without major changes, but
there's a sticking point: mutually recursive modules.
The core restriction is that pbject code can only link to other object
code. This is because byte-code resides in the heap and may move around
and be GC'd, so if we allowed object-code to point to byte-code the GC
would have to track pointers from object-code to byte-code, which it
doesn't (that would be possible). Also object-code itself currently never
gets GC'd, because in order to do that the GC would have to track pointers
into object-code, which include info pointers. Info pointers are not
currently tracked as GC pointers, so this is hard. In short, it's really
hard to lift this restriction - we thought about it at the time we
designed GHCi, and concluded that it wasn't worth it.
So the tricky bit about allowing `-fbyte-code` at the module level is that
if it occurs within a mutually-recursive group of modules, it has to apply
to the whole group. That makes this a bit more than a local change, so I
gave up for now.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1365#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs