Branch: Tag:

2020-02-03

2020-02-03 11:06:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Merge branch 'patches/bug10003'

* patches/bug10003:
CPP: Fix out of bounds read in recode_string().

2020-02-03 11:04:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Merge branch 'patches/bug10003-old' into patches/bug10003

* patches/bug10003-old:
CPP: Fix out of bounds read in recode_string().

2019-11-03

2019-11-03 09:45:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Increased argument paranoia in define_macro() et al.

Fixes stray "Too few arguments to macro x." in the testsuite.

2019-06-13

2019-06-13 10:00:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: __DIR__ now represents cwd with ".".

Previously it would sometimes be represented with "",
which was a bad idea considering use like

string file_path = __DIR__ "/file";

2018-11-04

2018-11-04 16:11:11 by Arne Goedeke <el@laramies.com>

Merge remote-tracking branch 'origin/master' into new_utf8

2018-11-03

2018-11-03 14:21:37 by Marcus Comstedt <marcus@mc.pp.se>

Merge remote-tracking branch 'origin/8.1' into gobject-introspection

2018-11-02

2018-11-02 10:21:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Adjusted indentation.

2018-10-31

2018-10-31 14:06:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Improved white-space fidelity.

White space characters that aren't '\r' are now kept unmodified
in the output. '\r' characters are removed if they are followed
immediately by a '\n' character, and are otherwise kept.

This change makes cpp() keep indentations, and improves the
readability of the output from Tools.Standalone.precompile.

2018-10-08

2018-10-08 13:31:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Move handlers to master.

Removes the low-level support for handlers from cpp(). It is
now instead implemented by the default master object.

2018-10-03

2018-10-03 15:03:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Adjusted indentation.

2018-09-30

2018-09-30 12:43:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Removed obsolete and unused variable.

2018-09-29

2018-09-29 13:34:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Adjusted error messages.

2018-09-22

2018-09-22 10:18:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Adjusted indent.

2018-09-21

2018-09-21 13:30:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use less magic for _Pragma().

_Pragma() is now implemented with a pike-level function.

All magic macros are now implemented with pike-level functions.

do_magic_define() is no more.

2018-09-12

2018-09-12 09:21:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added some optional parameters to define_macro().

Renumber the CPP_MACRO_* values, so that the ones useful for
users (CPP_MACRO_VARARGS and CPP_MACRO_KEEP_NL) come first.

define_macro() now accepts two additional optional arguments;
numargs and flags.

2018-09-11

2018-09-11 10:47:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use less magic for __VERSION__ et al.

__VERSION__, __MAJOR__, __MINOR__, __COUNTER__ and __DIR__ are
now implemented with pike-level functions.

2018-09-06

2018-09-06 09:07:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use less magic for __LINE__ et al.

__LINE__, __FILE__, __TIME__ and __DATE__ are now implemented
with pike-level functions.

2018-09-05

2018-09-05 10:10:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Break circular references via "magic" macros.

2018-09-04

2018-09-04 13:22:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added short-hand for adding predefined macros.

2018-09-02

2018-09-02 11:08:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

CPP: Added clear_macros().

2018-08-31

2018-08-31 10:59:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Macro expansion failure is now indicated by returning 0.

2018-08-30

2018-08-30 08:42:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed bugs related to the keep comments mode.

2018-08-29

2018-08-29 09:22:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Support callback macros natively.

The low-level function add_define() now supports defining macros
that have callback functions.

As a consequence of this the evaluate_define() API is no longer used.

2018-08-28

2018-08-28 10:07:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed infinite loop.

2018-08-27

2018-08-27 10:10:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Propagate error status on macro expansion failure.

2018-08-26

2018-08-26 11:26:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Remove droppings from stack...

2018-08-25

2018-08-25 09:15:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Changed calling convention for apply_define().

Macro arguments are now sent as an array of strings on the stack,
instead of in a malloced array of structs. This removes the need
for the stage where the malloced array was converted into an
array of strings.

This also removes the argument checking at parse time (as the
checking at expansion time should be sufficient).

2018-08-24

2018-08-24 09:34:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Improved macro argument checking.

2018-08-23

2018-08-23 10:31:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use cpp_error() to report macro expansion errors.

2018-08-22

2018-08-22 09:52:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use CPP_MACRO_KEEP_NL.

Reduce the number of hard coded special cases.

Some code clean up.

2018-08-21

2018-08-21 09:09:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed reference counting issue in macro expansion.

The arguments array lost a reference for each callback function call.

Also protect against callback functions throwing errors.

2018-08-20

2018-08-20 09:25:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Set the CPP_MACRO_KEEP_NL flag in appropriate places.

2018-08-19

2018-08-19 08:48:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added flag CPP_MACRO_KEEP_NL.

2018-08-18

2018-08-18 10:01:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed flag field confusion with macro expansion.

2018-08-17

2018-08-17 09:36:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added cpp_error().

2018-08-15

2018-08-15 09:48:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Improved support for varargs.

The macro expander now supports receiving separated varargs
(instead of having them all joined with commas).

2018-08-14

2018-08-14 09:30:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved implementation of evaluate_define() to master.

2018-08-13

2018-08-13 13:54:23 by Per Cederqvist <cederp@opera.com>

Documentation [Cpp]: Fix documentation markup error.

Fixes remainder of LysLysKOM 22790861.

2018-08-13 09:56:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Cleaned up change_cpp_compatibility().

Inline a function that was called from a single place.

Also adds some documentation.

2018-08-12

2018-08-12 09:24:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved compat handler initialization to master.

2018-08-11

2018-08-11 10:35:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use change_cpp_compatibility() to set the compat level.

2018-08-10

2018-08-10 09:00:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Improved argument checking in macro expansion.

Survive omitted arguments.

Fixes [CID 1438384] and [CID 1438385].

2018-08-09

2018-08-09 09:27:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Simplified base implementation of report().

The base implementation of CompilerEnvironment.CPP::report()
now just calls CompilerEnvironment::report() in its parent.

The handling of handler and compat_handler in report()
is moved to the implementation in the master.

2018-08-08

2018-08-08 09:36:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved more code to high_cpp().

2018-08-06

2018-08-06 13:35:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added format_exception().

The preprocessor now calls format_exception() in its object
rather than handle_exception() in the handler(s) to generate
suitable cpp error messages for exceptions caught by cpp().

Also adds some compatibility code to the master to support
the old API.

2018-08-04

2018-08-04 09:46:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Cpp]: Added some notes about invocation.

2018-08-03

2018-08-03 06:26:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: No need for safe_apply_*() in report().

2018-08-02

2018-08-02 07:48:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added handle_import().

2018-08-01

2018-08-01 07:32:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added handle_include() and read_include().

2018-07-31

2018-07-31 07:16:44 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved more code from cpp efun to CPP class.

Adds high_cpp().

Fixes various issues due to running code in the wrong context.

2018-07-30

2018-07-30 10:15:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added decode_charset().

2018-07-29

2018-07-29 13:05:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed typo in previous commit.

2018-07-29 11:56:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added evaluate_define().

evaluate_define() is now called via the CPP object.

Also adds a note about evaluate_define() likely to
be removed in a future version of Pike.

2018-07-28

2018-07-28 09:39:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Internal API change; pass the CPP object to macro functions.

The macro magic functions now get the CPP object (and not its
storage) as the first argument. This is to make it possible to
call functions in the object from the macro magic functions.

2018-07-27

2018-07-27 14:00:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fix implementation of get_predefines().

2018-07-27 11:41:09 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Clean up initialization in cpp() by using init_pike_cpp().

The cpp() efun now calls init_pike_cpp() in the CPP object to
init it, instead of performing the initialization by hand.

2018-07-26

2018-07-26 11:19:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved some debug checks.

2018-07-25

2018-07-25 10:43:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added change_cpp_compatibility().

2018-07-24

2018-07-24 10:39:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed bug in define_multiple_macros().

The code didn't take into account that alloc_empty_define()
leaves an object on the stack(), so it popped the wrong value.

Fixes definition of callback macros taking arguments via
define_multiple_macros().

2018-07-23

2018-07-23 09:14:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added drain().

2018-07-22

2018-07-22 10:15:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Removed extraneous inherit.

2018-07-21

2018-07-21 09:28:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Support setting the auto_convert mode via options mapping.

The options mapping for cpp() et al now supports the "charset"
member being an integer (ie as documented).

The options mapping mode should now be a strict superset of
the old-style mode.

2018-07-20

2018-07-20 16:38:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Cleaned up initialization code a bit.

Adds get_predefines() and init_pike_cpp().

2018-07-19

2018-07-19 10:54:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added define_multiple_macros().

2018-07-15

2018-07-15 10:23:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: More initial #line directive fixes.

2018-07-13

2018-07-13 12:35:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved generation of initial #line directive to create().

create() should now be fully reentrant.

The initial #line directive is now only generated if there is
a filename, or if it's a renetrant call.

Some related cleanup of the cpp() efun.

2018-07-08

2018-07-08 10:07:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added resolv().

2018-07-04

2018-07-04 08:27:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

CPP: CPP is now a subclass to CompilerEnvironment.

2018-07-03

2018-07-03 21:20:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Cpp]: Fixed namespace issue.

2018-07-01

2018-07-01 12:21:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

ADT.LowLevelStack: Moved implementation to builtin.cmod.

2018-06-30

2018-06-30 09:59:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Ensure that the compile_error counter gets incremented.

As there is code that relies on the counter being incremented
on error (eg the macro expansion), move the increment to code
that can not be overridden via overloading.

2018-06-28

2018-06-28 10:00:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>

CPP: Fixed typo.

2018-06-27

2018-06-27 14:15:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

CPP: Inherit and use Reporter.

The preprocessor now implements and uses the Reporter API
to report errors and warnings.

2018-06-25

2018-06-25 12:39:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Builtin.CPP: Removed some dead code.

2018-06-22

2018-06-22 08:27:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

__builtin.Stack: Fixed typo in `+().

2018-06-21

2018-06-21 08:47:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

__builtin.Stack: Fixed infinite recursion in quick_pop().

2018-06-06

2018-06-06 09:50:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Builtin.CPP: Added define_macro().

2018-06-03

2018-06-03 21:05:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Cpp]: Documented some of the functions.

2018-05-19

2018-05-19 18:33:28 by Arne Goedeke <el@laramies.com>

CPP: fixed refdoc comment

2018-04-19

2018-04-19 16:34:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved varargs field to a flag bit.

2018-04-15

2018-04-15 11:35:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed some CPP_MACRO_* flag confusion.

2018-04-12

2018-04-12 00:32:45 by Martin Nilsson <nilsson@fastmail.com>

Silence warning

2018-04-11

2018-04-11 15:34:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Enable the new macro expansion code.

2018-04-09

2018-04-09 16:18:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed whitespace handling in new stringify.

2018-04-07

2018-04-07 15:01:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed macro expansion issue in new code.

2018-04-06

2018-04-06 15:06:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved macro expansion to define class.

2018-04-04

2018-04-04 16:04:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added pointer to containing object to macro program.

This is in preparation for moving apply_define() to a
member function of the macro (aka define) program.

2018-03-31

2018-03-31 11:34:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added _sprintf() to the CPP context class.

2018-03-30

2018-03-30 15:56:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [Cpp]: Added some minimal documentation.

2018-03-21

2018-03-21 15:38:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Let the stack hold the reference to the input string.

Some code cleanup.

2018-03-08

2018-03-08 14:56:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added C-implementation of a stack.

This class is API-compatible with ADT.Stack, and is intended to be used
by the preprocessor.

2018-03-02

2018-03-02 15:22:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed some issues with #pike.

* cpp_change_compat() leaked stuff on the pike stack.

* Returning non-empty strings from directive_*() functions
should now work.

2018-02-28

2018-02-28 17:54:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use directive_* function for #pike.

Improves code readability somewhat.

2018-02-27

2018-02-27 16:00:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use directive_* function for #require.

Fixes support for disabled #require directives. Eg

#if 0
#require stuff
#endif

Improves code readability somewhat.

2018-02-26

2018-02-26 18:37:47 by Martin Nilsson <nilsson@fastmail.com>

Remove leftover variable nulling.

2018-02-26 17:57:54 by Martin Nilsson <nilsson@fastmail.com>

Fixed leak of unknown preprocessor directives.

2018-02-26 17:52:46 by Martin Nilsson <nilsson@fastmail.com>

Fixed a seriously misleading indentation.

2018-02-24

2018-02-24 16:10:42 by Martin Nilsson <nilsson@fastmail.com>

Remove base_sp from throw_error_object

2018-02-23

2018-02-23 16:16:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Conditional #pragma should now work again.

Fixes "End of file while searching for #endif." when preprocessing
files containing conditional #pragmas. Eg

#if 0
#pragma all_inline
#endif /* 0 */

2018-02-22

2018-02-22 16:57:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use directive_* function for #pragma.

Improves code readablility somewhat.

2018-02-21

2018-02-21 16:48:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Preprocessor: Some more cpp() API cleanups.

2018-02-12

2018-02-12 22:22:42 by Marcus Comstedt <marcus@mc.pp.se>

Add more FALLTHRU directives where needed

2018-02-12 21:49:35 by Marcus Comstedt <marcus@mc.pp.se>

Fix spelling of FALLTHRU directive

The non-standard spelling "FALL_THROUGH" is not recognized by gcc 7.3.
Also, the comment must not contain any other text, or be placed inside
braces.

2018-02-03

2018-02-03 09:48:55 by Peter Bortas <bortas@gmail.com>

Merge branch '8.1' into peter/travis

2018-01-17

2018-01-17 15:12:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Minor code simplification.

2018-01-15

2018-01-15 14:56:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Use directive_* functions for #error and #warning.

Replace the hard-coded special cases for #error and #warning
with use of the new generic directive_* API. This should make
the code easier to read, and reduces code-duplication somewhat.

2018-01-14

2018-01-14 22:11:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed circular reference issue.

Adding the directive_* functions in the CPP object to the
directives mapping causes circular references. Switch to
looking up the directive functions directly instead.

2018-01-13

2018-01-13 12:45:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Run the preprocessor with the state as current object.

2018-01-12

2018-01-12 18:55:45 by Stephen R. van den Berg <srb@cuci.nl>

Restore part of AmigaOS support.

2018-01-12 16:52:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Added tentative API for custom directives.

Adding a function directive_name() to the CPP class now causes
it to be called by the preprocessor when it encounters the
directive #prefix_name. Most current directives should be possible
to implement using this API, reducing the complexity of low_cpp().

2018-01-12 12:42:47 by Stephen R. van den Berg <srb@cuci.nl>

Rip out final remains of OS2 and AmigaOS.

2018-01-12 12:09:30 by Stephen R. van den Berg <srb@cuci.nl>

Equvivalent and equivalent are not equivalent.

2018-01-12 09:59:40 by Martin Nilsson <nilsson@fastmail.com>

Small string_builder optimizations.

2018-01-11

2018-01-11 23:28:13 by Martin Nilsson <nilsson@fastmail.com>

We do not support OS/2

2018-01-11 23:24:05 by Martin Nilsson <nilsson@fastmail.com>

Removed unused variable.

2018-01-11 23:22:03 by Martin Nilsson <nilsson@fastmail.com>

Trim stack after create.

2018-01-11 13:58:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Inline preprocessor.h in cpp.cmod.

There's no need for a separate preprocessor template file anymore, as
the template is only included once, so inline it instead to make the
code somewhat easier to follow.

2018-01-10

2018-01-10 11:40:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation: Added doc for Builtin._take_over_initial_predefines().

2018-01-09

2018-01-09 14:41:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved default macro initialization to separate functions.

2018-01-07

2018-01-07 11:11:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved initialization of cpp state to create().

2018-01-06

2018-01-06 12:29:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved auto_convert flag from argument to state.

This option was passed unmodified through low_cpp() and
apply_define(), and only used in a single place. Moving
it to the cpp state should reduce the overhead somewhat.

2018-01-05

2018-01-05 10:19:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Moved preprocessor state to a proper object.

Cleans up memory and error handling somewhat.

2018-01-04

2018-01-04 12:04:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cpp: Fixed potential memory leak on OOM.

add_predefine() would leak the macro name if it failed to
allocate space for the macro value.

2017-11-07

2017-11-07 10:48:38 by Martin Nilsson <nilsson@fastmail.com>

Use wide_isidchar also for non-wide strings.

2017-06-25

2017-06-25 01:38:13 by Martin Nilsson <nilsson@fastmail.com>

A first draft of reduction of object C initializers.

2017-04-08

2017-04-08 20:30:39 by Martin Nilsson <nilsson@fastmail.com>

Use Pike_sp instead of sp

2017-02-08

2017-02-08 17:03:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Moved {null,placeholder}_program to pikecompiler.cmod.

Use the CMOD preprocessor for these programs.

2017-01-25

2017-01-25 15:22:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Break out sprintf-related stuff from stralloc.h to sprintf.h.

Minor header file cleanup.

2017-01-16

2017-01-16 13:34:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Make #pragma disassemble available --without-debug.

2017-01-10

2017-01-10 16:02:00 by Martin Nilsson <nilsson@fastmail.com>

Changed name from is8bitalnum to isidchar as it contains non-alnum characters (e.g. underscore). Drop 8bit as the wide versions are prefixed as such.

2017-01-10 00:02:49 by Martin Nilsson <nilsson@fastmail.com>

isalnum doesn't recognize characters in Latin-1 supplement, so replace with is8bitalnum. This only matters for CPP prefixes.

2017-01-08

2017-01-08 14:20:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: __ARGS__ is now a macro expanding to __args__.

This ensures that the symbol was reserved in prior versions of Pike,
and also makes it possible to check support via #ifdef.

2016-12-17

2016-12-17 13:56:45 by Martin Nilsson <nilsson@fastmail.com>

Identifiers can no longer contain non-ascii whitespaces. wide_isidchar can now also easily be upgraded to disallow other special characters.

2016-12-17 13:05:44 by Martin Nilsson <nilsson@fastmail.com>

Removed WC_ISSPACE macro indirection.

2016-12-17 01:53:25 by Martin Nilsson <nilsson@fastmail.com>

Corrected WIDE_ISSPACE to actually work on all Unicode white spaces.

2016-10-21

2016-10-21 10:17:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Fixed some memory leaks.

2016-10-01

2016-10-01 11:07:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Reduced code duplication somewhat again.

Join find_end_of_string() and find_end_of_char() into
find_end_quote().

2016-09-30

2016-09-30 13:12:49 by Martin Nilsson <nilsson@fastmail.com>

Let's not have numbers on string-related defines for other stuff than string width.

2016-09-30 10:44:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Removed unused variable.

2016-09-29

2016-09-29 14:11:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Reduced code duplication somewhat.

Add a flags argument to find_end_of_string() and join it
and find_end_of_string2().

2016-09-28

2016-09-28 20:09:35 by Martin Nilsson <nilsson@fastmail.com>

Small simplification.

2016-09-25

2016-09-25 18:38:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: More code cleanup.

Adds string_builder_append_cpp_quoted_pcharp().

2016-09-24

2016-09-24 11:24:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Removed some redundant tests.

2016-09-21

2016-09-21 10:23:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Some code clean up.

Adds internal function apply_define().

2016-09-10

2016-09-10 10:12:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Documentation [cpp]: Fixed warning generated by example.

2016-09-09

2016-09-09 16:14:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Fixed refcount bug in simple_add_define().

2016-09-08

2016-09-08 12:52:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Renamed field "inside" to "flags".

Also adds CPP_MACRO_* for the valid values.

2016-09-06

2016-09-06 10:13:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Changed API for alloc_empty_defile() some more.

It now no longer steals a reference to the macro name.

2016-09-05

2016-09-05 22:57:17 by Martin Nilsson <nilsson@fastmail.com>

Removed some redundancy in adding defines.

2016-09-04

2016-09-04 13:56:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Use a pike array to hold the macro parts.

Further preprocessor cleanup.

2016-09-03

2016-09-03 09:58:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build [hashtable]: hashtable.[ch] are no longer used.

2016-09-03 09:54:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Replace the struct hash_entry with a string.

The struct hash_entry is only used to hold a string, so get rid
of it and store the string directly instead.

2016-09-02

2016-09-02 08:54:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Fixed indentation.

2016-09-02 08:52:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Use the precompiler for the define class.

2016-09-01

2016-09-01 12:41:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Renamed struct define to struct define_struct.

This is in preparation to using the precompiler for the define program.

2016-08-31

2016-08-31 10:12:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Wrap struct define in objects.

The preprocessor macro lookup table is now a standard mapping instead of
a custom hashtable. This is a step in cleaning up the preprocessor code.

2016-08-30

2016-08-30 09:09:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [cpp]: Removed some redundant declarations.

2016-08-24

2016-08-24 10:49:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [CPP]: Fixed missing reference.

Potential fix for precompiler failing on some platforms.

2016-08-21

2016-08-21 01:29:58 by Martin Nilsson <nilsson@fastmail.com>

Just use pike_string for args in define magic functions, and get rid of non-generic code.

2016-08-20

2016-08-20 11:08:25 by Martin Nilsson <nilsson@fastmail.com>

binary_findstring_pcharp had one user, so simplify the arguments for both sides.

2016-07-27

2016-07-27 10:14:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>

CPP: Use the precompiler to build the preprocessor.

Converts cpp.c into cpp.cmod.

predef::cpp() now uses the precompilers argument checker.