Commit Graph

584 Commits

Author SHA1 Message Date
Josh warner
f8bbc609e8 corrected debug messages 2009-08-06 10:32:00 -06:00
Josh warner
7483fa154d added floating point support, instrinsics support 2009-08-06 10:01:57 -06:00
Joel Dice
ad66ae2691 disable debug logging 2009-07-27 18:09:12 -06:00
Joel Dice
0447d9bed3 use __MINGW32__ instead of __WINDOWS__ in x86.cpp and assume Linux if it's not defined 2009-07-27 07:49:54 -06:00
Joel Dice
f869e5be21 Merge branch 'master' into gnu
Conflicts:

	classpath/java/util/TreeSet.java
2009-07-25 18:38:57 -06:00
Joel Dice
d3a249a3fa Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-07-25 18:36:27 -06:00
Joel Dice
08e9a99cb5 don't abort if pthread_kill fails in MySystem::visit 2009-07-24 19:03:33 -06:00
Joel Dice
3787985b25 implement basic finalization support
This implementation does not conform to the Java standard in that
finalize methods are called from whichever thread happens to be garbage
collecting, and that thread may hold locks, whereas the standard
guarantees that finalize will be run from a thread which holds no locks.
Also, an object will never be finalized more than once, even if its
finalize method "rescues" (i.e. makes reachable) the object such that it
might become unreachable a second time and thus a candidate for
finalization once more.  It's not clear to me from the standard if this
is OK or not.

Nonwithstanding the above, this implementation is useful for "normal"
finalize methods which simply release resources associated with an
object.
2009-07-21 18:57:55 -06:00
Joel Dice
afdab27e02 backport GC safety fixes from gnu branch 2009-07-20 14:32:25 -06:00
Joel Dice
514d0bf7e5 fix deadlocks and other misbehaviors in class initialization code 2009-07-20 14:12:38 -06:00
Joel Dice
d12b441aa1 restore state from subroutine after jsr to avoid later confusion determining basic block boundaries 2009-07-20 08:26:01 -06:00
Joel Dice
5f6f8039e6 various bugfixes in subroutine stack mapping code 2009-07-13 17:49:15 -06:00
Joel Dice
e72ff8db0b Merge branch 'master' into gnu
Conflicts:

	src/compile.cpp
2009-07-11 12:11:59 -06:00
Joel Dice
ab5ba9c954 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-07-10 09:57:29 -06:00
Joel Dice
22852dcffa fix GC safety bug when walking stack 2009-07-10 08:33:38 -06:00
Joel Dice
c22b4b4e79 various subroutine handling bugfixes 2009-07-08 08:18:40 -06:00
Joel Dice
dae7b68d5c avoid indexing past the end of the array in makeSimpleFrameMapTable 2009-06-30 17:35:28 -06:00
Joel Dice
b308354a3a handle subroutines properly when generating frame maps (initial sketch) 2009-06-26 15:36:04 -06:00
Joel Dice
7ed14948b9 re-initialize frame maps for exception handlers on every iteration of the frame map calculation loop
This fixes incorrect frame map calcuation which may lead to crashes
during garbage collection from an exception handler.
2009-06-16 13:41:31 -06:00
Joel Dice
e1c7504eda attempt to flush the compile log (if any) before crashing in SegFaultHandler::handle 2009-06-11 17:14:54 -06:00
Joel Dice
4a87d82d8e fix GC safety bug in MyProcessor::initVtable 2009-06-04 17:20:55 -06:00
Joel Dice
ba5105c374 throw NoSuchMethodError in resolveMethod if method not found 2009-06-02 18:55:12 -06:00
Joel Dice
11e61543a3 fix bootimage build 2009-05-31 21:16:58 -06:00
Joel Dice
b1d92fc6c2 fix compilation of synchronized methods which return values 2009-05-31 14:15:45 -06:00
Joel Dice
02fba10614 set DebugCompile to false 2009-05-28 19:56:15 -06:00
Joel Dice
14613193fa include return address size in frameSize passed to vmInvoke; fix printf warnings 2009-05-28 19:50:44 -06:00
Joel Dice
d99f8df6e6 several bugfixes for powerpc continuations 2009-05-28 18:56:05 -06:00
Joel Dice
2608a2ee43 progress towards powerpc continuation and tail call support 2009-05-26 19:02:39 -06:00
Joel Dice
31eb75a736 support tail calls and continuations as build options 2009-05-25 23:27:10 -06:00
Joel Dice
ea5fea4802 fix printf format for 64-bit build 2009-05-25 14:59:36 -06:00
Joel Dice
9837528a3e set Thread::continuation before calling jumpAndInvoke in Rewind case of callContinuation 2009-05-24 22:49:39 -06:00
Joel Dice
0a4e77ffa7 fix thinko in callContinuation 2009-05-24 22:36:16 -06:00
Joel Dice
92aea95b36 continuation bugfixes 2009-05-24 22:27:50 -06:00
Joel Dice
c2bd828cc1 call the right continuation in callContinuation 2009-05-24 18:58:45 -06:00
Joel Dice
af59c85deb various bugfixes 2009-05-24 18:22:36 -06:00
Joel Dice
364f31b785 finish initial sketch of dynamicWind implementation 2009-05-23 19:49:14 -06:00
Joel Dice
4305fdc7f3 begin dynamicWind implementation 2009-05-23 16:15:06 -06:00
Joel Dice
e165d5f3fd avoid uninitialized variable warnings in MyProcessor::callWithCurrentContinuation 2009-05-19 18:28:43 -06:00
Joel Dice
ecfecf2006 translate local indexes before passing to Frame.stored{Int,Long,Object} 2009-05-18 09:16:17 -06:00
Joel Dice
398dec58bb GC bugfixes 2009-05-17 17:43:48 -06:00
Joel Dice
195d95d809 continuation bugfixes 2009-05-16 18:39:08 -06:00
Joel Dice
8cb59c9d4c various bugfixes to get Continuations test working 2009-05-16 02:03:03 -06:00
Joel Dice
57cec2d068 various bugfixes 2009-05-14 20:08:01 -06:00
Joel Dice
3d1ef68001 various bugfixes 2009-05-12 12:16:55 -06:00
Joel Dice
66c4867f18 more work on continuation support 2009-05-05 18:29:05 -06:00
Joel Dice
eb3bd25aa1 code cleanup and build fixes 2009-05-04 19:04:17 -06:00
Joel Dice
0cd4eb2655 early sketch of continuation support 2009-05-03 14:57:11 -06:00
Joel Dice
90dcf084a2 protect object from GC in compileVirtualMethod2; condense frame GC root maps to minimum size needed 2009-04-27 14:46:43 +00:00
Joel Dice
50529969f9 fix code to visit GC roots on stack to be compatible with tail calls; avoid generating unreachable jumps 2009-04-26 19:53:42 -06:00
Joel Dice
299699f1ff fix stack unwinding for new calling convention (2nd try) 2009-04-26 16:06:15 -06:00
Joel Dice
03653d2dd8 fix stack unwinding and GC root scan for new calling convention 2009-04-26 15:55:35 -06:00
Joel Dice
64b529c915 avoid generating unreachable code after tail calls 2009-04-25 20:54:36 -06:00
Joel Dice
bf8fdb6316 visit MyProcessor::virtualThunks during GC 2009-04-25 20:24:04 -06:00
Joel Dice
0245a94ab8 generate code in ReturnEvent if and only if the event is preceded by at least one non-tail-call 2009-04-25 19:51:33 -06:00
Joel Dice
89221bfcfa fix handling of virtual calls to native methods 2009-04-25 17:52:08 -06:00
Joel Dice
141862470b fix stack pointer adjustment in invokeNative2; pad frame size using Architecture::frameFootprint in MyProcessor::invoke to conform to new calling convention 2009-04-25 17:33:42 -06:00
Joel Dice
1ed7c0d94c adapt native method call code to new calling convention 2009-04-25 11:49:56 -06:00
Joel Dice
3113ae74eb various bugfixes 2009-04-22 01:39:25 +00:00
Joel Dice
717f359666 implement "callee pops arguments" calling convention and refactor tail call code accordingly 2009-04-19 16:36:11 -06:00
Joel Dice
dba72409aa move use of SingleRead::successor; fix build errors
We now use SingleRead::successor in pickTarget, where we use it to
determine the prefered target site for the successor without requiring
the target to conform to that preference.  The previous code made the
preference a hard requirement, which is not desirable or even possible
in general.
2009-04-07 18:55:43 -06:00
Joel Dice
35d1c6e068 add SingleRead::successor; fix build errors
The SingleRead::successor field is used (when non-null) to further
constrain the SiteMask in SingleRead::intersect based on reads of
successor values (as in the cases of moves and condensed-addressing
combine and translate instructions).
2009-04-06 18:34:12 -06:00
Joel Dice
fea92ed995 more work on tail recursion
We now create a unique thunk for each vtable position so as to avoid
relying on using the return address to determine what method is to be
compiled and invoked, since we will not have the correct return address
in the case of a tail call.  This required refactoring how executable
memory is allocated in order to keep AOT compilation working.  Also, we
must always use the same register to hold the class pointer when
compiling virtual calls, and ensure that the pointer stays there until
the call instruction is executed so we know where to find it in the
thunk.
2009-04-05 15:42:10 -06:00
Joel Dice
5e740170f2 initial sketch of tail call optimization (non-virtual calls only, so far) 2009-03-31 14:15:08 -06:00
Joel Dice
538e23c642 fix order-of-operations bugs in compile.cpp which led to creation of incorrect stack maps 2009-03-18 16:24:13 -06:00
Joel Dice
d1018bf078 update copyright years 2009-03-15 12:02:36 -06:00
Joel Dice
49cd2dd9bf fix powerpc bootimage build (second try) 2009-03-10 19:08:16 -06:00
Joel Dice
6c271ac994 fix powerpc bootimage build 2009-03-09 18:52:09 -06:00
Joel Dice
89a2739165 sync instruction cache after compiling a method 2009-03-09 08:26:23 -06:00
Joel Dice
8b0f7d790f don't assume sizeof(bool) == 8 2009-03-07 18:23:28 -07:00
Joel Dice
33ba8d084d avoid unecessary subtraction in tableswitch 2009-03-06 17:11:14 -07:00
Joel Dice
7388da6282 fix endianness issues when loading values smaller than BytesPerWord from the stack 2009-03-06 10:56:11 -07:00
Joel Dice
6e6035505c zero heap space ahead of time when allocating raw storage and garbage collecting, not when allocating individual objects
This helps us support the Java Memory Model without adding a memory
barrier to every object allocation.  It's also potentially more
efficient, since we zero out each heap segment all at once instead of
bit-by-bit with each object allocation.
2009-03-03 20:05:48 -07:00
Joel Dice
8410e1d683 ensure reads and writes of volatile 64-bit fields are atomic 2009-03-03 18:02:11 -07:00
Joel Dice
2ca8132d97 implement support for volatile fields 2009-03-02 20:18:15 -07:00
Joel Dice
8c9d625f8f add memory barriers where appropriate in compile.cpp 2009-03-02 18:40:06 -07:00
Joel Dice
1192ef939e fix stack offset calculation for multianewarray on x86 2009-03-01 15:39:52 -07:00
Joel Dice
412348d938 fix stack offset calulation for multianewarray 2009-03-01 10:49:37 -07:00
Joel Dice
d6bd2e7308 make Compiler::store take both a source size and a destination size to avoid endianness issues; change order of Compiler::load parameters to match 2009-02-28 16:17:24 -07:00
Joel Dice
60c4bede39 fix undefined-order-of-operations bug in Frame::dupped 2009-02-28 14:41:05 -07:00
Joel Dice
3e6c30a4b5 always return an 8-byte value (or void) from native functions called from Java
This is important on the 32-bit OS X PowerPC ABI, since the location
of the low 32-bits of a return value change depending on whether the
entire value is 64-bits or not.
2009-02-28 14:20:43 -07:00
Joel Dice
f22ce3f996 fix parameter offset calculation in invokeNative2 2009-02-28 12:33:26 -07:00
Joel Dice
4999c08e32 fix stack offset calculation for powerpc
This may break x86, in which case we'll iterate until they both work.
2009-02-26 18:54:25 -07:00
Joel Dice
d7d3dd5055 various bugfixes, especially concerning frame allocation and offset calculation 2009-02-25 20:49:42 -07:00
Joel Dice
324caaf98b add size parameter to Assembler::returnLow since the register used depends on the return value size on PowerPC 2009-02-17 18:19:31 -07:00
Joel Dice
c88e3fa230 ensure stack alignment in compile-x86.S and update vmInvoke to accept frame size parameter 2009-02-16 19:49:28 -07:00
Joel Dice
4b2d74f656 fix merge conflict bug preventing the bootimage code from seeing, marking, and fixing jsr addresses 2009-02-14 14:23:23 -07:00
Joel Dice
f58f7b3bdf fix bugs pertaining to tracking reads and and value sites across subroutines (jsr and ret instructions) 2009-02-14 13:26:39 -07:00
Joel Dice
9b0d6854ec fix merge conflicts 2009-02-09 16:22:51 -07:00
Joel Dice
a1ec71423e Merge branch 'master' into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/binaryToMacho.cpp
	src/compile.cpp
	src/compiler.cpp
	src/x86.cpp
2009-02-09 16:22:01 -07:00
Joel Dice
1c3504b62a fix various stack bugs 2009-01-29 18:36:19 -07:00
Joel Dice
54ad7c4e98 tolerate ConstantValue attributes on non-static fields, since the compiler ensures that they are initialized in any constructors for that class (i.e., the VM does not need to do anything special to initialize them) 2009-01-10 12:25:52 -07:00
Joel Dice
9495d03dc6 explicitly load jump target in tableswitch to avoid retaining stale memory sites 2009-01-04 15:56:47 -07:00
Joel Dice
c678fb30a4 snapshot 2008-12-24 13:35:43 -07:00
Joel Dice
c9bec0ce96 only steal sites recursively when all else fails in trySteal 2008-12-21 18:14:20 -07:00
Joel Dice
055ec4dd9f various fixes and cleanups concerning 64-bit values on 32-bit systems 2008-12-21 14:41:56 -07:00
Joel Dice
5e727c8c5d throw an error if a volatile field is encountered, since we don't yet support them properly 2008-12-18 16:32:18 -07:00
Joel Dice
4098368cb9 fix non-debug build of compile.cpp 2008-12-02 19:39:56 -07:00
Joel Dice
d4363d250a mark and fix up absolute addresses in boot image code 2008-12-02 09:45:20 -07:00
Joel Dice
25ade1484a lots of bugfixes and refactoring 2008-12-01 19:38:00 -07:00
Joel Dice
eaf30eb909 fix static class initialization when using a boot image 2008-11-29 21:58:09 -07:00
Joel Dice
e44f326377 various bugfixes 2008-11-29 18:39:42 -07:00
Joel Dice
0ec5ad3701 update makefile to optionally build and use a boot image; various bugfixes 2008-11-29 16:08:14 -07:00
Joel Dice
b8056d905c fix bugs in allocating and populating method object pools 2008-11-28 18:23:01 -07:00
Joel Dice
4d1af63ed2 initial work on booting from boot image 2008-11-28 15:02:45 -07:00
Joel Dice
a8a030140c various bugfixes 2008-11-27 21:44:04 -07:00
Joel Dice
f698c24ea6 delay resolving method call offsets until all methods have been compiled when creating a boot image 2008-11-27 13:59:40 -07:00
Joel Dice
61ecb56e21 Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-11-25 16:19:21 -07:00
Joel Dice
fdb9c05ac6 avoid uninitialized value warnings from valgrind when DebugFrameMaps is true 2008-11-25 16:01:30 -07:00
Joel Dice
eea2225176 save locals to memory before executing any instruction which might trigger an exception if that instruction lies within an exception handler 2008-11-25 10:34:48 -07:00
Joel Dice
035aa0ecd4 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into bootimage
Conflicts:

	src/compile.cpp
	src/machine.h
	src/util.h
2008-11-23 17:02:34 -07:00
Joel Dice
20cf42c5e4 more work on boot image creation 2008-11-23 16:58:01 -07:00
Joel Dice
4392b04fd0 avoid creating unecessary garbage in treeInsertNode and friends 2008-11-22 16:25:35 -07:00
Joel Dice
92a8a4d83b clean up subroutine code in wake of merge from master branch 2008-11-15 18:03:43 -07:00
Joel Dice
9b6d4fdeab Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into powerpc
Conflicts:

	src/compile.cpp
2008-11-15 17:49:08 -07:00
Joel Dice
dc2700d913 ensure that the saved exception in a finally block is visited during GC when the jsr instruction is used 2008-11-15 17:28:45 -07:00
Joel Dice
fb770d10fb implement jsr/ret support
The Subroutine test won't pass due to a bug in the stack mapping code
such that objects may be missed during GC.
2008-11-13 17:59:21 -07:00
Joel Dice
acfd9689b2 Merge branch 'master' of oss:/var/local/git/avian into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
	src/finder.cpp
2008-11-11 12:15:19 -07:00
Joel Dice
0bef625500 fix thinko in logCompile 2008-11-11 09:17:11 -07:00
Joel Dice
c80eb51c17 Merge branch 'master' into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
	src/finder.cpp
2008-11-11 08:21:48 -07:00
Joel Dice
5fc9ad058b more bugfixes; all tests pass on amd64 2008-11-10 17:07:44 -07:00
Joel Dice
00d8142de9 various bugfixes; all but one test are passing on amd64 2008-11-09 16:56:37 -07:00
Joel Dice
000aeb25c1 handle case where first instruction is the target of a branch properly 2008-11-08 16:21:30 -07:00
Joel Dice
61539bae31 fix stack mapping bugs which broke GC 2008-11-08 15:36:38 -07:00
Joel Dice
312539af64 fix moves involving sign or zero extension 2008-11-08 13:47:26 -07:00
Joel Dice
f01f4441d9 various bugfixes and instructions implemented to get more tests passing 2008-11-06 17:39:38 -07:00
Joel Dice
1ba497d90a fix Exceptions test for amd64 2008-11-02 15:25:51 -07:00
Joel Dice
04da77e95b snapshot 2008-11-02 13:35:35 -07:00
Joel Dice
dd4dc18916 snapshot 2008-11-01 13:14:13 -06:00
Joel Dice
7d6ca28b2f snapshot 2008-10-18 18:15:57 -06:00
Joel Dice
5391c68efd bugfixes 2008-10-14 18:45:31 -06:00
Joel Dice
aaaf388652 fix handling of instructions which are targets of more than one conditional branch 2008-10-13 18:18:18 -06:00
Joel Dice
81cb951b08 fix stack corruption due to spurious pop events generated for jsr bytecodes 2008-10-09 17:14:52 -06:00
Joel Dice
83d5d6fde4 avoid unnecessary moves in resolveJunctionSite; distinguish between branches and other events when deciding when to marshal values at junctions 2008-10-07 18:08:13 -06:00
Joel Dice
f6c4496166 various bugfixes 2008-10-05 18:50:59 -06:00
Joel Dice
83aa342bc8 hello, world on amd64 2008-10-04 11:26:35 -06:00
Joel Dice
823327a00b fix bytecode address calculations which broke when using -Os 2008-09-29 08:46:44 -06:00
Joel Dice
d409f89d5d ensure that only one value holds a given frame site at at time 2008-09-28 15:56:12 -06:00
Joel Dice
61c708d7b2 reserve stack space for arguments to native calls 2008-09-28 13:00:52 -06:00
Joel Dice
11c2afbf91 bugfixes 2008-09-24 18:48:32 -06:00
Joel Dice
f2bf152eba more bugfixes 2008-09-23 18:01:42 -06:00
Joel Dice
d4938115ef various bugfixes 2008-09-23 15:18:41 -06:00
Joel Dice
b8dd495ada fix build 2008-09-22 08:28:18 -06:00
Joel Dice
1b4ad1db42 snapshot 2008-09-20 17:42:46 -06:00
Joel Dice
96c6c7f8ea don't log JIT results to stderr unless DebugCompile is true 2008-09-19 16:43:06 -06:00
Joel Dice
1657fb794c support logging addresses and names of JIT-compiled methods to a file specified via a system property 2008-09-19 11:34:37 -06:00
Joel Dice
606e5cb238 lots of bugfixes - finally got Simple.pow() working 2008-09-14 20:28:42 -06:00
Joel Dice
bd9e8a77e2 improved tracking of data flow across control flow boundaries 2008-09-13 15:09:26 -06:00
Joel Dice
392a1417e5 lots of bugfixes and a few instructions added 2008-09-08 18:31:19 -06:00
Joel Dice
af9758a6d3 got a simple arithmetic test working 2008-09-07 14:12:11 -06:00
Joel Dice
ed806ca740 working towards compiling simple methods 2008-09-06 15:25:41 -06:00
Joel Dice
767c3ce2e4 snapshot 2008-08-28 16:43:35 -06:00
Joel Dice
a062d8c975 progress towards refactored JIT compiler to support PowerPC and data flow analysis across control flow boundaries 2008-08-23 12:04:36 -06:00
Joel Dice
9908bbcf50 sketch new version of x86.cpp to conform to new assembler.h APIs 2008-08-19 17:38:37 -06:00
Joel Dice
9654e3445d refactor stack walking and visiting code to abstract away certain details of stack layout which are architecture-specific 2008-08-18 09:23:01 -06:00
Joel Dice
4a3be37c67 snapshot 2008-08-17 13:32:40 -06:00
Joel Dice
4a022147cd Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into powerpc 2008-08-16 12:56:41 -06:00
Joel Dice
5dc0959294 snapshot 2008-08-16 12:46:14 -06:00
Joel Dice
9efe6f1f05 snapshot 2008-08-16 11:45:36 -06:00
Joel Dice
c8cc7d931b maintain a table to look up methods called via JNI
This simplifies the JNI implementation for looking up methods.  It also
fixes a bug where an applications calls GetStaticMethodID with class A
and then calls CallStatic<Type>Method with class B which extends A.  The
old code would look in the wrong method table and thus call the wrong
method.
2008-08-15 12:32:33 -06:00
Joel Dice
78e48996b5 fix handling of native methods in stack walking code 2008-08-14 12:13:05 -06:00
Joel Dice
2343483d8e Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-07-13 12:47:49 -06:00
Joel Dice
bf58eaa6ba assert that the target of an invokestatic call is a static method and that the targets of all other invokes are non-static 2008-07-12 14:52:14 -06:00
Joel Dice
fcd4f0c8f5 third attempt to properly fix race condition in compile function 2008-07-11 22:01:42 -06:00
Joel Dice
5a97caa4ca fix recently-introduced GC safety bug 2008-07-11 19:24:37 -06:00
Joel Dice
b1f24079ec fix race condition in compile function (part 2) 2008-07-11 18:14:30 -06:00
Joel Dice
0b79ab4fed fix race condition in compile function
1. Thread A calls function F, which needs to be compiled.  So it
compiles it.
 2. Thread B calls function F, sees that it's already been compiled and
so runs it.
 3. Thread B calls function G from function F, and G needs to be
compiled, but it needs to acquire the class lock first, which A owns.
 4. Thread A causes a GC, walks thread B's stack, but function F has not
yet been added to the method tree, so it thinks the stack has no frames.
 5. Thread A finally adds function F to the method tree.
 6. Thread A causes another GC and walks thread B's stack again, and
this time it finds function F in the method tree.
 7. AAAARRRRRGGGHHH!!!!!!
2008-07-11 18:11:13 -06:00
Joel Dice
23043d140f snapshot 2008-07-05 14:21:13 -06:00
Joel Dice
8512d6c74c Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-06-23 17:38:16 -06:00
Eric Scharff
86a5e9ba8a Removed debugging that should not have been checked in 2008-06-16 11:47:54 -06:00
Eric Scharff
2bfe6f0d13 Ensure we align the stack before any time we might enter a C function from
generated code
2008-06-16 10:55:29 -06:00
dicej
358f3f801b Merge branch 'master' of oss.ecovate.com:/var/local/git/avian into powerpc 2008-06-15 11:48:05 -06:00
Joel Dice
eabb37e6eb add lcmp instruction to Compiler and corresponding LongCompare instruction to Assembler, since that's the only efficient way to implement the lcmp bytecode on x86 2008-06-12 10:56:48 -06:00
Joel Dice
dc136bb751 fix stack tracking weirdness for jsr instruction 2008-06-10 18:16:02 -06:00
Joel Dice
fc8c5a2ea9 fix a few bugs revealed by ProGuard optimizations, including too-early constant propagation during array loads and stores 2008-06-10 08:49:13 -06:00
dicej
0ccf8d57ea rough sketch of powerpc support 2008-06-04 16:21:27 -06:00
Eric Scharff
2aadbaac38 Force alignment for native calls 2008-06-02 11:43:58 -06:00
Joel Dice
ecfb853f17 use relative branches where possible on amd64 2008-06-02 07:49:09 -06:00
Joel Dice
7d1ed0da05 Merge branch 'compiler' of oss.readytalk.com:/var/local/git/avian
Conflicts:

	src/compiler.cpp
2008-05-31 19:30:28 -06:00
Joel Dice
7cdff9f1ee disable debug logging and fix build warnings 2008-05-31 17:06:45 -06:00
Joel Dice
eacca98c3f fix regressions affecting 32-bit systems 2008-05-31 16:53:37 -06:00
Joel Dice
1450b12e5b visit thunk objects during GC in MyProcessor::visitObjects 2008-05-31 16:24:32 -06:00
Joel Dice
65830a76c5 improve efficiency of array bounds checks and generate a thunk table for native functions called indirectly 2008-05-31 16:14:27 -06:00
Joel Dice
f05318b787 fix thinkos in d2i and friends 2008-05-22 18:08:41 -06:00
Joel Dice
292f84a3fa fix thinko in laload implementation 2008-05-19 08:50:37 -06:00
Joel Dice
3c30e815ec optimize multiple loads from the same local variable 2008-05-18 22:31:52 -06:00
Joel Dice
b2e25f4e17 reorder makeMultidimensionalArray parameters to remove the need for the caller to save the stack pointer in a temporary register 2008-05-18 09:45:11 -06:00
Joel Dice
04f4ad4f58 fix variadic argument passing bug on amd64 2008-05-14 17:22:44 -06:00
Joel Dice
08beaad1b6 various bugfixes related to new register allocation code 2008-05-13 11:27:57 -06:00
Joel Dice
f1809897bd fix build 2008-05-06 15:13:02 -06:00
Joel Dice
1cb9d0327a initialize body of exception handler table for GC safety 2008-05-05 19:17:29 -06:00
Joel Dice
bf08cc4c53 fix array bounds checks 2008-04-30 11:47:25 -06:00
Joel Dice
e2b24263a2 various bugfixes 2008-04-30 09:44:17 -06:00
Joel Dice
377e2864d9 fix argument marshalling for floating point helper functions on 32-bit systems 2008-04-29 10:40:44 -06:00
Joel Dice
d50e3aaee0 preserve operands to CombineEvent and TranslateEvent when necessary 2008-04-29 10:25:20 -06:00
Joel Dice
c96f44d77d don't skip move when MoveEvent is followed by a PushEvent which is not active; use existing register site in ValueSite when possible 2008-04-29 08:59:12 -06:00
Joel Dice
8738bddcb9 bugfixes, mainly concerning 32-bit machines 2008-04-28 16:08:31 -06:00
Joel Dice
1b5f14d847 re-enable tests in Misc and get them working 2008-04-28 09:53:48 -06:00
Joel Dice
9f8d77a2a9 Merge branch 'master' into compiler
Conflicts:

	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
2008-04-27 16:40:53 -06:00
Joel Dice
5b7372a3bb various bugfixes; majority of tests now pass 2008-04-27 14:15:18 -06:00
Joel Dice
d5137a7cdf use stack instead of registers to save data across jumps and branches; bugfixes 2008-04-26 14:56:03 -06:00
Joel Dice
23572b58bd fix code ordering bug in MyProcessor::getStackTrace which caused the stack trace footprint calculation to be inaccurate 2008-04-25 16:18:19 -06:00
Joel Dice
0655b55378 resolve catch type for each exception handler during compilation 2008-04-24 16:06:36 -06:00
Joel Dice
1d7b00baff backport getstatic/putstatic optimization from compiler branch 2008-04-23 16:56:02 -06:00
Joel Dice
7e1a2ea876 don't remove nodes from call node table, since it leads to a race condition 2008-04-23 15:01:47 -06:00
Joel Dice
d072b71c39 nth attempt to clean up MyStackWalker 2008-04-23 10:33:31 -06:00
Joel Dice
9e8e4b3de7 fix stack walker to properly handle the case of a native method calling another native method 2008-04-22 10:21:54 -06:00
Joel Dice
c7d679467f handle case of visiting thread when it is executing one of the transition procedures 2008-04-22 09:31:40 -06:00
Joel Dice
df5258d1d8 various bugfixes concerning Thread.getStackTrace 2008-04-21 16:36:13 -06:00
Joel Dice
efb4e0241b do all java->native class via Compiler::indirectCall to ensure we can always make an accurate stack trace (part 2) 2008-04-21 11:31:10 -06:00
Joel Dice
8c450a75a1 do all java->native class via Compiler::indirectCall to ensure we can always make an accurate stack trace 2008-04-21 11:29:36 -06:00
Joel Dice
2289d13cbb make debug logging more concise 2008-04-20 18:20:38 -06:00
Joel Dice
d6c3b2327f bugfixes; enums test now succeeds 2008-04-20 13:35:36 -06:00
Joel Dice
61f866ce89 do a garbage collection in compile.cpp if throwing an exception that required creating a backup heap 2008-04-20 10:21:32 -06:00
Joel Dice
8ebff705d6 various fixes 2008-04-19 23:23:08 -06:00
Joel Dice
8baa2bbd87 insert stack sync events before each instruction with more than one predecessor 2008-04-19 18:43:12 -06:00
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