use of dyvilx.tools.compiler.backend.exception.BytecodeException in project Dyvil by Dyvil.
the class CaptureParameter method getDefaultValue.
@Override
public IValue getDefaultValue(IContext context) {
final IValue access = new FieldAccess(this.variable) {
@Override
public void writeExpression(MethodWriter writer, IType type) throws BytecodeException {
this.field.writeGetRaw(writer, this.receiver, this.lineNumber());
}
}.resolve(MarkerList.BLACKHOLE, context);
// ensures proper capture
access.checkTypes(MarkerList.BLACKHOLE, context);
return access;
}
use of dyvilx.tools.compiler.backend.exception.BytecodeException in project Dyvil by Dyvil.
the class ValueAnnotationVisitor method visit.
@Override
public void visit(String key, Object value) {
final IValue iValue = IValue.fromObject(value);
if (iValue == null) {
throw new BytecodeException("Cannot convert '" + value + "' into an IValue");
}
this.consumer.setValue(iValue);
}
Aggregations