Commit Graph

656 Commits

Author SHA1 Message Date
Joshua Warner
781977d19c add debug-util for printing java bytecode as it's compiled 2014-05-30 23:40:21 -06:00
Joshua Warner
2e40d38078 enforce more strong typing in compiler 2014-05-30 23:40:15 -06:00
Joshua Warner
7b0d577430 fix some return type & intrinsic typing 2014-05-30 23:19:41 -06:00
Joshua Warner
cb7f570f20 begin enforcing more strong typing 2014-05-30 22:51:03 -06:00
Joshua Warner
43eb49cf53 fix sizing of some stack ints 2014-05-30 22:41:11 -06:00
Joshua Warner
d62d083733 remove stack manipulation from AvianCallingConvention loop 2014-05-30 22:41:11 -06:00
Joshua Warner
69edeaadee remove redundant Compiler::stackCall footprint argument 2014-05-30 22:41:11 -06:00
Joshua Warner
97ce7d2b4e pass CallEvent arguments in Slice as well 2014-05-30 22:41:10 -06:00
Joshua Warner
4e00a1e304 add Frame::referenceStackCall 2014-05-30 22:41:10 -06:00
Joshua Warner
3aa85f2494 move return handling into Frame::stackCall 2014-05-30 22:41:10 -06:00
Joshua Warner
ad3ec1abf3 introduce Frame::stackCall util 2014-05-30 22:41:10 -06:00
Joshua Warner
479c056b2c move Compiler::Operand to ir::Value 2014-05-30 22:41:10 -06:00
Joshua Warner
865041b688 add asserts 2014-05-30 22:38:10 -06:00
Joshua Warner
42fec084b0 expose Value::type and add asserts 2014-05-30 22:16:39 -06:00
Joshua Warner
00253ce528 remove redundant Compiler::load srcSelectType parameter 2014-05-30 22:16:39 -06:00
Joshua Warner
4c4cc49510 use Compiler::truncateThenExtend in more places 2014-05-30 22:16:39 -06:00
Joshua Warner
26d8e8aa1f add Compiler::truncateThenExtend 2014-05-30 22:16:39 -06:00
Joshua Warner
99fa560257 merge Compiler::load and Compiler::loadz 2014-05-30 22:16:39 -06:00
Joshua Warner
85f114ea0f use ir::Type in Compiler::loadLocal 2014-05-30 22:16:39 -06:00
Joshua Warner
53b68a693d add more aggressive checks to Compiler::load* 2014-05-30 22:16:38 -06:00
Joshua Warner
27ea503233 switch Compiler::load* to use ir::Type rather than sizes 2014-05-30 22:16:38 -06:00
Joshua Warner
9c98986f99 remove redundant Compiler::store dstType parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
0ee3eec478 add extra type checks to Compiler::store 2014-05-30 22:16:38 -06:00
Joshua Warner
8b1739dc0f remove redundant Compiler::stackCall resultSize parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
1d466a800e remove redundant Compiler::call resultSize parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
9805ff94b4 remove redundant Compiler::memory scale parameter 2014-05-30 22:16:38 -06:00
Joshua Warner
f9b781149e add extra type checks to Compiler::store and Compiler::memory 2014-05-30 22:16:38 -06:00
Joshua Warner
1fc6011bf7 add extra flavor type check to Compiler::store 2014-05-30 22:16:37 -06:00
Joshua Warner
aef5acce84 add flavor type check to Compiler::store 2014-05-30 22:16:35 -06:00
Joshua Warner
2ed52c05a8 use ir::Type in Compiler::store 2014-05-30 21:19:33 -06:00
Joshua Warner
8af9bb8297 change Compiler::register_ to Compiler::threadRegister, since it was only used as such 2014-05-30 21:19:32 -06:00
Joshua Warner
2d444830d0 use ir::Type in Compiler::unaryOp and Compiler::binaryOp 2014-05-30 21:19:32 -06:00
Joshua Warner
6ed7681dc0 use ir::Type in f2i and friends, instead of aSize 2014-05-30 21:19:27 -06:00
Joshua Warner
704c05f818 use ir::Type in place of Compiler::OperandType 2014-05-29 15:30:46 -06:00
Joshua Warner
d8914a9646 use ir::Type in Compiler::initLocal 2014-05-29 15:30:46 -06:00
Joshua Warner
4bfb359cdd use ir::Type in Compiler::pop 2014-05-29 15:30:46 -06:00
Joshua Warner
13342d28be use ir::Type in Compiler::save 2014-05-29 15:30:46 -06:00
Joshua Warner
49a5a9f398 use ir::Type in Compiler::push 2014-05-29 15:30:45 -06:00
Joshua Warner
d9fee1025c use ir::Type in Compiler::return_ 2014-05-29 15:30:45 -06:00
Joshua Warner
587b1e3eda use ir::Type in place of lir::ValueType in Value 2014-05-29 15:30:45 -06:00
Joshua Warner
855534b152 introduce ir::Type and begin migrating i2f and friends to it 2014-05-29 15:30:45 -06:00
Joshua Warner
e2f613e063 cleanly destroy MyProcessor to allow for creating/destroying VMs in the same process multiple times 2014-05-20 17:26:11 -06:00
Joel Dice
4a83b671b3 fix crash on exit due to order of operations bug in ~RawMonitorResource
The problem (which we've only been able to reproduce consistently with
the openjdk-src process=interpret build on Linux virtual machines) was
a race condition during VM shutdown.  Thread "A" would exit, see there
were other threads still running and thus enter ZombieState, which
involves acquiring and releasing a lock using RawMonitorResource.
Then the last thread (thread "B") would exit, wait for thread "A" to
release the lock, then shut down the VM, freeing all memory.  However,
thread "A" writes to its Thread object one last time after releasing
the lock (in ~Resource, the destructor of the superclass of
RawMonitorResource, which sets Thread::resource).  If thread "B" frees
that Thread before ~Resource runs, we end up writing to freed memory.

Thus, we need to update Thread::resource before releasing the lock.
Apparently C++ destructors run in order from most derived to least
derived, which is not what we want here.  My solution to split
Resource into two classes, one that has no destructor and another that
extends it (called AutoResource) which does hafe a destructor.  Now
all the classes which used to extend Resource extend AutoResource,
except for RawMonitorResource, which extends Resource directly so it
can control the order of operations.
2014-05-10 23:25:59 -06:00
Joshua Warner
41adb74eb1 remove powerpc support 2014-04-29 13:26:40 -06:00
Joshua Warner
34962ff334 Merge pull request #245 from dicej/jdk8
add support for using the OpenJDK 8 class library
2014-04-24 18:50:38 -06:00
Joel Dice
7de555c797 add support for using the OpenJDK 8 class library
This ensures that all tests pass when Avian is built with an
openjdk=$path option such that $path points to either OpenJDK 7 or 8.

Note that I have not yet tried using the openjdk-src option with
OpenJDK 8.  I'll work on that next.
2014-04-23 15:36:56 -06:00
Joel Dice
9b7d0d1624 update copyright years 2014-04-23 15:33:41 -06:00
Joel Dice
1b8b27fb6b add expect call to ensure tryAllocateExecutable actually succeeds
For some reason, running Avian under the SVN version of Valgrind
caused mmap to fail, which caused tryAllocateExecutable to return a
null pointer, which led to a non-obvious crash later on.  Adding an
expect to check the result immediately will at least make it obvious
what went wrong.
2014-04-11 19:52:53 -06:00
Joel Dice
fd778c2c76 remove redundant interfaces and generalize shift/reset generics
Turns out Function can do the jobs of both CallbackReceiver and
FunctionReceiver, so I've removed the latter two.

Also, shift and reset should work with a combination of types, not
just a single type, so I've expanded their generic signatures.
2014-03-21 07:38:29 -06:00
Joshua Warner
56ec7fc1f9 Merge pull request #200 from dicej/stack-signal
fix a few stack walking and signal handling bugs
2014-03-14 10:45:18 -06:00