1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-06 07:00:23 +00:00
Commit graph

81 commits

Author SHA1 Message Date
Roland Heyder ba90208c27 Add external dependencies checks
- tracks required external files for changes and triggers a rebuild if needed
- $EXEICON file
- $MIDISOUNDFONT (incl. the DEFAULT one)
- $INCLUDE (incl. nested ones)
- $EMBED files
- internal includes as forced by $COLOR or $DEBUG
2024-01-30 13:04:03 +01:00
RainRat f65a74c22a fix typos 2024-01-28 10:37:47 -08:00
Roland Heyder d83b6d9557 Rename internal $CHECKING flag
- this completes the previous commit, but as it also swapped the true/false logic, it was made as extra commit
2024-01-26 00:51:29 +01:00
Roland Heyder f24cabd9ad Rename internal meta flags
- mainly done to avoid faulty highlighting, but also makes more sense IMO
2024-01-26 00:43:38 +01:00
Roland Heyder b8424f1336 Refactoring $ASSERTS:CONSOLE highlighting
- according to other multipart meta-commands, make the CONSOLE part a regular keyword
- grouping meta handling blocks (removed some blank lines)
2024-01-26 00:32:11 +01:00
Matthew Kilgore 90941fffa7 Replace CONSTs while we have the individual elements
This moves the CONST replacement up before we turn the elements into a
single string. The advantage is that we don't have to worry about
splitting the string properly to find the CONST names as the elements
are already split for us.t
2024-01-18 13:00:13 -05:00
SteveMcNeill ef19a046be fix for CONST issues
Yet again, here's another patch to the patch which patches a patch....  /sigh
2023-12-29 01:12:01 -05:00
Roland Heyder c3d12c7d22 Bump Version
- added embed info to docs
- finalizing the new release
2023-12-18 15:25:55 +01:00
Roland Heyder cf378672e0 Moved handle checks
into FUNCTION evaluatefunc, where we have access to tokenized arguments, which makes checking a lot easier
2023-12-17 10:17:31 +01:00
Roland Heyder b10a055d28 Finetuned handle checks
- better check if _EMBEDDED$ appears inside a string or after a REM or apostrophe
- make sure REM is a valid command and not just part of a variable name
- better enforcement for 'handle' being a single literal string, i.e. not allowing stuff before or after
2023-12-16 16:38:09 +01:00
Roland Heyder 84c9761d51 Fixed include path separators 2023-12-15 19:01:40 +01:00
Roland Heyder 45ffc8c9e6 Minor flow changes
- As suggested by @mkilgore , moved the embed list array reset out of the $EMBED block
- Imposed a 20% least ratio for compression
- Moved the handle comparison into `func__embedded()` to avoid some unnecessary function calls
2023-12-15 00:22:28 +01:00
Roland Heyder 38eed18fc4 Implement file embedding
$EMBED:'filename','handle' and _EMBEDDED$("handle")
2023-12-13 20:49:53 +01:00
SteveMcNeill 1be3e366ac Final fixes to math stuff (I hope)
Fix to CONST with the math evaluator to toss a message and error with values out of acceptable range for ARCSEC and ARCCSC.

Tweak to _PI to add constexpr for speedier execution.

Fix to the math tests for the new (and unbuggy) values for ARCSEC and ARCCSC.
2023-10-31 11:32:22 -04:00
SteveMcNeill 45bf68fad4 Error Report before REDIM, not after 2023-10-30 10:51:14 -04:00
SteveMcNeill d7498d173c Increase Sub/Function Id Limit
As per #362, this raises the limit in increments from 1,000 to a maximum of 25,000 subs and functions for a single QB64PE program.  If that number is exceeded, the IDE will give an error message. reporting the issue for the user.
2023-10-30 00:43:20 -04:00
Samuel Gomes 5efe08153f
Merge branch 'main' into versioninfo-enhancement 2023-10-15 19:03:30 +05:30
SteveMcNeill 669e20fdea Fix to IDE blowing up from last fix 2023-10-15 02:43:44 -04:00
Samuel Gomes f03efa2468
Merge branch 'main' into versioninfo-enhancement 2023-10-15 11:39:02 +05:30
SteveMcNeill 1a7e9dd959 Fix to Mod and \ in CONST
As per the sample code below:

Const a = 5 Mod 2.8
Const b = 5 \ 2.8
Print a; "="; 5 Mod 2.8
Print b; "="; 5 \ 2.8

Old output was wrong.  Patch should make the CONST values the same as what QB64 normally generates for us.
2023-10-15 01:24:34 -04:00
SteveMcNeill ca38a08ce7 Clean up previous patch 2023-10-15 00:04:32 -04:00
SteveMcNeill 3670825280 Patch to CONST
Should fix both of these issues:
https://github.com/QB64-Phoenix-Edition/QB64pe/issues/193
https://github.com/QB64-Phoenix-Edition/QB64pe/issues/224
2023-10-14 23:00:53 -04:00
Samuel Gomes 5db34487c9 Implement #20 with suggestions from #392 2023-10-14 07:07:11 +05:30
Samuel Gomes db0a96bd6b Prefix remaining math functions to use std:: 2023-10-08 09:05:26 +05:30
Samuel Gomes 49aeccc486 Initial WoA64 and MingW-LLVM support 2023-10-01 08:08:58 +05:30
Samuel Gomes 28d1bf1aac Remove legacy audio code from the compiler 2023-09-22 10:10:04 +05:30
Samuel Gomes bdc39f4e65 Fix DECLARE DYNAMIC LIBRARY to load shared libraries relative to source without using absolute paths 2023-06-27 11:21:28 +05:30
Samuel Gomes 514e41bdce Correct error message 2023-05-08 01:46:41 +05:30
Samuel Gomes 290081ddb6 Use LONG array instead of INTEGER 2023-05-08 01:11:01 +05:30
Samuel Gomes 60a448fb54 Add _UCHARPOS() to get individual char pixel position 2023-05-07 22:12:47 +05:30
RainRat 3914037c0f fix typos 2023-04-30 15:20:42 -07:00
Matthew Kilgore 075d5bf157 Fix $MidiSoundFont when compiling from command line 2023-04-25 09:48:08 -04:00
Matthew Kilgore 312e31ab0f Fix .h file resolution when compiling via command line
When compiling via the command line (NoIDEMode) the `idepath$` is blank
and `path.source$` contains the path to the source file.
2023-04-25 09:48:08 -04:00
Samuel Gomes 8a9b8a2f25 Update TSF and add SF3 support. Fix $MIDISOUNDFONT behavior 2023-03-26 11:38:03 +05:30
Samuel Gomes 2b6b04e36c Fix to look for header libs relative to the $INCLUDE file 2023-03-24 06:13:21 +05:30
Samuel Gomes 5bd3192491 Fix #124 2023-03-23 05:33:28 +05:30
Matthew Kilgore fac5375ea6 Fix DECLARE LIBRARY against stripped .so file
.so files can be stripped such that they contain no "regular" symbol
table but do still contain the "dynamic" symbol table, this is pretty
typical for .so files. QB64-PE is supposed to check both tables when
linking against a .so file, but a bug in ab0c2b18 meant that the second
run of nm with the -D flag to check the dynamic symbol table no longer
happens. The fix is to introduce a new output file for the dynamic run
so that they are handled separately in terms of caching the result.

A new test .so file that only contains a dynamic symbol table was added
to avoid this in the future.

Fixes: #301
2023-02-19 02:10:51 -05:00
Matthew Kilgore 596a8d6092 Fix formatting 2023-02-18 14:50:31 -05:00
Matthew Kilgore df70f7e708 The -o flag should not strip extensions except for .exe
Current the -o flag will strip any "extension" on the provided filename,
which is fairly problimatic on Linux and Mac OS since those executes do
not have other extensions and names like "foobar.v1" will get the ".v1"
stripped off. This can happen on Windows as well if you leave off the
.exe (QB64-PE will add it for you, but also strip off the existing
extension).

QB64-PE stripping off the ".exe" when provided that on Linux and Mac OS
might actually be useful behavior people are relying on (so that they
don't need to provide different names when compiling on Linux/Mac OS) so
we are preserving that and still removing the extension if it is exactly
"EXE", otherwise we now leave it in place.

Fixes: #297
2023-02-18 14:50:31 -05:00
Matthew Kilgore e810229d11 Fix _RGB32() optional arguments
The new optional arguments for functions broke _RGB32() because it uses
some custom flags ('overloaded' and 'minargs' on the id Type) to control
its parameter passing. You are allowed passing any number from 1 to 4 args
to `func__rgb32` and there are 4 overloaded C++ functions that will get
picked from. This is different from how this typically would work, with
all 4 parameters always passed and an extra argument to specify the
parameters that were passed.

Rather than change `func__rgb32` I simply adjusted the optional argument
logic to account for the flags used by `_RGB32()` - if the `overloaded`
flag is set, then we don't need to add extra `NULL` parameters for any
parameter that wasn't specified in the argument list. Instead we simply
don't emit anything for those.
2023-02-13 00:25:51 -05:00
Matthew Kilgore 0836cf31eb Format source, apply Option _Explicit in tests 2023-02-12 22:38:50 -05:00
Matthew Kilgore 83533dc319 Add support for optional function arguments
Currently functions only have very limited optional argument support,
this expands it so that we can have more complex sets of optional
arguments for functions, such as multiple arguments where not all need
to be provided. This will be used in the future for some upcoming
functionality.

Note that this does not support any generic optional argument format,
the commas always have to be provided unless an optional argument is at
the end of the parameter list. Thus, if you have a format with two
optional arguments and you want to omit the second, then you need to call
it as 'foo(2, , 3)`, rather than `foo(2, 3)`. This is important for
avoiding ambiguous situations, and is how many SUBs currently function.

The two functions that violate that requirement are INSTR() and
_INSTRREV(), which use the format `[?],?,?` and allow omitting the comma
for the first argument. This format is simply handled as a special case.

Fixes: #303
2023-02-12 22:38:50 -05:00
Matthew Kilgore 4a2808905c Delete qbx.o before every compile
This helps when compiling several files in a row very quickly, Mac OS
only has a one second accuracy on the file modification time which can
cause Make to not notice a file has been modified. With the changes to
avoid startup delays it's possible to have compiles happen that quickly
in succession now.
2023-01-08 20:24:25 -05:00
Roland Heyder 764996499c nm output buffering
- file is loaded on first access and then kept in buffer
2022-12-20 02:59:52 +01:00
Luke Ceddia 4086cda00d
Clean up nm commands 2022-12-19 22:36:58 +11:00
Luke Ceddia ed0b6b12a5 Use tmpdir$ instead of internal/temp/ when invoking nm 2022-12-18 21:45:06 +11:00
Luke Ceddia ab0c2b189d Only run nm once per library 2022-12-18 20:45:58 +11:00
Matthew Kilgore 816126be08 Fix the Beginning C++ message being printed when using the IDE
This was overlooked in #258, previously this printing was being skipped
over via a check of idemode, but after changing where it was located so
it only prints once it now runs when using the IDE, which screwed up the
drawing of the IDE screen.

The simple fix is to check for idemode before doing the printing, which
is effectively what it was doing before anyway.

Fixes: #266
2022-11-27 12:41:07 -05:00
Matthew Kilgore 77c5e6c39c -x should create executable relative to _StartDir$ when -o is not provided
Starting with #201, source files relative to `_StartDir$` are allowed to
be passed to `-x` and compile as expected. Additionally as part of that
change, when the `-x` parameter is relative to `_StartDir$`, the `-o`
argument is _also_ treated relative to `_StartDir$`. This is simply the
behavior everyone using the compiler would expect - that the source file
and `-o` are relative to the same location.

An overlooked behavior was the executable location when `-o` is not
provided. It still writes to compiler directory, but it really should be
writing to `_Startdir$` since the output executable is intended to be
relative to the same location the source file is relative too. Overall
this is fairly straight forward to fix as the logic is the same, we just
need to make use of it when the `-o` flag is not provided.

Fixes: #257
2022-11-26 21:25:33 -05:00
Matthew Kilgore ae6602ecaf Prevent commands like NoPrefix duplicating commandline output
Some commands like NoPrefix trigger a complete "recompile" due to how
they work. This has the accidental effect of duplicating the command
line output, which should still only be printed once. Moving the
printing logic up a bit is a simple solution.

Fixes: #256
2022-11-26 21:25:33 -05:00