Commit graph

1953 commits

Author SHA1 Message Date
gambas
b5affdfa60 Implement fast unsafe compilation of Byte@, Short@... functions, that just access memory without checking anything.
[GB.JIT]
* NEW: Implement fast unsafe compilation of Byte@, Short@... functions, that just access memory without checking anything.
2019-12-23 11:22:36 +01:00
gambas
b09ab39338 Function names can be put between parenthesis to disable possible warnings on them.
[COMPILER]
* NEW: Function names can be put between parenthesis to disable possible warnings on them.
2019-12-22 20:48:58 +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
gambas
64be06797e Reading strings with the READ instruction when the NullTerminatedString property is set now works correctly on all streams.
[INTERPRETER]
* BUG: Reading strings with the READ instruction when the NullTerminatedString property is set now works correctly on all streams.
2019-12-20 00:29:07 +01:00
gambas
517266b4e4 Don't highlight Null as constant inside the new OPEN NULL syntax.
[GB.EVAL]
* NEW: Don't highlight Null as constant inside the new OPEN NULL syntax.
2019-12-18 07:26:43 +01:00
gambas
05cc5ee6e4 Forgot the new source file.
[INTERPRETER]
* BUG: Forgot the new source file.
2019-12-18 07:01:09 +01:00
gambas
3e0398dbd1 OPEN NULL is a new syntax that opens a null stream.
[INTERPRETER]
* NEW: OPEN NULL is a new syntax that opens a null stream. Reading always returns end of file, and writing does nothing except advancing the file pointer, allowing to know how many bytes were written.

[COMPILER]
* NEW: OPEN NULL is a new syntax that opens a null stream.
2019-12-18 06:59:21 +01:00
gambas
a0af9b3990 Fix some spaces in source code.
[GB.GEOM]
* BUG: Fix some spaces in source code.
2019-12-18 06:58:56 +01:00
gambas
2a6eaf8c8c Merge branch 'master' of gitlab.com:gambas/gambas 2019-12-18 06:34:42 +01:00
Benoît Minisini
53f83fb014 Forgot a semicolon.
[INTERPRETER]
* BUG: Forgot a semicolon.
2019-12-18 05:33:55 +00:00
gambas
4bca597638 Stream.NullTerminatedString is a new property that tells if writing a string on the stream emits the string length first, or a null terminated zero byte. This property is TRUE by default on memory streams.
[INTERPRETER]
* NEW: Stream.NullTerminatedString is a new property that tells if writing a string on the stream emits the string length first, or a null terminated zero byte. This property is TRUE by default on memory streams.
2019-12-18 06:29:33 +01:00
Benoît Minisini
6c1b9d6858 Really fix serialization of NULL values.
[INTERPRETER]
* BUG: Really fix serialization of NULL values.
2019-12-18 05:29:03 +00:00
gambas
c4b61aea83 Remove an old debugging message displayed when writing a pointer to a stream.
[INTERPRETER]
* BUG: Remove an old debugging message displayed when writing a pointer to a stream.
2019-12-18 06:22:26 +01:00
gambas
b98ca797e4 Fix serialization of NULL values.
[INTERPRETER]
* BUG: Fix serialization of NULL values.
2019-12-18 05:46:26 +01:00
gambas
b8ca134643 Reading a string on a memory stream now correctly skip the terminating null byte.
[INTERPRETER]
* BUG: Reading a string on a memory stream now correctly skip the terminating null byte.
2019-12-16 13:32:49 +01:00
gambas
b092a95132 Fix static array management.
[COMPILER]
* BUG: Allow static arrays to be used with the point operator.

[INTERPRETER]
* BUG: Fix static array management. They are not read-only anymore. Only methods that want to modify the size of the array are forbidden, as well as the ReadOnly property.
2019-11-30 06:29:17 +01:00
gambas
61af540536 Disable some compiler warnings and remove unnecessary PACKED directives.
[INTERPRETER]
* BUG: Disable some compiler warnings that generate false positives.

[GB.GEOM]
* BUG: Remove unnecessary PACKED directives.
2019-11-15 23:53:25 +01:00
gambas
55d7f20d80 Allow initialization of variables associated with property declaration.
[COMPILER]
* NEW: Allow initialization of variables associated with property declaration.
* BUG: Correctly detect help comments in all cases.
2019-11-13 20:06:41 +01:00
gambas
20a345cec4 Fix compilation of function calls with variable arguments passing.
[COMPILER]
* BUG: Fix compilation of function calls with variable arguments passing.
* BUG: Remove some useless structure packing directives.

[INTERPRETER]
* BUG: Fix compilation of function calls with variable arguments passing.
2019-11-09 11:58:57 +01:00
gambas
b02810d025 Fix Find() method on Float, Single, and Long arrays.
[INTERPRETER]
* BUG: Fix Find() method on Float, Single, and Long arrays.
2019-11-09 11:34:43 +01:00
Laurent Carlier
3f099c9b83 Partially revert "Remove register keyword, deprecated, now reserved keyword with C++17"
This partially reverts commit f1deb8e330.

Register keyword can be useful when the interpreter is built with '-Os'
2019-10-30 10:37:29 +01:00
Laurent Carlier
f1deb8e330 Remove register keyword, deprecated, now reserved keyword with C++17
Fixes "warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]"
with clang

https://en.cppreference.com/w/cpp/keyword/register
2019-10-30 06:53:09 +00:00
gambas
d8abac4cce Fix exponent sign printed twice in float to string conversion.
[INTERPRETER]
* BUG: Fix exponent sign printed twice in float to string conversion.
2019-10-29 09:20:41 +01:00
gambas
65d2b783fe Paint.TextHeight is a new property that returns the height of one line of text, and Paint.FontScale is now "transparent".
[GB.DRAW]
* NEW: Paint.TextHeight is a new property that returns the height of one line of text. This is not the same as Paint.Font.Height, as the device resolution is taken into account.

[GB.GTK]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.

[GB.GTK3]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.

[GB.QT4]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.

[GB.QT5]
* NEW: Paint.FontScale is now "transparent". Paint.Font.Size is not changed anymore when assigning the Paint.Font property.
* BUG: Utility windows now kept being in front of their parent window correctly.
2019-10-26 01:06:18 +02:00
gambas
f75de9a70f Fix highlighting of long lines and comments.
[GB.EVAL.HIGHLIGHT]
* BUG: Fix highlighting of long lines and comments.
2019-10-25 15:24:04 +02:00
gambas
8d8c8a71f8 Remove a useless global variable.
[INTERPRETER]
* BUG: Remove a useless global variable.
2019-10-21 09:44:52 +02:00
gambas
8c6f234cf4 Do JIT compilation after class loading. Otherwise the JIT compiler may want to load the class that triggers the compilation again.
[INTERPRETER]
* BUG: Do JIT compilation after class loading. Otherwise the JIT compiler may want to load the class that triggers the compilation again.
2019-10-12 13:06:01 +02:00
gambas
b7f2918fbd Correctly generate metadata file for events so that there is no spurious ByRef arguments anymore.
[COMPILER]
* BUG: Correctly generate metadata file for events so that there is no spurious ByRef arguments anymore.
2019-10-08 09:12:12 +02:00
gambas
e8ae38e098 Forgot to commit common header files.
[INTERPRETER]
* BUG: Forgot to commit common header files.
2019-10-07 22:04:56 +02:00
gambas
719f7967ad System.Trace is a new property that toggles the dump of the position of each executed line.
[INTERPRETER]
* NEW: Add command-line help for the '-t' option.
* NEW: The '-t' command-line option has a '--trace' long version.
* NEW: System.Trace is a new property that toggles the dump of the position of each executed line.
2019-10-05 04:03:32 +02:00
gambas
b73b47aca6 Floating-point number to string conversion is now 1.7 times faster.
[INTEPRETER]
* OPT: Floating-point number to string conversion is now 1.7 times faster.
2019-09-28 21:15:59 +02:00
gambas
28df313554 Add a '-t' option that dumps to the standard error the position of each executed line of code.
[INTERPRETER]
* NEW: Add a '-t' option that dumps to the standard error the position of each executed line of code.
2019-09-28 16:53:48 +02:00
gambas
f08ce22cdc Fix support of read-only arrays.
[INTERPRETER]
* BUG: Read-only arrays are now really read-only.

[GB.JIT]
* BUG: Support for read-only arrays.
2019-09-26 14:25:37 +02:00
gambas
7a49f039b5 Uncatched errors raised from an event handler can be ignored now.
[INTERPRETER]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.GTK]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.GTK3]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.QT4]
* NEW: Uncatched errors raised from an event handler can be ignored now.

[GB.QT5]
* NEW: Uncatched errors raised from an event handler can be ignored now.
2019-09-17 10:10:36 +02:00
gambas
225f2833da Fix again the management of the new new PROPERTY ... USE syntax.
[COMPILER]
* NEW: Don't emit debugging information for generated functions, but emit void sections for backward compatibility.
* NEW: Don't emit source file path in the debugging information.
2019-09-12 03:23:38 +02:00
gambas
133fd6e2d9 Fix again some crash when using the new PROPERTY ... USE syntax.
[COMPILER]
* BUG: Fix again some crash when using the new PROPERTY ... USE syntax.
2019-09-11 19:50:19 +02:00
gambas
51a9a1035d Fix crash when using the new PROPERTY ... USE syntax.
[COMPILER]
* BUG: Fix crash when using the new PROPERTY ... USE syntax.
2019-09-11 19:38:04 +02:00
gambas
d3fdd6fdda Error.Clear() now clears the error flag returned by the ERROR function.
[INTERPRETER]
* NEW: Error.Clear() now clears the error flag returned by the ERROR function.
2019-09-09 23:58:11 +02:00
gambas
a3b14f765b Fix the declaration of static properties using USE.
[COMPILER]
* BUG: Fix the declaration of static properties using USE.
2019-09-05 23:31:19 +02:00
gambas
234c2c690a [GB.DB]
* NEW: Add a driver API that handles debugging messages.
* NEW: Print the current date/time before any debugging message.

[GB.DB.MYSQL]
* NEW: Use the new driver API to print debugging messages.

[GB.DB.ODBC]
* NEW: Use the new driver API to print debugging messages.

[GB.DB.POSTGRESQL]
* NEW: Use the new driver API to print debugging messages.

[GB.DB.SQLITE2]
* NEW: Use the new driver API to print debugging messages.

[GB.DB.SQLITE3]
* NEW: Use the new driver API to print debugging messages.
2019-08-30 09:09:16 +02:00
gambas
56b7b9e322 Forgot a comma in the error message list, making the raise of the last error message crash.
[INTERPRETER]
* BUG: Forgot a comma in the error message list, making the raise of the last error message crash.
2019-08-24 01:57:16 +02:00
gambas
51e271f107 Fix '&/' operator.
[INTERPRETER]
* BUG: Fix '&/' operator.
2019-08-22 12:36:52 +02:00
gambas
abf4dfb110 PROPERTY...USE... is a new syntax to declare a property automatically associated with a private global variable.
[COMPILER]
* NEW: PROPERTY...USE... is a new syntax to declare a property automatically associated with a private global variable.
2019-08-22 03:13:58 +02:00
gambas
7b74fec6cc '&/' operator now automatically converts its arguments to strings.
[INTERPRETER]
* NEW: '&/' operator now automatically converts its arguments to strings.
2019-08-21 22:36:54 +02:00
gambas
411ee75e7d Fix JIT compilation when there are a lot of functions.
[INTERPRETER]
* BUG: Fix JIT compilation when there are a lot of functions.
2019-08-21 22:08:45 +02:00
gambas
4d59c6062d Fix boolean datatype management.
[GB.JIT]
* BUG: Fix boolean datatype management.
2019-08-21 01:23:12 +02:00
gambas
db50637bf4 Static class initializer are now always correctly run in the context of their component.
[INTERPRETER]
* BUG: Static class initializer are now always correctly run in the context of their component.
2019-08-03 00:13:56 +02:00
gambas
b11d422c14 Array.ReadOnly is a new property that make an array read-only. Once set, the property cannot be unset.
[INTERPRETER]
* NEW: Array.ReadOnly is a new property that make an array read-only. Once set, the property cannot be unset.
* NEW: The "Embedded array" error message has been rewritten as "Read-only array".
* NEW: Add two new standard errors: "Multidimensional array" and "Unknown class".
* NEW: Replace some specific error messages by standard errors.
2019-07-31 00:20:13 +02:00