Skip to content
Snippets Groups Projects
  1. Jun 06, 2020
  2. Jan 12, 2018
  3. Jul 27, 2016
  4. Jul 06, 2015
    • Arne Goedeke's avatar
      preprocessor: fixed two bugs when processing literal strings · 8ad23656
      Arne Goedeke authored
      The 'new' syntax for literal strings had these two bugs.
      
      1) Unterminated strings were not correctly handled, resulting in out
         of bounds reads. Note: cpp_error does not throw, it simply prints
         an error message.
      2) Newlines inside literal strings did not increment the current
         line number, which resulted in incorrect information in e.g. error
         messages.
      8ad23656
  5. Oct 22, 2014
  6. Sep 18, 2014
  7. Sep 03, 2014
  8. Aug 26, 2014
  9. Aug 09, 2014
  10. Jul 21, 2014
    • Per Hedbor's avatar
      Added a new string syntax · 2028f82c
      Per Hedbor authored
      They will all start and end a literal string.
      
      A literal string can contain any characters except the end sequence.
      
      The main usecase is writing code in a string.
      
      As an example:
      
      string test = #{
      This is a literal string.
      They can contain any characters, no de-quoting is done at all.
      
      So, as an example, foo "bar" 'gazonk' \
      
      Valid quote sequences are #{, #( and #[.
      They are ended by # followed by }, ) and ], respectively.
      
      So, you can use the two other quotes inside the string, if you want to, like:
      
      Also, no preprocessing is done inside the string.
      
      The main usecase for these strings is to write code in code.
      2028f82c
  11. May 22, 2014
    • Per Hedbor's avatar
      Binary size: push_constant_text -> push_text when not time-critical. · 7cf016a1
      Per Hedbor authored
      Especially in error handling, and code that does a lot of other string
      operations anyway the speed gain is not wort the 100+ bytes code size
      of each instance of push_constant_text
      
      This saves about 20K of code size (main pike binary), while not really
      changing the speed much.
      
      push_constant_text that seemed to be in at least pseudo-time-critical
      code was kept as they were.
      
      On a related note, push_constant_text(":") four times in a row creates
      four different string variables, for obvious reasons.
      
      Some of the remaining push_constant_text really should have a
      module/file local string variable, even though that is more bothersome
      to create.
      
      It might be nice to have this in .cmod files automatically.
      7cf016a1
  12. May 15, 2014
  13. May 13, 2014
  14. May 12, 2014
    • Martin Nilsson's avatar
      Save 5k by not inlining error code. · 1ebec6b9
      Martin Nilsson authored
      1ebec6b9
    • Martin Nilsson's avatar
      Fixed a double error message. · 6e52065d
      Martin Nilsson authored
      6e52065d
    • Martin Nilsson's avatar
      Some minor touch ups. · efd97a5b
      Martin Nilsson authored
      efd97a5b
    • Per Hedbor's avatar
      Unified macros in cpp.c and preprocessor.h · b7df6eae
      Per Hedbor authored
      b7df6eae
    • Per Hedbor's avatar
      low*_cpp now uses PCHARP. · 58efb8ee
      Per Hedbor authored
      Shaves of about 50% of the remaining code size.  Now down to about
      50Kb, which seems more reasonable than 200k.
      
      There is still a lot of code duplication, though, like the places that
      insert the current file as a #line, the code that handles quoted
      newlines etc.
      
      But it is better.
      
      I also removed macros that were only used once and inlined them.
      58efb8ee
    • Per Hedbor's avatar
      calc(*) are now PCHARP functions. · 74966ebf
      Per Hedbor authored
      I also fixed five errors that hopefully did not really matter all that
      much in calc(*):
      
      o Two instances of data[1] instead of data[pos+1]
      o Three instances of data[pos]+1 instead of data[pos+1]
      
      The first error would be triggered if you used '/' in an #if and the
      second character of the current cpp work area was '/'.
      
      The second one is probably harmless. Or not, it was in the code for
      '&' and '|': basically the detection of && and || there was broken.
      
      However, I think that would be handled by the calling order of the
      calc* functions.
      
      Anyway, cpp.o is now less than 100k, about 45% of its original size
      (OSX 64-bit).
      74966ebf
  15. May 10, 2014
  16. Apr 27, 2014
  17. Apr 10, 2014
  18. Feb 25, 2014
  19. Feb 21, 2014
  20. Feb 15, 2014
  21. Feb 14, 2014
  22. Nov 20, 2013
  23. Jun 17, 2013
  24. May 04, 2013
  25. Mar 16, 2013
  26. Dec 30, 2012
  27. Jul 22, 2012
  28. Mar 24, 2012
Loading