Commit graph

672 commits

Author SHA1 Message Date
Benoît Minisini
174c2747f2 [DEVELOPMENT ENVIRONMENT]
* BUG: Fix a circular reference.

[INTERPRETER]
* BUG: Fix error handling when freeing objects.

[GB.FORM]
* BUG: Stock.Themes now correctly checks that ~/.icons exists.


git-svn-id: svn://localhost/gambas/trunk@4996 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-28 12:28:15 +00:00
Benoît Minisini
9fc6b03718 [DEVELOPMENT ENVIRONMENT]
* NEW: Each comment anywhere in the source code beginning with 'TODO:', 
  'FIXME:', or 'NOTE:' is automatically listed in a new tab named 'Tasks' 
  in the bottom debugging panel.

[INTERPRETER]
* BUG: Env[...] does not return a constant string anymore. Anyone can 
  change the environment in the background!


git-svn-id: svn://localhost/gambas/trunk@4989 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-25 19:32:57 +00:00
Benoît Minisini
6516f5670c [INTERPRETER]
* OPT: Optimized GOSUB from an idea of Emil Lenngren.


git-svn-id: svn://localhost/gambas/trunk@4979 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-22 00:04:56 +00:00
Benoît Minisini
eab59c1482 [INTERPRETER]
* BUG: Fix conversion from pointer to structure.


git-svn-id: svn://localhost/gambas/trunk@4978 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-21 22:01:50 +00:00
Benoît Minisini
938458a03e [CONFIGURATION]
* NEW: Switch to 3.2.90 version.

[DEVELOPMENT ENVIRONMENT]
* BUG: Fix automatic completion of project classes that reimplements 
  another class.

[WEB SITE MAKER]
* BUG: Fix scrolling frames on Chrome.

[INTERPRETER]
* NEW: Args and Env classes are now shortcuts for Application.Args and 
  Application.Env properties.


git-svn-id: svn://localhost/gambas/trunk@4977 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-21 20:43:10 +00:00
Benoît Minisini
4f8389e766 [INTERPRETER]
* NEW: You can convert a pointer to a static structure now. It is useful 
  when an extern function has a 'struct XXX **' argument.


git-svn-id: svn://localhost/gambas/trunk@4974 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-21 11:16:57 +00:00
Benoît Minisini
e65f738f54 [INTERPRETER]
* BUG: Really compile when FFI support is disabled!


git-svn-id: svn://localhost/gambas/trunk@4972 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-21 00:27:39 +00:00
Benoît Minisini
186bb8d5e2 [INTERPRETER]
* BUG: Make the interpreter compile when FFI has been disabled.


git-svn-id: svn://localhost/gambas/trunk@4969 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-19 19:27:28 +00:00
Benoît Minisini
db7768aaf6 [INTERPRETER]
* BUG: Fix compilation on 32 bits platforms.


git-svn-id: svn://localhost/gambas/trunk@4962 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-17 19:36:11 +00:00
Benoît Minisini
97718051b1 [DEVELOPMENT ENVIRONMENT]
* OPT: New optimizations in profile file size.
* NEW: PageUp and PageDown keys now work as expected in the project filter 
  box.

[INTERPRETER]
* NEW: Support for new profile file format.

[GB.DEBUG]
* OPT: New profile file format.

[GB.LIBXML]
* NEW: Make this component exclude gb.xml.

[GB.XML]
* NEW: Make this component exclude gb.libxml.


git-svn-id: svn://localhost/gambas/trunk@4961 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-17 16:24:48 +00:00
Benoît Minisini
1d0ebd5999 [DEVELOPMENT ENVIRONMENT]
* NEW: The project tree filter box now tries to keep the focus.
* NEW: Hitting ENTER in the project filter box opens the current selected 
  file.
* NEW: Using arrows keys in the project filter box now moves the project
  tree cursor.
* NEW: CTRL+L now sets the focus back to the project filter box.
* NEW: Hitting ESC in the project filter box now resets the filter.
* NEW: Add support for gb.gsl component in the project creation dialog.

[INTERPRETER]
* NEW: Support for floating-point constants.
* BUG: The equality operators of the _operator interface now can return -1
  when a datatype is not supported.

[GB.COMPLEX]
* NEW: Remove methods that are implemented by the _operator interface.

[GB.QT4]
* OPT: Load clipboard format list only if the clipboard has changed.

[GB.GSL]
* NEW: Matrix can be compared with real or complex numbers. The number is
  then multiplied by the identity matrix before doing the comparison.


git-svn-id: svn://localhost/gambas/trunk@4958 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-16 16:30:55 +00:00
Benoît Minisini
7c9f99fef6 [INTERPRETER]
* NEW: Add a GB.FreeStringLater() API to allow components to create a new
  string with GB.NewString(), and let the interpreter frees it later.

[GB.GSL]
* NEW: Add a ToString() method to all classes. That method takes two 
  arguments: the first one tells if number must be localized. The second 
  one tells if complex numbers and polynomials are converted to a string
  that can be sent to Eval().
* BUG: Adding a number N to a Matrix A is equivalent to adding N times the
  identity matrix.
* NEW: The '^' operator has been implemented in the Matrix class. Only A^N
  where N is an integer is valid.


git-svn-id: svn://localhost/gambas/trunk@4955 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-15 13:07:57 +00:00
Benoît Minisini
a5c174d248 [INTERPRETER]
* NEW: Any operators of the _operator interface can be optional now. But
  consequently, division by zero must be raised by the implementation.
* NEW: Implement Vector arithmetic operators.
* NEW: Rename some Matrix methods.
* NEW: Implement Polynomial arithmetic addition and substraction.
* BUG: Fix Polynomial to string conversion.
* NEW: Complex.Handle is a new property that returns the memory address of
  the underlying complex number in memory.


git-svn-id: svn://localhost/gambas/trunk@4947 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-14 15:18:22 +00:00
Benoît Minisini
df89e09b2e [INTERPRETER]
* NEW: '_operators' interface has been renamed as '_operator'.
* NEW: Arithmetic operators now can be applied on two objects with
  different classes. One at least must implement the '_operator' interface.
* NEW: Each class that implements the '_operator' interface has now an 
  automatic priority that follows the load order. When a binary operator 
  has two objects that implement two different '_operator' interface, the
  one having the highest priority is used.
* NEW: Implementing all methods in the '_operators' interface is not 
  mandatory anymore. If one method is not implemented, then it is replaced
  by a function that raises a 'Type mismatch' error.

[GB.GSL]
* NEW: Matrix arithmetic has been implemented.
* NEW: Matrix.Determinant() method.
* NEW: Matrix.Invert() method.
* NEW: Matrix.Transpose() method.
* NEW: Matrix _call special method multiplies a matrix by a vector.
* NEW: Vector <-> Array conversion.


git-svn-id: svn://localhost/gambas/trunk@4946 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-14 02:49:57 +00:00
Benoît Minisini
89d42c3d40 [INTERPRETER]
* NEW: Add a new API to create an object without calling the constructors.

[GB.CRYPT]
* BUG: Fix bad casting of strcmp() return value to boolean. The same 
  security flaw has been found in MySQL recently. See 
  http://seclists.org/oss-sec/2012/q2/493

[GB.GTK]
* BUG: Fix bad casting of strcmp() return value to boolean in the Font 
  management.

[GB.GSL]
* NEW: Matrix class built the same way as the Vector class, i.e. with the 
  ability to switch transparently between Float or Complex elements.


git-svn-id: svn://localhost/gambas/trunk@4945 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-12 23:34:14 +00:00
Benoît Minisini
6d6034e845 [INTERPRETER]
* BUG: Don't optimize the "_operators" interface when using anonymous 
  objects!


git-svn-id: svn://localhost/gambas/trunk@4944 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-11 22:03:54 +00:00
Emil Lenngren
139884adb6 [GB.JIT]
* BUG: Properly check stack overflow for GoSubs.


git-svn-id: svn://localhost/gambas/trunk@4942 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-10 23:10:13 +00:00
Benoît Minisini
c1212ac95e [INTERPRETER]
* OPT: Remove a useless test in the macro that returns the class of an 
  object.
* OPT: Some little optimization in some type checks.


git-svn-id: svn://localhost/gambas/trunk@4939 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-10 19:57:43 +00:00
Benoît Minisini
1d86ebecb1 [INTERPRETER]
* BUG: Fix '_operators' interface negation handling.


git-svn-id: svn://localhost/gambas/trunk@4935 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-10 15:20:46 +00:00
Benoît Minisini
55e313b8f5 [INTERPRETER]
* NEW: Put every '_operators' interface related methods in the same source 
  file.

[GB.GSL]
* NEW: Polynomial _call() special method now is a synonymous of its Eval() 
  method. That way, you can write 'P(X)' to get the value of P(X).


git-svn-id: svn://localhost/gambas/trunk@4933 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-10 14:35:17 +00:00
Benoît Minisini
a9fbd40cd8 [INTERPRETER]
* NEW: Implement the ^ operator in the '_operators' interface.

[GB.COMPLEX]
* NEW: Implement the ^ operator.

[GB.GSL]
* NEW: Implement the ^ operator in the Complex class.


git-svn-id: svn://localhost/gambas/trunk@4931 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-10 02:37:39 +00:00
Benoît Minisini
a3966cf195 [DEVELOPMENT ENVIRONMENT]
* BUG: Array of classes exported by a component are now correctly handled
  by the component interface analyzer.

[INTERPRETER]
* BUG: The _operators interface now correctly takes into account the
  "Float - Object" case.

[GB.GSL]
* NEW: Redesign of the Polynomial class. Now it implements a polynomial 
  that can switch between real and complex coefficients transparently.
* NEW: The ComplexPolynomial class has been removed.


git-svn-id: svn://localhost/gambas/trunk@4929 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-10 00:13:00 +00:00
Benoît Minisini
9a46cc0486 [INTERPRETER]
* NEW: Temporary hack in the GB.New() API so that we can pass a number of 
  arguments in some cases.

[GB.COMPLEX]
* OPT: Do not create complex objects during arithmetic operations when we 
  are sure that we can reuse a temporary one. That trick can be used in any
  '_operators' interface.


git-svn-id: svn://localhost/gambas/trunk@4925 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-09 17:10:21 +00:00
Benoît Minisini
fa552f69c1 [DEVELOPMENT ENVIRONMENT]
* NEW: New gb.complex component

[INTERPRETER]
* BUG: Automatic array conversion now works with not yet loaded array 
  classes.

[GB.COMPLEX]
* NEW: New component that implements a rudimentary management of complex 
  numbers. This component is automatically loaded if a complex number
  constant is encountered and no loaded component can already handle 
  complex numbers.


git-svn-id: svn://localhost/gambas/trunk@4924 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-09 15:37:42 +00:00
Benoît Minisini
2402db91f0 [INTERPRETER]
* NEW: Support for imaginary number syntax. For example, using "3i" will 
  automatically load the gb.gsl component, create the corresponding complex 
  number and return it.

[COMPILER]
* NEW: Support for imaginary number syntax.

[GB.EVAL]
* NEW: Support for imaginary number syntax.

[GB.GSL]
* NEW: Support for imaginary number syntax.
* NEW: Vector class is now generic, and has two child classes: FloatVector 
  and ComplexVector, depending on the type of its elements.
* BUG: Support for arithmetic operators on Vector class has been removed. 
  It had too many problems.


git-svn-id: svn://localhost/gambas/trunk@4918 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 23:23:24 +00:00
Benoît Minisini
fc1c1e5531 [INTERPRETER]
* NEW: When converting an instance of A to the class B, try the conversion 
  interface of A first. If A has no conversion interface, or if it cannot 
  handle the B class, then try the conversion interface of B if any.

[GB.GSL]
* NEW: Vector class has been implemented.

[GB.JIT]
* NEW: SPEC_CONVERT constant has been replaced by a field in the CLASS 
  structure.


git-svn-id: svn://localhost/gambas/trunk@4916 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 20:08:43 +00:00
Emil Lenngren
ad81cf629a [GB.JIT]
* NEW: Use VALUE_convert instead of VALUE_convert_object.


git-svn-id: svn://localhost/gambas/trunk@4914 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 18:59:10 +00:00
Benoît Minisini
ef37065297 [INTERPRETER]
* BUG: Correctly raise an error when trying to use NULL on classes 
  implementing the _operators interface.
* NEW: The _convert interface now must handle conversions from any 
  datatype.

[GB.GSL]
* NEW: Automatic conversion from numbers to Complex.
* NEW: Start implementating the Vector class.


git-svn-id: svn://localhost/gambas/trunk@4913 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 16:55:35 +00:00
Benoît Minisini
64505bbb0b [INTERPRETER]
* BUG: Abs() and the negation operator on a null object implementing the 
  '_operators' interface does not crash anymore, and correctly raises an 
  error now.


git-svn-id: svn://localhost/gambas/trunk@4912 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 16:23:40 +00:00
Emil Lenngren
393decb5e1 [GB.JIT]
* NEW: Implement _unknown.
* BUG: Remove some warnings.

[INTERPRETER]
* BUG: Fix exception handling for JIT functions.


git-svn-id: svn://localhost/gambas/trunk@4909 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 14:53:23 +00:00
Benoît Minisini
7bd330aa00 [INTERPRETER]
* NEW: "_operators" is a new interface that allows any native class to be
  used with most of arithmetic operators: +, -, *, /, Abs, =, <> at the 
  moment.
* NEW: The "_convert" interface now allows a class to be converted to any
  datatype, not just other classes.
* NEW: Str() and Print uses the "_convert" interface to print a localized
  string conversion of any object.

[GB.GSL]
* NEW: Use the new "_operators" interface so that complex numbers can be 
  handled by standard arithmetic operators.
* NEW: The Complex class now implements the "_convert" interface.


git-svn-id: svn://localhost/gambas/trunk@4908 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 14:35:58 +00:00
Benoît Minisini
2c631a0874 [INTERPRETER]
* BUG: Do not leak memory if the _unknown method raised an error.


git-svn-id: svn://localhost/gambas/trunk@4907 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 14:29:44 +00:00
Benoît Minisini
a903da98f2 [INTERPRETER]
* BUG: Correctly read unknown properties.


git-svn-id: svn://localhost/gambas/trunk@4906 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-08 13:27:56 +00:00
Benoît Minisini
fa67280e7a [INTERPRETER]
* NEW: Static unknown properties can be used in a dynamic context now.


git-svn-id: svn://localhost/gambas/trunk@4897 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-04 22:06:19 +00:00
Benoît Minisini
6fd31cfe59 [INTERPRETER]
* BUG: Now the _property special method can be static even if _unknown is 
  dynamic. Anyway, if _unknown is static then all unknown properties and 
  methods must be static, and if _unknown is dynamic, they all must be 
  dynamic.


git-svn-id: svn://localhost/gambas/trunk@4896 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-04 21:59:16 +00:00
Benoît Minisini
6b6ca7654d [INTERPRETER]
* BUG: Allows the _unknown method to be static.


git-svn-id: svn://localhost/gambas/trunk@4894 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-03 23:45:09 +00:00
Benoît Minisini
307e7d396f [INTERPRETER]
* BUG: Raise the Kill event of a Process after having closed its I/O 
  streams.

[GB.DEBUG]
* NEW: Debug.GetSignal() is a new method that returns the description of a 
  signal from its numeric value.


git-svn-id: svn://localhost/gambas/trunk@4892 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-03 18:21:54 +00:00
Benoît Minisini
02eb02cd4f [INTERPRETER]
* BUG: Reading an unknown property does not crash anymore if _unknown is 
  defined but not _property.


git-svn-id: svn://localhost/gambas/trunk@4891 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-03 17:41:36 +00:00
Emil Lenngren
76e3dee4d0 [GB.JIT]
* NEW: Can now profile each line of code, but beware: profiling makes the program much much slower.

[GB.DEBUG]
* OPT: Now DEBUG_calc_line_from_position has logaritmic time complexity instead of linear. That makes profiling each line much faster for large functions!


git-svn-id: svn://localhost/gambas/trunk@4886 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-07-02 22:38:29 +00:00
Benoît Minisini
7a126b76e3 [INTERPRETER]
* NEW: Always put a space between international currency symbol and amount
  when formatting a currency.


git-svn-id: svn://localhost/gambas/trunk@4871 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-28 23:38:26 +00:00
Benoît Minisini
50681dead1 [INTERPRETER]
* BUG: Fix Format$() when using "AM/PM" just after a date formatting 
  character.


git-svn-id: svn://localhost/gambas/trunk@4870 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-28 23:09:10 +00:00
Benoît Minisini
6c54a66760 [INTERPRETER]
* BUG: Correctly release or keep the return value of a function when 
  destructors are called during epilogue.


git-svn-id: svn://localhost/gambas/trunk@4863 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-27 01:14:05 +00:00
Benoît Minisini
be77f4a2fa [INTERPRETER]
* BUG: Add a check to not create array classes when reimplementing or 
  inheriting native array classes. Hope that check is not wrong...


git-svn-id: svn://localhost/gambas/trunk@4856 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-24 18:41:57 +00:00
Emil Lenngren
1ee80f7683 [INTERPRETER]
* BUG: Correctly load the "npvar" field for Gambas functions.



git-svn-id: svn://localhost/gambas/trunk@4852 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-20 17:12:58 +00:00
Emil Lenngren
856af1cd45 [GB.JIT]
* NEW: Partially support callbacks for extern functions. You can only convert functions in the current class to pointers 
currently, i.e. functions that are referenced directly by their name.



git-svn-id: svn://localhost/gambas/trunk@4851 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-19 22:08:59 +00:00
Emil Lenngren
dba2bf91ac [GB.JIT]
* BUG: Fix extern function overriding.

[COMPILER]
* BUG: Write correct disassembly for PUSH INTEGER.



git-svn-id: svn://localhost/gambas/trunk@4850 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-19 21:23:49 +00:00
Benoît Minisini
b98a33c671 [INTERPRETER]
* BUG: If there is an error, wake up the debugger on the current stack 
  position. Return to the last encountered line break after, not before.


git-svn-id: svn://localhost/gambas/trunk@4841 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-17 09:12:31 +00:00
Emil Lenngren
c59b33e1bb [GB.JIT]
* BUG: Fixed some bugs.

[INTERPRETER]
* BUG: "Read ... As String"  now correctly returns a void string instead of null, if it read an empty string.



git-svn-id: svn://localhost/gambas/trunk@4839 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-16 23:45:57 +00:00
Emil Lenngren
56807e5b52 [GB.JIT]
* NEW: "Extern" functions should now work hopefully, but callbacks are still not yet implemented.
* BUG: Fix conversion Class -> Variant for non-virtual classes.
* BUG: Some minor bug fixes.

[INTERPRETER]
* BUG: Load classes from JIT should work better now.



git-svn-id: svn://localhost/gambas/trunk@4831 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-15 01:27:31 +00:00
Benoît Minisini
64fef6f598 [DEVELOPMENT ENVIRONMENT]
* BUG: If the project is read-only, the profile file is stored in the 
  process temporary directory in /tmp instead of the project directory.
* NEW: The name of profile files now follows this scheme: '.N.prof', where
  'N' is an index incremented each time the project is run.
* BUG: Toolbars and popup-menus are correctly updated at first load form
  text, source and form editors.
* BUG: Do not show or hide toolbars buttons outside of the toolbar 
  'Configure' event.

[INTERPRETER]
* NEW: The '-p' option now takes the profile file path as argument.

[GB.DEBUG]
* NEW: The profile file path can be specified on the command line.

[GB.FORM.MDI]
* NEW: Configured toolbars are drawn with a red frame.

[GB.GTK]
* BUG: Remove warnings displayed by the Control Raise() and Lower() 
  methods.
* BUG: Draw.Style methods now are correctly clipped.


git-svn-id: svn://localhost/gambas/trunk@4820 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2012-06-10 14:58:45 +00:00