• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 13 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Java DSL for binding method handles forward, rather than backward

Introduction

This library hopes to provide a more friendly DSL for binding method handles. Unlike the normal MethodHandle API, handles are bound forward from a source MethodType and eventually adapted to a final target MethodHandle. Along the way the transformations are pushed onto a stack and eventually applied in reverse order, as the standard API demands.

Examples

Transformation calls can be chained. They are not applied until an eventual "invoke" is called with the target endpoint MethodHandle.

MethodHandle mh = Binder
   .from(String.class, String.class, String.class) // String w(String, String)
   .drop(1, String.class) // String x(String)
   .insert(0, 'hello') // String y(String, String)
   .cast(String.class, CharSequence.class, Object.class) // String z(CharSequence, Object)
   .invoke(someTargetHandle);

Status

This is currently under development. Not all transformations from the MethodHandle API are yet supported.

Contributors are welcome :)

More Repositories

1

rubyflux

A Ruby static compiler.
Ruby
455
star
2

thread_safe

This project has been absorbed by ruby-concurrency/concurrent-ruby
Java
282
star
3

ruby-atomic

Atomic reference implementation for Ruby
Ruby
198
star
4

bitescript

The BiteScript API and language
Ruby
152
star
5

mirah

Mirah has moved to http://github.com/mirah/mirah
Ruby
114
star
6

duby

The Duby Programming Language
Ruby
100
star
7

jruby-pg

A JRuby version of the "pg" gem.
Java
69
star
8

jo

Implementation of key Go (lang) features for (J)Ruby
Java
65
star
9

indy_deep_dive

Examples from my invokedynamic "deep dive" talk
Java
51
star
10

spoon

A fork/exec replacement for FFI-capable implementations
Ruby
47
star
11

surinx

A simple dynamic language for the JVM
Java
43
star
12

cloby

A Clojure Ref/STM plugin for JRuby
Java
35
star
13

osx-on-linux

Configurations and guides to making Linux feel like OS X
CSS
34
star
14

luaj

Java
33
star
15

boing

Preloader-aware command runner for JRuby, a la Spring.
Ruby
30
star
16

dexclient

A wrapper around the "dex" tool from Android to use it as a library
Java
25
star
17

clojr

A JRuby ext wrapping Clojure's data structs as efficiently as possible
Java
21
star
18

forkjoin.rb

A JRuby extension/wrapper around the Java 7 Fork/Join framework
Java
19
star
19

LogCompilation

The LogCompilation tool from OpenJDK, as-is.
Java
18
star
20

redblack

A red/black tree impl and bench
Python
17
star
21

weakling

A modified WeakRef impl for JRuby plus some weakref-related tools
Java
15
star
22

lazy_enumerator

A pure-Ruby implementation of Ruby 2.0's Enumerator::Lazy
Ruby
14
star
23

options

A small library for managing sets of JVM properties to configure an app or library.
Java
14
star
24

hprof2

A fork of the "hprof" JVMTI demo from OpenJDK, which instruments JVM bytecode via the JVMTI APIs.
C
13
star
25

jruby-cdc

JRuby stripped down to run on the Java ME CDC profile
Ruby
12
star
26

jcd

JRuby version of MacRuby's Grand Central Dispatch wrapper
Java
11
star
27

mediakiller

A converter for MediaWiki markup to other formats
Ruby
10
star
28

jibernate

A JRuby/Hibernate integration example, maybe eventually a full API
Ruby
8
star
29

jruby-spymemcached

It's what you think it is.
Java
8
star
30

netty-examples

Ports of the examples from Netty
Ruby
8
star
31

backport9

Backports and utilities to support Java 9 and higher on Java 8
Java
8
star
32

hackit

A small utility to take advantage of various Windows desktop/window manager hacks.
C++
8
star
33

rx

Tim Bray's pure-Ruby XML parser
Ruby
8
star
34

to_source

JRuby to_source (and to_ast) using jrubyparser
Ruby
7
star
35

xni

A possible new C API for extending Ruby impls
Java
7
star
36

refractor

Utilities to generate direct-invoking stubs, avoiding reflective calls.
Java
6
star
37

protoj

Experiment in generating prototype classes on JVM similar to V8
Java
5
star
38

unsafe-fences

A wrapper around the Java 8 fences API for you to compile against.
Java
4
star
39

railsunder

My Rails Underground demos
Ruby
4
star
40

joniguruma

A pure-Ruby stub to emulate the Oniguruma gem on JRuby
Ruby
4
star
41

jruby-handle-compiler

An experiment in compiling JRuby AST nodes to method handles
Java
4
star
42

quercus

Quercus: Caucho's PHP on the JVM
Java
4
star
43

markdown_meta

markdown_meta is a meta-gem for markdown parsing and content generation.
3
star
44

jruby-demos

Demos for JRuby presentations at conferences
Ruby
3
star
45

jmx_jruby

A JMX wrapper library for JRuby
Ruby
3
star
46

rubytidy

A tool like perl's "perltidy" for reformatting Ruby source.
Ruby
3
star
47

sioc

Scheme InOneClass
Java
3
star
48

indy-examples

Examples and toys relating to invokedynamic
Java
3
star
49

jruby-stm

A thin wrapper around Clojure's STM for JRuby
Java
3
star
50

gc_tests

Ruby scripts designed to test, stress, monitor, or demonstrate GC in Ruby
Ruby
3
star
51

unsafe-mock

A mock of sun.misc.Unsafe for building against.
Java
3
star
52

jruby_gc_stats

GC stat-monitoring methods similar to Ruby Enterprise Edition
Ruby
3
star
53

modulator

Java
2
star
54

butthurt

2
star
55

rackup_thing

Ruby
2
star
56

ChaosBazaar

A port of ControlTower to work atop JCD
C
2
star
57

ruby-concurrency

The online book on concurrency in Ruby
2
star
58

coro-mock

A small mock library for compiling JVM coroutine-utilizing code on JVMs without coroutines
Java
2
star
59

sequence_counter

Examples of single and multi-threaded algorithms with incremental optimizations
Ruby
2
star
60

bone_utils

Utilities and scripts for the BeagleBone
Ruby
2
star
61

rubyvm_mvm

Implementation of MRI's MVM API for JRuby
Ruby
2
star
62

indifier

A tool for converting various Java calls into invokedynamic calls, for fun and profit.
Java
2
star
63

jpager

Example of using Java 7 ProcessBuilder to launch an interactive pager
Ruby
1
star
64

jruby-autolink

A JRuby wrapper around the autolink-java library to provide autolinking like rinku
Ruby
1
star
65

core-benchmarks

Ruby
1
star
66

jruby-extras-demo

Demonstration of some "extra" libraries that come with JRuby.
Java
1
star
67

debugr

A JVM/JDI-based debugger written in Ruby
Ruby
1
star
68

indy-crasher

Ruby
1
star
69

byte-string-examples

Java
1
star
70

rubyconf2011

Ruby
1
star
71

jsr166y-gem

A gem containing the jsr166y jar file
Ruby
1
star
72

jdi_objectspace

A primitive implementation of Ruby's ObjectSpace using the Java Debug Interface
Ruby
1
star
73

pgrailsbench

Ruby
1
star
74

jsr292-mock

Mock versions of java.lang.invoke from Java 7-8 for compilation
Java
1
star
75

singletonizer

A way to add singleton methods to objects without creating singleton objects
Ruby
1
star
76

dcpu-16-j

Java implementation of notch's DCPU-16
Java
1
star
77

graal

Java
1
star