262 Commits

Author SHA1 Message Date
Stone Tickle
b9b305dd17
remove local keyword 2023-12-06 21:39:23 -05:00
Stone Tickle
d9388848eb
add analyze -d 2023-12-06 16:37:15 -05:00
Stone Tickle
8973302295
add analyze -t 2023-12-06 16:36:26 -05:00
Stone Tickle
ed4e516dc7
reimplement dict_del 2023-12-06 16:31:51 -05:00
Stone Tickle
0010f5f451
wip optimize dicts with hash map backing 2023-12-06 09:10:00 -05:00
Stone Tickle
883594c470
reuse identical strings 2023-12-04 21:17:26 -05:00
Stone Tickle
acd88ddf23
add dict delete 2023-11-30 13:12:20 -05:00
Stone Tickle
d7dff4b44c
obj array more functions and fix when deleting end 2023-11-29 22:26:21 -05:00
Stone Tickle
b6545fc75e
make logging objects easier 2023-11-29 22:25:33 -05:00
Stone Tickle
4a79d17741
more scope work 2023-11-28 11:40:15 -05:00
Stone Tickle
7e99abc43e
working on scopes 2023-11-27 21:29:17 -05:00
Stone Tickle
9cb9d858c9
lots of small changes
- wip "unencapsulated" module.  This just means that the module is
  loaded into the global scope.  You could then write functions like
  `vcs_tag` in this global module to be used by all meson files.  This
  might be removed.
- remove export() function and instead use a lua-like return to export
  from the module.
- track language mode in function definitions.  Necessary for functions
  to use internal-only functions.
- use assigned function name in error messages
- fix embedded source reopening in error messages
- reduce number of node types that get marked as dead code
- create true/false bools on workspace initialization with known ids.
  Future code should use these rather than making new boolean objects to
  save memory.
- add a new test script-module
2023-11-27 12:45:53 -05:00
Stone Tickle
2afcdbdacb
restrict modules to embedded modules
also alter function syntax
2023-11-25 20:45:55 -05:00
Stone Tickle
0deb94b745
add extended lang mode 2023-11-19 20:37:31 -05:00
Stone Tickle
5e1c455cbc
more progress 2023-11-17 22:39:51 -05:00
Stone Tickle
4a0272972e
more flexible functions 2023-11-15 21:54:30 -05:00
Stone Tickle
949c2cf44c
rename datastructures 2023-11-12 11:04:23 -05:00
Stone Tickle
6416305a94
reformat and fix issues with python module changes
- fix python3.find_python return type
- fix missing interp_args for language_version()
- add missing run_cmd_ctx_destroy
2023-10-19 22:34:37 -04:00
Filipe Laíns
118134e531
python: implement python_installation.language_version
Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-10-19 22:33:54 -04:00
Filipe Laíns
50ce7d9053
object: add python_installation
python_installation is an external_program with a couple of extra
methods related to the Python installation. Right now, we only add the
type.

Signed-off-by: Filipe Laíns <lains@riseup.net>
Signed-off-by: Seedo Paul <seedoeldhopaul@gmail.com>
2023-10-19 22:33:54 -04:00
Stone Tickle
074f34e91c
support cmd_array for external_program
This will be required for find_program('meson') to return an external
program with the command ['muon', 'meson'].  It also allows muon to
return ['muon', 'samu'] as the result for find_program('ninja'), which
is kind of neat.
2023-10-09 10:04:57 -04:00
Stone Tickle
d2966a3f4c
implement project(license_files:) 2023-10-03 13:35:25 -04:00
Stone Tickle
5de4d811b7
implement declare_dependency(objects:) 2023-10-03 13:35:25 -04:00
Stone Tickle
dc432474c0
muon fmt: editorconfig support 2023-04-24 19:40:10 -04:00
Stone Tickle
6c0547b470
automatically unprefix build dir options
The invocation:

meson setup -Dlibdir=/usr/lib64 -Dprefix=/usr build

sets libdir to `lib64` because meson detects that it is an absolute path
that is a subdir of prefix.  This commit adds the same functionality to
muon.
2023-04-07 06:44:36 -04:00
Stone Tickle
b60b51965f
attempt to chdir to project root when -O is passed 2023-03-15 13:37:09 -04:00
Stone Tickle
40171e7e94
add quiet mode for parser 2023-03-15 13:36:42 -04:00
Stone Tickle
3f765c6a53
add -i flag to analyze muon internal eval files 2023-03-15 13:30:54 -04:00
Stone Tickle
d286201f39
rename posix.h to compat.h
Currently all compat.h does is define the appropriate POSIX macro unless
you are on windows, as well as conditionally enabling
__attribute__(format...).
2023-03-10 09:35:04 -05:00
Stone Tickle
22c1d334af
analyzer: replace -u with -Werror 2023-02-27 10:44:54 -05:00
Stone Tickle
73a26346c8
make dead code warning non-fatal 2023-02-27 10:36:09 -05:00
Stone Tickle
ba48defcd9
make the analyzer smarter 2023-02-26 22:27:14 -05:00
Stone Tickle
640b16bdd7
support custom_target depfiles 2023-01-29 11:56:55 -05:00
Stone Tickle
9c3cbb8804
add experimental meson cli compatibility layer 2023-01-23 22:09:00 -05:00
Stone Tickle
14dda5e9c5
add basic support for appleframeworks dependency 2023-01-17 20:32:00 -05:00
Stone Tickle
8c6e67b27a
guess external program version when we need it 2023-01-14 21:10:00 -05:00
Stone Tickle
a4bb06284b
add obj_array_tail 2023-01-14 21:09:59 -05:00
Stone Tickle
bead57c704
analyze: add -W opt and new reassignment warning 2022-12-02 08:02:01 -05:00
Stone Tickle
d90e4d4b6d
make muon fmt's comment preservation more robust 2022-11-16 11:57:39 -05:00
Stone Tickle
8a4a7225e2
add muon fmt -q to check if a file is formatted 2022-11-16 11:56:31 -05:00
Stone Tickle
28feff787c
add watch / unwatch debugger commands 2022-11-08 11:13:11 -05:00
Stone Tickle
c9a16fb0e2
enforce project() being the first statement 2022-11-06 15:23:30 -05:00
Stone Tickle
265173243c
make tests respect global options 2022-11-05 13:40:56 -04:00
Stone Tickle
93ac403ffb
optimize literal objects
Previously, each time a literal was evaluated, a new object was created.
This meant that if you had code like:

foreach x : list
    if x == 'hello'
        do_something
    endif
endforeach

In each loop, when the condition was evaluated, a new string containing
'hello' was allocated.  With many loops or lots of literals inside
loops, this can become a source of wasteful memory use.

The implemented solution is to create these objects once during the
parse step, and then reuse them inside the interpreter.  Currently only
strings, bools, and numbers get this treatment, but it should be
possible to handle arrays/dicts composed purely of literals as well,
although that would start to get into constant folding.
2022-10-30 07:46:50 -04:00
Stone Tickle
4298aa2011
make muon reuse compliant
https://reuse.software
2022-10-25 10:54:31 -04:00
Stone Tickle
e737a47df8
implement verbose kw 2022-10-04 20:29:29 -04:00
Stone Tickle
448fd5a1e9
tap test support 2022-10-04 12:11:05 -04:00
Stone Tickle
90d340b089
put add_test_setup data into tests dump 2022-09-29 09:12:41 -04:00
Stone Tickle
3e20b61d46
add timeout / protocol to test object 2022-09-29 09:11:47 -04:00
Stone Tickle
24eb131219
add regen dep for configure_file/run_command input 2022-09-26 10:02:58 -04:00