Branch: Tag:

2021-11-28

2021-11-28 11:39:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support nested type operators.

2021-11-27

2021-11-27 12:00:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Add type operator get_return.

2021-11-23

2021-11-23 14:37:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Filter type markers with their match pattern.

Fixes type markers containing non-matching types.

2021-11-21

2021-11-21 14:52:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some issues with __unknown__.

2021-11-21 14:19:37 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of index type for arrays.

2021-11-20

2021-11-20 13:55:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved type for empty array.

2021-11-19

2021-11-19 11:49:45 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix type stack underflow.

2021-11-17

2021-11-17 14:09:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of nullable types.

2021-11-14

2021-11-14 14:10:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added flag PT_FLAG_REMAP_INHIBIT.

2021-11-13

2021-11-13 13:02:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Remove stupid_describe_type_string().

This was a remnant of the really old type checker, and has not been
used for at least 10 years.

2021-11-11

2021-11-11 10:06:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Render markers with the prefix '$'.

This reduces ambiguity when markers and integers are mixed.

2021-11-10

2021-11-10 00:44:24 by Tobias S. Josefowitz <tobij@tobij.de>

Compiler [Typechecker]: Empty string has unknown range

The empty string now has no/unknown range and is a typewise valid match
for all possible string ranges.

2021-11-07

2021-11-07 12:33:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Markers now default to __unknown__.

2021-11-06

2021-11-06 18:08:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of __unknown__.

2021-11-06 17:56:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix handling of __unknown__ in string types.

2021-11-06 16:47:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Do not keep the type name when its value changes.

2021-09-27

2021-09-27 14:44:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved diagnostics --with-dmalloc.

2021-09-26

2021-09-26 12:38:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix type leak in type_binop().

2021-09-25

2021-09-25 13:05:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix type leak in find_lfun_type().

2021-09-16

2021-09-16 12:24:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Debug: Fix some rendering issues in simple_describe_type().

2021-09-15

2021-09-15 16:09:55 by Marcus Comstedt <marcus@mc.pp.se>

Compiler [Typechecker]: Workaround for gcc optimization of signed overflow

The expression "(min1 > max2) && (min1 > max2 + 1)" got optimized into
"(min1 > max2 + 1)" by gcc, because of min1 is larger than max2 + 1,
then it clearly must be larger than max2 as well... Except when max2 + 1
is a signed overflow. So explicitly check for that instead and hope gcc
doesn't optimize away that check as well...

2021-07-14

2021-07-14 10:22:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix erroneous deprecation warning in obscure case.

Fixes [REP-60].

2021-07-11

2021-07-11 13:33:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed ref-count errors with PIKE_T_OPERATOR.

2021-07-10

2021-07-10 14:32:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Detect circularities in simple_describe_type().

2021-07-04

2021-07-04 15:56:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added type operators set_car and set_cdr.

Also improves robustness regarding NULL in types.

2021-06-28

2021-06-28 12:58:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix NULL-deref.

Thanks to Chris Angelico <rosuav@gmail.com> for the
report and test case.

Fixes [LysLysKOM 24784470].

2021-06-10

2021-06-10 15:24:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fix typo.

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

Compiler: Support nullable types in compile_type_to_runtime_type().

2021-06-09

2021-06-09 12:00:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of __unknown__ in `|().

2021-06-04

2021-06-04 16:12:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix another issue with __unknown__.

2021-06-03

2021-06-03 15:28:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support __unknown__ in more places.

2021-05-21

2021-05-21 09:18:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Do not lose track of markers.

2021-05-20

2021-05-20 10:06:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some issues with binop's on __unknown__.

Fixes some erroneous warnings.

2021-05-11

2021-05-11 09:05:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Move some diagnoistics to PIKE_EXTRA_DEBUG.

2021-05-10

2021-05-10 18:22:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: More use of PIKE_T_UNKNOWN.

2021-05-10 12:12:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved robustness of lower_new_check_call().

2021-05-07

2021-05-07 14:27:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improve robustness against NULL in free_type().

2021-05-03

2021-05-03 15:19:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Third go at subtraction of function types.

2021-04-14

2021-04-14 08:31:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some NULL-derefs in low_index_type().

2021-04-13

2021-04-13 10:29:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix NULL-deref in push_unlimited_array_type().

2021-04-11

2021-04-11 16:29:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: More __unknown__ fixes.

2021-04-10

2021-04-10 13:23:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed PT_FLAG_CMP_VOID_IS_ZERO.

2021-04-09

2021-04-09 17:37:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix NULL-deref in even_lower_and_pike_types().

2021-04-09 17:31:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved binop(PT_BINOP_{OR|MINUS}, ...)

Add special case to simplify the result for A - (B|C) and A | (B|C).

Previously
int - (int(1)|int(5))
resulted in
(int(..0)|int(2..)) & (int(..4)|int(6..))
now it instead results in
int(..0)|int(2..4)|int(6..)
which is what most users expect.

2021-04-09 08:23:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix another NULL-deref in low_index_type().

2021-04-07

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

Compiler [Typechecker]: Fix NULL-deref in low_index_type().

2021-04-06

2021-04-06 07:04:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed some more NULL-derefs when rendering types.

2021-04-05

2021-04-05 11:33:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix NULL-deref in describe_type().

2021-04-04

2021-04-04 12:43:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: More use of __unknown__ in typeof().

2021-04-03

2021-04-03 12:25:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some NULL-derefs when rendering types.

2021-04-01

2021-04-01 15:08:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Handle return of __unknown__ in match_types().

2021-04-01 07:24:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix NULL-deref in new_get_return_type().

2021-03-31

2021-03-31 11:38:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed NULL-deref in push_type_operator().

2021-03-30

2021-03-30 09:29:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some special cases to push_type().

Handle __unknown__ in combination with AND, OR and NOT directly.

2021-03-27

2021-03-27 16:22:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Use __unknown__ instead of zero in some cases.

2021-03-22

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

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

2021-03-21

2021-03-21 15:13:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PT_FLAG_CMP_VOID_IS_ZERO.

2021-03-19

2021-03-19 16:16:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PT_FLAG_CMP_INSEPARABLE.

2021-03-18

2021-03-18 16:39:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some internal doc.

2021-03-15

2021-03-15 19:34:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: More NULL-deref fixes.

2021-03-14

2021-03-14 16:36:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some GC NULL-derefs.

2021-03-13

2021-03-13 11:28:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of NULL in pike_types_le().

2021-03-12

2021-03-12 09:51:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Minor DMALLOC clean-up.

2021-03-11

2021-03-11 18:09:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix indexing of __unknown__.

2021-03-10

2021-03-10 10:22:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix memory leak.

2021-03-09

2021-03-09 11:20:53 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime [DEBUG]: Improved robustness.

2021-03-09 11:19:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: One more place for __unknown__.

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

Runtime: Fix rendering of __unknown__.

2021-03-06

2021-03-06 13:32:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Fix some warnings.

2021-03-05

2021-03-05 16:28:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved --with-dmalloc handling.

2021-02-25

2021-02-25 15:51:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Survive NULL in push_finished_type_with_markers().

2021-02-20

2021-02-20 14:16:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of NULL in or_pike_types().

2021-02-17

2021-02-17 12:19:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix result type for indexing of mappings.

Indexing of mappings may always return zero (or rather UNDEFINED).

Fixes compilation error from the optimizer when it optimizes a
mapping lookup to UNDEFINED, but zero is not in the value type.

2021-02-16

2021-02-16 10:13:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix soft casting of void.

Soft casting of eg string|void to string now gives the
expected string (rather than string|zero).

Fixes multiple strict types warnings.

2021-02-15

2021-02-15 12:21:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix handling of nullable-void with mixed.

2021-02-14

2021-02-14 15:05:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Fix rendering issue of array types.

2021-02-11

2021-02-11 12:18:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker] [GC]: Fix NULL-deref.

2021-02-10

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

Compiler [Typechecker]: Improved robustness against NULL.

2021-02-05

2021-02-05 10:56:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix handling of NULL in debug_free_type().

debug_free_type() attempted to dereference NULL when it looped
on certain types.

2021-02-04

2021-02-04 11:37:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix zero - void and void - zero.

2021-02-04 11:09:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Use type_binop(PT_BINOP_MINUS) for pike_types_le().

2021-02-02

2021-02-02 11:56:15 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: push_binop(PT_BINOP_NONE) is now supported.

2021-02-01

2021-02-01 14:08:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix typo.

2021-01-30

2021-01-30 13:40:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: More robustness against NULL types.

2021-01-27

2021-01-27 18:33:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support NULL as argument type in T_MANY.

2021-01-26

2021-01-26 12:37:09 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support push_type(PIKE_T_UNKNOWN).

This pushes a NULL on the type stack, and is intended to represent
the empty type.

2021-01-25

2021-01-25 21:43:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Fix compilation warning.

2021-01-22

2021-01-22 16:50:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed typo.

2021-01-22 16:44:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix binops where one or both operands is NULL.

2021-01-20

2021-01-20 15:59:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Restructure binary operations of function types.

Also fixes the result of PT_BINOP_AND on function types.

2021-01-18

2021-01-18 15:00:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of comparing void and zero.

Fixed some handling of T_MANY(T_VOID, ...) in combination
with T_MANY(T_ZERO, ...).

2021-01-17

2021-01-17 14:16:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix comparison of void with mixed.

2021-01-14

2021-01-14 18:48:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

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

2021-01-13

2021-01-13 17:02:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added type_binop().

2021-01-10

2021-01-10 16:25:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Some tuning of handling of zero and mixed.

2021-01-08

2021-01-08 15:00:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Unify binops for T_AND and T_OR.

Also fixes typo in lookup table.

2021-01-05

2021-01-05 12:58:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of OR in low_type_binop().

2021-01-04

2021-01-04 17:36:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improve tracing of low_type_binop().

2021-01-03

2021-01-03 14:21:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed more issues with subtraction of functions.

Function type subtraction now seems to be compatible with pike_types_le().

2021-01-02

2021-01-02 12:57:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Remove extraneous pop_stack_mark().

2021-01-01

2021-01-01 14:39:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support PT_BINOP_XOR and PT_BINOP_XNOR.

2020-12-31

2020-12-31 13:33:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Remove use of duplicate type stack marks.

Use peek_stack_mark() instead of an extra type_stack_mark()
followed by pop_stack_mark(). Reduces type mark stack use
and code size slightly.

2020-12-30

2020-12-30 17:36:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Even more fixes for PT_BINOP_MINUS and functions.

2020-12-28

2020-12-28 17:21:01 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of PT_BINOP_MINUS & functions.

2020-12-27

2020-12-27 15:09:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some comments.

2020-12-26

2020-12-26 12:26:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Use the NULLABLE flag in a few common cases.

2020-12-25

2020-12-25 13:38:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build: Fix compilation warning.

2020-12-24

2020-12-24 12:11:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PT_FLAG_REMAP_NULLABLE.

This flag is analogous to void and PF_FLAG_REMAP_VOIDABLE, but
for zero.

2020-12-23

2020-12-23 16:34:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Remove some obsolete code.

Missed this hunk in the previous commit.

2020-12-23 15:10:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix handling of T_ZERO in low_type_binop().

Eg zero - int(1bit) now returns Ø (empty set) as intended (and not zero).

2020-12-20

2020-12-20 14:16:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Clean up flag handling in low_type_binop().

2020-12-19

2020-12-19 15:42:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Debug: Support dmalloc for pike types again.

2020-12-18

2020-12-18 15:00:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Use alloc_pike_type() to allocate types.

2020-12-17

2020-12-17 14:11:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed leak in low_type_binop().

2020-12-16

2020-12-16 16:00:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Clean up some of low_type_binop().

2020-12-13

2020-12-13 15:26:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of voidable arguments.

2020-12-06

2020-12-06 22:40:39 by Tobias S. Josefowitz <tobij@tobij.de>

Compiler [Typechecker]: Compile fixes

2020-12-06 14:51:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PT_FLAG_REMAP_TRACE.

Attempt to avoid drowning in debug output by traceing only
relevant operations.

2020-12-05

2020-12-05 14:53:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved checking of function types.

2020-12-03

2020-12-03 15:34:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Minor adjustment of rendering of string types.

Fixes testsuite failure.

2020-11-03

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

Compiler [Typechecker]: Fixed type_binop() on disjunct types.

2020-11-01

2020-11-01 13:30:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some C-compiler warnings.

2020-10-23

2020-10-23 14:49:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Allow calling remap_markers() with NULL.

This simplifies the code that needs to call remap_markers().

2020-10-21

2020-10-21 16:45:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some more validation on PIKE_DEBUG.

pike_types_le() now validates low_type_binop(MINUS, ...)
against low_pike_types_le() when --with-rtldebug. It also
validates that the type and type mark stacks are invariant.

2020-10-20

2020-10-20 13:09:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix type stack mark leak.

low_type_binop() leaked type stack marks in some cases when handling
PT_BINOP_MINUS of function types.

2020-10-19

2020-10-19 19:47:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed eval mode in remap_markers().

When we are evaluating, we need to recurse even if we're not
doing any remapping.

2020-10-18

2020-10-18 14:47:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some validation on PIKE_DEBUG.

match_types() now validates low_type_binop(AND, ...)
against low_match_types() when --with-rtldebug.

2020-10-17

2020-10-17 14:20:27 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed low_type_binop() handling of int.

2020-10-16

2020-10-16 13:52:19 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed infinite loop in low_type_binop().

There was a break statement that was intended to break a loop,
but instead broke a switch. Replaced with a goto.

Also adds a missing break.

2020-10-15

2020-10-15 10:50:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some implementation notes.

2020-10-14

2020-10-14 15:18:05 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix some more cases in low_type_binop().

It should now handle the same cases as low_intersect_types() and
low_subtract_types().

2020-10-13

2020-10-13 11:06:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Use push_binop().

2020-10-12

2020-10-12 07:42:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added low_pop_type().

This function pops a type from the type stack without messing
with the type mark stack.

2020-10-11

2020-10-11 14:02:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added push{,_reverse}_binop()

This is a helper function for low_type_binop().

2020-10-10

2020-10-10 14:37:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: First implementation of low_type_binop().

This function unifies low_intersect_types() and low_subtract_types(),
and is intended in the future to also support union (aka or) of types.

2020-10-08

2020-10-08 19:33:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added some FIXMEs.

2020-10-06

2020-10-06 15:33:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Restructured intersect_types() somewhat.

2020-10-05

2020-10-05 17:20:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Adjusted API for remap_markers().

remap_markers() can now be used to evaluate markers.

2020-10-04

2020-10-04 14:33:39 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed typos in DeMorgan special case.

2020-10-03

2020-10-03 12:24:59 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Attempt to reduce amount of type expansion.

2020-10-02

2020-10-02 13:47:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Short-circuit double type inversions.

2020-10-01

2020-10-01 11:19:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed multiple bugs in subtract_types().

2020-09-30

2020-09-30 09:28:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Some type rendering adjustments.

2020-09-29

2020-09-29 11:01:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed some bugs in remap_marker() et al.

The allocation and lookup of remapped markers now
seems to work as intended.

2020-09-28

2020-09-28 11:25:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed some infinite recursion.

2020-09-27

2020-09-27 12:17:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added {intersect,subtract}_types().

2020-09-26

2020-09-26 12:35:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed some issues with the marker remapper.

* The flags are now in an enum.
* The flag constants have been renamed slightly.
* The PT_FLAG_REMAP_SWAP_MARKERS flag should now work as intended.
* free_marker() now also receives the flags. This is needed
to avoid issues with PT_FLAG_REMAP_SWAP_MARKERS.

2020-09-25

2020-09-25 17:09:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added void_function_type_string.

2020-09-24

2020-09-24 14:42:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PT_FLAG_BOTH_MARKERS{,_AND,_OR,_MASK}.

This causes remap_markers() to use both marker sets and emit an
T_AND or T_OR type when a marker is found in both.

2020-09-23

2020-09-23 10:47:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed even more typos.

2020-09-22

2020-09-22 12:52:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Some more typo fixes.

2020-09-22 11:19:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed some typos.

2020-09-21

2020-09-21 16:58:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added alloc_remap_marker().

Changed the remap_marker API slightly. remap_marker() is now strictly
used to lookup the marker mapping, and alloc_remap_marker() to
allocate a new marker in the remapped set.

Also adds and defines the flag PT_FLAG_SWAP_MARKERS.

2020-09-20

2020-09-20 13:05:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added {push_,}remap_markers().

2020-09-18

2020-09-18 17:23:31 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Preparations for remapping type markers.

2020-09-16

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

Compiler [Typechecker]: Use PIKE_T_MASK.

2020-09-14

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

Compiler [Typechecker]: Simplify handling of transitive types somewhat.

2020-09-12

2020-09-12 12:36:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support soft casting of operators to function.

2020-09-11

2020-09-11 15:14:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed issue with expanding of transient types.

2020-09-10

2020-09-10 13:49:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed issue with soft casting of complex functions.

2020-09-09

2020-09-09 14:43:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Enable TYPE_STACK_DEBUG with l_flag.

2020-09-07

2020-09-07 21:05:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix soft casting of complex function types.

2020-08-31

2020-08-31 09:00:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix calling of transitive types.

2020-08-30

2020-08-30 11:37:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Port type matching changes to pike_types_le().

* Protect against infinite recursion.

* Perform proper checking of transitive types (via expand_transitive()).

2020-08-29

2020-08-29 13:54:35 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improve matching against transitive types.

2020-08-28

2020-08-28 17:27:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed some TYPE_STACK_DEBUG() calls.

2020-08-27

2020-08-27 15:17:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fix typo in rendering of complex function types.

2020-08-24

2020-08-24 09:52:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Improved handling of union (aka or) types.

Now that low_match_types() adds a reference to its result, we can
return the matching types for both parts of a union type.

2020-08-21

2020-08-21 13:33:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Changed calling convention for low_match_types().

low_match_types() now adds a reference to the returned type. This fixes
potential issues with matching PIKE_T_OPERATOR and similar, where it
could return a freed type.

2020-08-20

2020-08-20 08:51:30 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Use match_types() where possible.

Preparation for having low_match_types() add a reference to
its return value.

2020-08-19

2020-08-19 15:38:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed invalid deref in debug code.

2020-08-19 12:47:12 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Protect against infinite recursion.

With the addition of partially expanded types low_match_types()
is at risk of infinite recursion.

2020-08-17

2020-08-17 14:08:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PIKE_T_TRANSITIVE.

This is a helper type to construct the type for transitive left-
recursive functions (like eg many operator efuns).

2020-08-15

2020-08-15 10:58:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed issue where markers were not expanded.

Fixes multiple erroneous warnings. Eg

Pike v8.1 release 13 running Hilfe v3.5 (Incremental Pike Frontend)
> array a = ({ `+, `-, `/ });
Compiler Warning: 1: Expected object implementing lfun `+.
Compiler Warning: 1: Got : 2.

Also adjusts the warning message somewhat (for when it is relevant) to

Compiler Warning: 1: Expected object implementing lfun::`+().

2020-08-03

2020-08-03 11:10:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed bug in soft cast.

Soft casting of complex function types (ie not consisting only
of a chain of T_FUNCTION and T_MANY nodes) was broken.

Potential fix for a SIGSEGV in the testsuite.

2020-07-19

2020-07-19 13:28:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Fixed evaluation order in pike_types_le().

Fixes several obscure issues.

2020-07-18

2020-07-18 10:05:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added operator find_lfun.

This operator returns the type for the specified lfun in
the first argument. Typical intended use is for type-
checking of operators.

Fixes some of #10048.

2020-07-17

2020-07-17 16:02:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added PIKE_T_OPERATOR.

Added generic support for 127 + 127 type operator functions.

This reduces the amount of special cases needed to implement
type operators (like eg find_lfun() or zzap_return()).

Needed for #10048.

2020-07-15

2020-07-15 10:06:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Or-ing a type and its inverse yields mixed.

2020-07-13

2020-07-13 07:09:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Support more complex function types.

Support type nodes other than T_FUNCTION and T_MANY in the cdr
of T_FUNCTION nodes.

Needed for #10048.

2020-05-19

2020-05-19 14:45:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added some more consistency checks to the type checker.

2020-05-18

2020-05-18 14:58:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added some FIXME's to the type checker.

2020-03-14

2020-03-14 08:57:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: The type for >32-bit integers is now int.

This should solve issues with strange derived types due to truncation
with eg sprintf(%c).

Fixes #10018.

2020-01-23

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

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-21

2020-01-21 10:43:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Added special case for empty strings and arrays.

2020-01-19

2020-01-19 18:47:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Type-check the length field.

2020-01-18

2020-01-18 13:07:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Add a starting sentinel to the type marker stack.

This makes some debug checks (in eg compiler_discard_top_type())
simpler/not break on empty marker stack.

2020-01-16

2020-01-16 11:54:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Adjusted rendering of zero-length array and string types.

2020-01-16 10:34:52 by Henrik Grubbström (Grubba) <grubba@grubba.org>

EFUNs: _typeof() now returns limited length array and string types.

2020-01-14

2020-01-14 11:35:03 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added serialization of length-limited types.

2020-01-13

2020-01-13 11:50:08 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed typo in low_describe_type().

Fixes formatting of array types.

2020-01-12

2020-01-12 17:27:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed typo in fatal error message.

2020-01-11

2020-01-11 14:56:48 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Improved handling output from {simple,low}_describe_type().

{simple,low}_describe_type() now display the length type for
array and string types if it is other than the default.

2020-01-10

2020-01-10 11:44:22 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added low_describe_int_range().

This reduces code duplication and cleans up the code.

2020-01-08

2020-01-08 11:18:20 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added int_pos_type_string.

2020-01-07

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

Compiler: Set the length type for array types.

2020-01-04

2020-01-04 13:04:18 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Added compiler_discard_top_type().

2020-01-03

2020-01-03 18:08:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

GC: Fixed NULL-deref.

2020-01-03 12:18:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler & GC: Fixed some issues with NULL in car for T_ARRAY et al.

2020-01-03 10:00:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Support T_ARRAY and T_STRING nodes with non-NULL car.

Preparation for using the car for holding the length type.

2020-01-02

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

Compiler: Added push_unlimited_array_type().

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

2019-12-22

2019-12-22 15:07:50 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Use new syntax when outputting types.

2019-12-17

2019-12-17 11:59:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Fixed broken fallthrough.

2019-12-16

2019-12-16 17:18:26 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Moved the value type for arrays and strings to cdr.

This is in preparation for using car for the index type. This
can then be used to type the lengths for array and strings.

2019-12-15

2019-12-15 19:33:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Allow free_type(NULL).

2019-10-17

2019-10-17 09:03:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Type checker]: Added peek_stack_mark().

2019-07-11

2019-07-11 09:55:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Warn about indexing of deprecated values.