/gist:230fec022c8db7d49833 Secret
Created
October 24, 2014 15:25
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FixnumObjectSite extends LazyObjectSite { | |
private final long value; | |
public FixnumObjectSite(MethodType type, long value) { | |
super(type); | |
this.value = value; | |
} | |
public static final Handle BOOTSTRAP = new Handle(Opcodes.H_INVOKESTATIC, p(FixnumObjectSite.class), "bootstrap", sig(CallSite.class, MethodHandles.Lookup.class, String.class, MethodType.class, long.class)); | |
public static CallSite bootstrap(MethodHandles.Lookup lookup, String name, MethodType type, long value) { | |
return new FixnumObjectSite(type, value).bootstrap(lookup); | |
} | |
public IRubyObject construct(ThreadContext context) { | |
return context.runtime.newFixnum(value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment