Examples of StorageSpec


Examples of org.perl6.nqp.sixmodel.StorageSpec

        obj.value = "";
        return obj;
    }
   
    public StorageSpec get_storage_spec(ThreadContext tc, STable st) {
        StorageSpec ss = new StorageSpec();
        ss.inlineable = StorageSpec.INLINED;
        ss.boxed_primitive = StorageSpec.BP_STR;
        ss.can_box = StorageSpec.CAN_BOX_STR;
        return ss;
    }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

                for (long j = 0; j < numAttrs; j++) {
                    SixModelObject attrHash = attrs.at_pos_boxed(tc, j);
                    AttrInfo info = new AttrInfo();
                    info.name = attrHash.at_key_boxed(tc, "name").get_str(tc);
                    info.type = attrHash.at_key_boxed(tc, "type");
                    StorageSpec spec = info.type.st.REPR.get_storage_spec(tc, info.type.st);
                    info.bits = spec.bits;
                    repr_data.fieldTypes.put(info.name, info);

                    if (info.type == null) {
                        ExceptionHandling.dieInternal(tc, "CStruct representation requires the types of all attributes to be specified");
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        reprData.structureClass = tc.gc.byteClassLoader.defineClass(className, compiled);
    }

    private String typeDescriptor(ThreadContext tc, AttrInfo info) {
        REPR repr = info.type.st.REPR;
        StorageSpec spec = repr.get_storage_spec(tc, info.type.st);
        info.bits = spec.bits;
        if (spec.inlineable == StorageSpec.INLINED && spec.boxed_primitive == StorageSpec.BP_INT) {
            if (spec.bits == 8) {
                info.argType = ArgType.CHAR;
                return "B";
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        obj.storage = VMHashInstance.EMPTY_MAP;
        return obj;
    }
   
    public StorageSpec get_value_storage_spec(ThreadContext tc, STable st) {
        return new StorageSpec();
    }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        obj.st = st;
        return obj;
    }
   
    public StorageSpec get_value_storage_spec(ThreadContext tc, STable st) {
        return new StorageSpec();
    }
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

            if (attr.hasAutoVivContainer) sigBuilder.append('v');
            if (attr.posDelegate) sigBuilder.append('p');
            if (attr.assDelegate) sigBuilder.append('a');

            StorageSpec ss = attr.st.REPR.get_storage_spec(tc, attr.st);
            if (ss.inlineable != StorageSpec.REFERENCE) {
                sigBuilder.append('I');
                sigBuilder.append(attr.st.REPR.name);
                sigBuilder.append('(');
                if (!attr.st.REPR.inline_description(tc, attr.st, sigBuilder)) forceNew = true;
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        /* Now add all of the required fields and fill out the methods. */
        for (int i = 0; i < attrInfoList.size(); i++) {
            AttrInfo attr = attrInfoList.get(i);

            /* Is it a reference type or not? */
            StorageSpec ss = attr.st.REPR.get_storage_spec(tc, attr.st);
            if (ss.inlineable == StorageSpec.REFERENCE) {
                /* Add field. */
                String field = "field_" + i;
                String desc = "Lorg/perl6/nqp/sixmodel/SixModelObject;";
                cw.visitField(Opcodes.ACC_PUBLIC, field, desc, null, null);
View Full Code Here

Examples of org.perl6.nqp.sixmodel.StorageSpec

        obj.st = newType.st;
    }
   
    public StorageSpec get_storage_spec(ThreadContext tc, STable st) {
        P6OpaqueREPRData rd = (P6OpaqueREPRData)st.REPRData;
        StorageSpec ss = new StorageSpec();
        if (rd.unboxIntSlot >= 0)
            ss.can_box += StorageSpec.CAN_BOX_INT;
        if (rd.unboxNumSlot >= 0)
            ss.can_box += StorageSpec.CAN_BOX_NUM;
        if (rd.unboxStrSlot >= 0)
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_NUM;
        ss.bits = 64;
        ss.can_box = StorageSpec.CAN_BOX_NUM;
        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_NUM;
        if (reader.version >= 7)
            ss.bits = (short)reader.readLong();
        else
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.