All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.oracle.graal.python.builtins.modules.SocketModuleBuiltinsClinicProviders Maven / Gradle / Ivy

There is a newer version: 24.1.1
Show newest version
// CheckStyle: start generated
// Auto generated by ArgumentClinicProcessor at 2023-09-13T15:54:29.245407380
package com.oracle.graal.python.builtins.modules;

import com.oracle.graal.python.builtins.objects.PNone;
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
import com.oracle.graal.python.nodes.function.builtins.clinic.ArgumentCastNode;
import com.oracle.graal.python.nodes.function.builtins.clinic.ArgumentClinicProvider;
import com.oracle.graal.python.nodes.function.builtins.clinic.JavaIntConversionNode;
import com.oracle.graal.python.nodes.function.builtins.clinic.TruffleStringConverterNode;
import com.oracle.graal.python.nodes.function.builtins.clinic.TruffleStringConverterWithDefaultValueNode;

public class SocketModuleBuiltinsClinicProviders {
    public static final class GetHostByAddrNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final GetHostByAddrNodeClinicProviderGen INSTANCE = new GetHostByAddrNodeClinicProviderGen();
        
        private GetHostByAddrNodeClinicProviderGen() {
            super(0x0, 0x0, 0x0, 0x0, 0x1);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            if (argIndex == 0) {
                return TruffleStringConverterNode.create("gethostbyaddr");
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class InetPtoNNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final InetPtoNNodeClinicProviderGen INSTANCE = new InetPtoNNodeClinicProviderGen();
        
        private InetPtoNNodeClinicProviderGen() {
            super(0x0, 0x1, 0x0, 0x0, 0x3);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            switch (argIndex) {
                case 0: return JavaIntConversionNode.create(false);
                case 1: return TruffleStringConverterNode.create("inet_pton");
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class GetServByNameNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final GetServByNameNodeClinicProviderGen INSTANCE = new GetServByNameNodeClinicProviderGen();
        
        private GetServByNameNodeClinicProviderGen() {
            super(0x0, 0x0, 0x0, 0x0, 0x3);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            switch (argIndex) {
                case 0: return TruffleStringConverterNode.create("getservbyname");
                case 1: return TruffleStringConverterWithDefaultValueNode.create("getservbyname", PNone.NO_VALUE, false);
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class InetNtoPNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final InetNtoPNodeClinicProviderGen INSTANCE = new InetNtoPNodeClinicProviderGen();
        
        private InetNtoPNodeClinicProviderGen() {
            super(0x2, 0x3, 0x2, 0x2, 0x1);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            if (argIndex == 0) {
                return JavaIntConversionNode.create(false);
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class InetAtoNNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final InetAtoNNodeClinicProviderGen INSTANCE = new InetAtoNNodeClinicProviderGen();
        
        private InetAtoNNodeClinicProviderGen() {
            super(0x0, 0x0, 0x0, 0x0, 0x1);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            if (argIndex == 0) {
                return TruffleStringConverterNode.create("inet_aton");
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class GetServByPortNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final GetServByPortNodeClinicProviderGen INSTANCE = new GetServByPortNodeClinicProviderGen();
        
        private GetServByPortNodeClinicProviderGen() {
            super(0x0, 0x1, 0x0, 0x0, 0x3);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            switch (argIndex) {
                case 0: return JavaIntConversionNode.create(false);
                case 1: return TruffleStringConverterWithDefaultValueNode.create("getservbyport", PNone.NO_VALUE, false);
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class GetAddrInfoNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final GetAddrInfoNodeClinicProviderGen INSTANCE = new GetAddrInfoNodeClinicProviderGen();
        
        private GetAddrInfoNodeClinicProviderGen() {
            super(0x3, 0x3f, 0x3, 0x3, 0x3c);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            switch (argIndex) {
                case 2: return JavaIntConversionNode.create(com.oracle.graal.python.runtime.PosixConstants.AF_UNSPEC.value, false);
                case 3: return JavaIntConversionNode.create(0, false);
                case 4: return JavaIntConversionNode.create(0, false);
                case 5: return JavaIntConversionNode.create(0, false);
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
    public static final class GetNameInfoNodeClinicProviderGen extends ArgumentClinicProvider {
        public static final GetNameInfoNodeClinicProviderGen INSTANCE = new GetNameInfoNodeClinicProviderGen();
        
        private GetNameInfoNodeClinicProviderGen() {
            super(0x1, 0x3, 0x1, 0x1, 0x2);
        }
        
        @Override
        public ArgumentCastNode createCastNode(int argIndex, PythonBuiltinBaseNode builtin) {
            if (argIndex == 1) {
                return JavaIntConversionNode.create(false);
            }
            return super.createCastNode(argIndex, builtin);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy