[PATCH 1/2] vm: implement VMClass.getComponentType()

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/jato.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/vm/jato.c b/vm/jato.c index 49749d2..34f453a 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -535,6 +535,22 @@ static jint

[PATCH 2/2] jit: introduce per-edge data flow resolution blocks

2009-08-08 Thread Tomek Grabiec
When resolving data flow we can not emit reload instructions at the end of a basic block. That's because the register we are reloading to might be allocated to another interval at the end of this block. Especially, it can be used in a branch instruction that ends this basic block (see

[PATCH 1/2] vm: clean up field initialization a little bit

2009-08-08 Thread Vegard Nossum
Makes the code easier to read. Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- vm/class.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/vm/class.c b/vm/class.c index 91f4ca0..8cb6ebb 100644 --- a/vm/class.c +++ b/vm/class.c @@ -266,6 +266,7 @@ int

[PATCH] vm: fix array_set_field_double()

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/object.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vm/object.h b/include/vm/object.h index 3b5a707..899e741 100644 --- a/include/vm/object.h +++ b/include/vm/object.h @@ -181,9 +181,9 @@

Re: [PATCH 2/2] jit: introduce per-edge data flow resolution blocks

2009-08-08 Thread Arthur Huillet
Hi, On Sat, 8 Aug 2009 12:43:50 +0200 Tomek Grabiec tgrab...@gmail.com wrote: When resolving data flow we can not emit reload instructions at the end of a basic block. That's because the register we are reloading to might be allocated to another interval at the end of this block.

[PATCH] vm: fix utf8_to_char_array()

2009-08-08 Thread Tomek Grabiec
This caused that for characters with codes 0x80 we skipped one byte. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- vm/utf8.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/vm/utf8.c b/vm/utf8.c index c9caf88..85355e3 100644 --- a/vm/utf8.c +++ b/vm/utf8.c

Re: [PATCH] vm: fix utf8_to_char_array()

2009-08-08 Thread Vegard Nossum
2009/8/8 Tomek Grabiec tgrab...@gmail.com: This caused that for characters with codes 0x80 we skipped one byte. Signed-off-by: Tomek Grabiec tgrab...@gmail.com I don't like this patch. We already have all our error checking in utf8_char_count() and utf8_to_char_array() assumes this. We

[PATCH 1/2] vm: print resolved method signature in bytecode disassembly

2009-08-08 Thread Tomek Grabiec
Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- include/vm/bytecodes.h |4 +++- jit/trace-jit.c|3 ++- vm/bytecodes.c | 28 +++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/include/vm/bytecodes.h b/include/vm/bytecodes.h

[PATCH 2/2] vm: fix off-by-one bug in utf8_to_char_array()

2009-08-08 Thread Tomek Grabiec
This caused incorrect loading of utf8 strings with character codes = 0x80. Signed-off-by: Tomek Grabiec tgrab...@gmail.com --- regression/jvm/StringTest.java |5 + vm/utf8.c | 10 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH 2/5] x86: define emitter for MOVSX_8_MEMBASE_REG

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- arch/x86/emit-code.c| 15 +++ arch/x86/include/arch/instruction.h |1 + arch/x86/use-def.c |1 + 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/x86/emit-code.c

[PATCH 3/5] x86: define emitter for MOVSX_16_MEMBASE_REG

2009-08-08 Thread Vegard Nossum
Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- arch/x86/emit-code.c| 15 +++ arch/x86/include/arch/instruction.h |1 + arch/x86/use-def.c |1 + 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/arch/x86/emit-code.c

[PATCH 4/5] jit: fix off-by-one in register allocator

2009-08-08 Thread Vegard Nossum
From: Arthur Huillet arthur.huil...@free.fr Signed-off-by: Vegard Nossum vegard.nos...@gmail.com --- jit/linear-scan.c |2 +- test/jit/linear-scan-test.c |9 +++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/jit/linear-scan.c b/jit/linear-scan.c index