Commit graph

397 commits

Author SHA1 Message Date
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
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
e8ae38e098 Forgot to commit common header files.
[INTERPRETER]
* BUG: Forgot to commit common header files.
2019-10-07 22:04:56 +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
f6f7f85f8b Add ByRef annotations to the ".info" files generated by the compiler.
[COMPILER]
* NEW: Add ByRef annotations to the ".info" files generated by the compiler. The name of "ByRef" method arguments is now prefixed with a '&' character.
2019-07-15 15:38:52 +02:00
gambas
9f2da35cbe Emit column position in almost all error messages.
[COMPILER]
* OPT: Some optimizations in symbol table routines.
* NEW: Emit column position in almost all error messages. It makes the compiler 2.5% slower, even with the optimizations.
2019-05-08 06:20:35 +02:00
gambas
3dd1fd493e Fix the JIT compiler: '_init' method, Lock instruction, Object datatype, and DO / REPEAT loops at the beginning of a function now work correctly.
[INTERPRETER]
* BUG: JIT compiler does not run static initializers anymore when loading a class. Otherwise bytecode can be modified before being compiled, leading to a JIT compiler crash.

[COMPILER]
* BUG: Fix LOCK subroutine meta-information.

[GB.JIT]
* NEW: Don't display abortion debugging message if there is no compilation to abort.
* BUG: Object variables are correctly managed now.
* BUG: DO...LOOP and REPEAT...UNTIL at the beginning of the function now is correctly compiled in all cases.
2019-04-04 22:58:06 +02:00
gambas
6c9df4c423 Cosmetic changes in debugger code.
[INTERPRETER]
* NEW: Cosmetic changes in debugger code.

[GB.DEBUG]
* NEW: Cosmetic changes in debugger code.
2019-03-21 23:14:22 +01:00
gambas
7c808bbba3 Define a new limit constant, that is the maximum length of the System.Language variable. It is 16 bytes.
[INTERPRETER]
* NEW: Define a new limit constant, that is the maximum length of the System.Language variable. It is 16 bytes.
2019-02-26 21:01:18 +01:00
gambas
245d3d7429 Do not add an extra decimal digit to floating point numbers, it introduces rounding errors.
[INTERPRETER]
* BUG: Do not add an extra decimal digit to floating point numbers, it introduces rounding errors.
2019-01-26 15:24:46 +01:00
gambas
912d804daa Raise the maximum number of decimal digit of a Float value to 16.
[INTERPRETER]
* NEW: Raise the maximum number of decimal digit of a Float value to 16.
2019-01-19 01:06:38 +01:00
gambas
ced4594599 Take care of components that modifiy the 'environ' variable. Using 'gb.httpd' does not crash anymore.
[INTERPRETER]
* BUG: Take care of components that modifiy the 'environ' variable. Using 'gb.httpd' does not crash anymore.
2019-01-11 15:23:50 +01:00
gambas
628aa30e54 Take the other requested GUI components into account to choose the toolkit.
[INTERPRETER]
* NEW: Add a API to know if a native component exists on the disk.

[GB.GUI]
* BUG: Take the other requested GUI components into account to choose the toolkit.

[GB.GUI.QT]
* BUG: Take the other requested GUI components into account to choose the toolkit.
2019-01-05 03:57:08 +01:00
gambas
245427b08e * Get rid of many gcc warnings. 2019-01-02 00:48:58 +01:00
gambas
d91451cf1e Assert is an new instruction that raises an error as soon as its boolean argument is FALSE.
[COMPILER]
* NEW: Assert is an new instruction that raises an error as soon as its boolean argument is FALSE. The associated bytecode is not emitted if the '-x' option is specified.

[INTERPRETER]
* NEW: Assert is an new instruction that raises an error as soon as its boolean argument is FALSE.

[GB.DEBUG]
* BUG: Fix a potential array overflow.
2018-12-16 00:35:46 +01:00
gambas
26117d0fc9 [COMPILER]
* BUG: Compiler messages are prefixed with 'gbc3:', not just 'gbc:'.
* NEW: Make loop variable errors more accurate.
2018-12-14 05:16:24 +01:00
gambas
9b77965499 Remove the date from the copyright message defined in 'gb_common.h'
[CONFIGURATION]
* NEW: Remove the date from the copyright message defined in 'gb_common.h'
2018-11-19 23:20:51 +01:00
gambas
921067cd34 The IsAlnum() function was never defined in the subroutine symbol table!
[COMPILER]
* NEW: The IsAlnum() function was never defined in the subroutine symbol table!
2018-10-16 19:31:24 +02:00
bgermann
a0e95cc0b8 Spelling: catched -> caught 2018-10-14 21:52:07 +02:00
gambas
ad8ea52b64 Don't crash after a buffered file failed to close.
[INTERPRETER]
* BUG: Don't crash after a buffered file failed to close.
2018-10-11 12:30:45 +02:00
bgermann
846c4bada9 Change __WORDSIZE definition for BSDs 2018-09-15 10:50:10 +02:00
bgermann
6e2a9d458f Unify BSD ifdefs 2018-09-09 18:26:38 +02:00
Benoît Minisini
ce37927180 Merge branch 'netbsd' into 'master'
Improve NetBSD support

See merge request gambas/gambas!37
2018-09-01 10:28:18 +00:00
gambas
a73c2ed412 Add three new color constants for syntax highlighting: Escape, Label and Constant.
[COMPILER]
* NEW: Rename a macro constant to avoid a symbol clash when compiling the interpreter.

[INTERPRETER]
* NEW: Get rid of a macro trick in 'gbx_eval.h' header.

[GB.EVAL]
* NEW: Highlight: Add three new color constants for syntax highlighting: Escape, Label and Constant.
* NEW: Rename some source files.
* NEW: Rename some constants.
* NEW: Gambas syntax highlighter now use the three new contants for escape characters in strings, for labels, and for language contants (True, False, Null, +Inf and -Inf).

[GB.EVAL.HIGHLIGHT]
* NEW: Support for the new syntax highlighting color constants.

[GB.FORM.EDITOR]
* NEW: Support for the new syntax highlighting color constants.
2018-08-31 15:58:53 +02:00
bgermann
3e6d969613 Change enum prefix that collides with statvfs 2018-08-30 13:33:13 +02:00
bgermann
b1a12236ad Convert from statfs to more portable statvfs
[INTERPRETER]
* NEW: Convert from statfs to more portable statvfs
2018-08-29 23:59:11 +02:00
gambas
0aedbe63a2 Fix an internal common string routine used by thousand separator management.
[INTERPRETER]
* BUG: Fix an internal common string routine used by thousand separator management.
2018-08-11 07:54:22 +02:00
gambas
9cf443a04f [INTERPRETER]
* BUG: Take JIT code into account when displaying current position in DEBUG instruction.

[COMPILER]
* BUG: Fix subroutine metadata.
* BUG: Fix subroutine search function.

[GB.JIT]
* BUG: Fix string referencing.
* NEW: Implement date arrays accessors.
* BUG: Fix error management.
* BUG: Fix mathematic functions implementation.
* NEW: Support of functions with a variable number of arguments.
* BUG: Fix support of Long constants.
* BUG: Fix implementation of Collection array operator.
* BUG: Fix READ, EXEC, SHELL and DEBUG instructions.
* BUG: Fix VarPtr().
* BUG: Fix TRUE constant implementation.
2018-07-02 19:37:37 +02:00
gambas
5f4f12acf3 [COMPILER]
* NEW: UNSAFE is a new keyword used in conjunction with FAST. It tells the JIT compiler not to do any safety check (null objects, division by zero, out of array bounds...). It makes the code a bit faster, but prone to segmentation fault.

[INTERPRETER]
* NEW: Support for the UNSAFE keyword.

[GB.JIT]
* NEW: Support for the UNSAFE keyword.
* NEW: Check validity of objects that can be invalid.
2018-06-29 00:10:31 +02:00
Benoît Minisini
9834cc71d9 Merge branch 'clang' into 'master'
Make compilation with clang possible

See merge request gambas/gambas!27
2018-06-19 00:07:32 +00:00
gambas
b9a83c8a10 Work continues on new JIT system.
[INTERPRETER]
* NEW: Support for error management in JIT methods.

[COMPILER]
* BUG: Fix Error() function metadata.

[GB.JIT]
* NEW: Support for error management.
* NEW: TRY instruction.
* BUG: Correct support of NULL.
2018-06-14 16:45:05 +02:00
bgermann
ff8a181667 Make compilation with clang possible
[CONFIGURATION]
* OPT: Compilation with clang is possible
2018-06-13 18:26:06 +02:00
gambas
83eed9707d Merge branch 'jit-with-c' 2018-06-13 00:45:19 +02:00
gambas
6b8afd0617 [COMPILER]
* BUG: Fix Left, Mid and Right subroutines metadata.

[GB.JIT]
* BUG: Fix function arguments management.
* BUG: Functions returning objects work correctly now.
* BUG: Fix internal control variables management.
2018-06-13 00:38:18 +02:00
Tobias Boege
d44b4bd7f2 Chmod reads mode bit string correctly
[INTERPRETER]
* BUG: Fix off-by-one error in FILE_mode_from_string which couldn't read mode bits 's' and 't'
2018-06-12 13:40:44 +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
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
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
ebd8963617 Continue working on the new jit system.
[COMPILER]
* NEW: Continue working on the new jit system.
* NEW: Initial support for arithmetic instructions.
2018-05-24 00:31:58 +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
4c38b0f5c3 RDir() now works correctly when browsing executable directories.
[INTERPRETER]
* BUG: RDir() now works correctly when browsing executable directories.
2018-03-16 14:02:58 +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
58ddc650ad Try to add some more static datatype analysis, but did not succed.
[COMPILER]
* NEW: Try to add some more static datatype analysis, but did not succed.
2018-03-03 03:14:11 +01:00
gambas
4ae717707e Forgot to commit the headers for MOD and DIV static datatype analysis.
[COMPILER]
* BUG: Forgot to commit the headers for MOD and DIV static datatype analysis.
2018-02-28 19:12:59 +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