Branch: Tag:


2021-10-15 10:24:32 by Henrik Grubbström (Grubba) <>

Compiler: Make print_tree() available also --without-debug.


2021-10-13 18:12:07 by Henrik Grubbström (Grubba) <>

Compiler: Some cosmetic fixes.


2021-10-04 12:44:41 by Henrik Grubbström (Grubba) <>

Compiler: Move cumulative_parse_error to struct compilation.

Fixes spurious erroneous warnings --with-debug about leaked
nodes. This appears to have been due to the destruct order
and the use of a global variable getting out of phase.


2021-09-30 11:04:49 by Henrik Grubbström (Grubba) <>

Compiler: Register nodes --with-dmalloc.


2021-06-02 09:21:07 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Reduce strict type warnings somewhat.


2021-04-02 12:44:46 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Fixed NULL-deref on specific syntax error.

Fixes [LysLysKOM 24260957].


2021-03-23 16:39:36 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Improved typechecking of assignments.

The checker is now informed that void values are converted into
UNDEFINED/zero on assignment.

Fixes several warnings.


2021-03-22 14:12:22 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Added flags to pike_types_le().


2021-03-01 14:42:34 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Second go at fixing some warnings.

las.cmod:fix_type_field() is called by optimize() from the leaves
going up. This means that the expression in eg `?` has typically
already been typechecked when it is received by fix_type_field().
Move the special case to mknode().

Calling fix_type_field() from mknode() in early compiler passes
may cause strange and unexpected failures. The special case type
adjustment is therefore only performed in the last compiler pass.

Fixes warnings from eg Getopt.


2021-02-28 13:49:56 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Reduce number of warnings.

Do not warn about the type not containing zero in the special case

if (string foo = expr) { xxx }

as foo will never be zero even though expr may very well be zero.


2021-02-27 16:32:23 by Henrik Grubbström (Grubba) <>

Compiler: Added F_INITIALIZER node type.

This node type behaves identically to F_ASSIGN, but is only used
in the case where it is the initializer assignment in a local
variable declaration.


2021-02-26 16:58:43 by Henrik Grubbström (Grubba) <>

Compiler: Swap CAR and CDR for F_DO nodes.

This change causes the conditional be in CAR, analogous to
'?' and F_FOR nodes, reducing the number of special cases
in some upcoming code.


2021-02-19 14:49:51 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Improved result type for logical or.

Fixes some warnings.


2021-02-18 15:54:13 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Fix some warning messages.


2021-02-15 09:52:20 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Reduce strictness a bit more.


2021-02-08 14:20:35 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Fix lots of warnings about assigning zero.


2021-02-07 16:32:07 by Henrik Grubbström (Grubba) <>

Compiler: Use weaker typecheck when casting result from eval_low().

Fixes issue with attempts to (soft) cast zero to eg string.

2021-02-07 13:15:40 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Use type_binop() in check_node_type().


2021-02-06 12:43:10 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Fix checking of foreach().


2020-07-07 16:54:55 by Henrik Grubbström (Grubba) <>

Compiler: Survive --without-rtl-debug again.

low_get_f_name() is only present --with-debug...

2020-07-07 11:39:37 by Henrik Grubbström (Grubba) <>

Compiler: Added type checking for operator-assignment.

Fixes most of bug #10033.


2020-07-06 11:10:45 by Henrik Grubbström (Grubba) <>

Compiler: Don't attempt to constant-fold automap markers.

Attempting to get a constant from an expression like

({ "abc", "cde" })[*]

is not possible and generates the compilation error
"[*] not supported here", so don't attempt to.

Fixes #10039.


2020-03-12 13:08:14 by Henrik Grubbström (Grubba) <>

Compiler: Reduce the number of soft cast warnings.

Fixes some of #10006.


2020-02-04 11:33:05 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Added DWIM kludge.


2020-01-23 15:32:18 by Henrik Grubbström (Grubba) <>

Compiler [Typechecker]: Improved type checking.

Fixed issue where constant expressions after evaluation sometimes
got a partially weaker type. Eg: The expression

({ 0, 1, 2, 3 })

gets the type array(int(4bit)) from evaluating the type, but
the type array(4: int) from generating a type from the value.
The code generator now adds a soft-cast to the original type,
causing the resulting type to be array(4: int(4bit)).

Fixes testsuite failures for undumped pikes from eg SSL.Context.


2020-01-17 12:02:43 by Henrik Grubbström (Grubba) <>

Compiler: Adjusted type checking for foreach.


2020-01-02 13:38:20 by Henrik Grubbström (Grubba) <>

Compiler: Added push_unlimited_array_type().

This is in preparation for adding support for
length-limited array types.


2019-11-23 13:39:08 by Henrik Grubbström (Grubba) <>

Compiler: print_tree() now knows about continue return and yield.


2019-11-14 12:15:53 by Henrik Grubbström (Grubba) <>

Compiler: count_memory_in_node_ss() now survives Pike_compiler_base.

Pike_compiler_base has no active compiler.

Also adds some PIKE_DEBUG checks.

2019-11-14 09:46:57 by Henrik Grubbström (Grubba) <>

Compiler: Move node_allocator to struct compilation.

Allocated nodes may need to live during an entire translation unit.

This moves the allocator from struct Pike_compiler (ie compilation.h)
to struct compilation (aka CompilationEnvironment.PikeCompiler).

Fixes use of already freed nodes after certain syntax errors.


2019-10-26 21:14:40 by Marcus Comstedt <>

Compiler [generators]: Fix compiler crash

F_GENERATOR does not use CDR, so don't try to access it as a node.


2019-10-18 12:31:25 by Henrik Grubbström (Grubba) <>

Merge branch 'patches/pike221'

* patches/pike221:
Compiler: object->program_id only exists --with-debug.

2019-10-18 09:11:58 by Henrik Grubbström (Grubba) <>

Merge branch 'patches/pike221'

* patches/pike221:
Compiler: Make get_name_of_function() survive destructed functions.
Compiler: Improved robustness of placeholder activation.


2019-09-12 10:03:07 by Henrik Grubbström (Grubba) <>

Compiler [generators]: Added yield().


2019-08-26 12:51:20 by Henrik Grubbström (Grubba) <>

Compiler: Fixed bug in mkgeneratornode().


2019-08-24 15:58:29 by Henrik Grubbström (Grubba) <>

Compiler: Added mkgeneratornode().