Permalink
Commits on Jun 16, 2018
  1. Version 0.35

    niner committed Jun 16, 2018
Commits on Jun 14, 2018
  1. Fix "inconsistent bind result" when loading a Perl 5 module at runtime

    niner committed Jun 14, 2018
    When loading a module via $p5.use('Foo'), we don't have compiler services
    available. Since $compiler_services is the target of a bind, it ends up as
    a Mu, not an Any. This greatly confuses the signature binder. Fix by using
    plain old assignment instead.
Commits on Jun 12, 2018
  1. Use multi-dispatch for p5_to_p6

    niner committed Jun 12, 2018
    Since value based multi dispatch is horribly slow compared to type based one,
    we make a detour via an array holding types corresponding to our values.
Commits on Jun 9, 2018
  1. Version 0.34

    niner committed Jun 9, 2018
  2. Remove NQP ops from CompUnit::Handle setup code

    niner committed Jun 9, 2018
    Turns out by using a mixin, the code can become simpler and free from NQP ops
  3. Speed up unpack_return_values a little

    niner committed Jun 9, 2018
    No need to set up a scalar container for retval as it's written to only once
  4. Improve performance of fallback code

    niner committed Jun 9, 2018
    It's likely that while the multi dispatch cache ops will be replaced at some
    point, the ops for querying a call capture will remain. Even with just those
    we can retain much of the performance, so use them if possible.
  5. Ensure forwards compatibility

    niner committed Jun 9, 2018
    We use nqp ops for handling the multi dispatch cache. Those are not a stable
    API and can go away any time. To prepare for that event, we compile the
    find_best_dispatchee method in an EVAL and fall back to unoptimized code in
    case compilation fails.
    Note that this will just keep things running, or rather crawling. Performance
    will be pretty terrible.
  6. Use an optimized multi dispatcher for P5 wrapper methods

    niner committed Jun 2, 2018
    We do not want ordinary Perl 6 semnatics for multi dispatch which would not
    treat optional named arguments as significant. Instead, we want to use the
    most optimized code for cases where no named arguments were passed. We fall
    back to generic wrapper code if named args are present.
  7. Use multi dispatch to differentiate between one simple and one pair a…

    niner committed Jun 2, 2018
    …rgument
    
    A Pair is a single argument for Perl 6 but actually two arguments for Perl 5.
    The optimized code for handling a single argument can become even faster when
    guaranteed that the argument is not a Pair.
  8. Fix compatibility issues of meta model code with unmodified rakudo

    niner committed Jun 2, 2018
    Unfortunately no deployed rakudo version really supports meta model code
    written in Perl 6. Perl6::Metamodel code expects methods to return deconted
    VM types. There's no way to avoid using NQP code but at least the amount of
    copied/adjusted code is relatively small.
  9. Use multi dispatch to run optimized code for wrapped methods

    niner committed May 30, 2018
    It's what we do in Inline::Perl5::Object, but without having to create and mix
    in a role at runtime.
  10. Centralize code for creating wrapper methods

    niner committed May 29, 2018
    This will allow for us to create optimized versions in a one place
  11. Implement find_method for real

    niner committed May 28, 2018
  12. Use imported packages when wrapping Perl 5 objects

    niner committed May 27, 2018
    Instead of getting undifferentiated Inline::Perl5::Object instances for
    Perl 5 objects, we now use the generated packages for creating wrappers.
    This way the objects get a proper ^name and we get to use the generated
    method wrappers.
Commits on May 16, 2018
  1. Version 0.33

    niner committed May 16, 2018
Commits on May 12, 2018
  1. Work around a strange issue on OS X

    niner committed May 12, 2018
    Apparently p5_av_top_index returns an Int despite having a returns int32
    in its signature. This causes elems() to return 4294967296 instead of 0.
    This is just a workaround, but it seems to help OS X users.
Commits on Apr 24, 2018
  1. Fix importing the same sub into different compunits

    niner committed Apr 24, 2018
    Since on the Perl 5 side all imports go into the main namespace, we
    didn't notice that the requested name got imported earlier already. Work
    around that by explicitly ignoring names that were already there when
    creating the list of imported names.
    This could use some redesign...
Commits on Apr 22, 2018
  1. Fix make clean reporting errors even if it actually ran successfully

    niner committed Apr 22, 2018
    find would try to recourse into directories it just deleted.
    Thanks to ugexe++ for pointing this out!
Commits on Apr 13, 2018
  1. Merge pull request #109 from zoffixznet/patch-1

    niner committed Apr 13, 2018
    Avoid problems due to line-ending differences between OSes
  2. Try to avoid line ending issues on Windows

    niner committed Apr 13, 2018
    Hopefully chomp is smart enough to get rid of whatever newlines on the
    current platform are expressed with.
  3. Avoid shell quoting issues in build system

    niner committed Apr 13, 2018
    Double quotes may have different meaning on different systems. Avoid that trap
    by running the perl binary directly instead of through some shell.
    
    Should fix GH #1728
  4. Support passing Regexes to Perl 5 code.

    niner committed Apr 13, 2018
    This wraps a Perl 6 Regex object in a Perl 5 regex with an embedded code block
    calling a closure. However this means that the Perl 5 regex does not stringify
    to something useful. But it can be used as is to match a string just fine.
  5. Mention how to pass references

    zoffixznet authored and niner committed Apr 12, 2018
Commits on Mar 25, 2018
  1. Version 0.32

    niner committed Mar 25, 2018
  2. Fix method calls on P5 objects swallowing named args

    niner committed Mar 25, 2018
    Unfortunately named arguments play only a very minor role in multi dispatch,
    so the presence of a candidate taking a Capture won't help and other candidates
    will still be called. So we still have to check %_ and manually create the
    Capture.
    
    This will cost some performance but fortunately still retains some of the
    benefit of creating multis at runtime.
  3. Fix precompiled file containing absolute path to shared lib

    niner committed Mar 25, 2018
    %?RESOURCES returns an IO::Path like object that NativeCall understands as it
    is but has the advantage of always resolving relative to the current path of
    the repository. This means we can build in a temporary directory and move the
    files afterwards and still find them.