mate.git
12 years agomain: remove PoC code
Bernhard Urban [Sun, 8 Apr 2012 18:22:15 +0000 (20:22 +0200)]
main: remove PoC code

12 years agocodegen: patch method calls on-demand via traps
Bernhard Urban [Sun, 8 Apr 2012 18:21:56 +0000 (20:21 +0200)]
codegen: patch method calls on-demand via traps

we can determine the source of an invalid memory access via unix signal
handling. to do so, we write
 > mov (Addr 0) eax    ; 0x8905 0000 0000
which tries to access memory at address 0. upon first execution of this
instruction the signalhandler is called. there, we replace it with
 > nop                 ; 0x90
 > call <target>       ; 0xe8 YYYY YYYY  ; Y = target

at the moment, this just works with Fib.fib() (or other recursive methods)
as the <target> address is more or less hardcoded.

several TODOs:
- determine address of target method in a different way
- after a call, we have to throw away arguments of the call.
  this is hardcoded now.

12 years agocodegen: execute generated code
Bernhard Urban [Sat, 7 Apr 2012 01:44:22 +0000 (03:44 +0200)]
codegen: execute generated code

woot! :-)  looks good

12 years agocodegen: use label mechanism of harpy
Bernhard Urban [Sat, 7 Apr 2012 01:44:21 +0000 (03:44 +0200)]
codegen: use label mechanism of harpy

more convenient than manual patching

12 years agobasicblock: change order of `TwoTarget'
Bernhard Urban [Sat, 7 Apr 2012 01:44:21 +0000 (03:44 +0200)]
basicblock: change order of `TwoTarget'

12 years agobasicblock: also generate BB #0 when it's labeld with `Nothing' (BBEnd)
Bernhard Urban [Sat, 7 Apr 2012 01:44:21 +0000 (03:44 +0200)]
basicblock: also generate BB #0 when it's labeld with `Nothing' (BBEnd)

12 years agocodegen: simple code generation stuff
Bernhard Urban [Tue, 3 Apr 2012 22:49:00 +0000 (00:49 +0200)]
codegen: simple code generation stuff

generated code isn't tested yet

12 years agobasicblock: remove warning
Bernhard Urban [Tue, 3 Apr 2012 22:49:00 +0000 (00:49 +0200)]
basicblock: remove warning

it can happen now ;-)

12 years agobasicblock: refactor function interface
Bernhard Urban [Tue, 3 Apr 2012 22:49:00 +0000 (00:49 +0200)]
basicblock: refactor function interface

12 years agobasicblock: build BBs from instructionstream
Bernhard Urban [Mon, 2 Apr 2012 23:32:26 +0000 (01:32 +0200)]
basicblock: build BBs from instructionstream

12 years agobasicblock: get jump offsets from instructions
Bernhard Urban [Mon, 2 Apr 2012 19:40:00 +0000 (21:40 +0200)]
basicblock: get jump offsets from instructions

12 years agobasicblock: calculate offset in instructionstream
Bernhard Urban [Mon, 2 Apr 2012 19:40:00 +0000 (21:40 +0200)]
basicblock: calculate offset in instructionstream

12 years agosrc: move files into a Mate package
Bernhard Urban [Mon, 2 Apr 2012 19:40:00 +0000 (21:40 +0200)]
src: move files into a Mate package

hence, ghc(i) is able to figuring out the correct path

12 years agoMakefile: generate tags (for vim)
Bernhard Urban [Mon, 2 Apr 2012 19:40:00 +0000 (21:40 +0200)]
Makefile: generate tags (for vim)

12 years agoREADME: more install instructions
Bernhard Urban [Mon, 2 Apr 2012 00:15:28 +0000 (02:15 +0200)]
README: more install instructions

12 years agotests: add class with {do-,}while keyword
Bernhard Urban [Mon, 2 Apr 2012 00:00:49 +0000 (02:00 +0200)]
tests: add class with {do-,}while keyword

... which unfortunately fails to parse due to a bug in hs-java.

the bogus instructions are goto and if<cond>, which hs-java
misses to parse their immediate values from the instructionstream.

fix:
$ git clone git@wien.tomnetworks.com:hs-java.git || git clone git://wien.tomnetworks.com/hs-java.git
$ cd hs-java; cabal configure; cabal build; cabal install

12 years agobasicblock: put \n between instructions
Bernhard Urban [Mon, 2 Apr 2012 00:00:49 +0000 (02:00 +0200)]
basicblock: put \n between instructions

12 years agoMakefile: build all class files in tests/
Bernhard Urban [Mon, 2 Apr 2012 00:00:48 +0000 (02:00 +0200)]
Makefile: build all class files in tests/

12 years agocompile: use relative call
Bernhard Urban [Mon, 2 Apr 2012 00:00:48 +0000 (02:00 +0200)]
compile: use relative call

we have to calculate the offset, but it's cheaper than a register call

12 years agodoc: some related papers
Bernhard Urban [Mon, 2 Apr 2012 00:00:48 +0000 (02:00 +0200)]
doc: some related papers

12 years agofixed broken Makefile (sry - forgot to check Makefile), added RegisterAllocation...
Harald Steinlechner [Tue, 27 Mar 2012 20:22:51 +0000 (22:22 +0200)]
fixed broken Makefile (sry - forgot to check Makefile), added RegisterAllocation playground

12 years agoUtilities, BasicBlock into src folder, BasicBlock sketching
Harald Steinlechner [Tue, 27 Mar 2012 20:13:42 +0000 (22:13 +0200)]
Utilities, BasicBlock into src folder, BasicBlock sketching

12 years agoMate.hs now uses lately introduced Utilities lookupMethod
Harald Steinlechner [Tue, 27 Mar 2012 19:07:59 +0000 (21:07 +0200)]
Mate.hs now uses lately introduced Utilities lookupMethod

12 years agomoved lookupMethod into separate Utilities file. added BasicBlocks playground
Harald Steinlechner [Tue, 27 Mar 2012 19:06:56 +0000 (21:06 +0200)]
moved lookupMethod into separate Utilities file. added BasicBlocks playground

12 years agoMerge branch 'master' of wien.tomnetworks.com:mate
Harald Steinlechner [Thu, 22 Mar 2012 15:44:25 +0000 (16:44 +0100)]
Merge branch 'master' of wien.tomnetworks.com:mate

12 years agodoc: fixed english grammar mistakes (an on demand manner, analyses is plural of analysis)
Harald Steinlechner [Thu, 22 Mar 2012 15:41:55 +0000 (16:41 +0100)]
doc: fixed english grammar mistakes (an on demand manner, analyses is plural of analysis)

12 years agodoc: fixed englisch grammar mistakes (an on demand manner, analyses is plural of...
Harald Steinlechner [Thu, 22 Mar 2012 15:41:55 +0000 (16:41 +0100)]
doc: fixed englisch grammar mistakes (an on demand manner, analyses is plural of analysis)

12 years agodoc: README
Bernhard Urban [Wed, 21 Mar 2012 14:40:39 +0000 (15:40 +0100)]
doc: README

12 years agodoc: added TODO
Harald Steinlechner [Wed, 21 Mar 2012 14:09:50 +0000 (15:09 +0100)]
doc: added TODO

12 years agotrapping code: transition from native to haskell rts PoC
Bernhard Urban [Sun, 18 Mar 2012 04:19:43 +0000 (05:19 +0100)]
trapping code: transition from native to haskell rts

12 years agopatching existing code
Bernhard Urban [Sat, 17 Mar 2012 22:10:52 +0000 (23:10 +0100)]
patching existing code

12 years agoplaying around with generated codebuffers
Bernhard Urban [Sat, 17 Mar 2012 20:20:39 +0000 (21:20 +0100)]
playing around with generated codebuffers

be aware, generated code doesn't make sense yet ;-)

12 years agomate: Initial commit
Bernhard Urban [Thu, 15 Mar 2012 21:27:16 +0000 (22:27 +0100)]
mate: Initial commit