Re: [Gambas-user] [Gambas Bug Tracker] Bug #1041: [JIT] Doing : Return [2/8] , I get "Type Mismatch ..."

2016-11-30 Thread Emil Lenngren
Seems like the implicit conversion from Float[] to Integer[] fails (2/8 performs float calculation)... 2016-11-30 23:42 GMT+01:00 : > http://gambaswiki.org/bugtracker/edit?object=BUG.1041&from=L21haW4- > > Zainudin AHMAD added an attachment: > > Bug-jit-ArrayInteger-0.0.1.tar.gz > > > > -

Re: [Gambas-user] [Gambas Bug Tracker] Bug #950: Can't compile gb.jit with 3.5.0 version, segmentation fault and gb.xml.rpc not found

2016-06-09 Thread Emil Lenngren
I actually never tried the jit on arm, only on x86(_64). LLVM is supposed to be cross-platform but I guess there are differences that need to be taken care of. 2016-06-09 20:00 GMT+02:00 : > http://gambaswiki.org/bugtracker/edit?object=BUG.950&from=L21haW4- > > Comment #8 by Frigo 2010: > > Have

Re: [Gambas-user] [Gambas Bug Tracker] Bug #846: Fast routines raise error: Wanted Float[] got Integer[] instead

2015-11-25 Thread Emil Lenngren
Where is the source code for GBrubik? 2015-11-26 0:32 GMT+01:00 : > http://gambaswiki.org/bugtracker/edit?object=BUG.846&from=L21haW4- > > Comment #2 by Jussi LAHTINEN: > > Try the rubik cube (GBrubik). > > 1. Open modMotor3D module. > 2. Add Fast to get "Fast Public Sub fRotateVector()". > 3. Ru

Re: [Gambas-user] [Gambas Bug Tracker] Bug #833: Application.Dir returns rubbish when just-in-time compilation is enabled

2015-11-10 Thread Emil Lenngren
I think GB_STATIC_PROPERTY_READ("Dir", "i", Application_Dir) should be GB_STATIC_PROPERTY_READ("Dir", "s", Application_Dir) :) /Emil 2015-10-31 4:45 GMT+01:00 : > http://gambaswiki.org/bugtracker/edit?object=BUG.833&from=L21haW4- > > Benoît MINISINI changed the state of the bug to: Accepted. >

Re: [Gambas-user] [Gambas Bug Tracker] Bug #835: gambas3 doesn't build with llvm > 3.5

2015-11-10 Thread Emil Lenngren
It's quite bad the LLVM team dropped the old jit... I haven''t really looked into it but it might not be that hard to port it to the new MCJIT (see http://blog.llvm.org/2013/07/using-mcjit-with-kaleidoscope-tutorial.html). Hopefully the API for generating the code instructions are the same and they

Re: [Gambas-user] Pre-release of Gambas 3.7 (2)

2015-03-10 Thread Emil Lenngren
Sigh... Why did they remove the old jit... I'll try to see how easy or hard it is to port it to their MCJIT. /Emil Den 11 mar 2015 00:18 skrev "Benoît Minisini" : > Le 11/03/2015 00:03, Jussi Lahtinen a écrit : > >> Exactly. Only Emil can confirm, as I don't have enough knowledge about > >> that

Re: [Gambas-user] JIT and IDE

2014-12-13 Thread Emil Lenngren
Can you send a screenshot of how the error message looks like in the ide? Den 13 dec 2014 19:31 skrev "Jussi Lahtinen" : > Hi! > Is it possible to have bit better integration with JIT and IDE? > Now when you try to run project with JIT enabled, you may not get line > number of offending code, only

Re: [Gambas-user] JIT bug with complex string substitutions

2014-10-31 Thread Emil Lenngren
Hi. There was a problem with the IIf function. If you had two strings as the last two arguments, but one of them was a string constant, but not the other, it failed. I fixed this in the latest revision. /Emil 2014-10-12 21:11 GMT+02:00 Emil Lenngren : > Hi. I'll check. > > /Emi

Re: [Gambas-user] gb.jit crash

2014-10-31 Thread Emil Lenngren
And this is done in the function JR_object_cast in gb_runtime.c, which is called from jitted code when objects are converted to other object types. 2014-10-31 21:55 GMT+01:00 Emil Lenngren : > The problem is the signature of the _convert functions in the classes. > Before they were

Re: [Gambas-user] gb.jit crash

2014-10-31 Thread Emil Lenngren
: > Le 31/10/2014 21:40, Emil Lenngren a écrit : > > Hi! > > Actually this will also fail: > > > > Dim a As Integer[] > > a = ["1"] > > > > The problem is with the "new" _convert mechanism, introduced in > > http://sourceforge.n

Re: [Gambas-user] gb.jit crash

2014-10-31 Thread Emil Lenngren
Hi! Actually this will also fail: Dim a As Integer[] a = ["1"] The problem is with the "new" _convert mechanism, introduced in http://sourceforge.net/p/gambas/code/4908/. The JIT code expects the older API, which therefore crash... I haven't found out how much refactor needs to be done to support

Re: [Gambas-user] JIT bug with complex string substitutions

2014-10-12 Thread Emil Lenngren
Hi. I'll check. /Emil Den 12 okt 2014 21:09 skrev "Jussi Lahtinen" : > Thanks to unnecessary complexness of Finnish language and my lack of > ideas, I have written some monster lines with nested Substs. JIT doesn't > seem to like them. > I isolated the problem to simplest possible (unusable) case

Re: [Gambas-user] Segmentation fault (11)

2014-05-29 Thread Emil Lenngren
Hm, could you provide a backtrace (from gdb) if it is the JIT that segfaults? 2014-05-30 0:25 GMT+02:00 Tobias Boege : > On Fri, 30 May 2014, Jussi Lahtinen wrote: > > According to documentation, debugging information is enabled by default. > > If not it should be enough to recompile just the in

Re: [Gambas-user] Feature request: Array.Frequency

2014-05-18 Thread Emil Lenngren
gt; Dim iFrequency As Integer > > For i = 0 To avValues.Length - 1 > If avValues[i] = vValue Then > Inc iFrequency > Endif > Next > > Return iFrequency > > End > > > > 2014-05-18 14:50 GMT+02:00 Emil Lenngren : > > > For be

Re: [Gambas-user] Feature request: Array.Frequency

2014-05-18 Thread Emil Lenngren
For best performance, loop over index from 0 to length-1 instead of using the For Each construct. 2014-05-18 14:43 GMT+02:00 Benoît Minisini : > Le 18/05/2014 13:44, Patrik Karlsson a écrit : > > I'm converting a Java app of mine to Gambas and I could not find any > > equivalent to Java's Collec

Re: [Gambas-user] JIT problem

2014-05-14 Thread Emil Lenngren
05-14 16:03 GMT+02:00 Benoît Minisini : > Le 14/05/2014 15:54, Emil Lenngren a écrit : > > Can someone print a gambas disassembly of a gambas file (and source code) > > where this happens? > > gbc -v File.class > > will compile the file and print the disassembly if I re

Re: [Gambas-user] JIT problem

2014-05-14 Thread Emil Lenngren
Can someone print a gambas disassembly of a gambas file (and source code) where this happens? gbc -v File.class will compile the file and print the disassembly if I remember correctly. 2014-05-14 15:50 GMT+02:00 Roki : > Hi Jussi! If you find a solution to this problem, please Share with us. > I

Re: [Gambas-user] Long C routine

2014-01-30 Thread Emil Lenngren
How does your Gambas source code for the test look like? For the best speed when using JIT (Fast), you could try to use one-dimensional embedded arrays (http://gambasdoc.org/help/cat/arraydecl?v3) But then they must be fixed-sized... /Emil 2014-01-31 Jussi Lahtinen > Did you make pre-run for J

Re: [Gambas-user] build JIT ?

2013-11-17 Thread Emil Lenngren
Hi. It should be possible with a distro version. However, you might have to change the configuration file for gb.jit and run autoconf. If you look at the file list of the distro llvm package, you should be able to figure out where the library is located. Den 17 nov 2013 10:06 skrev "wally" : > Hel

Re: [Gambas-user] LLVM for Gambas

2013-09-21 Thread Emil Lenngren
Hi Jussi. What is the error message when you use g++? /Emil 2013/9/21 Jussi Lahtinen > > Download 3.1 from Sourceforge and unpack to wherever you want - I used > > david/llvm. Then create > > a "build" folder within "llvm". > > Then from this "build" folder: > > > > ../configure --prefix=/usr

Re: [Gambas-user] Screen Shots of GambOS

2013-02-07 Thread Emil Lenngren
Cool ;) 2013/2/7 John > Here are a few screen shots of GambOS as it is now, enjoy. > > John > > http://www.flickr.com/photos/mynetbookos/8453527047/ > http://www.flickr.com/photos/mynetbookos/8453527177/ > http://www.flickr.com/photos/mynetbookos/8453527287/ > http://www.flickr.com/photos/mynetb

Re: [Gambas-user] Len function not correct?

2012-12-31 Thread Emil Lenngren
The Len function counts the number of bytes in the string. Strings are always in UTF-8, so é is two bytes. String.Len counts the number of characters. 2012/12/31 Johny Provoost > Thank you, that's working. > > Johny > > Op 31-12-12 12:28, M. Cs. schreef: > > Use String.Len() instead if you plan

Re: [Gambas-user] Error in rev. #5473

2012-12-29 Thread Emil Lenngren
Ah, smart ;) 2012/12/30 Benoît Minisini > Le 30/12/2012 03:18, Emil Lenngren a écrit : > > What's the point to be able to convert pointers to strings (take the > > numerical value of the pointer)? > > If I would like a string representation of a pointer I would

Re: [Gambas-user] Error in rev. #5473

2012-12-29 Thread Emil Lenngren
What's the point to be able to convert pointers to strings (take the numerical value of the pointer)? If I would like a string representation of a pointer I would at least want it in hexadecimal form. But I also think most people that convert pointers to strings want to get the string out of a char

Re: [Gambas-user] LLVM compilation error

2012-12-21 Thread Emil Lenngren
Gah.. In the trunk it's called Attribute, and in version 3.2, it's called Attributes... 2012/12/19 Benoît Minisini > Le 19/12/2012 16:04, Emil Lenngren a écrit : > > Let's wait until tomorrow. Who knows if they re-rename it again in the > last > > minutes? ;) &g

Re: [Gambas-user] RaspberryPi

2012-12-20 Thread Emil Lenngren
I use distcc to compile faster on my Raspberry Pi. It works good. 2012/12/20, Mike Crean : > Hi John, > > I have had my Pi for a while > now and admit I have not used it much. > I downloaded the wheezy image with GB3 > (3.2.1) from > > http://dl.dropbox.com/u/97096067/2012-07-15-wheezy-gambas3.zip

Re: [Gambas-user] LLVM compilation error

2012-12-19 Thread Emil Lenngren
Let's wait until tomorrow. Who knows if they re-rename it again in the last minutes? ;) /Emil 2012/12/19 Tobias Boege > On Tue, 18 Dec 2012, Tobias Boege wrote: > > Hi Emil, > > > > Hans gave me some output from his gb.jit compilation attempt: > > > > --8<--- > > > > make[4]: Betret

Re: [Gambas-user] gb.jit can't be compiled

2012-12-18 Thread Emil Lenngren
errors when compiling on debian sid (with llvm-3.2~rc3.1 > > packages) : > > > > In jit_gambas_pass.cpp line 28 and jit.h line 36 : change > > /llvm/Support/IRBuilder.h to /llvm/IRBuilder.h > > > > In jit_codegen.cpp, line 3617 and line 3668 : change llvm:Attri

Re: [Gambas-user] gb.jit can't be compiled

2012-12-18 Thread Emil Lenngren
debian sid (with llvm-3.2~rc3.1 > packages) : > > In jit_gambas_pass.cpp line 28 and jit.h line 36 : change > /llvm/Support/IRBuilder.h to /llvm/IRBuilder.h > > In jit_codegen.cpp, line 3617 and line 3668 : change llvm:Attribute > to llvm::Attributes > > Regards

Re: [Gambas-user] RaspberryPi

2012-12-17 Thread Emil Lenngren
I compiled from source, that worked fine. Maybe there are binary packages for armhf now, they didn't exist when I tested... /Emil 2012/12/17 John Rose > Could anyone tell me what the best method of installing Gambas3 on a > RaspberryPi is? When I get my RaspberryPi, I assuming that it will ha

Re: [Gambas-user] llvm compiling - how to (your millage may vary)

2012-11-27 Thread Emil Lenngren
Nice tutorial, but just a little note: you do not need Clang for gb.jit ;) /Emil 2012/11/27 The Phantomgraph };8> > Hey All, > > I run Ubuntu 11.10 and I was able to get llvm compiled and > subsequently Gambas 3-3.3.3 with the gb.jit component. I did have a > lot of trouble, mostly figuring out

Re: [Gambas-user] gb.jit can't be compiled

2012-11-26 Thread Emil Lenngren
So there is no llvm package for openSuse that installs the dynamic libraries? It's easy to link to static libraries by changing the configure.ac file. However, at least I think it's difficult to make the configure.ac file to work for all linux distributions... The best thing might be to first chec

Re: [Gambas-user] gb.jit can't be compiled

2012-11-25 Thread Emil Lenngren
It's a pity that almost all linux distributions put the llvm libs in different places. Also, some distributions use the static library, and some of them use a dynamic library. Can you see where your package manager has installed the llvm files? /Emil 2012/11/25 Matti > Didn't care about this c

Re: [Gambas-user] Bugs with conversion functions

2012-11-03 Thread Emil Lenngren
It's the same in VB. If you run CInt("some string") you get the same error message. I think it's better to throw an error message rather than returning 0 or something... /Emil 2012/11/3 Jussi Lahtinen > > First, a void string has never been a number. > > > > Yes, but, why "Type mismatch: wanted

Re: [Gambas-user] error compiling gb.jit

2012-10-14 Thread Emil Lenngren
Lambda functions feature detection would be better... 2012/10/14 Laurent Carlier > Le dimanche 14 octobre 2012 14:20:00 Emil Lenngren a écrit : > > Ian, you are correct. You need at least gcc 4.5 or newer. > > > > /Emil > > > > This macro could help: > h

Re: [Gambas-user] error compiling gb.jit

2012-10-14 Thread Emil Lenngren
Ian, you are correct. You need at least gcc 4.5 or newer. /Emil 2012/10/14 Bruce > On Sun, 2012-10-14 at 19:11 +1100, Ian Haywood wrote: > > Sorry didn't see previous e-mail. Downloading a new compiler now... > > > > Hello > > > > I am trying to compile gambas 3.3.3 on Debian wheezy > > I have

Re: [Gambas-user] Gambas3 3.3.3 error compiling jit

2012-10-12 Thread Emil Lenngren
You probably have a too old version of GCC. Ubuntu 10.04 is like two and a half years old ;) /Emil 2012/10/11 Pino Zollo > On Ubuntu > > > Version 10.04 Lucid > Kernel 2.6.32-43-generic-pae > GNOME 2.30.2 > > Error compiling jit > > Attached the output of > > (./reconf-all && ./configure --disa

Re: [Gambas-user] Array slicing - how is it done in Gambas?

2012-10-10 Thread Emil Lenngren
Still, it's not a real "slice" in the sense that it points to the original array, but a deep copy that may take some time to create. In for example the Go language, you can create a slice that "points" to the original array with different offsets and lengths. 2012/10/10 RICHARD WALKER > That's t

Re: [Gambas-user] Array slicing - how is it done in Gambas?

2012-10-10 Thread Emil Lenngren
Sorry to disappoint you, but there is no way (yet) to slice an array. You can do slicing on strings, with Left, Right and Mid. For example: Dim str1 As String Dim str2 As String str1 = "hello there" str2 = Mid(str1, 2, 4) ' will point to the same string but with the length 4 and offset 2. Print st

Re: [Gambas-user] gb.jit ... gb.mime - 2

2012-10-07 Thread Emil Lenngren
What "prefix" did you use for llvm? Please read the README file in the gb.jit directory for how to compile llvm. /Emil 2012/10/1 Pino Zollo > I have installed LLVM 3.1 fron sources but I still get: > > | > || Unable to find file: libLLVM-3.1.so > || gb.jit is disabled > || > > > by the way the

Re: [Gambas-user] R: Unending cycle "For...Next" with variable As Byte

2012-09-30 Thread Emil Lenngren
It is the same in almost all languages. unsigned char i; for(i=0; i<255; i++){} and unsigned int i; for(i=0; i<4294967295U; i++){} in C will never terminate. In Gambas, Dim i As Integer For i = 0 To 2147483647 Next will not terminate either. You might think that because you say the range 0 To X,

Re: [Gambas-user] 2D arrays

2012-09-05 Thread Emil Lenngren
You cannot access array elements with the "Array" type. That is just a base class with no _get method. If you have an unknown array type you must first cast the array to an object, or to the "real" type. Read more about this here: http://code.google.com/p/gambas/issues/detail?id=175 ;) /Emil 2012

Re: [Gambas-user] Code Reviews

2012-08-29 Thread Emil Lenngren
2012/8/29 Tobias Boege > > Maybe I'm too young to be conservative, but isn't sending patches and > discussion just what the gambas-devel mailing list is for? User comments go > to gambas-user. My mail programs perform well; why bring a second tool in? > I can't see how it could make things better

Re: [Gambas-user] Extern declaration question

2012-08-20 Thread Emil Lenngren
I hope that the real signature is void serialPrintf (int fd, *const* char *message, ...) because extern functions are not allowed to manipulate gambas strings. /Emil 2012/8/20 Benoît Minisini > Le 20/08/2012 11:05, wally a écrit : > > How should i declare this function of a shared libray in gam

Re: [Gambas-user] Check on entered number having more than 6 digits not working

2012-08-13 Thread Emil Lenngren
A 64-bit floating point value use to have about 14-15 correct digits. /Emil 2012/8/13 nando > That's perfectly fine. > Let me offer this plan of attack. > Test if it is between -90 and +90 > multiply by 1,000,000 into an INTEGER > which chops all decimal digits to the right of the decimal point

Re: [Gambas-user] gb.jit component on other than intel-cpu ?

2012-08-12 Thread Emil Lenngren
I tried to run it on the raspberry pi. LLVM seemed to crash or produce illegal code or something... I will check further when I have time. /Emil 2012/8/12 wally > Hello, > > does it make sense to build and use gb.jit component on > other than Intel CPUs ? > e.g. ARM , Raspberry etc. > > wally >

Re: [Gambas-user] GT2_10.1 Ubuntu ARM

2012-08-10 Thread Emil Lenngren
2012/8/10 John Spikowski > > I'm curious, was the Raspberry Pi Gambas3 binary distribution built with > a cross compiler (on Intel/AMD Linux) or native under Ubuntu ARM on the > Pi? > > There is not a single "the gambas3 binary distribution", but one for each distro. I think most of them are cross

Re: [Gambas-user] Gambas 3 Ubuntu ARMv7

2012-08-09 Thread Emil Lenngren
It worked without problems on Raspbian, as all the auto* tools are available through apt-get. /Emil 2012/8/9 John Spikowski > On Wed, 2012-08-08 at 22:10 -0700, John Spikowski wrote: > > On Wed, 2012-08-08 at 21:29 -0700, John Spikowski wrote: > > > Is there a Gambas 3 ARM binary package availa

Re: [Gambas-user] My Raspberry Pi has arrived!

2012-08-08 Thread Emil Lenngren
-08 at 21:40 +0200, Benoît Minisini wrote: > > Le 08/08/2012 21:39, Emil Lenngren a écrit : > > > Yay, the IDE works too, and it is actually faster than I expected. I > think > > > it is not "sluggish" at all! > > > It is just that most of the IDE wind

Re: [Gambas-user] My Raspberry Pi has arrived!

2012-08-08 Thread Emil Lenngren
Yay, the IDE works too, and it is actually faster than I expected. I think it is not "sluggish" at all! It is just that most of the IDE windows are a bit too large for my 720x576 tv... 2012/8/8 Emil Lenngren > I finally managed to compile the main components (compiler/interpreter)

Re: [Gambas-user] My Raspberry Pi has arrived!

2012-08-08 Thread Emil Lenngren
I finally managed to compile the main components (compiler/interpreter) and run the benchmark "primes" (takes 430 seconds, compared to 20 seconds for standard x86). What I don't like is the reconf-scripts. Even for components that take ~10 seconds to compile, I first have to run the ./reconf scrip

Re: [Gambas-user] Adding values to fields in SQLite table??

2012-08-07 Thread Emil Lenngren
with the first column to see if it works, > which it doesn't. > > Tried your suggestion: > $hConn.Exec("INSERT INTO inventory VALUES($1)", txtName.Text) > > Values are still not inserting. > > > > On Wed, 2012-08-08 at 00:31 +0200, Emil Lenngren wrote: &g

Re: [Gambas-user] Adding values to fields in SQLite table??

2012-08-07 Thread Emil Lenngren
Try $hConn.Begin $hConn.Exec("INSERT INTO inventory VALUES(&1)", txtName.Text) $hConn.Commit Do you only have one column in that table? 2012/8/8 rocko > Ok I tried this: > $hConn.Begin > $hConn.Exec("INSERT INTO inventory VALUES(name)", txtName.Text) > $hConn.Commit > > Without suc

Re: [Gambas-user] Raspberry Pi

2012-08-07 Thread Emil Lenngren
I tried to install http://tomv.home.xs4all.nl/raspberry/gambas3_3.1.1-1_armel.deb on Raspbian but I got "package architecture (armel) does not match system (armhf)". When I tried with "--force-architecture", I got a lot of dependency errors, but the files were installed. Running "gambas3" prints: "

Re: [Gambas-user] Using DEBUG to print to console in "compiled" applications

2012-08-06 Thread Emil Lenngren
g means to enable debugging information. a means to recompile everything. Omitting a means only compile files that have new changes. 2012/8/6 RICHARD WALKER > Perfect! That's the one. I don't think I have ever seen that checkbox > before. It must. > > I'm not sure what those cryptic commands do

Re: [Gambas-user] Issue 297 in gambas: square bracket and LIKE

2012-08-06 Thread Emil Lenngren
What exactly are you trying to do? Using Like/Regexp is probably much slower than anything else. /Emil 2012/8/6 > > Comment #3 on issue 297 by kokok...@gmail.com: square bracket and LIKE > http://code.google.com/p/gambas/issues/detail?id=297 > > Thanks, changing the pattern using a="/music/albu

Re: [Gambas-user] Gambas has Gosub now!

2012-08-05 Thread Emil Lenngren
As Integer With [1] For i = 1 To 2 GoSub lbl Next End With Return lbl: Error.Raise("Hello") Catch Print "catching";; Error.Text Return End 2012/7/23 Benoît Minisini > Le 23/07/2012 01:14, Emil Lenngren a écrit : > > It was

Re: [Gambas-user] Time Format in 00:00:00 (Two digits)

2012-08-05 Thread Emil Lenngren
Try Dim TimeS As String = Format$(Now, "hh:nn:ss") Read more at: http://gambasdoc.org/help/lang/userformat?v3 /Emil 2012/8/5 abbat > > > Dim TimeS as String = Hour(Now) & ":" & Minute(Now) & ":" & Second(Now) > > We get a string like "9:8:4" > But

Re: [Gambas-user] JIT bug 7

2012-08-04 Thread Emil Lenngren
OK, it should work now. 2012/7/28 Emil Lenngren > Can't really do anything right now. I am in Venice now on Vacation :) > I come home in 8 days or something. > > If you want, you can post the llvm output, gdb stacktrace or whatever... > > /Emil > > 2012/7/2

Re: [Gambas-user] Declaring external C libraries

2012-08-04 Thread Emil Lenngren
Does somebody have a compiled version of Gambas for the Raspberry Pi? (I don't have time to compile my own...) /Emil 2012/8/4 Christer Johansson > > > Pardon me for butting in, but I wonder if you have tried a Gambas > > short (16 bits). > > > > The last time I can recall seeing a byte or chara

Re: [Gambas-user] VB to Gambas conversion question

2012-07-28 Thread Emil Lenngren
You should write "Dim t As New Float[25]" instead of "Dim t[25] As Float" if you don't have special reasons. /Emil 2012/7/28 wally > Thank you very much. > > so if i use > VB: ReDim t#(0 To 25) > GB: Dim t[25] as Float > > VB: If (i < 10) Then t(I) = 0# > GB: If(i < 10) then t[i

Re: [Gambas-user] JIT bug 7

2012-07-28 Thread Emil Lenngren
Can't really do anything right now. I am in Venice now on Vacation :) I come home in 8 days or something. If you want, you can post the llvm output, gdb stacktrace or whatever... /Emil 2012/7/28 Jussi Lahtinen > Before continuing my vacation again in countryside... > Here is some JIT bug. See

Re: [Gambas-user] Gambas has Gosub now!

2012-07-22 Thread Emil Lenngren
It was this line I was worried about: while (SP > (BP + FP->n_local + FP->n_ctrl)) /Emil 2012/7/23 Benoît Minisini > Le 23/07/2012 00:47, Emil Lenngren a écrit : > > Does exception handling with Catch work as I stated before? > > > > I am at a hotel in Vienna wit

Re: [Gambas-user] Gambas has Gosub now!

2012-07-22 Thread Emil Lenngren
Does exception handling with Catch work as I stated before? I am at a hotel in Vienna with Wi-Fi now so I can't test it right now :) /Emil 2012/7/22 Benoît Minisini > Le 09/07/2012 00:46, Emil Lenngren a écrit : > > Just store it inside a T_POINTER? > > val->ty

Re: [Gambas-user] JIT bug 5

2012-07-10 Thread Emil Lenngren
Fixed in the latest revision! Gambas should have a real unit test system... /Emil 2012/7/10 Jussi Lahtinen > OK, see attachment. > > Jussi > > > > On 10 July 2012 22:30, Jussi Lahtinen wrote: > > > Strange, this crash occurs on somewhere in initialization sub of my > > project which worked wi

Re: [Gambas-user] xml.save() (Adrien Prokopowicz)

2012-07-10 Thread Emil Lenngren
if a menu exists? (Beno?t Minisini) >2. Re: How to determine if a menu exists? (Bruce) >3. ComboBox.List.Insert( Array as String[]) used as a Sub (Bruce) >4. Menu.Group property??? (Bruce) >5. Re: JIT bug 4 (Emil Lenngren) >6. Re: Menu.Group property??

Re: [Gambas-user] JIT bug 6 :-)

2012-07-10 Thread Emil Lenngren
Yes I know... I sent a bug report to llvm May 21: http://llvm.org/bugs/show_bug.cgi?id=12906 They haven't done anything about it yet :/ As a workaround, you can run LANG=en GB_JIT=info gbx3 /Emil 2012/7/10 Benoît Minisini > In the fractal example, i

Re: [Gambas-user] JIT bug 4

2012-07-10 Thread Emil Lenngren
Yes, "0.6 ^ x" was the culprit alone ;) 2012/7/10 Emil Lenngren > Because if you only write "x = 0.6 ^ x", that statement is completely > optimized away, because x is never used later on. > If you write "Print 0.6 ^ x", the result of the operation is

Re: [Gambas-user] JIT bug 4

2012-07-10 Thread Emil Lenngren
rint 0.36". /Emil 2012/7/10 Jussi Lahtinen > Yes it works now. > But "Print 0.6 ^ x" did crash, but "x = 0.6 ^ x" alone did not crash > ("imMatr[10, 10] += x" was needed)! > So I wonder was "0.6 ^ x" culprit alone? > > Jussi > > >

Re: [Gambas-user] JIT bug 4

2012-07-10 Thread Emil Lenngren
It should work now in revision #4934! /Emil 2012/7/9 Emil Lenngren > From gdb I disassemble the jit function to this: > ... >0x77e3f05c: movabs $0x0,%rax >0x77e3f066: callq *%rax > ... > > You can see that llvm replaced the llvm.powi.f

Re: [Gambas-user] JIT bug 4

2012-07-09 Thread Emil Lenngren
>From gdb I disassemble the jit function to this: ... 0x77e3f05c: movabs $0x0,%rax 0x77e3f066: callq *%rax ... You can see that llvm replaced the llvm.powi.f64 to a null function :/ 2012/7/9 Emil Lenngren > Public Sub Button1_Click() > test(19) > En

Re: [Gambas-user] JIT bug 4

2012-07-09 Thread Emil Lenngren
Public Sub Button1_Click() test(19) End Fast Private Sub test(x As Integer) Print 0.6 ^ x End Does this crash for you as well? I think there is a bug in llvm or something. It doesn't seem to like that I call llvm.powi.f64. I shall see what I can do about it ... /Emil 2012/7/9 Jussi Lahti

Re: [Gambas-user] Building gb.gsl on Arch Linux

2012-07-08 Thread Emil Lenngren
I have the same problem on Gentoo. || || Unable to met pkg-config requirement: libgsl || Unable to met pkg-config requirement: libgslcblas || However, I could still do a make and sudo make install. /Emil 2012/7/9 Adrien Prokopowicz > Hi, > > I noticed that I could'nt build gb.gsl on archlinu

Re: [Gambas-user] Gambas has Gosub now!

2012-07-08 Thread Emil Lenngren
Just store it inside a T_POINTER? val->type = T_POINTER; val->_pointer.value = PC; Or whatever big enough datatype that doesn't do anything on RELEASE. 2012/7/9 Benoît Minisini > Le 09/07/2012 00:13, Emil Lenngren a écrit : > > I have a little optimization idea: > > &

Re: [Gambas-user] Gambas has Gosub now!

2012-07-08 Thread Emil Lenngren
aches PP, so that is fine. It is also possible to completely remove the function STACK_free_gosub_stack. Can this be a good idea? /Emil 2012/3/7 Kevin Fishburne > On 03/05/2012 09:00 PM, Benoît Minisini wrote: > > Le 06/03/2012 02:11, Emil Lenngren a écrit : > >> Yeah, if

Re: [Gambas-user] gb3: using array of structures with dimensions unknown until runtime

2012-07-04 Thread Emil Lenngren
As Benoît says, Dim Normals As New Tile_Normals[TileGrid.Size, TileGrid.Size] only gives an array where you can store references to Tile_Normals. You also have to do: Dim I As Integer Dim J As Integer For I = 0 To TileGrid.Size - 1 For J = 0 To TileGrid.Size - 1 Normals[I, J] = New Tile_Norm

Re: [Gambas-user] gb3: using array of structures with dimensions unknown until runtime

2012-07-04 Thread Emil Lenngren
When you are declaring the array by writing A[3] As Single you declare an inline array, i.e. NOT a reference to an array. So you cannot write ThatStruct.A = AnArray. Instead you have to copy the contents from AnArray into A. 2012/7/4 Kevin Fishburne > On 07/04/2012 12:06 AM, Kevin Fishburne wrot

Re: [Gambas-user] IDE Form Editor Blinking

2012-07-02 Thread Emil Lenngren
Yes, you are correct. My computer has an Intel i7 processor :) /Emil 2012/7/3 Adrien Prokopowicz > Le lundi 2 juillet 2012 23:09:31 Emil Lenngren a écrit : > > It uses no CPU on my computer... > > > > 2012/7/2 Benoît Minisini > > > > > Le 02/07/20

Re: [Gambas-user] IDE Form Editor Blinking

2012-07-02 Thread Emil Lenngren
It uses no CPU on my computer... 2012/7/2 Benoît Minisini > Le 02/07/2012 22:33, Adrien Prokopowicz a écrit : > > Le lundi 2 juillet 2012 19:31:35 Benoît Minisini a écrit : > >> Le 02/07/2012 07:20, Benoît Minisini a écrit : > >>> Le 02/07/2012 00:41, Adrien Prokopowicz a écrit : > Hi, > >>

Re: [Gambas-user] revision 4879 from svn - error !

2012-07-01 Thread Emil Lenngren
Does it work in revision #4880? /Emil 2012/7/2 Ru Vuott > Hello, > > I tried update my Gambas3 with revision 4879 from svn, but I obtained an > error (usual...): > > *** > jit_gambas_pass.cpp:28:28: fatal error: llvm/IRBuilder.h: No such file or > directory > compilation terminated. > make[4]:

Re: [Gambas-user] Bug with JIT and external functions

2012-06-26 Thread Emil Lenngren
%36 > br i1 %38, label %if.cont9, label %if.then8 > > if.then8: ; preds = %if.cont7 > tail call void @stack_corrupted_abort() > unreachable > > if.cont9: ; preds = %if.cont7 > store i64 0, i64* getelem

Re: [Gambas-user] Bug with JIT and external functions

2012-06-26 Thread Emil Lenngren
omething broke!!". > But if I add 'Return', under Message("Everything works!"), or I remove > 'Fast' then everything works as expected. > > See attachment. > > Gambas 3 rev 4860 @ Xubuntu 12.04 64bit > > Jussi > > > > > On 2

Re: [Gambas-user] Signal #11 when overriding Variant[] - Bug revived?

2012-06-26 Thread Emil Lenngren
If you use the JIT compiler, you can override native classes with classes written in Gambas, but not override classes written in gambas with a native one. I hope that makes sense.. /Emil 2012/6/24 Benoît Minisini > Le 24/06/2012 20:46, tobi a écrit : > > > > Alright, works. > > I wonder how a b

Re: [Gambas-user] Fwd: Debian install

2012-06-20 Thread Emil Lenngren
You can test the 3.0 version of LLVM and see if it works. When I used the 3.0 version from Ubuntu repository, I got errors. But try it out! /Emil 2012/6/20 Willy Raets > On do, 2012-06-14 at 19:07 +0300, Demosthenes Koptsis wrote: > > i did not incude the libs for > > > > jit > > gstreamer > >

Re: [Gambas-user] Bug with JIT and external functions

2012-06-20 Thread Emil Lenngren
roblem with argument counting. > > Jussi > > > > > > On 20 June 2012 19:14, Emil Lenngren wrote: > > > Tomorrow I will travel away for a week so I cannot do anything then, but > > just keep sending emails and I will reply when I come home :) > > > > /E

Re: [Gambas-user] Bug with JIT and external functions

2012-06-20 Thread Emil Lenngren
Tomorrow I will travel away for a week so I cannot do anything then, but just keep sending emails and I will reply when I come home :) /Emil 2012/6/20 Jussi Lahtinen > So far everything seems to work! > I'll continue further testing later. > > Jussi > > > > On 20 J

Re: [Gambas-user] Bug with JIT and external functions

2012-06-19 Thread Emil Lenngren
Is revision #4851 useful for you? You can now convert functions in the current running class to pointers. /Emil 2012/6/19 Emil Lenngren > It should work in the latest revision :) > > > 2012/6/19 Emil Lenngren > >> If you want a quick workaround, you can have non-fast met

Re: [Gambas-user] Bug with JIT and external functions

2012-06-19 Thread Emil Lenngren
It should work in the latest revision :) 2012/6/19 Emil Lenngren > If you want a quick workaround, you can have non-fast method that creates > a callback, and immediately returns it, like: > > Private Function GenerateCallback() As Pointer > Return CallbackFunction > En

Re: [Gambas-user] Bug with JIT and external functions

2012-06-19 Thread Emil Lenngren
> My project has about 120 000 lines of code. And I try JIT with every module > and class of it. > So I think I will find more bugs... But in some point I must wait support > for callbacks to finish that. > > Jussi > > > > On 19 June 2012 21:58, Emil Lenngren wrote: &

Re: [Gambas-user] Bug with JIT and external functions

2012-06-19 Thread Emil Lenngren
9 June 2012 21:02, Jussi Lahtinen wrote: > > > Yes, it works now! > > > > Jussi > > > > > > > > > > On 18 June 2012 22:34, Emil Lenngren wrote: > > > >> Does it work in revision #4847? > >> > >> /Emil > >>

Re: [Gambas-user] Bug with JIT and external functions

2012-06-18 Thread Emil Lenngren
gen.cpp:6490 > #17 0x7fffedcadc64 in JIT_compile_and_execute () at jit_compile.cpp:119 > #18 0x0040a2fb in EXEC_jit_function_loop () at gbx_exec.c:871 > #19 0x0040ab22 in EXEC_function_real () at gbx_exec.c:862 > #20 0x00000041e86d in raise_event (observer=, >

Re: [Gambas-user] Bug with JIT and external functions

2012-06-18 Thread Emil Lenngren
:GlobalValue*, void*): > > Assertion `(CurVal == 0 || Addr == 0) && "GlobalMapping already > > established!"' failed. > > > > I'm out of time, but as soon as I have time I try to isolate code causing > > the problem. > > > > Jussi > >

Re: [Gambas-user] How do I override an Array class?

2012-06-18 Thread Emil Lenngren
You don't need to call alloca(). Simply use something like this: CLASS *her[get_the_size()]; It is valid in C99. 2012/6/18 Benoît Minisini > Le 18/06/2012 14:32, Emil Lenngren a écrit : > > Even if most projects don't need more than depth 16, there might be > some &

Re: [Gambas-user] How do I override an Array class?

2012-06-18 Thread Emil Lenngren
Haha lol. I looked up the class hierarchy for LLVM, which is a quite large project, and the longest chain had 9 classes. /Emil 2012/6/18 Bruce > On Mon, 2012-06-18 at 14:32 +0200, Emil Lenngren wrote: > > Even if most projects don't need more than depth 16, there might be some

Re: [Gambas-user] How do I override an Array class?

2012-06-18 Thread Emil Lenngren
t class is at, then declare a variable-size array (directly on the stack, not with malloc) with the depth as size, then fill it with all parents. /Emil 2012/6/18 Benoît Minisini > Le 18/06/2012 13:24, Emil Lenngren a écrit : > > What is the real reason for limiting inheritance to max 16

Re: [Gambas-user] How do I override an Array class?

2012-06-18 Thread Emil Lenngren
What is the real reason for limiting inheritance to max 16 levels? I see no problem having no limit at all. /Emil 2012/6/18 Bruce > On Sun, 2012-06-17 at 18:06 +0200, Emil Lenngren wrote: > > Instead of overriding, why not simply create a module that does things > with > >

Re: [Gambas-user] Bug with JIT and external functions

2012-06-17 Thread Emil Lenngren
This seems not to be related to compare method, so just ignore name of the > attached project. > I will look it more closely when this is fixed. > > Jussi > > > > > On 17 June 2012 19:01, Emil Lenngren wrote: > > > Yes, it works now :) > > > > 2012/6

Re: [Gambas-user] How do I override an Array class?

2012-06-17 Thread Emil Lenngren
Instead of overriding, why not simply create a module that does things with your array instead? Instead of Public Function Decode(ivar as String[], pattern as Integer[]) as Variant[] in some new array-class, you can simply have Public Function Decode(array As Variant[], ivar as String[], pattern

Re: [Gambas-user] Bug with JIT and external functions

2012-06-17 Thread Emil Lenngren
Yes, it works now :) 2012/6/17 Benoît Minisini > Le 17/06/2012 02:54, Jussi Lahtinen a écrit : > > Yeah, terminal gives other position... > > With my actual project, I got error message; wanted string, got > > blaablaaClass instead. > > And that error message comes from function (from other modu

Re: [Gambas-user] Bug with JIT and external functions

2012-06-16 Thread Emil Lenngren
project I had similar error messages from modules > where extern is used. > Also the error message is pretty misleading as it points to the line I > copy&pasted. > > I will investigate more... > > Jussi > > > > > On 17 June 2012 03:23, Emil Lenngren wrote: &g

  1   2   3   >