Commit Graph

1041 Commits

Author SHA1 Message Date
Joel Dice
2e3fd111d4 fix regressions on x86_64 2009-02-01 16:19:11 -07:00
Joel Dice
8b1801c465 various bugfixes involving multiword values 2009-02-01 16:10:56 -07:00
Joel Dice
11408dc2cd fix popIndex calculation in CallEvent ctor 2009-01-31 12:35:45 -07:00
Joel Dice
8b6319fbc8 assume stack grows towards negative addresses when loading and storing multiword locals 2009-01-31 12:05:06 -07:00
Joel Dice
a11d018dc2 fix assertion in MyCompiler::peek 2009-01-29 18:43:46 -07:00
Joel Dice
8dca14af74 remove obsolete assertion from negateRR 2009-01-29 18:43:18 -07:00
Joel Dice
1c3504b62a fix various stack bugs 2009-01-29 18:36:19 -07:00
Joel Dice
565ece136b begin refactoring compiler.cpp to treat each word of a multiword value seperately 2009-01-25 15:03:38 -07:00
Joel Dice
034444db57 fix a couple of bugs handling multi-word values 2009-01-12 09:26:43 -07:00
Joel Dice
582e975a8a remove temporary debug code 2009-01-11 16:46:36 -07:00
Joel Dice
85ac9b9c71 revert overflow code in sitesToString since we now prune dead buddies from values 2009-01-11 16:46:22 -07:00
Joel Dice
05bd86e2ed use upper 32 bits of mask in pickRegisterTarget when picking register for high word; set Target::Impossible to 5 since 4 is a valid cost 2009-01-11 16:42:41 -07:00
Joel Dice
04bc58fd95 reorder code in MemorySite::release so we can use low->size before it is overwritten 2009-01-11 16:24:25 -07:00
Joel Dice
5a76277b84 remove dead buddies from values so they don't accumulate without bound; when resolving sites, avoid picking those which belong to other values; various bugfixes 2009-01-11 15:53:51 -07:00
Joel Dice
e3976e66d3 avoid using all registers when marshalling sites, since we need at least one register free for memory-to-memory moves; various bugfixes 2009-01-11 11:48:02 -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
8459489212 avoid overflow in sitesToString 2009-01-04 15:58:05 -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
c56f37197c marshal values at branches to avoid duplication of effort at junctions 2009-01-04 14:52:46 -07:00
Joel Dice
f4689093ee try harder to find an acceptable source site in resolveSourceJunctionSites 2009-01-04 13:35:09 -07:00
Joel Dice
ce1e161f52 allocate larger buffer for sitesToString 2009-01-04 12:38:31 -07:00
Joel Dice
095e6d7bc3 prefer unowned resources in resourceCost 2009-01-04 12:34:38 -07:00
Joel Dice
d76b4121ae fix 64-bit constant case in addCR and subtractCR 2009-01-04 12:32:11 -07:00
Joel Dice
ded2ffe437 more compile.cpp refactoring 2009-01-03 18:17:51 -07:00
Joel Dice
ae24a6c18e continue refactoring compiler.cpp to simplify register and frame resource allocation 2009-01-03 14:34:45 -07:00
Joel Dice
7b546936d6 snapshot 2009-01-02 17:44:47 -07:00
Joel Dice
c678fb30a4 snapshot 2008-12-24 13:35:43 -07:00
Joel Dice
f96ee3ea73 handle p->value->reads == 0 case in visit 2008-12-22 18:25:00 -07:00
Joel Dice
897586aa76 clobber overlapping locals in storeLocal; move fallback code in trySteal to increase its applicability 2008-12-22 17:55:29 -07:00
Joel Dice
ac37941fa5 fix build error in previous commit 2008-12-21 18:14:24 -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
c78e76c747 temporarily reacquire source in releaseRegister
This avoids a SEGV when freezing the register.
2008-12-21 14:48:26 -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
b23f7374e9 don't steal sites in pickJunctionSite 2008-12-20 17:45:52 -07:00
Joel Dice
b9b7ae4003 avoid clobbering first operand in CombineEvent.compile 2008-12-20 16:05:01 -07:00
Joel Dice
cf4e8e7ec2 various fixes for marshalling values among registers and frame sites 2008-12-20 14:55:45 -07:00
Joel Dice
75b3bf98ab pick only unfrozen frame sites in save 2008-12-20 11:13:58 -07:00
Joel Dice
bd89b8e00a check for null array in HashMapIterator::find 2008-12-18 20:23:08 -07:00
Joel Dice
2622773eb4 support bootimage build on OS X 2008-12-18 19:52:03 -07:00
Joel Dice
e55b59905e Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2008-12-18 16:32:23 -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
7ce35b212f fix GCC 4.0.1 uninitialized value warning 2008-12-18 10:10:19 -07:00
Joel Dice
a40ae85588 clear sites from dead value in removeBuddy 2008-12-15 18:21:01 -07:00
Joel Dice
8819d01522 only set Context::forfeitedSite if value is live 2008-12-15 17:42:32 -07:00
Joel Dice
39358e6652 update junction read based on liveness of local value on first visit to junction, not stub read value 2008-12-15 07:35:19 -07:00
Joel Dice
7f4bd51464 don't use trySteal when moving sites between buddies 2008-12-13 13:54:26 -07:00
Joel Dice
4717e94fa3 remove value buddies after setting sites to junction sites, not after populating junction sites
This mirrors how snapshots are captured and restored for branch events.
Also, switch back to resolving junction sites before capturing fork
snapshots so we capture the true state of each value immediately before
the branch.
2008-12-13 12:59:02 -07:00
Joel Dice
d50febe088 various control-flow related bugfixes 2008-12-11 18:09:36 -07:00
Joel Dice
8b2a6f85fc remove divideCR and remainderCR
This forces the compiler to explicitly move the constant operand into
a register, avoiding the possibility that AX or DX might be unavailable
when the assembler needs them.
2008-12-11 18:08:16 -07:00
Joel Dice
aa7b47eec4 fix merge confict fallout in heapdump.cpp 2008-12-04 14:35:25 -07:00
Joel Dice
7d68c9b0a5 Merge branch 'bootimage' of oss.readytalk.com:/var/local/git/avian
Conflicts:

	src/heapdump.cpp
2008-12-04 14:29:17 -07:00
Joel Dice
58a90f2b84 fix regressions for non-bootimage case 2008-12-03 19:09:57 -07:00
Joel Dice
93d4fbc43d fix platform=windows and process=interpret builds 2008-12-03 08:44:07 -07:00
Joel Dice
457c3d135e return Tenured from MyHeap::status if the object resides in the immortal heap 2008-12-02 19:41:22 -07:00
Joel Dice
4098368cb9 fix non-debug build of compile.cpp 2008-12-02 19:39:56 -07:00
Joel Dice
851efc8d10 handle case of unresolved promise in compareCR and compareCM 2008-12-02 19:39:09 -07:00
Joel Dice
bcfdc03631 fix build breakage in heapdump.cpp 2008-12-02 19:38:32 -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
Rich Scott
f13bf44e87 Check return value of fwrite() calls.
This is to satisfy GCC 4.3.2 (on Ubuntu 8.10), which requires it.
2008-12-01 16:53:34 -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
0ef2ee1d02 refactor Segment::Map to support map data which is not allocated as part of the segment data 2008-11-29 13:37:03 -07:00
Joel Dice
702525fd32 support immortal heap area in heap.cpp 2008-11-28 19:31:06 -07:00
Joel Dice
b8056d905c fix bugs in allocating and populating method object pools 2008-11-28 18:23:01 -07:00
Joel Dice
80815d35f7 fix fixed object tracking in heap.cpp 2008-11-28 18:22:09 -07:00
Joel Dice
4d1af63ed2 initial work on booting from boot image 2008-11-28 15:02:45 -07:00
Joel Dice
d22a9ab270 visit constants in visitRoots so they are included in the final heap image 2008-11-28 11:33:11 -07:00
Joel Dice
02afbd1fa1 handle unresolved constants in moveCM 2008-11-27 21:58:32 -07:00
Joel Dice
6dc181fad5 move allocation zone from makeCodeImage to writeBootImage so it stays in scope until after updateConstants is called 2008-11-27 21:58:04 -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
264779ed2a copy site if necessary to avoid chaining to another site in resolveJunctionSite 2008-11-25 19:23:47 -07:00
Joel Dice
f9145528c8 do constant-to-memory movq in one instruction on amd64 when possible 2008-11-25 19:22:21 -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
58a9718d82 clean stack sites more aggressively after function calls to avoid GC bugs 2008-11-25 16:00:40 -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
207f093464 never trigger a GC due to an immortal allocation 2008-11-23 11:48:39 -07:00
Joel Dice
fb9b2bf173 avoid creating garbage when iterating over hashmaps 2008-11-22 16:38:41 -07:00
Joel Dice
4392b04fd0 avoid creating unecessary garbage in treeInsertNode and friends 2008-11-22 16:25:35 -07:00
Joel Dice
6162dfafbb increase heap pool size and fixed footprint threshold constants based on performance profiling and experimentation (second try) 2008-11-22 14:48:10 -07:00
Joel Dice
8a7852172e increase heap pool size and fixed footprint threshold constants based on performance profiling and experimentation 2008-11-22 14:47:18 -07:00
Joel Dice
2e2925c321 fix backwards logic in treeMapInsert which prevented correct balancing 2008-11-22 14:14:52 -07:00
Joel Dice
6500f1eff6 initial work to support boot image creation and use 2008-11-21 16:20:35 -07:00
Joel Dice
e98da8440e minor tweak to find function in heapdump.cpp to return 0 where we were returning false (which amounts to the same thing but is less confusing) 2008-11-19 18:09:02 -07:00
Joel Dice
3d9e508e3e fix regression in last commit 2008-11-17 08:44:35 -07:00
Joel Dice
9aee242408 Merge branch 'powerpc' of oss:/var/local/git/avian into powerpc
Conflicts:

	src/compiler.cpp
2008-11-17 08:22:07 -07:00
Joel Dice
7ea5a4a64f avoid inifinite recursion in trySteal 2008-11-17 08:20:48 -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
fae0ccfe96 fix unused parameter warnings 2008-11-11 18:09:45 -07:00
Joel Dice
6f5613ebd9 minor code cleanup in MoveEvent::compile 2008-11-11 17:48:21 -07:00
Joel Dice
191bfb6141 fix 4-to-8 byte sign extensions for ia32 and clean up MoveEvent; all tests now pass on ia32 2008-11-11 17:39:26 -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