Skip to content
Commits on Oct 20, 2015
  1. @dicej
Commits on Oct 19, 2015
  1. @dicej

    add bootimage-test option to makefile

    dicej committed Oct 19, 2015
    This option specifies that the test classes should be AOT-compiled
    along with the class library, which allows us to test that everything
    works in AOT-compiled form as well as JIT-compiled form.  This is
    primarily motivated by the need to test d906db6 (support for
    AOT-compilation of Java 8 lambda expressions).
    Note that I had to tweak Misc because it tested something that
    couldn't be done in an AOT build without a lot of extra work, and
    SystemClassLoader.getPackage because it was returning null when the
    requested package could not be populated with JAR manifest metadata.
    Technically, we probably *should* return null for packages that don't
    exist at all (in the sense that no classes have been loaded from such
    a package), but tracking that kind of thing seems like more trouble
    than it's worth unless someone complains about it.
Commits on Oct 12, 2015
  1. @joshuawarner32

    Merge pull request #457 from dicej/no-artifacts

    joshuawarner32 committed Oct 12, 2015
    disable TravisCI artifact publication
  2. @dicej

    disable TravisCI artifact publication

    dicej committed Oct 12, 2015
    This stopped working recently, apparently due to obsolete
    credentials.  Since no-one is actually using these artifacts as far as
    we are aware, I'm just disabling the task so the build doesn't
    continue to fail.
Commits on Sep 28, 2015
  1. @dicej

    Merge pull request #456 from joshuawarner32/master

    dicej committed Sep 28, 2015
    reorganize docker files, upgrade to java 8, gcc 4.9
  2. @joshuawarner32

    Merge pull request #454 from dicej/aot-lambda

    joshuawarner32 committed Sep 28, 2015
    support AOT-compilation of Java 8 lambda expressions
  3. @joshuawarner32
Commits on Sep 13, 2015
  1. @dicej

    support AOT-compilation of Java 8 lambda expressions

    dicej committed Sep 12, 2015
    These expressions are tricky because they rely on invokedynamic, which
    normally implies runtime code generation.  However, since lambdas
    don't actually use the "dynamicness" of invokedynamic, we can convert
    them into static calls to synthetic classes at compile time.
    Since I had already written code to synthesize such classes in Java
    and I didn't want to rewrite it in C++, I needed to add support for
    running Java code to the bootimage generator.  And since the primary
    VM used by the generator is purpose-built to generate AOT-compiled
    code for a specific target architecture and is not capable of
    generating or running JIT-compiled code for the host architecture, I
    added support for loading a second, independent, host-specific VM for
    running Java code.
    The rest of the patch handles the fact that each method compilation
    might cause new, synthetic classes to be created, so we need to make
    sure those classes and their methods are included in the final heap
    and code images.  This required breaking some giant code blocks out of
    makeCodeImage into their own methods, which makes the diff look
    scarier than it really is.
  2. @dicej

    Merge pull request #446 from bgould/master

    dicej committed Sep 13, 2015
    Added targets for Eclipse environment descriptor.
  3. @dicej

    Merge pull request #453 from joshuawarner32/master

    dicej committed Sep 13, 2015
    ignore leading / for files on Windows (fixes #452)
  4. @dicej

    optionally specify reentrancy when creating a System object

    dicej committed Sep 12, 2015
    This allows multiple Avian VMs to share the same process space,
    provided they don't try to use functionality that involves global
    shared resources (e.g. signal handling).
  5. @dicej

    avoid calling unrelated JNI methods during class initialization

    dicej committed Sep 12, 2015
    The main goal here is to avoid making JNI calls from code that really
    shouldn't need JNI (e.g. before this patch, ArrayList.add called
    Math.max, which called Math.<clinit>, which called Random.<init>,
    which called System.currentTimeMillis).
    Besides following the "pay for only what you need" principle, this
    change ensures we can call LambdaMetaFactory methods during AOT
    compilation with a minimal VM (i.e. without compiling in JNI methods
    we don't need).
Commits on Sep 2, 2015
  1. @joshuawarner32
Commits on Aug 18, 2015
  1. @joshuawarner32

    Merge pull request #451 from dicej/invoke-dynamic-stub

    joshuawarner32 committed Aug 18, 2015
    implement basic Java 8 lambda support
Commits on Aug 8, 2015
  1. @dicej


    dicej committed Aug 7, 2015
    This wasn't meant to be checked in long-term.
Commits on Aug 6, 2015
  1. @dicej

    allow building with Java 7

    dicej committed Aug 6, 2015
  2. @dicej
  3. @dicej

    add support for openjdk=$JDK8_HOME

    dicej committed Aug 6, 2015
    All tests pass for the process=compile build.  Next step: process=interpret.
  4. @dicej

    implement basic Java 8 lambda support

    dicej committed Aug 5, 2015
    The two big pieces here are basic invokedynamic support and a working
    version of LambdaMetaFactory.metafactory.  The latter works by
    dynamically building a synthetic class with three methods: a static
    factory method, a constructor for the factory method to call, and a
    method to satisfy the requested interface which defers to the
    specified MethodHandle.
    This work relies heavily on Avian's specific MethodType and
    MethodHandle implementations, which provide extra, non-standard
    features to make code generation easier.  That means we'll probably
    need to use Avian's versions of java.lang.invoke.* even when building
    with the OpenJDK or Android class libraries.
  5. @joshuawarner32 @dicej

    first pass at minimal invokedynamic support for Java 8 lambdas

    joshuawarner32 committed with dicej May 3, 2015
    This is a bunch of commits squashed into one per Josh's request.
    add dynamicTable field
    add invokedynamic instruction
    add defaultDynamic bootimage field
    add dummy invokedynamic support in bootimage-generator
    add defaultDynamic thunk
    check dynamicTable offset
    comment defaultDynamicThunk to fix unused function
    comment defaultDynamicThunk to fix unused function
    add dynamicTable / dynamicIndex stuff
    comment dynamicIndex and dynamicTable
    add invokedynamic instruction impl
    stub out addDynamic
    unstub addDynamic
    don't allow tail calls in invokedynamic
    implement stub JVM_GetTemporaryDirectory method
    (build broken) begin add InvokeDynamicTest
    Revert "(build broken) begin add InvokeDynamicTest"
    This reverts commit 77f9c54.
    add InternalError
    add URLClassPath.c for openjdk-src builds
    implement stub JVM_KnownToNotExist and JVM_GetResourceLookupCache methods
    intercept open0 / open for openjdk
    add basic java/lang/invoke stubs
    remove non-public java/lang/invoke classes
    fix invokedynamic example building
    <wip debugging>
  6. @bgould @dicej
  7. @joshuawarner32 @dicej
Commits on Jul 29, 2015
  1. @joshuawarner32

    Merge pull request #450 from bgould/io-enhancements

    joshuawarner32 committed Jul 29, 2015
    Closeable extends AutoCloseable; RandomAccessFile implements DataInput
  2. @joshuawarner32

    Merge pull request #449 from bgould/printf-fix

    joshuawarner32 committed Jul 29, 2015
    Fixed method signatures on format() methods to return PrintStream as in OpenJDK
  3. @bgould
  4. @bgould
Commits on Jul 18, 2015
  1. @joshuawarner32
Commits on Jul 17, 2015
  1. @bgould
Commits on Jul 16, 2015
  1. @bgould

    Added targets for Eclipse environment descriptor.

    bgould committed Jul 16, 2015
    Someone on the Google Groups site asked how to set up an Eclipse
    project with Avian classpath. This patch creates the descriptor
    that you can you use to do that at `$(build)/eclipse/jdk/`.
    The descriptor includes the Avian version, platform, architecture,
    and build options to allow for multiple versions to exist side by
    side.  Users can import the descriptor into Eclipse via:
        Window >> Preferences >> Java >> Installed JREs >> Add >> Execution
        Environment Description
    Once the descriptor is imported, Avian can be used just like any other
    JVM installation for Eclipse projects. Personally I use this in
    conjunction with Eclim to gain code completion for Avian in vim.
    The new targets also create symlinks to loosely mimic OpenJDK's
    filenames and folder layout:
        ├── bin
        │   └── java -> ../../../avian
        ├── jre
        │   └── lib
        │       └── rt.jar -> ../../../../classpath.jar
        └── src -> ../../classpath
    Annoyingly, Eclipse for some reason expects this layout to exist
    even though the descriptor format has required parameters for
    specifying these locations. I suppose that other software may
    look for this "standard" layout in a JVM installation so it may be
    generally useful.
    These artifacts are only built if the platform is one of `windows`,
    `linux`, or `macosx`. The symlinks might not actually work at all on
    Windows, I'm not sure how things like cygwin/msys handle that and I
    do not have the means to test it. If they do not work a fallback
    for windows might be to actually copy the files instead of symlinking.
    I realize this can be done outside of the makefile but it seemed
    useful to put it here to gain access to the information about the
    build location, platform, architecture, and other build options.
    For the record, this contribution is my original work and is released
    under the same license that Avian uses, found in the license.txt
    file in this repository.
Commits on Jul 8, 2015
  1. @joshuawarner32

    Merge pull request #444 from dicej/immortal-fixies

    joshuawarner32 committed Jul 7, 2015
    fix GC crash for bootimage builds
Commits on Jul 7, 2015
  1. @dicej

    fix GC crash for bootimage builds

    dicej committed Jul 7, 2015
    In a bootimage=true build, we create allocate certain objects as
    "immortal fixies", which means they will never been deallocated at
    runtime and should only be visited if/when they point to objects which
    might move during garbage collection.  However, there was a bug in the
    following case:
     1. immortal fixie F is updated to point to a movable object M and
     thus F is added to the list of fixies to visit during the next minor
     collection (but not the next major one, since all reachable objects
     are visited during a major collection, and there's no point in
     visiting an unreachable object, whereas during a minor collection we
     have to visit F because we don't know if it's reachable or not)
     2. a major collection occurs, but F is not reachable and thus is not
     visited, whereas M is moved
     3. a minor collection occurs, and since F is still in the list, it is
     visited, but since it contains a stale pointer to M's old location,
     we crash
    The solution is to ensure unreachable immortal fixies are removed from
    the above list after each major collection, thus guaranteeing they
    won't be visited on any subsequent collection.
Commits on Jun 25, 2015
  1. @joshuawarner32

    Merge pull request #442 from dicej/master

    joshuawarner32 committed Jun 25, 2015
    fix GCC 5.1 compiler warnings/errors
Commits on Jun 24, 2015
  1. @dicej

    Merge pull request #441 from bigfatbrowncat/cp_fix2

    dicej committed Jun 24, 2015
    fixed abs() compilation for Android classpath on OSX
  2. @bigfatbrowncat

    llabs call fixed

    bigfatbrowncat committed Jun 24, 2015
Commits on Jun 23, 2015
  1. @dicej

    fix GCC 5.1 compiler warnings/errors

    dicej committed Jun 23, 2015
    GCC is a lot more sensitive about -Werror=unused-variable, to the
    point that stuff declared in header files but unused in a given
    compilation unit is flagged.  This may be due to the way we're
    here's the fix.
Something went wrong with that request. Please try again.