ajla.git
3 days agogtk: signals may return valuesmain
Mikulas Patocka [Tue, 14 Jul 2026 19:09:29 +0000 (14 21:09 +0200)]
gtk: signals may return values

3 days agogtk: delete the arguments d, h, env of gobject_repository
Mikulas Patocka [Tue, 14 Jul 2026 18:20:01 +0000 (14 20:20 +0200)]
gtk: delete the arguments d, h, env of gobject_repository

4 days agogtk: add the 'data' argument to g_signal_connect_data
Mikulas Patocka [Mon, 13 Jul 2026 17:09:14 +0000 (13 19:09 +0200)]
gtk: add the 'data' argument to g_signal_connect_data

5 days agogtk: allow callbacks with parameters
Mikulas Patocka [Sun, 12 Jul 2026 18:08:28 +0000 (12 20:08 +0200)]
gtk: allow callbacks with parameters

5 days agodelete unused io_ffi_callback_recurse_handler
Mikulas Patocka [Sun, 12 Jul 2026 15:43:01 +0000 (12 17:43 +0200)]
delete unused io_ffi_callback_recurse_handler

5 days agodon't crash with NULL pointer dereference on unknown gi repository
Mikulas Patocka [Sun, 12 Jul 2026 08:47:14 +0000 (12 10:47 +0200)]
don't crash with NULL pointer dereference on unknown gi repository

5 days agomake thread_safe selectable
Mikulas Patocka [Sun, 12 Jul 2026 08:35:38 +0000 (12 10:35 +0200)]
make thread_safe selectable

6 days agodon't bounce girepository calls through a thread - this speeds up unit
Mikulas Patocka [Sat, 11 Jul 2026 12:44:40 +0000 (11 14:44 +0200)]
don't bounce girepository calls through a thread - this speeds up unit
generation significantly

6 days agomake the girepository unit generator lazy
Mikulas Patocka [Sat, 11 Jul 2026 12:15:40 +0000 (11 14:15 +0200)]
make the girepository unit generator lazy

6 days agoimplement the girepository unit generator
Mikulas Patocka [Sat, 11 Jul 2026 12:10:13 +0000 (11 14:10 +0200)]
implement the girepository unit generator

6 days agoprepare for the girepository unit generator
Mikulas Patocka [Sat, 11 Jul 2026 11:57:03 +0000 (11 13:57 +0200)]
prepare for the girepository unit generator

6 days agosupport generators in the standard library
Mikulas Patocka [Sat, 11 Jul 2026 08:56:59 +0000 (11 10:56 +0200)]
support generators in the standard library

6 days agostart the support for generators in the standard library
Mikulas Patocka [Sat, 11 Jul 2026 08:04:47 +0000 (11 10:04 +0200)]
start the support for generators in the standard library

7 days agocache the result of the unit generators
Mikulas Patocka [Fri, 10 Jul 2026 19:11:45 +0000 (10 21:11 +0200)]
cache the result of the unit generators

7 days agocontinue the implementation of unit generators 5
Mikulas Patocka [Fri, 10 Jul 2026 19:02:57 +0000 (10 21:02 +0200)]
continue the implementation of unit generators 5

7 days agocontinue the implementation of unit generators 4
Mikulas Patocka [Fri, 10 Jul 2026 18:18:44 +0000 (10 20:18 +0200)]
continue the implementation of unit generators 4

7 days agorename IO_Load_Program to IO_Load_Function and make it possible to return
Mikulas Patocka [Fri, 10 Jul 2026 17:54:44 +0000 (10 19:54 +0200)]
rename IO_Load_Program to IO_Load_Function and make it possible to return
arbitrary functions

9 days agocontinue the implementation of unit generators 3
Mikulas Patocka [Wed, 8 Jul 2026 19:27:06 +0000 (8 21:27 +0200)]
continue the implementation of unit generators 3

9 days agocontinue the implementation of unit generators 2
Mikulas Patocka [Wed, 8 Jul 2026 19:01:27 +0000 (8 21:01 +0200)]
continue the implementation of unit generators 2

9 days agocontinue the implementation of unit generators
Mikulas Patocka [Wed, 8 Jul 2026 17:45:57 +0000 (8 19:45 +0200)]
continue the implementation of unit generators

9 days agostart the implementation of unit generators
Mikulas Patocka [Wed, 8 Jul 2026 17:00:42 +0000 (8 19:00 +0200)]
start the implementation of unit generators

13 days agoclang 6 to 11 crash with internal error when using long double
Mikulas Patocka [Sat, 4 Jul 2026 19:11:29 +0000 (4 21:11 +0200)]
clang 6 to 11 crash with internal error when using long double

13 days agouse gobject_keep instead of keep because it is synchronized with world
Mikulas Patocka [Sat, 4 Jul 2026 09:35:46 +0000 (4 11:35 +0200)]
use gobject_keep instead of keep because it is synchronized with world

2 weeks agox86: optimize the generation of the fcomip instruction slightly
Mikulas Patocka [Fri, 3 Jul 2026 18:32:20 +0000 (3 20:32 +0200)]
x86: optimize the generation of the fcomip instruction slightly

2 weeks agoriscv: swap restoring s0 and s1
Mikulas Patocka [Thu, 2 Jul 2026 20:53:37 +0000 (2 22:53 +0200)]
riscv: swap restoring s0 and s1

2 weeks agoarm64: fix a bug that we swapped d12 and d13 when saving floating point
Mikulas Patocka [Thu, 2 Jul 2026 20:25:35 +0000 (2 22:25 +0200)]
arm64: fix a bug that we swapped d12 and d13 when saving floating point
registers

2 weeks agowork around for cache-invalidation bug on Clang 5
Mikulas Patocka [Thu, 2 Jul 2026 20:05:38 +0000 (2 22:05 +0200)]
work around for cache-invalidation bug on Clang 5

2 weeks agofix compilation failure on non-x86 platforms
Mikulas Patocka [Thu, 2 Jul 2026 18:51:34 +0000 (2 20:51 +0200)]
fix compilation failure on non-x86 platforms

2 weeks agomark the system unit as mostly unused too - this speeds up startup of
Mikulas Patocka [Wed, 1 Jul 2026 19:21:23 +0000 (1 21:21 +0200)]
mark the system unit as mostly unused too - this speeds up startup of
Ajla Commander a bit

2 weeks agotreemap: mark this unit as mostly unused
Mikulas Patocka [Wed, 1 Jul 2026 19:14:40 +0000 (1 21:14 +0200)]
treemap: mark this unit as mostly unused

2 weeks agoif we are self-compiling, set dict.mostly_unused - this reduces
Mikulas Patocka [Wed, 1 Jul 2026 19:05:33 +0000 (1 21:05 +0200)]
if we are self-compiling, set dict.mostly_unused - this reduces
compilation time a bit

2 weeks agointroduce the ~lazy unit specifier, it will switch unit parsing to use
Mikulas Patocka [Wed, 1 Jul 2026 17:33:47 +0000 (1 19:33 +0200)]
introduce the ~lazy unit specifier, it will switch unit parsing to use
lazy evaluation - it should be used on units that are mostly unused

2 weeks agoadd "~spark" to dump_function
Mikulas Patocka [Wed, 1 Jul 2026 17:17:39 +0000 (1 19:17 +0200)]
add "~spark" to dump_function

2 weeks agoparser: clean-up the code after the previous change
Mikulas Patocka [Wed, 1 Jul 2026 16:32:31 +0000 (1 18:32 +0200)]
parser: clean-up the code after the previous change

2 weeks agouse ~spark to compile function body; this speeds up compilation by 20%
Mikulas Patocka [Tue, 30 Jun 2026 20:48:18 +0000 (30 22:48 +0200)]
use ~spark to compile function body; this speeds up compilation by 20%

2 weeks agoupdate builtin.pcd after 1f71e134f9e0911f337d38d2b3eafbf3b35db5b7
Mikulas Patocka [Tue, 30 Jun 2026 16:30:59 +0000 (30 18:30 +0200)]
update builtin.pcd after 1f71e134f9e0911f337d38d2b3eafbf3b35db5b7

2 weeks agox86: fix warnings in gen_entry
Mikulas Patocka [Tue, 30 Jun 2026 16:14:47 +0000 (30 18:14 +0200)]
x86: fix warnings in gen_entry

2 weeks agogen_clear_bitmap: make additional_offset signed
Mikulas Patocka [Sun, 28 Jun 2026 17:38:46 +0000 (28 19:38 +0200)]
gen_clear_bitmap: make additional_offset signed

2 weeks agomake it possible to use codegen with Watcom C
Mikulas Patocka [Sun, 28 Jun 2026 16:45:44 +0000 (28 18:45 +0200)]
make it possible to use codegen with Watcom C

2 weeks agocodegen: add "return false" after "internal"
Mikulas Patocka [Sun, 28 Jun 2026 16:12:34 +0000 (28 18:12 +0200)]
codegen: add "return false" after "internal"

2 weeks agoHaiku has buggy localtime_r
Mikulas Patocka [Sun, 28 Jun 2026 11:58:37 +0000 (28 13:58 +0200)]
Haiku has buggy localtime_r

2 weeks agofix a bug in save_load_cache if we didn't have codegen
Mikulas Patocka [Sun, 28 Jun 2026 10:54:35 +0000 (28 12:54 +0200)]
fix a bug in save_load_cache if we didn't have codegen

2 weeks agomake it compile with OpenWatcom
Mikulas Patocka [Sun, 28 Jun 2026 10:47:59 +0000 (28 12:47 +0200)]
make it compile with OpenWatcom

2 weeks agofix c89-incompatible declarations
Mikulas Patocka [Sun, 28 Jun 2026 09:57:10 +0000 (28 11:57 +0200)]
fix c89-incompatible declarations

2 weeks agodon't generate P_BinaryConstOp for emulated real numbers
Mikulas Patocka [Sat, 27 Jun 2026 18:56:12 +0000 (27 20:56 +0200)]
don't generate P_BinaryConstOp for emulated real numbers

2 weeks agoget rid of DEBUG_INFO and introduce environment variable PRINT_INFO
Mikulas Patocka [Sat, 27 Jun 2026 17:48:17 +0000 (27 19:48 +0200)]
get rid of DEBUG_INFO and introduce environment variable PRINT_INFO
instead

2 weeks agofix drastic slowdown in programs/test/test-fp.ajla if the system didn't
Mikulas Patocka [Sat, 27 Jun 2026 11:49:47 +0000 (27 13:49 +0200)]
fix drastic slowdown in programs/test/test-fp.ajla if the system didn't
have 128-bit floating point numbers

2 weeks agoclang: use __attribute__((preserve_none)) on clang/x86-64
Mikulas Patocka [Sat, 27 Jun 2026 10:22:24 +0000 (27 12:22 +0200)]
clang: use __attribute__((preserve_none)) on clang/x86-64

3 weeks agoclang: we must reduce nodes for clang >= 21
Mikulas Patocka [Fri, 26 Jun 2026 17:17:33 +0000 (26 19:17 +0200)]
clang: we must reduce nodes for clang >= 21

3 weeks agoamalloc: return NULL instead of false
Mikulas Patocka [Fri, 26 Jun 2026 16:51:05 +0000 (26 18:51 +0200)]
amalloc: return NULL instead of false

3 weeks agoclang: once we disabled the -Wuninitialized warning, we don't have to use
Mikulas Patocka [Fri, 26 Jun 2026 16:46:21 +0000 (26 18:46 +0200)]
clang: once we disabled the -Wuninitialized warning, we don't have to use
HAVE_REDUCE_NODES for clang >= 19

3 weeks agoclang: disable the "-Wuninitialized" warning in the "run" function
Mikulas Patocka [Fri, 26 Jun 2026 16:40:14 +0000 (26 18:40 +0200)]
clang: disable the "-Wuninitialized" warning in the "run" function
because it slows down compilation significantly

3 weeks agoselect --enable-reduce-nodes=2 by default when using clang
Mikulas Patocka [Thu, 25 Jun 2026 19:48:54 +0000 (25 21:48 +0200)]
select --enable-reduce-nodes=2 by default when using clang

3 weeks agodelete unused inline functions fixed_ldc_real*_t
Mikulas Patocka [Thu, 25 Jun 2026 19:28:49 +0000 (25 21:28 +0200)]
delete unused inline functions fixed_ldc_real*_t

3 weeks agointroduce --enable-reduce-nodes
Mikulas Patocka [Thu, 25 Jun 2026 19:27:41 +0000 (25 21:27 +0200)]
introduce --enable-reduce-nodes

3 weeks agofix non-monotonic alttable - it was broken when real constants were added
Mikulas Patocka [Thu, 25 Jun 2026 18:50:12 +0000 (25 20:50 +0200)]
fix non-monotonic alttable - it was broken when real constants were added

3 weeks agocode: prepare for the option to disable arg mode 0 and arg mode 1
Mikulas Patocka [Thu, 25 Jun 2026 18:32:48 +0000 (25 20:32 +0200)]
code: prepare for the option to disable arg mode 0 and arg mode 1

3 weeks agoadd g/gobject.ajla and g/girepository.ajla
Mikulas Patocka [Thu, 25 Jun 2026 17:41:17 +0000 (25 19:41 +0200)]
add g/gobject.ajla and g/girepository.ajla

4 weeks agoffi: ffi_thread_async_call was unusable because it returned the world
Mikulas Patocka [Fri, 19 Jun 2026 16:40:31 +0000 (19 18:40 +0200)]
ffi: ffi_thread_async_call was unusable because it returned the world
before finishing the call and returning the arguments - this caused
premature destruction of various gobjects. This commit renames
ffi_thread_async_call to ffi_thread_sync_call and makes it synchronous.

rename ffi_thread_async_call_noret to ffi_thread_async_call

rename ffi_thread_async_call_cb to ffi_thread_callback_call

4 weeks agoffi: add a "version" argument to ffi_open_library
Mikulas Patocka [Tue, 16 Jun 2026 17:59:43 +0000 (16 19:59 +0200)]
ffi: add a "version" argument to ffi_open_library

4 weeks agoffi: freeing threads from thread_close is subject to deadlocks because we
Mikulas Patocka [Mon, 15 Jun 2026 22:01:05 +0000 (16 00:01 +0200)]
ffi: freeing threads from thread_close is subject to deadlocks because we
block indefinitely if the thread is busy. So, let's make thread_close
non-blocking and add threads to a pool. The pool is freed either when we
start a new thread or at program exit (after the exception is printed
out).

4 weeks agoffi: rework reference counting on callbacks
Mikulas Patocka [Mon, 15 Jun 2026 19:33:45 +0000 (15 21:33 +0200)]
ffi: rework reference counting on callbacks

4 weeks agouse "union result u" in io_get_argument_from_longint
Mikulas Patocka [Mon, 15 Jun 2026 16:26:43 +0000 (15 18:26 +0200)]
use "union result u" in io_get_argument_from_longint

4 weeks agoffi: introduce ffi_callback_get_address
Mikulas Patocka [Mon, 15 Jun 2026 16:25:57 +0000 (15 18:25 +0200)]
ffi: introduce ffi_callback_get_address

4 weeks agoffi: don't unload held libraries - gtk spawns some background threads,
Mikulas Patocka [Sun, 14 Jun 2026 18:24:11 +0000 (14 20:24 +0200)]
ffi: don't unload held libraries - gtk spawns some background threads,
doesn't terminate them and crashes if we unload the library

4 weeks agoffi: the first implementation of callbacks
Mikulas Patocka [Sun, 14 Jun 2026 12:11:03 +0000 (14 14:11 +0200)]
ffi: the first implementation of callbacks

4 weeks agoffi: add "_handler" suffix for consistency
Mikulas Patocka [Sat, 13 Jun 2026 13:14:29 +0000 (13 15:14 +0200)]
ffi: add "_handler" suffix for consistency

4 weeks agoffi: rework ffi_function_prototype so that it can accept variable names
Mikulas Patocka [Sat, 13 Jun 2026 12:15:15 +0000 (13 14:15 +0200)]
ffi: rework ffi_function_prototype so that it can accept variable names
(and ignores them)

4 weeks agoffi: introduce ffi_function_prototype that makes it easier to load ffi
Mikulas Patocka [Sat, 13 Jun 2026 11:42:27 +0000 (13 13:42 +0200)]
ffi: introduce ffi_function_prototype that makes it easier to load ffi
functions

4 weeks agoffi: join flags and err_type
Mikulas Patocka [Sat, 13 Jun 2026 10:38:23 +0000 (13 12:38 +0200)]
ffi: join flags and err_type

4 weeks agoffi: add "flags" argument to ffi_function_create and delete
Mikulas Patocka [Sat, 13 Jun 2026 09:46:57 +0000 (13 11:46 +0200)]
ffi: add "flags" argument to ffi_function_create and delete
ffi_function_create_with_flags

4 weeks agoffi: delete synchronous callback, this is not needed because we
Mikulas Patocka [Sat, 13 Jun 2026 09:27:58 +0000 (13 11:27 +0200)]
ffi: delete synchronous callback, this is not needed because we
asynchronous callbacks

4 weeks agoffi: pass destructor to ffi_thread_async_call and ffi_thread_async_call_noret
Mikulas Patocka [Sat, 13 Jun 2026 09:17:10 +0000 (13 11:17 +0200)]
ffi: pass destructor to ffi_thread_async_call and ffi_thread_async_call_noret

4 weeks agoffi: introduce ffi_thread_async_call and ffi_thread_async_call_noret
Mikulas Patocka [Sat, 13 Jun 2026 08:53:04 +0000 (13 10:53 +0200)]
ffi: introduce ffi_thread_async_call and ffi_thread_async_call_noret

5 weeks agoffi: support callbacks on a thread
Mikulas Patocka [Fri, 12 Jun 2026 18:39:46 +0000 (12 20:39 +0200)]
ffi: support callbacks on a thread

5 weeks agooffload: support fma in OpenCL
Mikulas Patocka [Thu, 11 Jun 2026 16:36:01 +0000 (11 18:36 +0200)]
offload: support fma in OpenCL

5 weeks agooffload: support P_BinaryConstOp on real numbers properly
Mikulas Patocka [Thu, 11 Jun 2026 16:24:31 +0000 (11 18:24 +0200)]
offload: support P_BinaryConstOp on real numbers properly

5 weeks agom68k: use immediate floating-point constants
Mikulas Patocka [Wed, 10 Jun 2026 16:33:37 +0000 (10 18:33 +0200)]
m68k: use immediate floating-point constants

5 weeks agoarm64: fix a bug in gen_address - we don't want to convert pc-relative
Mikulas Patocka [Tue, 9 Jun 2026 20:48:31 +0000 (9 22:48 +0200)]
arm64: fix a bug in gen_address - we don't want to convert pc-relative
addresses

5 weeks agossa: swap commutative operators for real types too
Mikulas Patocka [Tue, 9 Jun 2026 18:15:05 +0000 (9 20:15 +0200)]
ssa: swap commutative operators for real types too

5 weeks agom68k: implement pc-relative addressing
Mikulas Patocka [Tue, 9 Jun 2026 18:00:38 +0000 (9 20:00 +0200)]
m68k: implement pc-relative addressing

5 weeks agocodegen: rename R_PC to R_PCN because R_PC already defined in
Mikulas Patocka [Tue, 9 Jun 2026 17:41:51 +0000 (9 19:41 +0200)]
codegen: rename R_PC to R_PCN because R_PC already defined in
/usr/m68k-linux-gnu/include/sys/ucontext.h

5 weeks agoarm64: implement pc-relative addressing
Mikulas Patocka [Tue, 9 Jun 2026 17:28:59 +0000 (9 19:28 +0200)]
arm64: implement pc-relative addressing

5 weeks agoalign real numbers to ARCH_HAS_PC_RELATIVE_ADDRESSING - this is
Mikulas Patocka [Tue, 9 Jun 2026 16:45:46 +0000 (9 18:45 +0200)]
align real numbers to ARCH_HAS_PC_RELATIVE_ADDRESSING - this is
prerequisite for arm64 where 4-byte alignment is needed even for 2-byte
numbers

5 weeks agoalign code to CODE_ALIGNMENT
Mikulas Patocka [Tue, 9 Jun 2026 16:33:15 +0000 (9 18:33 +0200)]
align code to CODE_ALIGNMENT

5 weeks agoiomux_ep: use epoll_pwait2 if available for more precise timeout
Mikulas Patocka [Mon, 8 Jun 2026 16:09:40 +0000 (8 18:09 +0200)]
iomux_ep: use epoll_pwait2 if available for more precise timeout

5 weeks agocodegen: fix a bug in codegen_map - we must add real_size only if we have
Mikulas Patocka [Sun, 7 Jun 2026 21:50:04 +0000 (7 23:50 +0200)]
codegen: fix a bug in codegen_map - we must add real_size only if we have
pc-relative addressing

5 weeks agoif we don't have 3-address fp alu, result must not be in the same slot as
Mikulas Patocka [Sun, 7 Jun 2026 21:36:31 +0000 (7 23:36 +0200)]
if we don't have 3-address fp alu, result must not be in the same slot as
2nd operand

5 weeks agox86: if we have 3-address fp alu, we can allocate the result in the same
Mikulas Patocka [Sun, 7 Jun 2026 21:34:12 +0000 (7 23:34 +0200)]
x86: if we have 3-address fp alu, we can allocate the result in the same
register as slot_2

5 weeks agox86: improve detection of known constants
Mikulas Patocka [Sun, 7 Jun 2026 19:37:04 +0000 (7 21:37 +0200)]
x86: improve detection of known constants

5 weeks agomove repetitive logic to a macro function_real_pool_offset
Mikulas Patocka [Sun, 7 Jun 2026 19:08:50 +0000 (7 21:08 +0200)]
move repetitive logic to a macro function_real_pool_offset

5 weeks agox86-64: support pc-relative addressing for the real constant pool
Mikulas Patocka [Sun, 7 Jun 2026 19:03:15 +0000 (7 21:03 +0200)]
x86-64: support pc-relative addressing for the real constant pool

5 weeks agox86: improve constant handling in gen_real_constant
Mikulas Patocka [Sun, 7 Jun 2026 11:35:16 +0000 (7 13:35 +0200)]
x86: improve constant handling in gen_real_constant

5 weeks agocodegen: remove unused pieces of code from gen_constant
Mikulas Patocka [Sun, 7 Jun 2026 11:02:11 +0000 (7 13:02 +0200)]
codegen: remove unused pieces of code from gen_constant

5 weeks agocodegen: use R_SCRATCH_2 instead of R_SCRATCH_1 when loading from the
Mikulas Patocka [Sun, 7 Jun 2026 08:17:30 +0000 (7 10:17 +0200)]
codegen: use R_SCRATCH_2 instead of R_SCRATCH_1 when loading from the
constant pool - so that the optimizations can join them

5 weeks agocodegen: use FP registers when copying from the constant pool to frame in
Mikulas Patocka [Sun, 7 Jun 2026 08:12:05 +0000 (7 10:12 +0200)]
codegen: use FP registers when copying from the constant pool to frame in
gen_real_constant

5 weeks agocodegen: fix a crash on powerpc due to passing R_SCRATCH_1 to
Mikulas Patocka [Sun, 7 Jun 2026 07:45:35 +0000 (7 09:45 +0200)]
codegen: fix a crash on powerpc due to passing R_SCRATCH_1 to
gen_memcpy_raw

5 weeks agocodegen: fix warnings on non-x86 systems and a bug on s390x
Mikulas Patocka [Sat, 6 Jun 2026 19:40:39 +0000 (6 21:40 +0200)]
codegen: fix warnings on non-x86 systems and a bug on s390x

5 weeks agox86: use fused cmp+jmp for x87 comparisons
Mikulas Patocka [Sat, 6 Jun 2026 19:22:25 +0000 (6 21:22 +0200)]
x86: use fused cmp+jmp for x87 comparisons

5 weeks agomodify OPCODE_REAL_OP_ldc so that it loads the value from the constant
Mikulas Patocka [Sat, 6 Jun 2026 19:17:19 +0000 (6 21:17 +0200)]
modify OPCODE_REAL_OP_ldc so that it loads the value from the constant
pool