Commit Graph

4621 Commits

Author SHA1 Message Date
Joel Dice
601546efb7 Merge pull request #430 from joshuawarner32/master
Fixes for arm64, new clang, new ios SDK
2015-05-01 16:54:33 -06:00
Joshua Warner
fa63bce14d don't use x18 on arm64, where it's a reserved 'platform' register 2015-05-01 13:44:44 -06:00
Joshua Warner
1290fda6a8 fix new clang warnings (from upgrading clang) 2015-05-01 13:44:21 -06:00
Joshua Warner
b950d8eea8 add sdk 8.3 support 2015-05-01 13:02:52 -06:00
Joel Dice
62570109f2 fix windows publish regression 2015-04-07 17:09:22 -06:00
Joel Dice
8022bd9733 expand support for publishing LZMA artifacts 2015-04-07 16:55:45 -06:00
Seth Goings
e60f53db73 Add lzma support 2015-04-07 11:08:50 -06:00
Joel Dice
4bacddb20a Merge pull request #427 from bgould/master
Added java.util.Formatter implementation. Basic/common formats work,
2015-03-19 14:50:50 -06:00
BCG
5bd8d2759e Switched test harness from calling avian.FormatString to use java.lang.String.format() instead 2015-03-17 12:34:45 -04:00
BCG
a8bed52097 Added java.util.Formatter implementation. Basic/common formats work,
such as %s, %d, %x... also width, left justify, zerofill flags are
implemented. Many of the other formats do not work, see the comments in
avian.FormatString javadoc and look for FIXME and TODO items for more
information on features that are known to not work correctly.
2015-03-17 01:08:07 -04:00
Joshua Warner
cacc099987 Merge pull request #426 from dicej/ci-error
ensure ci.sh exits with error when any test fails
2015-03-16 17:19:22 -06:00
Joel Dice
7d6f80e64d Merge pull request #425 from joshuawarner32/size_t
use size_t instead of unsigned in a bunch of appropriate places
2015-03-16 17:01:08 -06:00
Joel Dice
c6f7129c27 ensure ci.sh exits with error when any test fails
As explained in
http://stackoverflow.com/questions/25794905/why-does-set-e-true-false-true-not-exit,
"set -e" will only cause the script to exit if the failing command is
"unhandled".  The fancy || and && shortcuts we were using to run some
of the tests caused bash to think we were handling the errors, which
isn't what we wanted.
2015-03-16 16:47:24 -06:00
Joshua Warner
1fcc097344 use size_t instead of unsigned in a bunch of appropriate places
This would theoretically break compatibility with apps using embedded
classpaths, on big-endian architectures - because of the size type
extension.  However, we don't currently support any big-endian
architectures, so it shouldn't be a problem.
2015-03-16 16:28:20 -06:00
Joel Dice
b199542b66 update version to 1.3.0-SNAPSHOT 2015-03-16 14:23:30 -06:00
Joel Dice
72c0547f4b update version for release 2015-03-16 14:22:00 -06:00
Joshua Warner
d9650be570 Merge pull request #424 from dicej/ios-x86_64
add support for iOS/x86_64
2015-03-16 13:57:48 -06:00
Joel Dice
575f595292 add support for iOS/x86_64 2015-03-16 11:39:08 -06:00
Joshua Warner
ad75d4ae22 Merge pull request #423 from dicej/clean
delete lib dir in clean target
2015-03-16 11:19:38 -06:00
Joel Dice
93a4702de9 delete lib dir in clean target 2015-03-16 10:39:11 -06:00
Joshua Warner
8b20e89a3d Merge pull request #422 from dicej/clean
expand clean target and disable jdk tests when alternative arch specified
2015-03-16 08:59:37 -06:00
Joshua Warner
1fd0833a0c Merge pull request #421 from dicej/copyright
update copyright years
2015-03-13 17:08:36 -06:00
Joel Dice
d6c9d3c2d0 disable openjdk=... and jdk tests if arch flag specified
These combinations generally won't work, since the JAVA_HOME JDK will
tend to match the native, default architecture, not the one specified.
2015-03-13 15:28:14 -06:00
Joel Dice
b35f236066 delete cmake-build and distrib in clean target 2015-03-13 15:21:29 -06:00
Joel Dice
cbde34620c update copyright years 2015-03-13 12:52:59 -06:00
Joshua Warner
7a74c2c168 Merge pull request #419 from dicej/type-generator-limit
handle arbitrary class sizes in type-generator/main.cpp
2015-03-12 13:33:42 -06:00
Joel Dice
dc7e68708f add JVM_GetResourceLookupCacheURLs
This improves support for building with openjdk=$jdk8.  Note, however,
that the Processes test does not pass, since JDK 8's
java.lang.UNIXProcess uses invokedynamic, which Avian does not yet
support.
2015-03-12 10:52:17 -06:00
Joel Dice
6c7ff9874e handle arbitrary class sizes in type-generator/main.cpp
OpenJDK 8 includes a core class (java.lang.Thread) which so many
fields that it exceeds the class size limit in type-generator dictated
by the logic responsible for calculating each class's GC object mask,
at least on 32-bit systems.  There was no fundamental need for this
limit -- it just made the code simpler.

This commit removes the above limit at the cost of slightly more
complicated code.  The original motivation for this change is that the
platform=macosx arch=i386 openjdk=$jdk8 build was failing.  However,
there doesn't seem to be a prebuild JDK 8 for 32-bit OS X anywhere on
the Internet, nor is there any obvious way to build one on a modern
Mac, so it's safe to say we won't be supporting this combination
anyway.  The problem also occurs on Linux and Windows, though,
so it needs to be fixed.
2015-03-12 10:50:03 -06:00
Joel Dice
795604bbc4 Merge pull request #417 from ReadyTalk/repatch-windows-file-delete
repatch windows file delete
2015-03-06 15:39:20 -07:00
Brandon Craig
9928597543 repatch windows file delete 2015-03-06 14:37:06 -07:00
Joshua Warner
1f8f0b2194 Merge pull request #415 from dicej/openjdk8
fix OpenJDK 8 class library build
2015-02-27 14:14:53 -07:00
Joel Dice
02cfe06850 fix OpenJDK 8 class library build 2015-02-27 13:59:06 -07:00
Joshua Warner
09833801c8 Merge pull request #414 from ReadyTalk/fix-delete-windows
fix java.io.File.delete() implementation for windows
2015-02-19 15:24:46 -07:00
Brandon Craig
a188b15f2e fix java.io.File.delete() implementation for windows 2015-02-19 14:55:48 -07:00
Joshua Warner
b959a2a2f9 Merge pull request #407 from dicej/master
load bootstrap classes in findInterfaceMethod
2015-02-09 10:21:26 -07:00
Joshua Warner
f05f116c3f Merge pull request #409 from marcinolawski/master
Added missing methods to ByteArrayOutputStream, Modifier and UTFDataFormatException.
2015-02-08 17:49:50 -07:00
Marcin Olawski
a5ff62fbad Swap the directionality of the links in Cell. 2015-02-08 22:38:56 +01:00
Marcin Olawski
0537cb4775 Add ByteArrayOutputStream.writeTo(OutputStream), UTFDataFormatException and Modifier.isTransient(int). 2015-02-08 16:09:08 +01:00
Joshua Warner
3441e6f5aa Merge pull request #408 from marcinolawski/master
Missing methods in Arrays, ArrayIndexOutOfBoundsException and ClassNotFoundException.
2015-02-07 18:38:04 -07:00
Marcin Olawski
ff17455baa Add Arrays.fill(* a,int start,int stop,* value). 2015-02-07 21:12:48 +01:00
Marcin Olawski
6462c159aa Add ArrayIndexOutOfBoundsException(int) and ClassNotFoundException.getException(). 2015-02-07 21:12:04 +01:00
Joel Dice
7a4cae0dde load bootstrap classes in findInterfaceMethod
In afbd4ff, I made a low-risk, but very specific fix for a more
general problem: "bootstrap" classes (i.e. classes which the VM has
built-in knowledge of) need to be loaded from the classpath before any
of their methods are called.  Based on recent testing, I found there were
more cases than I previously thought where the VM tries to call methods on
"unloaded" bootstrap classes, so we needed a more general solution to
the problem.

This commit addresses it by closing the last (known) loophole by which
methods might be called on bootstrap classes: invokeinterface, and its
helper method findInterfaceMethod.  The fix is to check for bootstrap
classes in findInterfaceMethod and load the full versions if
necessary.  This process may lead to garbage collection and/or thrown
exceptions, which made me nervous about cases of direct or indirect
calls to findInterfaceMethod not expecting those events, which is why
I hadn't used that approach earlier.  However, it turns out there were
only a few places that made non-GC-safe calls to findInterfaceMethod,
and a bit of code rearrangement fixed that.
2015-02-06 13:51:32 -07:00
Joshua Warner
21e6bd8598 Merge pull request #406 from marcinolawski/master
I added 2 missing method to java.lang.Character.
2015-02-06 12:49:44 -07:00
Marcin Olawski
6f8a8b9436 Added Character.isJavaIdentifierStart(int), isJavaIdentifierPart(int) and made isJavaIdentifierStart(char), isJavaIdentifierPart(char) more compact. 2015-02-06 20:07:51 +01:00
Marcin Olawski
ab3ee4c6e2 Add Character.isJavaIdentifierStart(char ch) and isJavaIdentifierPart(char ch) 2015-02-06 15:26:40 +01:00
Joshua Warner
4d91110fe7 Merge pull request #405 from dicej/master
fix ARM64 iOS JNI crashes
2015-02-05 19:03:49 -07:00
Joel Dice
c2a0210c7b fix ARM64 iOS JNI crashes
As documented at
https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html,
the ARM64 iOS ABI differs from the generic ABI in a few important
ways.  Specifically, arguments passed via the stack are aligned
according to their natural alignment instead of 8 bytes.  The VM's
dynamic call code was aligning each argument to 8 bytes, so native JNI
code couldn't find them in their expected places.

Also, we weren't setting the "os.arch" system property on ARM64, so I
fixed that too.
2015-02-05 17:20:53 -07:00
Joshua Warner
a13e97ddf7 Merge pull request #403 from dicej/getDeclaredMethods
fix crash when calling Class.getDeclaredMethods using the OpenJDK class ...
2015-01-22 13:38:54 -07:00
Joshua Warner
7fe6f015fd Merge pull request #402 from dicej/master
fix Cygwin build
2015-01-22 13:30:43 -07:00
Joel Dice
afbd4ff303 fix crash when calling Class.getDeclaredMethods using the OpenJDK class library
This method ends up defering to JVM_GetClassDeclaredMethods, which
creates an array of java.lang.reflect.Method instances and then
calling getName on each one through the java.lang.reflect.Member
interface.  However, Method is a "bootstrap" class, meaning the VM has
built-in knowledge of it and includes a tentative version built-in but
must load the real version from the classpath at runtime before
invoking methods on it.  Normally this happens naturally when Method
instances are created in Java code, but here we're creating them in
the VM instead, which doesn't automatically cause the real class to be
loaded.  So we must do so explicitly.
2015-01-22 12:02:28 -07:00