Joshua Warner
ada6ce4cc3
fix arm compiler abort
2014-06-11 09:55:39 -06:00
Joel Dice
975b1ddfd8
Merge pull request #275 from mikehearn/prop-fix
...
Set a property that the LambdaWorks SCrypt library expects to be present
2014-06-05 13:37:47 -06:00
Joel Dice
b16dd4e63f
only enter IdleState if necessary in idleIfNecessary
...
There's no need to enter IdleState (and incur synchronization
overhead) unless another thread is waiting to enter ExclusiveState.
This change improves the performance of the MemoryRamp test by a
factor of about 100.
2014-06-05 07:49:49 -06:00
Mike Hearn
87125874b5
Set a property that the LambdaWorks SCrypt library expects to be present.
2014-06-05 21:32:39 +08:00
Joshua Warner
05d80aee8b
remove static references to TargetBytesPerWord in Compiler
2014-06-01 14:57:05 -06:00
Joshua Warner
1fb6a0bceb
fix up creation of ir::Type
2014-06-01 14:22:51 -06:00
Joshua Warner
68b725900e
remove old Subroutine comments
2014-06-01 10:04:56 -06:00
Joshua Warner
ec2e153aa8
fixup comments in Subroutine
2014-05-31 21:28:27 -06:00
Joshua Warner
9ed6a16340
make function and constant naming clearer (code review feedback)
2014-05-31 19:39:36 -06:00
Joshua Warner
1d86e668cb
inline Frame::*ed* code
2014-05-30 23:57:07 -06:00
Joshua Warner
955f4918b4
parameterize many Frame:: methods by type
2014-05-30 23:57:02 -06:00
Joshua Warner
7abbace8fb
replace Frame::StackType with ir::Type
2014-05-30 23:40:24 -06:00
Joshua Warner
37d104871c
test line number table generation in subroutines
2014-05-30 23:40:24 -06:00
Joshua Warner
9273d5ca39
remove redundant Compiler::initLocal footprint parameter
2014-05-30 23:40:24 -06:00
Joshua Warner
b6a3ed763c
add assert in Compiler::initLocal and fix ensuing problems
2014-05-30 23:40:24 -06:00
Joshua Warner
9a54c50db6
make asserts in loadLocal and storeLocal more strict
2014-05-30 23:40:23 -06:00
Joshua Warner
91c5599fc0
remove redundant Compiler::storeLocal footprint parameter
2014-05-30 23:40:23 -06:00
Joshua Warner
cc4525c31c
add type/footprint assert in Compiler::storeLocal
2014-05-30 23:40:23 -06:00
Joshua Warner
e7837c243e
remove redundant size parameter to appendBranch, rename type -> op
2014-05-30 23:40:23 -06:00
Joshua Warner
0eda1d7d11
add type asserts in appendBranch
2014-05-30 23:40:23 -06:00
Joshua Warner
c259faf24a
remove redundant size parameters to appendReturn and appendCall
2014-05-30 23:40:23 -06:00
Joshua Warner
9282c78549
add type asserts in appendReturn and appendCall
2014-05-30 23:40:23 -06:00
Joshua Warner
148d35bab5
remove redundant size parameters to appendCombine and appendTranslate
2014-05-30 23:40:23 -06:00
Joshua Warner
d67820054e
add type asserts in appendCombine and appendTranslate
2014-05-30 23:40:23 -06:00
Joshua Warner
008bb6b86e
remove redundant Compiler::unaryOp type parameter
2014-05-30 23:40:23 -06:00
Joshua Warner
a0443f0ef1
add type asserts in Compiler::unaryOp
2014-05-30 23:40:22 -06:00
Joshua Warner
b14709c54c
remove redundant Compiler::condJump type parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
e3354617a6
add type asserts in Compiler::condJump
2014-05-30 23:40:22 -06:00
Joshua Warner
33d946d249
remove redundant Compiler::store srcType parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
f6bc51647e
add type assert in Compiler::store, fix ensuing problems
2014-05-30 23:40:22 -06:00
Joshua Warner
e3d01746e8
remove redundant Compiler::truncate srcType parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
3029bb2d7e
add type asserts in Compiler::truncate
2014-05-30 23:40:22 -06:00
Joshua Warner
b853f1a594
remove redundant f2i & i2f aType parameter
2014-05-30 23:40:22 -06:00
Joshua Warner
c9313d5802
add type assert in f2i & i2f
2014-05-30 23:40:22 -06:00
Joshua Warner
c843a97e23
remove redundant f2f aType parameter
2014-05-30 23:40:21 -06:00
Joshua Warner
963b371e04
remove redundant load srcType parameter
2014-05-30 23:40:21 -06:00
Joshua Warner
69966f1d36
add type assert in load, fix ensuing problems
2014-05-30 23:40:21 -06:00
Joshua Warner
6fdd5d13ca
remove redundant return_ type parameter
2014-05-30 23:40:21 -06:00
Joshua Warner
746c0fa0e8
remove ir::Type::Invalid, no longer needed for Subroutine
2014-05-30 23:40:21 -06:00
Joshua Warner
5ad1a14a73
explode Subroutines in compile.cpp rather than handling them in Compiler
2014-05-30 23:40:21 -06:00
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
9f36a8e0ec
prepare to move stack manipulation out of CallEvent
2014-05-30 22:41:11 -06:00
Joshua Warner
ae534bed5f
cleanup
2014-05-30 22:41:11 -06:00
Joshua Warner
cfc3bd212b
remove stack manipulation from NativeCallingConvention calls
2014-05-30 22:41:11 -06:00
Joshua Warner
fe2962830c
remove unused CallEvent::argumentStack variable, prepare to remove stack manipulation from NativeCallingConvention calls
2014-05-30 22:41:11 -06:00
Joshua Warner
d2e9911161
add asserts in CallEvent
2014-05-30 22:41:11 -06:00
Joshua Warner
1318b9ca2a
remove redundant CallEvent::argumentCount parameter
2014-05-30 22:41:11 -06:00
Joshua Warner
f9cbca8f7d
pair up stack for NativeCallingConvention
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
3c9a453d17
add extra asserts in CallEvent
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
86a98240b4
remove useless static_casts to retrieve ir::Value::type
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
75f0812f7a
remove unused Compiler::push method
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
Joel Dice
6d68ae7c13
Merge pull request #268 from joshuawarner32/clean-shutdown
...
cleanly destroy MyProcessor
2014-05-20 18:30:05 -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
Joshua Warner
7ee03be2e9
add simple version flag
2014-05-20 13:13:17 -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
Joel Dice
0800508b4e
move Runtime.freeMemory and totalMemory to builtin.cpp
...
This allows them to be shared between the Avian and Android class
library builds.
This commit also disables the URL test in Misc.java on Android, since
it's known to fail, and we still want to know whether the other tests
pass.
2014-05-10 18:56:04 -06:00
Joel Dice
3696edeb1e
fix stack alignment bug in vmJumpAndInvoke
...
This was causing crashes on 32-bit OS X continuations=true builds.
There were two important differences between vmInvoke and
vmJumpAndInvoke: (1) vmInvoke expects its stack to be aligned on
entry, modulo the return address whereas the stack argument to
vmJumpAndInvoke is aligned without allowing for the return address,
and (2) vmInvoke pushes EBP before doing its frame allocation, whereas
vmJumpAndInvoke did not take that into account. So in order for
vmJumpAndInvoke to allocate the exact same frame size that vmInvoke
would have when calling the same method, it needed to add an extra two
words beyond what it was already allocating.
Aside from alignment concerns, the code is not particularly sensitive
to vmJumpAndInvoke allocating a different frame size than vmInvoke,
since we store the frame pointer in a "thread local" variable:
// remember this stack position, since we won't be able to rely on
// %rbp being restored when the call returns
movl 8(%ebp),%eax
movl %esp,TARGET_THREAD_SCRATCH(%eax)
...
GLOBAL(vmInvoke_returnAddress):
// restore stack pointer
movl TARGET_THREAD_SCRATCH(%ebx),%esp
My original patch makes an equivalent change for the 64-bit changes,
but I'll leave that for after we release 1.0 since we're in
bugfix-only mode right now
2014-05-08 09:20:12 -06:00
Joshua Warner
518f428f13
add Field.getDeclaredAnnotations default method for android classpath (fixes Reflection test)
2014-05-07 14:48:21 -06:00
Joshua Warner
41adb74eb1
remove powerpc support
2014-04-29 13:26:40 -06:00
Joel Dice
172ef9a7e6
Merge pull request #246 from joshuawarner32/master
...
Stop using *Critical functions in throwIOException
2014-04-24 19:40:10 -06:00