Re: [Felix-language] Compiler

2014-09-25 Thread john skaller
On 23/09/2014, at 8:23 AM, john skaller wrote: > The new compiler organisation is based on early monomorphisation. Always some fun problem. To monomorphise stuff, for Felix things we just replace the type variables with concrete types. But what about a primitive, eg a function? To monomorphis

[Felix-language] Compiler

2014-09-22 Thread john skaller
The new compiler organisation is based on early monomorphisation. Initially I deliberately wrote the optimiser to work directly with polymorphic entities. I did this to be absolutely certain that Felix didn't make the same mistake as C++, and allow unprincipled dependent name lookup, in other word

Re: [Felix-language] compiler plugins

2013-03-13 Thread john skaller
/// // fred.cpp #include int main() { ::std::cout << "Hello World of Fred" << ::std::endl; return 0; } /// // tcxx.flx include "src/tools/toolchain_clang_config"; include "src/tools/toolchain_interface"; var toolchain-maker = Dynlink::load-pl

[Felix-language] compiler plugins

2013-03-12 Thread john skaller
I have just added (completely untested so don't use yet!): // src/tools/toolchain_interface.flx interface toolchain_t { whatami : 1 -> string; host_os : 1 -> string; target_os : 1 -> string; cxx_compiler_vendor : 1 -> string; cxx_static_object_compiler : (dst:string,src: string) -> int

[Felix-language] compiler performance

2013-03-09 Thread john skaller
flx --test=build/release --expect --indir=test/regress/rt --time --usage=prototype '--regex=.*flx' provides some insight. Note there's a bug... pkgconfig is returning a massive list of repeated include files. -- john skaller skal...@users.sourceforge.net http://felix-lang.org -

[Felix-language] compiler performance

2013-03-04 Thread john skaller
Thought I'd have a look: ~/felix>time 'build/release/bin/flxg' -q --inline=500 '--output_dir=/Users/johnskaller/.felix/cache/text' '--cache_dir=/Users/johnskaller/.felix/cache/binary' '-Ibuild/release/lib' --syntax=@grammar/grammar.files --import=plat/flx.flxh std web '/Users/johnskaller/fel

Re: [Felix-language] Compiler error

2010-10-29 Thread john skaller
On 30/10/2010, at 2:03 AM, john skaller wrote: > > In any case the problem is simple: the function has to use the unbound > symbol table to print the entry_kind. and if you look at some of the commented out debug lines: print_endline ("SUCCESS: overload chooses " ^ full_string_of_e

Re: [Felix-language] Compiler error

2010-10-29 Thread john skaller
On 30/10/2010, at 1:17 AM, john skaller wrote: > > No, I don't know which bit is failing yet, but it has narrowed it down to > something > trivial (TGFT!) Well now .. I have found the bug. It is here: let full_string_of_entry_kind bsym_table {base_sym=i; spec_vs=vs; sub_ts=ts} = let bsym =

Re: [Felix-language] Compiler error

2010-10-29 Thread john skaller
On 29/10/2010, at 6:56 PM, john skaller wrote: [] Well I said the error had to be in the actual error handling and indeed that is the case, I finally pinpointed the bug: | None -> print_endline "Overload resolution failed .."; try clierr sra ( "[lo

[Felix-language] Compiler error

2010-10-29 Thread john skaller
Well I have found the error: > private fun getcwd: &char * size -> &char = "getcwd($1,$2)"; > fun getcwd():string = { >var b: array[char,1024]; >var p = getcwd(C_hack::cast[&char] (&b),size 1024); >return if C_hack::isNULL p then "" else string p endif; > } saying: > SYSTEM FAIL