Commit graph

1284 commits

Author SHA1 Message Date
gambas
3ad3e9a42d Errors cannot be propagated outside of an event handler.
[INTERPRETER]
* NEW: GB.IsLocked() is a new API that tells if an object is locked.
* NEW: GB.IsRaiseLocked() is a new API that tells if raising an event is useless because no observer will receive it.
* BUG: Errors cannot be propagated outside of an event handler, because the event may result from a library signal that do not support exceptions (like the glib library).
2020-11-14 03:33:12 +01:00
gambas
2ca5bdd574 The debugger now correctly saves and prints the current error message.
[INTERPRETER]
* NEW: Add a debug API that returns the current error message, and remove the API that printed it.

[GB.DEBUG]
* BUG: The debugger now correctly saves and prints the current error message.
2020-11-11 03:32:03 +01:00
gambas
cb531a5b21 Add 'gb.Input' and 'gb.Output' constants.
[INTERPRETER]
* NEW: Add 'gb.Input' and 'gb.Output' constants.
2020-11-09 17:41:27 +01:00
gambas
1239f45687 Redesign internal file constants.
[INTERPRETER]
* NEW: Redesign internal file constants.
* BUG: Opening a file for creation in direct mode now implies the write flag.
2020-11-09 17:38:28 +01:00
gambas
6586e7d7cc Add a '-a' option that allows to override the program path (i.e. Application.Path and Args[0]).
[INTERPRETER]
* NEW: Add a '-a' option that allows to override the program path (i.e. Application.Path and Args[0]).
2020-11-02 22:09:35 +01:00
gambas
cd786d0429 Fix signal handler overriding management.
[INTERPRETER]
* BUG: Fix signal handler overriding management.
2020-10-21 23:31:02 +02:00
gambas
7b37117b9d Fix Variant arrays sort when a mode is specified.
[INTERPRETER]
* BUG: Fix Variant arrays sort when a mode is specified.
2020-10-07 01:32:44 +02:00
gambas
9df7f50047 Child processes do not inherit locks anymore. Workaround libraries that override SIGCHLD handler.
[INTERPRETER]
* BUG: Child processes do not inherit locks anymore.
* BUG: Workaround libraries like 'glib' that override SIGCHLD handler by checking and reinstalling it at each process run.
2020-10-06 16:40:58 +02:00
gambas
f2f9623c14 Correctly catch errors raised inside event handlers in all cases.
[INTERPRETER]
* BUG: Correctly catch errors raised inside event handlers in all cases.
2020-09-27 01:14:54 +02:00
gambas
7ad56a4adb Fix panic message displayed when a JIT method is not found.
[INTERPRETER]
* BUG: Fix panic message displayed when a JIT method is not found.
2020-09-17 23:51:13 +02:00
gambas
2d1d307455 If no language environment variable is defined, use "C" locale instead of "en_US".
[INTERPRETER]
* NEW: Add process id in warning messages.
* BUG: If no language environment variable is defined, use "C" locale instead of "en_US".
2020-09-17 09:52:38 +02:00
gambas
f0606b61c3 Disable jit compiler if no compiler is found.
[INTERPRETER]
* NEW: Disable jit compiler if no compiler is found.

[GB.JIT]
* NEW: Don't crash if no compiler is found, but just tell the interpreter.
2020-09-14 21:15:20 +02:00
gambas
ed0f467b63 Some fixes in translation support.
[INTERPRETER]
* BUG: Fix possible buffer overflow on localisation environment variables.
* BUG: Always define LC_ALL and LANG with the effective language chosen.
* BUG: Use the current language to load translations, not what setlocale() returns.
2020-09-11 00:39:00 +02:00
gambas
ccf354c19a The interpreter can compile without 'libffi' again.
[INTERPRETER]
* BUG: The interpreter can compile without 'libffi' again.
2020-08-01 23:35:37 +02:00
gambas
0e4f68da94 Really really fix '&=' operator optimization.
[INTERPRETER]
* BUG: Really really fix '&=' operator optimization.
2020-07-27 20:39:21 +02:00
gambas
95ea5cd72c Better fix for '&=' operator optimization.
[INTERPRETER]
* BUG: Better fix for '&=' operator optimization.
2020-07-13 16:00:17 +02:00
gambas
5004f20609 Move 'gb.test' sources in '/main/lib'.
[INTERPRETER]
* NEW: Remove the now useless testing specific code.
* NEW: 'gbx3 -T' now just loads the 'gb.test' component and calls Test.Main() passing it the '-T' option argument.

[GB.TEST]
* NEW: Move 'gb.test' sources in '/main/lib'.
* NEW: 'gb.test' has now a part written in C that allows him to load project classes on demand.
2020-05-25 21:24:28 +02:00
gambas
3737b08904 Classes passed to 'gbx3 -T' that are not test modules are silently ignored.
[INTERPRETER]
* NEW: Classes passed to 'gbx3 -T' that are not test modules are silently ignored.
2020-05-25 11:50:12 +02:00
gambas
f3850aad1b Redesign the interface between the interpreter and 'gb.test'.
[INTERPRETER]
* NEW: Redesign the interface between the interpreter and 'gb.test'.
2020-05-23 04:31:33 +02:00
gambas
d8f4c5a7cf Redesign the interface between the interpreter and 'gb.test' component.
[INTERPRETER]
* NEW: Now '-T' option with no argument calls Test._List() method.
* NEW: If '-T' gets an argument, the Test._Run() method is used.
* NEW: If '-T' argument is '*', then the Test._RunAll() method is called.
2020-05-22 16:02:48 +02:00
gambas
7c7029aed8 Make a public function static.
[INTERPRETER]
* BUG: Make a public function static.
2020-05-17 08:26:14 +02:00
gambas
8395b972b8 Make READ and INPUT return void strings instead of NULL, otherwise JIT compiler fails.
[INTERPRETER]
* BUG: Make READ and INPUT return void strings instead of NULL, otherwise JIT compiler fails.
2020-05-12 01:13:43 +02:00
gambas
986ca05fc4 Automatically load 'gb.test' component when the '-T' option is used.
[INTERPRETER]
* NEW: Automatically load 'gb.test' component when the '-T' option is used.
2020-05-07 15:15:13 +02:00
gambas
1cd23bb578 Interpreter options now accept a void argument.
[INTERPRETER]
* BUG: Interpreter options now accept a void argument.
2020-05-07 10:18:33 +02:00
gambas
368165ff2f Add '-T' option to run test modules.
[INTERPRETER]
* NEW: Add '-T' option to run test modules.
* NEW: Update help message and display options in alphabetic order.
* BUG: Use '-r' option now to redirect standard error output. No conflict anymore with '-t'.
2020-05-07 08:18:48 +02:00
gambas
b0eb952028 '&=' on variants is not incorrectly optimized anymore.
[INTERPRETER]
* BUG: '&=' on variants is not incorrectly optimized anymore.

[GB.JIT]
* BUG: '&=' on variants is not incorrectly optimized anymore.
2020-04-16 09:47:59 +02:00
gambas
68c503bc2e Enabling an already enabled timer has no effect anymore.
[INTERPRETER]
* BUG: Enabling an already enabled timer has no effect anymore.
2020-04-08 21:27:27 +02:00
gambas
2165ececd5 JIT optimization of '&=' has been implemented.
[INTERPRETER]
* NEW: Support for JIT '&=' optimization.
* BUG: Fix '&=' optimization on argument variables.
* OPT: Strings greater than 4096 bytes are allocated by 4096 bytes steps.

[GB.JIT]
* NEW: JIT optimization of '&=' has been implemented.
2020-04-06 04:43:12 +02:00
gambas
08c5fc95c7 '&=' operator optimization.
[COMPILER]
* OPT: Support for '&=' operator optimization.

[INTERPRETER]
* OPT: '&=' operator optimization.
2020-04-04 16:18:10 +02:00
gambas
fd2794612b Call the event loop just after the JIT compiler has aborted, so that its processes are correctly freed.
[INTERPRETER]
* BUG: Call the event loop just after the JIT compiler has aborted, so that its processes are correctly freed.
2020-03-02 14:20:49 +01:00
gambas
131653ab1f Converting a string to a pointer returns a pointer pointing at the beginning of the string.
[INTERPRETER]
* NEW: Converting a string to a pointer returns a pointer pointing at the beginning of the string.
2020-02-18 23:03:24 +01:00
gambas
7bedc9af65 Fix VarPtr() behaviour.
[INTERPRETER]
* BUG: VarPtr() on local strings are forbidden again.
* BUG: VarPtr() on variants now returns a pointer to the variant contents.
2020-02-18 20:36:45 +01:00
gambas
2cd257be5b PEEK is a new instruction that peek some bytes from a stream without removing them.
[COMPILER]
* NEW: Support for the new PEEK instruction.

[INTERPRETER]
* NEW: PEEK is a new instruction that peek some bytes from a stream without removing them, so that they are available to the next READ instruction.
* OPT: IsAscii(), IsLower(), IsPunct()... instructions are now a bit faster.
2020-02-11 01:45:10 +01:00
gambas
d4860710c0 Running a process without an event name does not reference its observer for nothing anymore.
[INTERPRETER]
* BUG: Running a process without an event name does not reference its observer for nothing anymore.
2020-02-04 10:32:55 +01:00
gambas
f0b3762ec1 JIT compiler can compile libraries now.
[INTERPRETER]
* NEW: Internal name of libraries uses a point now between vendor and library name, not a slash anymore.

[GB.DEBUG]
* BUG: Undo "make debugger output writes more robust". Apparently it does not work.

[GB.JIT]
* BUG: Compiling libraries works now.
2020-01-26 07:09:36 +01:00
gambas
ad3ce9b21e Fix VarPtr() error message.
[INTERPRETER]
* BUG: Fix VarPtr() error message.
2020-01-18 05:39:33 +01:00
gambas
3829c3b9cb VarPtr() now works on variant variables, but the returned pointer may become valid if the variant datatype changes.
[INTERPRETER]
* NEW: VarPtr() now works on variant variables, but the returned pointer may become valid if the variant datatype changes.
2020-01-18 05:33:47 +01:00
gambas
ba221177da Fix call of special methods _read() and _write().
[INTERPRETER]
* BUG: Fix call of special methods _read() and _write().
2020-01-14 03:49:03 +01:00
gambas
507f48ca61 Fix a possible memory leak when reading an object on a stream through its special _read() method fails.
[INTERPRETER]
* BUG: Fix a possible memory leak when reading an object on a stream through its special _read() method fails.
2020-01-09 18:31:56 +01:00
gambas
85ded796c9 Fix release of return value of JIT methods called from non-JIT methods.
[INTERPRETER]
* BUG: Fix release of return value of JIT methods called from non-JIT methods.
2020-01-09 04:48:22 +01:00
gambas
46b3b16630 Application.ParentHandle is a new property that returns the parent process id.
[INTERPRETER]
* NEW: Application.ParentHandle is a new property that returns the parent process id.
2020-01-08 13:54:03 +01:00
gambas
2429cff72b Fix possible memory leaks when reading objects or variants with the READ instruction.
[INTERPRETER]
* BUG: Fix possible memory leaks when reading objects or variants with the READ instruction.
2020-01-07 02:34:40 +01:00
gambas
f0290255fe Opening a pipe for reading does not block anymore if the pipe has not been opened for writing yet.
[INTERPRETER]
* NEW: Add class name in 'incorrect symbol declaration' error message.
* NEW: Opening a pipe for reading does not block anymore if the pipe has not been opened for writing yet. It help synchronizing applications using the same pipe a lot!
2020-01-06 23:02:33 +01:00
gambas
87100b744a Check special methods return value datatype. Add '_invalid' special variable.
[INTERPRETER]
* NEW: Check special methods return value datatype and raise a dedicated error if it is incorrect.
* NEW: Error.Text, Error.Where and Error.Backtrace are now available inside the Application_Error handler.
* BUG: 'gbx3 -L' now displays the same Gambas version as 'gbx3 -V'.
* NEW: A class can declare a public '_invalid' boolean variable. The value of that variable will indicates if the object is invalid.
2020-01-04 22:11:29 +01:00
gambas
c797862f43 Object.Count() does not fail anymore if the object is invalid.
[INTERPRETER]
* NEW: Object.Count() does not fail anymore if the object is invalid.
2020-01-04 22:09:56 +01:00
gambas
ca0a224f6a Signals are now correctly unregistered if the program exits during a signal handler.
[INTERPRETER]
* BUG: Signals are now correctly unregistered if the program exits during a signal handler.
2020-01-04 22:09:13 +01:00
gambas
63000a27fe WAIT NEXT is a new instruction that waits for the next event and process it.
[INTERPRETER]
* NEW: WAIT NEXT is a new instruction that waits for the next event and process it.

[COMPILER]
* NEW: Support for the new WAIT NEXT instruction.

[GB.GTK]
* NEW: Support for the new WAIT NEXT instruction.

[GB.GTK3]
* NEW: Support for the new WAIT NEXT instruction.

[GB.QT4]
* NEW: Support for the new WAIT NEXT instruction.

[GB.QT5]
* NEW: Support for the new WAIT NEXT instruction.
2020-01-02 13:08:45 +01:00
gambas
15a7a7f4f3 Fix objet serialization.
[INTERPRETER]
* BUG: Fix objet serialization.
* NEW: Use one byte for writing the class name length when serializing objects.
2019-12-21 20:54:13 +01:00
gambas
f39ed34592 Serializing an object is not ambiguous anymore.
[INTERPRETER]
* BUG: Serializing an object is not ambiguous anymore.
2019-12-21 17:35:30 +01:00
gambas
3d956c269c '_read' and '_write' are two new special methods that allow to make any object serializable by the READ and WRITE instructions.
[INTERPRETER]
* NEW: '_read' and '_write' are two new special methods that allow to make any object serializable by the READ and WRITE instructions.
* NEW: Rename macro that convert a Gambas stream object to the internal stream structure and add a macro that does the reverse conversion.
2019-12-21 17:03:42 +01:00