Commit graph

1103 commits

Author SHA1 Message Date
gambas
c671adfd6b Work continues on new JIT system.
[INTERPRETER]
* OPT: String searching (Instr, RInstr and Replace) has been made about 4x faster by searching the first occurence with memchr() and memrchr().

[GB.FORM.TERMINAL]
* BUG: Fix warning messages.

[GB.JIT]
* BUG: Fix byte, short and boolean pushing and popping routines.
* BUG: Fix string values referencing.
* BUG: Fix optional argument management.
* NEW: Optimization of bits management subroutines.

[GB.QT4]
* BUG: Delay hooks initialization, because now socket notifiers must not be used before creating the event loop.

[GB.QT5]
* BUG: Delay hooks initialization, because now socket notifiers must not be used before creating the event loop.
2018-06-11 18:56:39 +02:00
gambas
4e50dec11d Work continues on new JIT system. Translation is now done at runtime.
[INTERPRETER]
* OPT: String routines are now compiled with -O3.
* NEW: Don't display JIT debugging message unless GB_JIT_DEBUG is set to something different from zero.
* NEW: String whose length is greater than 256 now have a growth step of 256 bytes instead of 16.

[GB.JIT]
* NEW: Do many global optimizations as now the class metadata is fully available.
* NEW: Support for optional argument. Still buggy at the moment.
2018-06-09 22:42:35 +02:00
gambas
23be942b6a Work continues on the new JIT system.
[BENCHMARKS]
* NEW: Little meaningless changes.

[INTERPRETER]
* NEW: JIT: Support for FOR EACH loops.
* BUG: JIT: Handle function values that are put on stack before calling them.

[COMPILER]
* NEW: JIT: Optimization of mathematic functions.
* NEW: JIT: Support for FOR EACH loops.
* NEW: JIT: Remove successive POP_x() / PUSH_x().
* NEW: JIT: Optimization of DIV and MOD.
* NEW: JIT: Support of internal control local variables used by SELECT and FOR EACH.
* NEW: JIT: Support for SWAP.

[GB.JIT]
* NEW: Optimization of mathematic functions.
* NEW: Variants management.
* NEW: All conversions are handled now.
* NEW: FOR EACH loops are implemented.
2018-06-05 11:43:39 +02:00
gambas
23081e47c6 Work continues on new JIT system. The "Fractal" example runs!
[INTERPRETER]
* NEW: Implement return value of JIT methods.
* NEW: Support for calling '.' operator from a JIT method.

[COMPILER]
* BUG: JIT: Fix detection of native arrays.
* BUG: JIT: Delete translated file if a class has no fast method anymore.
* BUG: JIT: Prefix JIT method with "jit_" to avoid possible conflicts.
* BUG: JIT: Fix variable initialization.
* NEW: JIT: Complete datatype support.
* NEW: JIT: Support for SWAP.
* NEW: JIT: Support for array operators.
* BUG: JIT: Fix arithmetic operators.
* NEW: JIT: Implement ME and "." operator.
* NEW: JIT: Complete GOSUB / RETURN support.
* NEW: JIT: Support for DIV and MOD operators. Not optimized yet.

[ARCHIVER]
* NEW: Put JIT translation in the archive.

[GB.JIT]
* NEW: Complete datatype support. Variant is not supported yet.
* NEW: Complete GOSUB / RETURN support.
* NEW: Support for ME and '.' operator.
2018-06-02 17:59:47 +02:00
gambas
1d276cdc68 Work continues on new JIT system.
[INTERPRETER]
* BUG: Release arguments after having called a JIT method.
* NEW: Add JIT interface for returning a value.

[COMPILER]
* NEW: JIT: Nicer translation for quick add of negative numbers.
2018-06-01 14:40:07 +02:00
gambas
714b77a10d Work on new JIT system continues.
[CONFIGURATION]
* NEW: Add '.jit' directory to '.gitignore'.

[COMPILER]
* NEW: New '-j' option that disables just in time compilation.
* NEW: JIT: Support for private functions calls.
* NEW: JIT: Support for native arrays accessors.
* BUG: JIT: Fix loop support.
* NEW: JIT: Support for GOSUB.

[GB.JIT]
* NEW: GB_JIT_DEBUG is an environment variable that defines if JIT compilation debugging messages are printed.
* NEW: GB_JIT_CFLAGS is an environment variable that defines the JIT compilation flags. The default is "-O3".
* NEW: Support for native arrays accessors.
2018-06-01 03:50:42 +02:00
gambas
5219fc48d1 Work continues on new JIT system.
[COMPILER]
* BUG: JIT: Fix local variable referencing.
* NEW: JIT: Implement NEW operator and array accessors.

[INTERPRETER]
* NEW: Support for JIT NEW operator and array accessors.

[GB.JIT]
* NEW: Support for object datatypes.
* NEW: Implement NEW operator and array accessors.
2018-05-29 23:25:57 +02:00
gambas
83a2452acb Continue working on new JIT system.
[COMPILER]
* NEW: JIT: Support for FOR...TO...NEXT loops.
* NEW: JIT: Support for Len(), Left$(), Mid$(), and Right$().
* NEW: JIT: Subroutines return values are now hadled correctly.

[GB.JIT]
* NEW: Compile JIT code with -O3.
2018-05-29 03:43:23 +02:00
gambas
a2b64b190a Work on new JIT system continues.
[COMPILER]
* NEW: Internal initialization functions now can be JIT translated.
* NEW: Support of subroutine calling completed. Interpreter subroutines are called if there is no optimization implemented in the JIT translation.

[INTERPRETER]
* NEW: Remove old JIT stuff.

[GB.JIT]
* NEW: Use 'gambas.h' and 'gb.jit.h' to compile translated code.
2018-05-28 03:18:44 +02:00
gambas
d797a545b6 [COMPILER]
* NEW: Work on JIT continues...
* NEW: Better panic errors.

[INTERPRETER]
* NEW: Remove the old JIT stuff.
* NEW: Calls gb.jit at runtime if needed. If a fast function has no jit implementation, the bytecode version is used.
* NEW: Start defining the JIT interface needed by the JIT functions.
* NEW: The common static character buffer is now twice the size of the maximum symbol length, to avoid possible overflows.

[GB.JIT]
* NEW: Compilation starts to work.
* NEW: Debugging messages.
2018-05-26 16:50:00 +02:00
gambas
cdc6d47922 Work continues on new JIT system.
[COMPILER]
* NEW: Work continues on new JIT system.

[INTERPRETER]
* NEW: Make comparison operator true functions so that they can be called by the JIT code.
2018-05-25 21:01:38 +02:00
gambas
dfeb4243ab Continue working on the new jit system.
[COMPILER]
* NEW: Continue working on the new jit system.
2018-05-18 02:19:28 +02:00
gambas
f39f7063ef Start working on the new jit system.
[COMPILER]
* NEW: Start working on the new jit system.

[GB.JIT]
* NEW: Rename the component as 'gb.jit.llvm'.
2018-05-17 01:13:56 +02:00
gambas
14614f4e67 Check if the "-flto" link time optimzation flag is available.
[CONFIGURATION]
* BUG: Check if the "-flto" link time optimzation flag is available.
2018-05-08 18:44:31 +02:00
gambas
43285550c6 UTF-8 string routines position cache now should behave correctly in all cases.
[INTERPRETER]
* BUG: UTF-8 string routines position cache now should behave correctly in all cases.
2018-04-20 18:26:52 +02:00
gambas
de12caa1e7 Fix conversion between dates and their local string representation.
[INTERPRETER]
* BUG: Fix conversion between dates and their local string representation.
* OPT: Little optimization in conversion functions calls.

[GB.UTIL]
* BUG: Fix Date.ToUnixTime() and Date.FromUnixTime() according to the interpreter fix.
2018-04-09 18:58:11 +02:00
gambas
f47d63100c Raise an error if a object being freed has been referenced by its '_free' special method.
[INTERPRETER]
* NEW: Add a new message error for free object being referenced.
* NEW: Raise an error if a object being freed has been referenced by its '_free' special method.
* OPT: Add a boolean flag in the class structure not to try to call the '_free' special method if there is not.
2018-03-17 23:33:02 +01:00
gambas
b517994783 Years written with a initial zero digit are not converted to years between 1931 and 2030 if lower then 100.
[INTERPRETER]
* NEW: When formatting a date, the number of 'y' is now the minimum number of digits used for displaying the date year.
* NEW: When converting a string to a date with Val(), if the year begins with a zero character, then it is not converted to years between 1931 and 2030 if it is lower than 100.
2018-03-16 01:45:32 +01:00
gambas
d6b8c451c9 Raise a more explicit "No return value" error when trying to get the return value of a task that didn't return anything.
[INTERPRETER]
* BUG: Raise a more explicit "No return value" error when trying to get the return value of a task that didn't return anything.
2018-03-14 16:59:57 +01:00
gambas
043229a013 Result.GetAll() is a new method that returns an array of the values of a specific field from each record.
[INTERPRETER]
* NEW: New API for reference a Gambas string.

[GB.DB]
* NEW: Result.GetAll() is a new method that returns an array of the values of a specific field from each record. It is about twice faster than the equivalent code written in Gambas.
2018-03-07 22:06:02 +01:00
gambas
83e95184c1 Fix the AND, OR, and XOR operator. The AND, OR, XOR and NOT operator now can take a Date, that is converted to boolean.
[INTERPRETER]
* BUG: Fix the AND, OR, and XOR operator.
* NEW: The AND, OR, XOR and NOT operator now can take a Date, that is converted to boolean.
2018-02-28 14:05:45 +01:00
gambas
a93f5b3cc2 Writing to a stream does not crash anymore if the stream is closed while the data is sent in several shots.
[INTERPRETER]
* BUG: Writing to a stream does not crash anymore if the stream is closed while the data is sent in several shots. Socket stream implementation should not close the stream while writing. I will try to fix that later.
2018-02-23 04:01:56 +01:00
gambas
6f06d516b3 Deleting a collection item while the collection is enumerated does not crash anymore.
[INTERPRETER]
* BUG: Deleting a collection item while the collection is enumerated does not crash anymore.
2018-02-20 23:00:17 +01:00
gambas
5487a3ca88 Fix a possible memory leak when using the Stream.End() method.
[INTERPRETER]
* BUG: Fix a possible memory leak when using the Stream.End() method.
2018-02-17 23:16:28 +01:00
gambas
3c8c5a2243 Fix an uninitialized flag in streams, that make watching real files from reading incorrectly raise the Read event.
[INTERPRETER]
* BUG: Fix an uninitialized flag in streams, that make watching real files from reading incorrectly raise the Read event.
2018-02-16 02:39:30 +01:00
gambas
76c314a0e6 Class.IsLoaded() is a new static method that returns if a specific class is loaded.
[INTERPRETER]
* NEW: Class.IsLoaded() is a new static method that returns if a specific class is loaded.
2018-02-14 17:41:31 +01:00
gambas
ab89976564 Don't crash when building a collection with the bracket operator if one of the value is a class.
[INTERPRETER]
* BUG: Don't crash when building a collection with the bracket operator if one of the value is a class.
2018-02-12 23:45:27 +01:00
gambas
09a0573e61 Replace my old sourceforge mail address by the new one.
[CONFIGURATION]
Replace my old sourceforge mail address by the new one.
2018-02-12 02:53:46 +01:00
gambas
17834b13a6 Don't call QUIT when terminating a task, it crashes. Just clean up the temporary directory and exit.
[INTERPRETER]
* BUG: Don't call QUIT when terminating a task, it crashes. Just clean up the temporary directory and exit.
2018-01-28 17:57:13 +01:00
gambas
477116942d Tasks do not print memory and objects clean up warnings anymore, and their output serialization file is now automatically destroyed.
[INTERPRETER]
* BUG: Remove the task output serialization file when it is freed.
* BUG: Tasks do not print memory and objects clean up warnings anymore.
2018-01-20 16:43:13 +01:00
gambas
dc9bdcfc87 When a task terminates, it now internally calls the QUIT instruction, so that everything is cleaned up.
[INTERPRETER]
* BUG: When a task terminates, it now internally calls the QUIT instruction, so that everything is cleaned up.
2018-01-19 01:56:13 +01:00
gambas
e3f941c7e2 Use a dedicated stream for locks, and ignore Application.Busy when displaying a message box.
[DEVELOPMENT ENVIRONMENT]
* OPT: Don't load the help browser form immediately to speed up IDE starting.

[INTERPRETER]
* NEW: Use a dedicated stream for locks, so that the File object returned by LOCK cannot be used for reading or writing the locked file.

[GB.GTK]
* NEW: Ignore Application.Busy when displaying a message box.

[GB.GTK3]
* NEW: Ignore Application.Busy when displaying a message box.

[GB.QT4]
* NEW: Ignore Application.Busy when displaying a message box.

[GB.QT5]
* NEW: Ignore Application.Busy when displaying a message box.
2017-12-18 13:02:39 +01:00
gambas
2bb28545a5 LOCK instruction now can be used on existing files without clearing them.
[INTEPRRETER]
* NEW: LOCK instruction now can be used on existing files without clearing them.
2017-12-17 21:21:29 +01:00
gambas
dfb179b549 Component.Version now returns the full version of libraries.
[INTERPRETER]
* NEW: Component.Version now returns the full version of libraries.
2017-11-25 06:02:46 +01:00
gambas
8bf14d2a7e New properties for knowing if a component is a user library, and for getting its version.
[INTERPRETER]
* NEW: Component.Library is a new property that returns if a component is actually a user library.
* NEW: Component.Version is a new property that returns the version number of a loaded component. If the component is a user library, you get the version number of that library. Otherwise you get the current Gambas version.
2017-11-25 05:40:12 +01:00
gambas
9519c3dc52 Implement string comparison based on MATCH operator with the gb.Match constant.
[INTERPRETER]
* NEW: gb.Match is a new constant that indicates a string comparison using the PCRE MATCH operator.
* BUG: The gb.Descent flag could be erased when sorting objects implementing the '_compare' special method.
2017-10-21 01:19:27 +02:00
gambas
b8bb7e60c1 Fix internal renaming of overridden classes, and use the '^' character instead of '>' to name them.
[INTERPRETER]
* BUG: Fix internal renaming of overridden classes, and use the '^' character instead of '>' to name them.
2017-10-12 13:48:52 +02:00
gambas
e6495bcc5b READ instruction with a negtive length argument works correctly again.
[INTERPRETER]
* BUG: READ instruction with a negtive length argument works correctly again.
2017-10-10 18:49:15 +02:00
gambas
55a1701759 Correctly attach newly created objects.
[INTERPRETER]
* BUG: Correctly attach newly created objects.
* BUG: Lof() should work correctly now on streams having a specific implementation of Lof() function.
2017-10-05 23:18:19 +02:00
gambas
6018b475b6 Oct$() is a new functions that converts an integer to its octal representation.
[COMPILER]
* NEW: Oct$() is a new functions that converts an integer to its octal representation.

[INTERPRETER]
* NEW: Oct$() is a new functions that converts an integer to its octal representation.
2017-10-05 04:11:00 +02:00
gambas
12d51ca863 New syntax for octal numbers: "&Oxxx".
[COMPILER]
* NEW: New syntax for octal numbers: "&Oxxx".

[INTERPRETER]
* NEW: New syntax for octal numbers: "&Oxxx".

[GB.EVAL]
* NEW: New syntax for octal numbers: "&Oxxx".
2017-10-05 03:17:13 +02:00
gambas
57820e6d44 Val() and Eval() now correctly read binary and hexadecimal numbers with the maximum number of digits.
[INTERPRETER]
* BUG: Val() and Eval() now correctly read binary and hexadecimal numbers with the maximum number of digits.
2017-10-05 03:01:44 +02:00
Benoît Minisini
86f8104bd4 Merge branch 'rework-stream-interface' into 'master'
Rework the interpreter stream management

See merge request gambas/gambas!15
2017-09-30 18:43:25 +00:00
gambas
6cdcb477fc Array construction operator now accepts class names as Variants.
[INTERPRETER]
* BUG: Array construction operator now accepts class names as Variants.
2017-09-29 04:14:08 +02:00
gambas
2953ea8d85 Fix error management that could lead to other potential crashes.
[INTERPRETER]
* BUG: Fix error management that could lead to other potential crashes.
2017-09-28 02:05:43 +02:00
gambas
8a30ff0ec3 Fix a crash when an error occurs inside a constructor that is called from another constructor.
[INTERPRETER]
* BUG: Fix a crash when an error occurs inside a constructor that is called from another constructor.
2017-09-28 01:20:35 +02:00
gambas
b17c977502 Fix internal stream buffer management, and STREAM_read_max() function.
[INTERPRETER]
* BUG: Fix internal stream buffer management, and STREAM_read_max() function.
2017-09-27 14:15:23 +02:00
gambas
aa67ba1309 Rework the stream interface, so that the stream read & write methods just have to actually read or write the data.
[INTERPRETER]
* NEW: Rework the stream interface, so that the stream read & write methods just have to actually read or write the data.
2017-09-27 02:48:00 +02:00
gambas
a489f435e7 gb.notify: don't crash anymore when releasing watches.
[INTERPRETER]
* NEW: Add an API that returns the first element of a hash table.

[GB.NOTIFY]
* BUG: Don't crash anymore when releasing watches.
2017-09-21 18:15:37 +02:00
gambas
82c94e87a4 Dir() does not loop indefinitely anymore when browsing an archive file with a void pattern.
[INTERPRETER]
* BUG: Dir() does not loop indefinitely anymore when browsing an archive file with a void pattern.
2017-09-09 01:31:57 +02:00