use of st.gravel.support.compiler.ast.AbsoluteReference in project gravel by gravel-st.
the class MethodLinker method globalWriteBootstrap.
public static CallSite globalWriteBootstrap(Lookup lookup, String selector, MethodType type, String namespaceString) throws Throwable {
AbsoluteReference namespace = (AbsoluteReference) Reference.factory.value_(namespaceString);
AbsoluteReference fullReference = namespace.$slash$(Symbol.value(selector));
final AlmostFinalValue singletonHolder = ImageBootstrapper.systemMapping.resolveSingletonHolder_(fullReference);
final MethodHandle target = lookup.findVirtual(AlmostFinalValue.class, "setValue", MethodType.methodType(Object.class, Object.class)).bindTo(singletonHolder);
return new ConstantCallSite(target);
}
use of st.gravel.support.compiler.ast.AbsoluteReference in project gravel by gravel-st.
the class MetaclassNode method superclassReferenceForMethodLookup.
@Override
public Reference superclassReferenceForMethodLookup() {
final Reference _csr;
_csr = _classNode.superclassReference();
if (_csr == null) {
return AbsoluteReference.factory.path_(new st.gravel.core.Symbol[] { st.gravel.core.Symbol.value("st"), st.gravel.core.Symbol.value("gravel"), st.gravel.core.Symbol.value("lang"), st.gravel.core.Symbol.value("Class") });
}
return ClassReference.factory.reference_(((AbsoluteReference) _csr));
}
Aggregations