Joel Dice
50eb1cbb71
peek at stack values during bounds checks
2008-04-19 16:13:57 -06:00
Joel Dice
eb77687a57
hello, world
2008-04-19 15:52:45 -06:00
Joel Dice
7b8b7a7b11
snapshot
2008-04-19 14:41:31 -06:00
Joel Dice
b19c52b501
control flow bugfixes
2008-04-19 01:03:59 -06:00
Joel Dice
ab7314e526
more bugfixes
2008-04-18 18:19:45 -06:00
Joel Dice
44b3a7c36d
various bugfixes
2008-04-17 22:16:20 -06:00
Joel Dice
a7134a2cd7
fix build
2008-04-17 16:07:32 -06:00
Joel Dice
df4a56d40c
Merge branch 'compiler' of oss.readytalk.com:/var/local/git/avian
2008-04-16 11:16:36 -06:00
Joel Dice
479c48f1dd
fix printf warning
2008-04-15 23:26:58 -06:00
Joel Dice
525f733171
Merge branch 'master' into compiler
...
Conflicts:
src/compile.cpp
src/compiler.cpp
src/compiler.h
2008-04-13 13:48:20 -06:00
Joel Dice
0d3e6b7793
simplify memory allocation interfaces
2008-04-13 12:15:04 -06:00
Joel Dice
85712d183b
fix stack walking from native methods
2008-04-11 18:06:04 -06:00
Joel Dice
aa9cb5c086
fix windows build
2008-04-11 17:01:17 -06:00
Joel Dice
f7a79f4874
fix frame object map size calculations
2008-04-11 15:00:18 -06:00
Joel Dice
bd618a51f6
translate exception handler table into a form which does not depend on the constant pool after JIT compiling a method
2008-04-11 13:03:40 -06:00
Joel Dice
2cf62a5926
various bugfixes in new stack trace code
2008-04-10 17:48:28 -06:00
Joel Dice
2d6eebf4d1
more progress on general stack tracing
2008-04-09 13:08:13 -06:00
Joel Dice
3fb90fdaa4
limit scope of lock acquisition in compileMethod2
2008-04-07 18:03:58 -06:00
Joel Dice
2c18ced808
use methodForIp in SegFaultHandler::handleSignal
2008-04-07 17:51:32 -06:00
Joel Dice
7ee29d4939
progress towards general stack trace support
2008-04-07 17:47:41 -06:00
Joel Dice
4102c97be3
fix bugs wrt calling methods via JNI
2008-04-01 11:37:59 -06:00
Joel Dice
9fe2cbff43
implement l2d and l2f byte codes
2008-03-20 18:37:58 -06:00
Joel Dice
a51c4cef39
bugfixes
2008-03-16 13:38:43 -06:00
Joel Dice
684b402e82
bugfixes and new instructions
2008-03-15 17:54:20 -06:00
Joel Dice
6bf0ca5bd9
various bugfixes and new instructions
2008-03-15 14:24:04 -06:00
Joel Dice
406f173982
handle constant array lengths and indexes properly; various bugfixes
2008-03-13 14:50:56 -06:00
Joel Dice
7cd79736c2
fix tracking of stack operations in compile.cpp
2008-03-11 10:57:35 -06:00
Joel Dice
9e2e614a15
various fixes to get invokevirtual working
2008-03-10 16:37:21 -06:00
Joel Dice
11dea0ad8e
don't bother calling methods which are known do nothing
2008-03-10 07:28:21 -06:00
Joel Dice
7cfb89bd2a
Merge branch 'master' into compiler
2008-03-09 11:31:55 -06:00
Joel Dice
9fe00836f7
fix stack mapping code to do as many passes as necessary
...
Previously, we had been doing exactly two passes over the event log to
caculate the stack object reference map at each trace point. It turns
out the correct number of passes depends on how many incorrect
assumptions we make about what the stack looks like at instructions with
multiple predecessors (i.e. targets of jumps and branches).
Each time we detect we've made one or more incorrect assumptions during
a pass, we must do another pass to correct those assumptions. That pass
may in turn reveal further incorrect assumptions, and so on.
2008-03-05 14:44:17 -07:00
Joel Dice
3317149cd2
Merge branch 'master' into compiler
...
Conflicts:
src/x86.cpp
2008-02-26 17:56:35 -07:00
Joel Dice
2edaa82801
prepend copyright notice and license to all source files; add license.txt and readme.txt
2008-02-19 11:06:52 -07:00
Joel Dice
e8ed2a4749
various bugfixes in new compiler
2008-02-17 15:29:04 -07:00
Joel Dice
d654c943f3
various bugfixes and tweaks in new compiler, primarily related to duplicating stack operands
2008-02-17 13:57:40 -07:00
Joel Dice
fa513beb2f
rework compiler interface to explicitly accept a size parameter for each operation where relevant
2008-02-11 19:06:12 -07:00
Joel Dice
b9fa7179d9
more work on new compiler; addition now works
2008-02-11 17:20:32 -07:00
Joel Dice
5b2f351f01
adapt compile.cpp to new compiler
2008-02-11 10:21:41 -07:00
Joel Dice
2346714d60
move local reference cleanup from invoke() to invokeNative2(), where it belonged all along
2008-02-01 14:17:54 -07:00
Joel Dice
eeac584474
fix thinko in invokeNative2
2008-01-30 17:08:47 -07:00
Joel Dice
008ac07079
refactor native method resolution to be simpler and more robust
2008-01-28 10:27:02 -07:00
Joel Dice
8150b957c9
support JIT compiling methods with unsorted exception handler tables
2008-01-25 17:17:27 -07:00
Joel Dice
c9714c73f2
fix frame map calculations involving exception handlers
2008-01-20 16:03:28 -07:00
Joel Dice
422133d1ba
initialize vtables with pointers to JIT function, including native methods, since this allows code shrinkers to eliminate unused methods without confusing the VM
2008-01-20 15:05:59 -07:00
Joel Dice
a69c366d07
save 'this' pointer on entrance to synchronized, non-static, non-native methods so we can release the monitor on exit, reguardless of whether the pointer at local index zero is overwritten
2008-01-20 11:55:08 -07:00
Joel Dice
86bdd48a66
when invoking Java methods from native code on 32-bit systems, push 32-bit halves of 64-bit values in reverse order since they are reversed again when pushed on the stack
2008-01-15 18:01:11 -07:00
Joel Dice
d1b4dfccd0
fix class cast exception message thinko
2008-01-15 16:33:20 -07:00
Joel Dice
2f83468b80
remove context argument from Allocator::tryAllocate and Allocator::allocate, since we aren't using it after all
2008-01-14 16:37:24 -07:00
Joel Dice
e4c1f6cc8f
protect local variable from GC in findUnwindTarget
2008-01-14 09:33:26 -07:00
Joel Dice
0298865efa
refactor memory allocation to allow better detection and handling of low-memory conditions
2008-01-13 15:05:08 -07:00
Joel Dice
d1ec7cd0e8
remove debug logging
2008-01-11 15:19:44 -07:00
Joel Dice
f0d556b0ec
fix handling of call target resolution for non-virtual calls
2008-01-11 15:16:24 -07:00
Joel Dice
570925ad0e
handle locking for synchronized native methods
2008-01-11 10:49:11 -07:00
Joel Dice
13aaa14a41
use code allocator to allocate indirect caller
2008-01-09 18:51:58 -07:00
Joel Dice
8e5ce11047
refactor memory management code
...
We now support immortal objects, which the GC will scan for references
but not consider for collection. On x86_64, we allocate JIT code memory
via mmap, which lets us map memory into the bottom 2GB of the address
space, ensuring that 32-bit relative jumps and calls work.
2008-01-09 18:20:36 -07:00
Joel Dice
811fbf0ab9
don't try to compile a method twice if it was compiled as a side-effect of initializing a class
2008-01-08 14:23:49 -07:00
Joel Dice
cfc959a3d2
invoke static initializers more lazily
2008-01-08 12:36:34 -07:00
Joel Dice
551addc638
make array bounds checking optional; add comments describing stack mapping algorithm
2008-01-08 10:10:24 -07:00
Joel Dice
c8472c4d30
minimize state tracked by stack mapping algorithm
2008-01-08 08:24:57 -07:00
Joel Dice
8dc674b3d2
remove redundant line in multianewarray
2008-01-07 16:09:55 -07:00
Joel Dice
72f7115323
add FORCE_ALIGN attribute to non-trivial functions called from Java land
2008-01-07 15:49:34 -07:00
Joel Dice
2cda000725
fix code ordering bug in compile() which caused us to calculate the stack map incorrectly; logging tweak
2008-01-07 15:04:53 -07:00
Joel Dice
259dd643e0
fix over-agressive state reset in state mapping code; logging tweaks
2008-01-07 14:32:41 -07:00
Joel Dice
25f12ca40a
set Verbose=false
2008-01-07 10:16:41 -07:00
Joel Dice
888dce8f3c
bugfixes and cleanups for new stack mapping code
2008-01-07 09:01:35 -07:00
Joel Dice
a755368add
sketch of new stack mapping algorithm
2008-01-07 07:51:07 -07:00
Joel Dice
e30302722e
Merge branch 'master' of dice.ecovate.com:git/vm
...
Conflicts:
src/compile.cpp
2008-01-03 16:54:35 -07:00
Joel Dice
4bda925e08
fix thinko in Frame::mapSizeInWords; code cleanup
2008-01-03 16:53:37 -07:00
Joel Dice
ce2f5dd375
fix use of clobbered stack register in multianewarray
2008-01-03 14:28:29 -07:00
Joel Dice
2d6d69a573
fix thinko in invokeNative2
2008-01-03 12:49:07 -07:00
Joel Dice
651a27f73e
sign-extend array indexes from 32 to 64 bits on amd64; provide useful messages for certain runtime exceptions
2008-01-03 11:37:00 -07:00
Joel Dice
1d7931a654
fix GC safety bugs in compile.cpp
2008-01-01 18:07:12 -07:00
Joel Dice
bdd62011eb
fix up access violation handling on windows; refactor posix segv handling to match API change needed for windows
2008-01-01 10:08:47 -07:00
Joel Dice
100fc304ad
sketch of windows access violation handling; posix segv handling bugfixes
2007-12-31 16:21:57 -07:00
Joel Dice
f151d85f4e
intercept SIGSEGV and throw NullPointerExceptions
2007-12-31 15:40:56 -07:00
Joel Dice
069a760918
snapshot
2007-12-30 15:24:48 -07:00
Joel Dice
c147ef4e5c
allow concurrent reads and writes on trace node hashtable, requiring only writes to acquire the the class lock
2007-12-28 09:50:26 -07:00
Joel Dice
5d65e7c220
handle synchronized methods properly in JIT mode
2007-12-27 17:02:05 -07:00
Joel Dice
bc44f468de
set Verbose=false in compile.cpp
2007-12-27 13:33:58 -07:00
Joel Dice
00c095b564
pop address off stack in jsr instruction before compiling the code which follows
2007-12-27 13:32:34 -07:00
Joel Dice
ea2935f5f1
use storeObjectOrAddress in all astore* instructions
2007-12-27 09:02:03 -07:00
Joel Dice
848a67b397
implement jsr, jsr_w, and ret; various bugfixes to get SWT example working in JIT mode
2007-12-26 16:59:55 -07:00
Joel Dice
c0cf15bb37
add missing instructions and fix shift long instructions to pop an int instead of a long as the shift count
2007-12-26 12:19:45 -07:00
Joel Dice
b361e1b637
refactor JIT code to make operand size an explicit part of each applicable instruction
2007-12-26 09:56:14 -07:00
Joel Dice
8cd18d6193
more JIT bugfixes
2007-12-23 13:06:24 -07:00
Joel Dice
271797bead
GC safety fix in resolveTarget
2007-12-23 12:26:35 -07:00
Joel Dice
f87a78833b
fix JIT regressions on amd64
2007-12-23 12:18:34 -07:00
Joel Dice
15857135c0
more JIT fixes; all tests now pass on x86-32
2007-12-23 11:48:22 -07:00
Joel Dice
a020a3f6bb
handle various return types properly in invokeNative2
2007-12-23 11:09:41 -07:00
Joel Dice
31cf1754ce
fix frame trace bug leading to incomplete stack coverage during GC; fix thinko pushing arguments in vmInvoke
2007-12-23 11:01:41 -07:00
Joel Dice
6c532e2ba4
fix register allocation bugs in floating point instructions
2007-12-22 17:15:46 -07:00
Joel Dice
f116225933
fix 64-bit arithmetic support on x86-32
2007-12-22 17:00:35 -07:00
Joel Dice
a867e4d587
snapshot
2007-12-21 17:26:55 -07:00
Joel Dice
06109792e5
JIT build fixes
2007-12-20 16:19:48 -07:00
Joel Dice
be42c325d8
32-bit JIT bugfixes; still broken
2007-12-19 18:42:12 -07:00
Joel Dice
7dd81c803a
fix native call argument marshalling regression
2007-12-19 17:02:32 -07:00
Joel Dice
6895ffaa99
GC safety and sign extension fixes
2007-12-17 19:09:32 -07:00
Joel Dice
b2cb8e0a69
JIT bugfixes; implement or and xor
2007-12-17 17:22:37 -07:00
Joel Dice
5c807a4ddc
implement shl; fix thinko in Frame::Protector; fix uninitialized value warnings
2007-12-17 15:38:59 -07:00
Joel Dice
4c3a2575ba
lots of JIT bugfixes; all top-level tests now pass
2007-12-17 13:55:31 -07:00