summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorSylvain Henry <hsyl20@gmail.com>2018-05-13 11:36:28 -0400
committerBen Gamari <ben@smart-cactus.org>2018-05-13 18:32:20 -0400
commit7c665f9ce0980ee7c81a44c8f861686395637453 (patch)
treeb8a90c2da2d364bdd7703c0f265d1f7adf4d0c28 /compiler/parser
parent2188427015e384410fcb7ec9114f5e7f0e2ad6f0 (diff)
downloadhaskell-7c665f9ce0980ee7c81a44c8f861686395637453.tar.gz
Refactor LitString
Refactor LitString so that the string length is computed at most once and then stored. Also remove strlen and memcmp wrappers (it seems like they were a workaround for a very old GCC when using -fvia-C). Bumps haddock submodule. Reviewers: bgamari, dfeuer, nickkuk Reviewed By: bgamari, nickkuk Subscribers: nickkuk, dfeuer, thomie, carter Differential Revision: https://phabricator.haskell.org/D4630
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/cutils.c17
-rw-r--r--compiler/parser/cutils.h5
2 files changed, 0 insertions, 22 deletions
diff --git a/compiler/parser/cutils.c b/compiler/parser/cutils.c
index fdaea44cc7..eca3e3d25c 100644
--- a/compiler/parser/cutils.c
+++ b/compiler/parser/cutils.c
@@ -13,23 +13,6 @@ places in the GHC library.
#include <unistd.h>
#endif
-/*
-Calling 'strlen' and 'memcpy' directly gives problems with GCC's inliner,
-and causes gcc to require too many registers on x84
-*/
-
-HsInt
-ghc_strlen( HsPtr a )
-{
- return (strlen((char *)a));
-}
-
-HsInt
-ghc_memcmp( HsPtr a1, HsPtr a2, HsInt len )
-{
- return (memcmp((char *)a1, a2, len));
-}
-
void
enableTimingStats( void ) /* called from the driver */
{
diff --git a/compiler/parser/cutils.h b/compiler/parser/cutils.h
index 0c8ab12a2c..009fffa86f 100644
--- a/compiler/parser/cutils.h
+++ b/compiler/parser/cutils.h
@@ -6,10 +6,5 @@
#include "HsFFI.h"
-// Out-of-line string functions, see compiler/utils/FastString.hs
-HsInt ghc_strlen( HsAddr a );
-HsInt ghc_memcmp( HsAddr a1, HsAddr a2, HsInt len );
-
-
void enableTimingStats( void );
void setHeapSize( HsInt size );