Commit Graph

3906 Commits

Author SHA1 Message Date
Vasily Litvinov
25a8a1d59a Merge branch 'avian-droid-2' of https://github.com/bigfatbrowncat/avian into avian-droid-2
Conflicts:
	makefile
Resolved using my changes
2014-03-30 23:16:01 +04:00
Vasily Litvinov
c4e194b63f Small refactoring of the non-class file copying 2014-03-30 23:10:48 +04:00
Ilya Mizus
81c8fc20ab Merge remote-tracking branch 'refs/remotes/ReadyTalk/master' into avian-pack 2014-03-26 09:20:38 +03:00
Mike Jensen
1e1fff58f8 Merge pull request #210 from dicej/cell
fix OpenJDK and Android build regression
2014-03-25 16:37:14 -06:00
Joel Dice
77c451193c Merge pull request #209 from joshuawarner32/master
fix lzma build
2014-03-25 16:04:53 -06:00
Joel Dice
043e832c02 fix OpenJDK and Android build regression
c2bfba9 introduced a regression such that building against a non-Avian
class library failed due to avian.Cell not being added to the library.
Since avian.Continuations depends on that class, the build broke.
2014-03-25 15:58:46 -06:00
Joshua Warner
56cd1d51e0 fix lzma build 2014-03-25 15:10:24 -06:00
Joshua Warner
debaa7b315 Merge pull request #207 from dicej/composable-continuations
Composable continuations
2014-03-24 12:06:27 -06:00
Joel Dice
2a6acfcbe5 Merge pull request #208 from joshuawarner32/master
fix build on mingw
2014-03-24 11:03:19 -06:00
Joshua Warner
0e8d3d91ee fix build on mingw, which somehow doesn't recognize the UNICODE macro correctly 2014-03-24 10:51:44 -06:00
Joel Dice
c2bfba92f0 consolidate duplicate Cell classes 2014-03-24 10:47:37 -06:00
Joel Dice
164717056b remove makefile references to deleted classes 2014-03-24 10:10:08 -06:00
Joel Dice
959172a112 return naturally from function in Continuations.shift rather than via the continuation
Since the function in question is the only one on the call stack above
the reset method, there's no need to invoke the captured continuation
-- we get the same effect by just returning normally, and it's more
efficient that way.
2014-03-24 09:50:09 -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
Joel Dice
570b5447bf fix openjdk and android builds when continuations=true
Also, update the whitespace padding for printing test results to
accommodate long names like extra.ComposableContinuations.
2014-03-21 07:38:29 -06:00
Joel Dice
fcb7059573 revert unintended change to jnienv.cpp 2014-03-21 07:38:28 -06:00
Joel Dice
ff57447507 fix handling of multiple shifts delimited by a single reset 2014-03-21 07:38:28 -06:00
Joel Dice
aa3fa1aff4 simplify shift/reset API and add test (currently failing) 2014-03-21 07:38:28 -06:00
Joel Dice
91e4d2b4a1 quick sketch of composable continuation implementation
I've been told by knowledgeable people that it is impossible to
implement composable continuations (AKA delimited continuations AKA
shift/reset) in terms of call-with-current-continuation.  Since I
don't yet understand why that is, I figured it would help my
understanding to attempt it and see how it fails.
2014-03-21 07:38:28 -06:00
Ilya Mizus
35b567c778 Merge branch 'master' of https://github.com/ReadyTalk/avian into avian-droid-2 2014-03-20 09:18:20 +04:00
Joshua Warner
c5012cda72 Merge pull request #205 from dicej/getPackage
ensure ClassLoader.getPackage works with all class libraries
2014-03-19 17:59:44 -06:00
Joshua Warner
d0c6d81274 Merge pull request #204 from jentfoo/ArrayDeque
Added an implemention of ArrayDeque, as well as unit tests
2014-03-19 12:04:16 -06:00
Joel Dice
8740d76154 ensure ClassLoader.getPackage works with all class libraries
There's more work to do to derive all the properties of a given class
from its code source (e.g. JAR file), but this at least ensures that
ClassLoader.getPackage will actually return something non-null when
appropriate.
2014-03-19 11:21:26 -06:00
Mike Jensen
354d522cd5 Renamed these two files to indicate they are not actual tests, but rather just to help other tests 2014-03-19 10:54:06 -06:00
Mike Jensen
54a1fbac4c Removing unit test where avian implementation is more readily willing to throw a ConcurrentModificationException. 2014-03-19 09:05:19 -06:00
Mike Jensen
b5d388a718 Added an implemention of ArrayDeque, as well as unit tests
I also used this opportunity to reduce code duplication around other queue/deque implementations.
2014-03-18 19:45:00 -06:00
Ilya Mizus
ffc439ad23 Merge branch 'master' of https://github.com/ReadyTalk/avian into avian-droid-2 2014-03-19 00:17:22 +04:00
Vasily Litvinov
a311ced69e Added patching of security.properties - removed "com.android." in front of all "com.android.org.*" classes 2014-03-18 23:13:35 +04:00
Vasily Litvinov
df06564392 Made it so all non-.java files from luni/src/main will be added to classpath directory 2014-03-18 19:22:52 +04:00
Vasily Litvinov
3bd903ca69 Now making it so all .properties get packed into classpath.jar 2014-03-18 19:01:44 +04:00
Joel Dice
e9e365d698 Merge pull request #202 from joshuawarner32/master
Remove old, unused code
2014-03-17 08:03:38 -06:00
Joshua Warner
a368dc0625 remove unused 'audit-codegen' tool 2014-03-16 19:42:03 -06:00
Joshua Warner
c37b13301a remove old unused code
Conflicts:
	include/avian/codegen/lir.h
2014-03-16 19:41:48 -06:00
Vasily Litvinov
1f8fa8a4e8 Made .properties be copied from Android Java source tree 2014-03-17 00:15:33 +04:00
Ilya Mizus
763c95d98e Replaced printf with __mingw_printf to avoid strange crushes 2014-03-16 00:52:58 +03:00
Ilya Mizus
abc9316702 NativeCrypto added for Windows 2014-03-15 21:21:24 +03:00
Joshua Warner
f52ebdc323 Merge pull request #201 from dicej/declaring
fix broken Class.getDeclar{ed|ing}Classes implementations
2014-03-14 11:51:23 -06:00
Joel Dice
58079887a9 fix broken Class.getDeclar{ed|ing}Classes implementations
classpath-common.h's getDeclaringClass was trying to look up
non-existing classes, which led to an abort, and I don't even know
what Class.getDeclaredClasses was trying to do, but it was ugly and
wrong.
2014-03-14 11:10:54 -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
Joel Dice
e43a1b92d4 Merge pull request #199 from joshuawarner32/master
remove unused constants (fixes #198)
2014-03-14 10:06:30 -06:00
Joel Dice
918b7828f1 fix StackOverflowError stack walking in tails=true builds
The various Architecture::nextFrame implementations were not walking
the stack correctly when a StackOverflowError was thrown.  The
throwStackOverflow thunk is called before the frame of the most
recently called method has been fully created, and because tails=true
builds use a different calling convention, we need to treat this
situation carefully when building a stack trace or unwinding.
Otherwise, we will skip past all the java frames to the next native
frame, which is what was happening.
2014-03-14 09:59:04 -06:00
Joel Dice
73e60adeab always add a trap instruction after a throw
Tail call and dead code optimizations can cause code after a throw to
be eliminated, which confuses findUnwindTarget because it doesn't know
what code is throwing the exception.  So we need at least one
instruction to follow the call to the throw_ thunk.  Previously, we
only added such an instruction when we knew the throw was the last
instruction in the bytecode, but it turns out there are other cases
where it is needed, including certain try/finally situations.
2014-03-14 09:54:05 -06:00
Joel Dice
7cfbdc8fdb call crash if the signal handler is unable to handle the signal
Otherwise, the OS will just keep asking us to handle the signal in an
infinite loop.
2014-03-14 09:50:10 -06:00
Joshua Warner
7fa8c7ec20 remove unused constants (fixes #198) 2014-03-14 09:06:19 -06:00
Joel Dice
70b5ea6838 Merge pull request #191 from bigfatbrowncat/avian-droid
Android classpath support in Windows
2014-03-12 16:38:37 -06:00
Mike Jensen
e0497a594b Merge pull request #196 from dicej/concurrent
implement ConcurrentHashMap and fix test class misspelling
2014-03-12 14:23:21 -06:00
Joel Dice
dd359ef937 rename Concurrent to ConcurrentHashMapTest 2014-03-12 13:04:20 -06:00
Joel Dice
4d05bfd540 fix Completeion/Completion misspelling 2014-03-12 10:44:24 -06:00
Joel Dice
c0d178d5f1 implement ConcurrentHashMap and AtomicReferenceArray
This is the simplest possible ConcurrentHashMap I could come up with
that works and is actually concurrent in the way one would expect.
It's pretty unconventional, being based on a persistent red-black
tree, and not particularly memory-efficient or cache-friendly.  I
think this is a good place to start, though, and it should perform
reasonably well for most workloads.  Patches for a more efficient
implementation are welcome!

I also implemented AtomicReferenceArray, since I was using it in my
first, naive attempt to implement ConcurrentHashMap.

I had to do a bit of refactoring, including moving some non-standard
stuff from java.util.Collections to avian.Data so I could make it
available to code outside the java.util package, which is why I had to
modify several unrelated files.
2014-03-12 10:44:24 -06:00
Vasily Litvinov
e3ddb14fd2 Merge branch 'avian-droid' of https://github.com/bigfatbrowncat/avian into avian-droid 2014-03-12 01:11:41 +04:00