Skip to content

Commit

Permalink
Add SocketPlugin's primitiveResolverHostNameSize
Browse files Browse the repository at this point in the history
  • Loading branch information
fniephaus committed Feb 8, 2019
1 parent f9ccf53 commit d837c20
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@ protected final AbstractSqueakObject doWork(@SuppressWarnings("unused") final Ab
}
}

@GenerateNodeFactory
@SqueakPrimitive(names = "primitiveResolverHostNameSize")
protected abstract static class PrimResolverHostNameSizeNode extends AbstractPrimitiveNode implements UnaryPrimitive {
protected PrimResolverHostNameSizeNode(final CompiledMethodObject method) {
super(method);
}

@Specialization
protected static final AbstractSqueakObject doSize(@SuppressWarnings("unused") final AbstractSqueakObject receiver) {
throw new PrimitiveFailed(); // Signals that IPv6 is not available.
}
}

@GenerateNodeFactory
@SqueakPrimitive(names = "primitiveSocketLocalPort")
protected abstract static class PrimSocketLocalPortNode extends AbstractPrimitiveNode implements BinaryPrimitive {
Expand Down

0 comments on commit d837c20

Please sign in to comment.