In the fractal example, if I set the GB_JIT environment variable to get 
a dump of the jit-compiled fractal computing loop, the program aborts:

gb.jit: using LLVM 3.1.
------------------------------------------------------------------------
gb.jit: beginning compiling FFractal.FastDrawFractalRect:
------------------------------------------------------------------------

------------------------------------------------------------------------
gb.jit: dumping function FFractal.FastDrawFractalRect:
------------------------------------------------------------------------
; ModuleID = 'jit_mod'
target datalayout = 
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-pc-linux-gnu"

%ValueObject = type { i8*, i8*, i8* }
%Null = type { i64 }
%Object = type { i8*, i8* }
%Float = type { i64, double }
%Integer = type { i64, i32 }
%GosubStackNode = type { i16, %Value* }
%Value = type { i64, i64, i64, i64 }
%Void = type { i64, i64, i64, i64 }
%OBJECT = type { i8*, i64 }
%ValueFunction = type { i64, i8*, i8*, i8, i8, i16 }

define void @func_0_FFractal_3() {
entry:
   %0 = load i8** inttoptr (i64 6647792 to i8**)
   tail call void @GB.NewArray(i8* inttoptr (i64 6647856 to i8*), i32 
16, i32 0)
   %1 = load i8** inttoptr (i64 6647776 to i8**)
   %2 = getelementptr i8* %1, i64 -256
   %3 = bitcast i8* %2 to %ValueObject*
   %4 = bitcast i8* %2 to %Null*
   %5 = getelementptr %Null* %4, i64 0, i32 0
   %6 = load i64* %5
   %7 = icmp eq i64 %6, 15
   %8 = getelementptr %ValueObject* %3, i64 0, i32 1
   %9 = load i8** %8
   %10 = getelementptr %ValueObject* %3, i64 0, i32 0
   %11 = load i8** %10
   %12 = insertvalue %Object undef, i8* %11, 0
   %13 = insertvalue %Object %12, i8* %9, 1
   %14 = select i1 %7, %Object { i8* inttoptr (i64 14338600 to i8*), i8* 
null }, %Object %13
   %15 = getelementptr i8* %1, i64 -224
   %16 = bitcast i8* %15 to %Float*
   %17 = getelementptr %Float* %16, i64 0, i32 1
   %18 = load double* %17
   %19 = getelementptr i8* %1, i64 -192
   %20 = bitcast i8* %19 to %Float*
   %21 = getelementptr %Float* %20, i64 0, i32 1
   %22 = load double* %21
   %23 = getelementptr i8* %1, i64 -160
   %24 = bitcast i8* %23 to %Float*
   %25 = getelementptr %Float* %24, i64 0, i32 1
   %26 = load double* %25
   %27 = getelementptr i8* %1, i64 -128
   %28 = bitcast i8* %27 to %Integer*
   %29 = getelementptr %Integer* %28, i64 0, i32 1
   %30 = load i32* %29
   %31 = getelementptr i8* %1, i64 -96
   %32 = bitcast i8* %31 to %Integer*
   %33 = getelementptr %Integer* %32, i64 0, i32 1
   %34 = load i32* %33
   %35 = getelementptr i8* %1, i64 -64
   %36 = bitcast i8* %35 to %Integer*
   %37 = getelementptr %Integer* %36, i64 0, i32 1
   %38 = load i32* %37
   %39 = getelementptr i8* %1, i64 -32
   %40 = bitcast i8* %39 to %Integer*
   %41 = getelementptr %Integer* %40, i64 0, i32 1
   %42 = load i32* %41
   %43 = load i8** inttoptr (i64 6647744 to i8**)
   %44 = load i8** inttoptr (i64 6647768 to i8**)
   %45 = getelementptr i8* %44, i64 704
   %46 = icmp eq i8* %45, %43
   br i1 %46, label %if.cont, label %if.then

if.then:                                          ; preds = %entry
   tail call void @stack_corrupted_abort()
   unreachable

if.cont:                                          ; preds = %entry
   %47 = getelementptr i8* %0, i64 241
   %48 = load i8* %47
   %49 = and i8 %48, 1
   %50 = icmp eq i8 %49, 0
   %51 = sitofp i32 %30 to double
   %52 = fmul double %51, %26
   %53 = fadd double %18, %52
   %54 = sitofp i32 %34 to double
   %55 = fmul double %54, %26
   %56 = fadd double %22, %55
   %57 = icmp slt i32 %38, 5
   %58 = icmp slt i32 %42, 5
   %or.cond = and i1 %57, %58
   br i1 %or.cond, label %if.cont265, label %if.cont18

if.cont18:                                        ; preds = %if.cont
   %59 = add i32 %38, -1
   %60 = sitofp i32 %59 to double
   %61 = fmul double %60, %26
   %62 = fadd double %53, %61
   %63 = add i32 %42, -1
   %64 = sitofp i32 %63 to double
   %65 = fmul double %64, %26
   %66 = fadd double %56, %65
   %67 = fcmp olt double %53, gbx3: APFloat.cpp :285 : void 
interpretDecimal(llvm::StringRef::iterator, llvm::StringRef::iterator, 
decimalInfo*):  L'assertion « (*p == 'e' || *p == 'E') && "Invalid 
character in significand" » a échoué.

-- 
Benoît Minisini


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to