Examples of StorageSpec


Examples of org.perl6.nqp.sixmodel.StorageSpec

        obj.body = new NativeCallBody();
        return obj;
    }
   
    public StorageSpec get_storage_spec(ThreadContext tc, STable st) {
        StorageSpec ss = new StorageSpec();
        ss.inlineable = StorageSpec.INLINED;
        ss.bits = 64;
        return ss;
    }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        obj.st = st;
        return obj;
    }
   
    public StorageSpec get_storage_spec(ThreadContext tc, STable st) {
        StorageSpec ss = new StorageSpec();
        ss.inlineable = StorageSpec.INLINED;
        ss.boxed_primitive = StorageSpec.BP_INT;
        ss.bits = 64;
        ss.can_box = StorageSpec.CAN_BOX_INT;
        return ss;
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        SixModelObject obj;
        if (st.REPRData == null) {
            obj = new VMArrayInstance();
        }
        else {
            StorageSpec ss = ((VMArrayREPRData)st.REPRData).ss;
            switch (ss.boxed_primitive) {
            case StorageSpec.BP_INT:
                if (ss.bits == 64)
                    obj = new VMArrayInstance_i();
                else if (ss.bits == 8)
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

   
    public void compose(ThreadContext tc, STable st, SixModelObject repr_info) {
        SixModelObject arrayInfo = repr_info.at_key_boxed(tc, "array");
        if (arrayInfo != null) {
            SixModelObject type = arrayInfo.at_key_boxed(tc, "type");
            StorageSpec ss = type.st.REPR.get_storage_spec(tc, type.st);
            switch (ss.boxed_primitive) {
            case StorageSpec.BP_INT:
            case StorageSpec.BP_NUM:
            case StorageSpec.BP_STR:
                VMArrayREPRData reprData = new VMArrayREPRData();
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        SixModelObject obj;
        if (st.REPRData == null) {
            obj = new VMArrayInstance();
        }
        else {
            StorageSpec ss = ((VMArrayREPRData)st.REPRData).ss;
            switch (ss.boxed_primitive) {
            case StorageSpec.BP_INT:
                if (ss.bits == 8)
                    obj = ss.is_unsigned == 0
                        ? new VMArrayInstance_i8()
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        STable st = new STable(this, HOW);
        SixModelObject obj = new TypeObject();
        obj.st = st;
        st.WHAT = obj;
       
        StorageSpec ss = new StorageSpec();
        ss.inlineable = StorageSpec.INLINED;
        ss.boxed_primitive = StorageSpec.BP_INT;
        ss.bits = 64;
        ss.can_box = StorageSpec.CAN_BOX_INT;
        st.REPRData = ss;
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

     * REPR data deserialization. Deserializes the per-type representation data and
     * attaches it to the supplied STable.
     */
    public void deserialize_repr_data(ThreadContext tc, STable st, SerializationReader reader)
    {
        StorageSpec ss = new StorageSpec();
        ss.inlineable = StorageSpec.INLINED;
        ss.boxed_primitive = StorageSpec.BP_INT;
        if (reader.version >= 7)
            ss.bits = (short)reader.readLong();
        else
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

            NativeLibrary library = libname == null || libname.equals("")
                ? NativeLibrary.getProcess()
                : NativeLibrary.getInstance(libname);
            Pointer entry_point = library.getGlobalVariableAddress(symbol);

            StorageSpec ss = target_spec.st.REPR.get_storage_spec(tc, target_spec.st);
            if (ss.boxed_primitive == StorageSpec.BP_STR)
                entry_point = entry_point.getPointer(0);

            return castNativeCall(tc, target_spec, target_type, entry_point);
        }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        if (o == null)
            return target_type;

        ArgType target        = ArgType.INT;
        SixModelObject nqpobj = target_type.st.REPR.allocate(tc, target_type.st);
        StorageSpec        ss = target_spec.st.REPR.get_storage_spec(tc, target_spec.st);

        switch (ss.boxed_primitive) {
            case StorageSpec.BP_INT:
                switch (ss.bits) {
                    case 8:
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        Ops.invokeDirect(tc, meth, new CallSiteDescriptor(new byte[] { ARG_OBJ }, null), new Object[] { st.WHAT });
        data.elem_type = Ops.decont(Ops.result_o(tc.resultFrame()), tc);
        if (data.elem_type == null)
            ExceptionHandling.dieInternal(tc, "CArray representation expects a non-null return value from the 'of' method, specifying the element type");

        StorageSpec ss = data.elem_type.st.REPR.get_storage_spec(tc, data.elem_type.st);
        data.elem_size = ss.bits;
        if (ss.boxed_primitive == StorageSpec.BP_INT) {
            if (ss.bits == 8) {
                data.jna_size = Native.getNativeSize(Byte.class);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.