Package org.perl6.nqp.sixmodel

Examples of org.perl6.nqp.sixmodel.SixModelObject


        st.WHAT = obj;
        return st.WHAT;
    }

    public SixModelObject allocate(ThreadContext tc, STable st) {
        SixModelObject obj;
        if (st.REPRData == null) {
            obj = new VMArrayInstance();
        }
        else {
            StorageSpec ss = ((VMArrayREPRData)st.REPRData).ss;
View Full Code Here


        obj.st = st;
        return obj;
    }
   
    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:
View Full Code Here

            }
        }
    }

    public SixModelObject deserialize_stub(ThreadContext tc, STable st) {
        SixModelObject obj;
        if (st.REPRData == null) {
            obj = new VMArrayInstance();
        }
        else {
            StorageSpec ss = ((VMArrayREPRData)st.REPRData).ss;
View Full Code Here

     * attaches it to the supplied STable.
     */
    public void deserialize_repr_data(ThreadContext tc, STable st, SerializationReader reader)
    {
        if (reader.version >= 7) {
            SixModelObject type = reader.readRef();
            if (type != null) {
                VMArrayREPRData reprData = new VMArrayREPRData();
                reprData.type = type;
                reprData.ss = type.st.REPR.get_storage_spec(tc, type.st);
                st.REPRData = reprData;
View Full Code Here

public class CStr extends REPR {
    public SixModelObject type_object_for(ThreadContext tc, SixModelObject HOW) {
        STable st = new STable(this, HOW);
        st.REPRData = null; /* No REPR data needed. */
        SixModelObject obj = new TypeObject();
        obj.st = st;
        st.WHAT = obj;
        return st.WHAT;
    }
View Full Code Here

        st.WHAT = obj;
        return st.WHAT;
    }

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

import org.perl6.nqp.sixmodel.TypeObject;

public class KnowHOWAttribute extends REPR {
    public SixModelObject type_object_for(ThreadContext tc, SixModelObject HOW) {
        STable st = new STable(this, HOW);
        SixModelObject obj = new TypeObject();
        obj.st = st;
        st.WHAT = obj;
        return st.WHAT;
    }
View Full Code Here

import org.perl6.nqp.sixmodel.TypeObject;

public class AsyncTask extends REPR {
    public SixModelObject type_object_for(ThreadContext tc, SixModelObject HOW) {
        STable st = new STable(this, HOW);
        SixModelObject obj = new TypeObject();
        obj.st = st;
        st.WHAT = obj;
        return st.WHAT;
    }
View Full Code Here

import org.perl6.nqp.sixmodel.TypeObject;

public class P6int extends REPR {
    public SixModelObject type_object_for(ThreadContext tc, SixModelObject HOW) {
        STable st = new STable(this, HOW);
        SixModelObject obj = new TypeObject();
        obj.st = st;
        st.WHAT = obj;
       
        StorageSpec ss = new StorageSpec();
        ss.inlineable = StorageSpec.INLINED;
View Full Code Here

       
        return st.WHAT;
    }
   
    public void compose(ThreadContext tc, STable st, SixModelObject repr_info) {
        SixModelObject integerInfo = repr_info.at_key_boxed(tc, "integer");
        if (integerInfo != null) {
            SixModelObject bits = integerInfo.at_key_boxed(tc, "bits");
            if (bits != null)
                ((StorageSpec)st.REPRData).bits = (short)bits.get_int(tc);

            SixModelObject unsigned = integerInfo.at_key_boxed(tc, "unsigned");
            if (unsigned != null)
                ((StorageSpec)st.REPRData).is_unsigned = (short)unsigned.get_int(tc);
        }
    }
View Full Code Here

TOP

Related Classes of org.perl6.nqp.sixmodel.SixModelObject

Copyright © 2018 www.massapicom. 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.