Commit graph

1165 commits

Author SHA1 Message Date
gambas
b4d3c7612a Really correctly initialize EC register to NULL before calling a compiled fast method.
[INTERPRETER]
* BUG: Really correctly initialize EC register to NULL before calling a compiled fast method.
2018-11-29 09:10:56 +01:00
gambas
3652b82b3e Let the caller always release the function arguments.
[GB.JIT]
* BUG: Let the caller always release the function arguments.
2018-11-27 02:59:21 +01:00
gambas
baaf962ab0 JIT now handles "no return value" errors correctly.
[INTERPRETER]
* BUG: Process.Wait() now handles error output correctly.

[GB.JIT]
* BUG: Display compiler error correctly.
* BUG: Handle "no return value" errors correctly.
2018-11-24 20:00:45 +01:00
gambas
55d9d0aa2d Integer constants are correctly handled on little endian systems (arm, powerpc64...).
[INTERPRETER]
* BUG: Integer constants are correctly handled on little endian systems (arm, powerpc64...).
2018-11-20 23:11:13 +01:00
gambas
9726b53bb3 Add First and Last read-write properties to arrays.
[INTERPRETER]
* NEW: Add First and Last read-write properties to arrays.
2018-11-09 00:06:20 +01:00
gambas
ecf3410e99 Fix a crash in exception management.
[INTERPRETER]
* BUG: Fix a crash in exception management.
2018-11-07 17:21:38 +01:00
gambas
31901d72c9 Fix the LANGUAGE environment variable at startup, and add hebrew to the list of right-to-left written languages
[INTERPRETER]
* BUG: Fix the LANGUAGE environment variable at startup, not just when System.Language is set. This is a temporary fix, as you lost the contents of LANGUAGE.
* NEW: Add hebrew to the list of right-to-left written languages.
2018-11-06 18:11:51 +01:00
gambas
dcac5c2a26 Handle TRY inside JIT functions correctly.
[INTERPRETER]
* BUG: Handle TRY inside JIT functions correctly.

[GB.DEBUG]
* NEW: Add explicit messages when something fails during initialization.

[GB.JIT]
* BUG: Handle TRY correctly.
2018-11-02 21:44:40 +01:00
gambas
615ff675d2 Calling a jit function now correctly checks the number of arguments.
[INTERPRETER]
* BUG: Calling a jit function now correctly checks the number of arguments.
* BUG: Fix a panic message.
2018-10-31 01:56:35 +01:00
gambas
9aa856c3a6 Do not use __DATE__ and __TIME__ macros, they prevent reproducible builds.
[INTERPRETER]
* BUG: Do not use __DATE__ and __TIME__ macros, they prevent reproducible builds.

[COMPILER]
* BUG: Do not use __DATE__ and __TIME__ macros, they prevent reproducible builds.

[ARCHIVER]
* BUG: Do not use __DATE__ and __TIME__ macros, they prevent reproducible builds.

[INFORMER]
* BUG: Do not use __DATE__ and __TIME__ macros, they prevent reproducible builds.
2018-10-26 03:05:02 +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
gambas
31929e1e44 Overriding public variables is forbidden, and JIT compiler correctly handles public constants.
[INTERPRETER]
* NEW: Overriding public variables was useless, and is now forbidden to help JIT compiler optimizations.

[GB.JIT]
* BUG: Correctly compile dynamic accesses to public constants.
2018-10-08 16:36:38 +02:00
gambas
1f29f16e32 Fix information about native classes.
[INTERPRETER]
* BUG: Fix information about native classes.
2018-09-23 22:02:56 +02:00
gambas
737b77c387 String value can be used like object.
[INTERPRETER]
* NEW: String value can be used like object.
* NEW: String[X] returns the X-th character of the string, 0 being the first one.
* NEW: String[X, N] returns N characters from the position X, 0 being the first one. IF N is strictly negative, then all characters from the position X, except the last N characters are returned.
* NEW: String.Len returns the length of the string.

[COMPILER]
* NEW: Allow the [] operator to be applied to a string.
2018-09-23 09:15:29 +02:00
Benoît Minisini
a79edf23ed Merge branch 'bsd' into 'master'
More BSD changes

See merge request gambas/gambas!38
2018-09-21 22:55:31 +00:00
gambas
6ad1333324 Fix String.InStr() and String.RInstr() in ignore case mode, when the starting position is not specified.
[INTERPRETER]
* BUG: Fix String.InStr() and String.RInstr() in ignore case mode, when the starting position is not specified.
2018-09-14 19:17:56 +02:00
gambas
12c0ebda46 String.InStr() starting position is correctly taken into account now.
[INTERPRETER]
* BUG: String.InStr() starting position is correctly taken into account now.
2018-09-12 13:39:05 +02:00
gambas
88220d483b Let the interpreter correctly manage exceptions when calling non-JIT code from JIT code.
[INTERPRETER]
* BUG: JIT: Let the interpreter correctly manage exceptions when calling non-JIT code from JIT code.

[GB.JIT]
* BUG: Correctly initialize CP during exception handler.
2018-09-10 20:11:59 +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
2374407b4d [DEVELOPMENT ENVIRONMENT]
* NEW: Update highlighting themes by defining the new color constants.
* NEW: Update French translation.
* BUG: Option dialog: The highlighting color panel now takes the editor font size into account.

[GB.EVAL]
* BUG: Fix string highlighting.
2018-09-01 00:46:48 +02: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
1b7abb97b7 Correct 3e6d9696 2018-08-30 14:07:18 +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
bgermann
e74adab7c5 Use FreeBSD exp10() fix for all BSDs
[INTERPRETER]
* BUG: The exp10() function works on all BSDs now
2018-08-29 15:36:25 +02:00
bgermann
a3df769268 Use sys/ioctl.h instead of pty.h
pty.h is not needed because its functions are not used.
Use ioctl.h additionally to the already included termios.h to import the
implicitly used functions/constants.
2018-08-29 14:29:54 +02:00
gambas
7d16436c5c Eof() now correctly works on file bigger than 4GB opened in direct mode.
[INTERPRETER]
* BUG: Eof() now correctly works on file bigger than 4GB opened in direct mode.
2018-08-27 23:57:30 +02:00
gambas
c2b2d7d624 If an unknown symbol is called through a parent class reference, the _unknown() method is not called and an error is raised if the unknown symbol exists in the actual child class.
[INTERPRETER]
* NEW: If an unknown symbol is called through a parent class reference, the _unknown() method is not called and an error is raised if the unknown symbol exists in the actual child class.
2018-08-23 12:22:30 +02:00
gambas
706a605cc3 Correctly restore the stack after calling a method through the interpreter, and handle null values as object values having a null address automatically.
[INTERPRETER]
* NEW: Creating a NULL value now clears the object address field so that it can be freely interpreted as a Object value with a null address by the JIT compiled code.

[GB.JIT]
* BUG: Correctly restore stack after calling a method through the interpreter.
2018-08-22 09:30:27 +02:00
gambas
7492efcc0e Always load the class before accessing a static variable, as it may not be ready.
[INTERPRETER]
* BUG: FIx JIT class loading API.

[GB.JIT]
* BUG: Always load the class before accessing a static variable, as it may not be ready.
2018-08-18 15:28:19 +02:00
gambas
979e22f6e9 Correctly load classes from archives other than the main project one during JIT compilation.
[INTERPRETER]
* NEW: When creating a new class, set its component immediately if we know the archive it comes from.

[GB.JIT]
* BUG: Correctly load classes from archives other than the main project one.
2018-08-16 01:50:45 +02:00
gambas
0297c1bafa Load classes without running the _init method, so that the JIT behaviour is closer to the interpreter behaviour.
[INTERPRETER]
* NEW: Add a JIT API for loading classes without running the _init method.

[GB.JIT]
* BUG: Load classes without running the _init method, so that the JIT behaviour is closer to the interpreter behaviour.
2018-08-14 16:46:55 +02:00
gambas
0975e520db JIT: Handle function datatype by raising a type mismatch error.
[INTERPRETER]
* NEW: JIT: Add an API for throwing type mismatch errors.
* BUG: Raise a type mismatch error when converting a function to a variant. Don't panic anymore.

[GB.JIT]
* BUG: Handle function datatype by raising a type mismatch error.
2018-08-11 14:06:46 +02:00
gambas
aa33e0ddad Add a '-j' option to the interpreter that disable the JIT compiler.
[INTERPRETER]
* NEW: Add a '-j' option to the interpreter that disable the JIT compiler.
2018-08-11 07:53:02 +02:00
gambas
28b52f2de0 Val() correctly reads thousand separators again.
[INTERPRETER]
* BUG: Val() correctly reads thousand separators again.
2018-08-10 23:37:55 +02:00
gambas
4e83422f20 Fix optional arguments management.
[INTERPRETER]
* NEW: Fix panic error message again.

[GB.JIT]
* BUG: Fix optional arguments management.
2018-08-10 14:22:49 +02:00
gambas
4209cffa11 [INTERPRETER]
* NEW: Fix panic error message.

[GB.JIT]
* BUG: Load project classes before try to resolve a unknown symbol.
* BUG: Correctly restore the stack pointer in all cases at function exit.
2018-08-10 13:26:54 +02:00
gambas
f5b1c1c03b Format$ now prints the expected number of decimal digits when using exponential format.
[INTERPRETER]
* BUG: Format$ now prints the expected number of decimal digits when using exponential format.
2018-08-10 11:49:12 +02:00
gambas
7b501542a1 Fix thousand separators again.
[INTERPRETER]
* BUG: Fix thousand separators again.
2018-08-09 15:47:29 +02:00
gambas
acf401ba2d Correctly reset the stack pointer when releasing the stack in error handlers.
[INTERPRETER]
* BUG: Do not clear the 'super' field of the object value returned by NEW, as it does not fix actually anything.

[GB.JIT]
* BUG: Correctly reset the stack pointer when releasing the stack in error handlers.
2018-08-09 11:05:51 +02:00
gambas
bb34431646 Fix a crash in JIT relative to SUPER management.
[INTERPRETER]
* BUG: Clear the 'super' field of the object value returned by NEW.

[GB.JIT]
* BUG: Correctly reset EXEC_super in error catching.
2018-08-06 13:26:49 +02:00
gambas
609ef351f8 The interpreter does not crash anymore when using standard streams at the end of the program whereas they have been already freed.
[INTERPRETER]
* BUG: The interpreter does not crash anymore when using standard streams at the end of the program whereas they have been already freed.
2018-07-17 15:33:11 +02:00
gambas
e04ec717c7 JIT: Structures and static arrays have been implemented.
[INTERPRETER]
* NEW: JIT: Support for structures and static arrays.

[GB.JIT]
* NEW: Structures and static arrays have been implemented.
2018-07-07 14:54:23 +02:00
gambas
d3c93a05e4 Work on new JIT system continues.
[INTERPRETER]
* NEW: Abort if a stack mismatch is detected after a JIT function has been called.

[GB.JIT]
* NEW: The GB_JIT_CC environment variable allows to define the C compiler that will generate the code.
* OPT: Don't call the compiler through a shell anymore.
* NEW: Support for clang.
* BUG: Don't use the "," operator anymore to write JIT code.
* BUG: Correctly free stack when leaving a function whereas we are still inside a GOSUB.
* BUG: Declare all local variables and arguments as volatile as soon the function uses CATCH or FINALLY.
2018-07-05 07:10:31 +02:00
gambas
4a1c81d0aa Jit.Time is a new property that returns the time spent in JIT compilation, in seconds.
[INTERPRETER]
* NEW: Jit is a new static class that allows to deal with the JIT compiler.
* NEW: Jit.Time is a new property that returns the time spent in JIT compilation, in seconds.

[GB.JIT]
* NEW: Support for the Jit.Time property.
2018-07-03 00:52:19 +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
gambas
fe08dfa333 Work continues on new JIT system.
[INTERPRETER]
* NEW: JIT: Support for SUPER.
* NEW: JIT: Support for extern functions.
* NEW: Add a flag in Gambas functions to know if they are static or not.

[GB.JIT]
* NEW: Support for SUPER.
* NEW: Support for extern functions.
* BUG: Fix object arrays access.
* OPT: Optimization of Abs, Sgn, Int, Fix, and Pi subroutines.
2018-06-27 19:35:23 +02:00