summaryrefslogtreecommitdiff
path: root/rts
Commit message (Collapse)AuthorAgeFilesLines
* Fix typo in section name: no leading period.Edward Z. Yang2014-10-031-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Check for staticclosures section in Windows linker.Edward Z. Yang2014-10-031-0/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* rts/PrimOps.cmm: follow '_static_closure' updateSergei Trofimovich2014-10-021-1/+1
| | | | | | | | | | | | | | Caught by UNREG build failure: rts_dist_HC rts/dist/build/PrimOps.o /tmp/ghc8613_0/ghc8613_2.hc: In function 'cf8_entry': /tmp/ghc8613_0/ghc8613_2.hc:1942:13: error: 'base_ControlziExceptionziBase_nestedAtomically_static_closure' undeclared (first use in this function) R1.w = (W_)&base_ControlziExceptionziBase_nestedAtomically_static_closure; ^ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Rename _closure to _static_closure, apply naming consistently.Edward Z. Yang2014-10-0115-122/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In preparation for indirecting all references to closures, we rename _closure to _static_closure to ensure any old code will get an undefined symbol error. In order to reference a closure foobar_closure (which is now undefined), you should instead use STATIC_CLOSURE(foobar). For convenience, a number of these old identifiers are macro'd. Across C-- and C (Windows and otherwise), there were differing conventions on whether or not foobar_closure or &foobar_closure was the address of the closure. Now, all foobar_closure references are addresses, and no & is necessary. CHARLIKE/INTLIKE were not changed, simply alpha-renamed. Part of remove HEAP_ALLOCED patch set (#8199) Depends on D265 Signed-off-by: Edward Z. Yang <ezyang@mit.edu> Test Plan: validate Reviewers: simonmar, austin Subscribers: simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D267 GHC Trac Issues: #8199
* BC-breaking changes to C-- CLOSURE syntax.Edward Z. Yang2014-10-011-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, there were two variants of CLOSURE in C--: - Top-level CLOSURE(foo_closure, foo, lits...), which defines a new static closure and gives it a name, and - Array CLOSURE(foo, lits...), which was used for the static char and integer arrays. They used the same name, were confusing, and didn't even generate the correct internal label representation! So now, we have two new forms: - Top-level CLOSURE(foo, lits...) which automatically generates foo_closure (along with foo_info, which we were doing already) - Array ANONYMOUS_CLOSURE(foo, lits...) which doesn't generate a foo_closure identifier. Part of remove HEAP_ALLOCED patch set (#8199) Signed-off-by: Edward Z. Yang <ezyang@mit.edu> Test Plan: validate Reviewers: simonmar, austin Subscribers: simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D264 GHC Trac Issues: #8199
* Use LinkerInternals.h for exitLinker.Edward Z. Yang2014-10-011-1/+1
| | | | | | | | | | | | | | | | Part of remove HEAP_ALLOCED patch set (#8199) Summary: Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonmar, austin Subscribers: simonmar, ezyang, carter, thomie Differential Revision: https://phabricator.haskell.org/D262 GHC Trac Issues: #8199
* rts/includes: Fix up .dir-locals.elAustin Seipp2014-10-011-9/+10
| | | | | | After 23bb90460, these were slightly busted for `c-mode`. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add emacs indentation/line-length settingsSimon Marlow2014-09-291-0/+12
|
* Revert "rts: add Emacs 'Local Variables' to every .c file"Simon Marlow2014-09-29161-1288/+0
| | | | This reverts commit 39b5c1cbd8950755de400933cecca7b8deb4ffcd.
* bugfix: EventCapsetID should be EventThreadIDSimon Marlow2014-09-291-1/+1
|
* Refer to 'mask' instead of 'block' in Control.ExceptionThomas Miedema2014-09-251-16/+21
| | | | | | | | | | | | | | | | | Summary: More thorough version of a75383cdd46f7bb593639bc6d1628b068b78262a Test Plan: change of comments only [skip ci] Reviewers: austin, simonmar, ekmett Reviewed By: austin, ekmett Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D239
* `M-x delete-trailing-whitespace` & `M-x untabify`Herbert Valerio Riedel2014-09-243-17/+17
|
* Implement `decodeDouble_Int64#` primopHerbert Valerio Riedel2014-09-174-0/+37
| | | | | | | | | | | | | | | The existing `decodeDouble_2Int#` primop is rather inconvenient to use (and in fact is not even used by `integer-gmp`) as the mantissa is split into 3 components which would actually fit in an `Int64#` value. However, `decodeDouble_Int64#` is to be used by the new `integer-gmp2` re-implementation (see #9281). Moreover, `decodeDouble_2Int#` performs direct bit-wise operations on the IEEE representation which can be replaced by a combination of the portable standard C99 `scalbn(3)` and `frexp(3)` functions. Differential Revision: https://phabricator.haskell.org/D160
* Revert "Revert "rts/base: Fix #9423"" and resolve issue that caused the revert.Andreas Voellmy2014-09-164-30/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit 4748f5936fe72d96edfa17b153dbfd84f2c4c053. The fix for #9423 was reverted because this commit introduced a C function setIOManagerControlFd() (defined in Schedule.c) defined for all OS types, while the prototype (in includes/rts/IOManager.h) was only included when mingw32_HOST_OS is not defined. This broke Windows builds. This commit reverts the original commit and resolves the problem by only defining setIOManagerControlFd() when mingw32_HOST_OS is defined. Hence the missing prototype error should not occur on Windows. In addition, since the io_manager_control_wr_fd field of the Capability struct is only usd by the setIOManagerControlFd, this commit includes the io_manager_control_wr_fd field in the Capability struct only when mingw32_HOST_OS is not defined. Test Plan: Try to compile successfully on all platforms. Reviewers: austin Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D174
* Fix cppcheck warningsBoris Egorov2014-09-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Cppcheck found a few defects in win32 IOManager and a typo in rts testsuite. This commit fixes them. Cppcheck 1.54 founds three possible null pointer dereferences of ioMan pointer. It is dereferenced and checked for NULL after that. testheapalloced.c contains typo in printf statement, which should print percent sign but treated as parameter placement by compiler. To properly print percent sign one need to use "%%" string. FYI: Cppcheck 1.66 cannot find possible null pointer dereferences in mentioned places, mistakenly thinking that some memory leaking instead. I probably fill a regression bug to Cppcheck. Test Plan: Build project, run 'make fulltest'. It finished with 28 unexpected failures. I don't know if they are related to my fix. Unexpected results from: TEST="T3500b T7891 tc124 T7653 T5321FD T5030 T4801 T6048 T5631 T5837 T5642 T9020 T3064 parsing001 T1969 T5321Fun T783 T3294" OVERALL SUMMARY for test run started at Tue Sep 9 16:46:27 2014 NOVT 4:23:24 spent to go through 4101 total tests, which gave rise to 16075 test cases, of which 3430 were skipped 315 had missing libraries 12154 expected passes 145 expected failures 3 caused framework failures 0 unexpected passes 28 unexpected failures Unexpected failures: ../../libraries/base/tests T7653 [bad exit code] (ghci,threaded1,threaded2) perf/compiler T1969 [stat not good enough] (normal) perf/compiler T3064 [stat not good enough] (normal) perf/compiler T3294 [stat not good enough] (normal) perf/compiler T4801 [stat not good enough] (normal) perf/compiler T5030 [stat not good enough] (normal) perf/compiler T5321FD [stat not good enough] (normal) perf/compiler T5321Fun [stat not good enough] (normal) perf/compiler T5631 [stat not good enough] (normal) perf/compiler T5642 [stat not good enough] (normal) perf/compiler T5837 [stat not good enough] (normal) perf/compiler T6048 [stat not good enough] (optasm) perf/compiler T783 [stat not good enough] (normal) perf/compiler T9020 [stat not good enough] (optasm) perf/compiler parsing001 [stat not good enough] (normal) typecheck/should_compile T7891 [exit code non-0] (hpc,optasm,optllvm) typecheck/should_compile tc124 [exit code non-0] (hpc,optasm,optllvm) typecheck/should_run T3500b [exit code non-0] (hpc,optasm,threaded2,dyn,optllvm) Reviewers: austin Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D203
* rts/Printer.c: update comments about using USING_LIBBFDSergei Trofimovich2014-09-021-2/+2
| | | | Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Refactor stack squeezing logicArash Rouhani2014-09-011-8/+13
| | | | | | | | | | | | | | | | | | Summary: This patch is only to make the code easier to read. In addition, this is the first patch I send with the arc/differential workflow. So I start with something very small. Test Plan: I have not even tried to compile it yet. Reviewers: simonmar, austin Reviewed By: austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D189
* Revert "Make sure that a prototype is included for 'setIOManagerControlFd'"Gabor Greif2014-08-301-1/+0
| | | | This reverts commit 7bf49f86a20f3beda0ee5fbea2db64cfef730d74.
* Revert "Comment why the include is necessary"Gabor Greif2014-08-301-1/+1
| | | | This reverts commit 15df6d98afb8c3813013c5b97efffe0ba8020d32.
* rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbolSergei Trofimovich2014-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | $ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history \ testsuite/tests/ffi/should_run/T4038.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS *Main> main <interactive>: /tmp/ghc16668_0/ghc16668_5.o: unknown symbol `deRefStablePtr' The reference to 'deRefStablePtr' is generated by 'compiler/deSugar/DsForeign.lhs': the_cfun = case maybe_target of Nothing -> text "(StgClosure*)deRefStablePtr(the_stableptr)" Just hs_fn -> char '&' <> ppr hs_fn <> text "_closure" Patch fixes all broken tests using 'import wrapper': TEST="ffi013 ffi010 ffi011 ffi005 ffi020 ffi006 ffi019 fed001 T1679 T4038" Tests manifested as broken only in DYNAMIC_GHC_PROGRAMS=NO builds, where GHCi's custom linker is used instead of system's linker. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Revert "rts/base: Fix #9423"Austin Seipp2014-08-224-65/+30
| | | | | | | | | This should fix the Windows fallout, and hopefully this will be fixed once that's sorted out. This reverts commit f9f89b7884ccc8ee5047cf4fffdf2b36df6832df. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Comment why the include is necessaryGabor Greif2014-08-201-1/+1
|
* rts: detabify/dewhitespace LdvProfile.cAustin Seipp2014-08-201-46/+46
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Disassembler.cAustin Seipp2014-08-201-45/+45
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace RtsUtils.cAustin Seipp2014-08-201-7/+7
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace RtsStartup.cAustin Seipp2014-08-201-8/+8
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace RtsAPI.cAustin Seipp2014-08-201-13/+13
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace RtsMain.cAustin Seipp2014-08-201-5/+5
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Sparks.cAustin Seipp2014-08-201-15/+15
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace StgPrimFloat.hAustin Seipp2014-08-201-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace StgPrimFloat.cAustin Seipp2014-08-201-48/+48
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace StgStartup.cmmAustin Seipp2014-08-201-12/+12
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace StgStdThunks.cmmAustin Seipp2014-08-201-4/+4
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace AutoApply.hAustin Seipp2014-08-201-53/+53
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Task.hAustin Seipp2014-08-201-10/+10
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Printer.hAustin Seipp2014-08-201-6/+6
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Hpc.cAustin Seipp2014-08-201-23/+23
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Apply.cmmAustin Seipp2014-08-201-33/+33
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/MBlock.cAustin Seipp2014-08-201-12/+12
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/GCUtils.cAustin Seipp2014-08-201-16/+16
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/GCUtils.hAustin Seipp2014-08-201-6/+6
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/GCAux.cAustin Seipp2014-08-201-19/+19
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/MarkWeak.cAustin Seipp2014-08-201-15/+15
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/BlockAlloc.cAustin Seipp2014-08-201-35/+35
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace sm/Storage.hAustin Seipp2014-08-201-4/+4
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Task.cAustin Seipp2014-08-201-19/+19
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: reflow some comments in STM.cAustin Seipp2014-08-201-34/+34
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace STM.cAustin Seipp2014-08-201-199/+199
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Trace.cAustin Seipp2014-08-201-20/+20
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* rts: detabify/dewhitespace Timer.cAustin Seipp2014-08-201-3/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>