Пример #1
0
/* Initializes the representations registry, building up all of the various
 * representations. */
void MVM_repr_initialize_registry(MVMThreadContext *tc) {
    tc->instance->repr_list = malloc(
            MVM_REPR_MAX_COUNT * sizeof *tc->instance->repr_list);

    /* Add all core representations. */
    register_core_repr(String);
    register_core_repr(Array);
    register_core_repr(Hash);
    register_core_repr(CFunction);
    register_core_repr(KnowHOWREPR);
    register_core_repr(P6opaque);
    register_core_repr(Code);
    register_core_repr(OSHandle);
    register_core_repr(P6int);
    register_core_repr(P6num);
    register_core_repr(Uninstantiable);
    register_core_repr(HashAttrStore);
    register_core_repr(KnowHOWAttributeREPR);
    register_core_repr(P6str);
    register_core_repr(Thread);
    register_core_repr(Iter);
    register_core_repr(Context);
    register_core_repr(SCRef);
    register_core_repr(Lexotic);
    register_core_repr(CallCapture);
    register_core_repr(P6bigint);
    register_core_repr(NFA);
    register_core_repr(Exception);
    register_core_repr(StaticFrame);
    register_core_repr(CompUnit);
    register_core_repr(DLLSym);

    tc->instance->num_reprs = MVM_REPR_CORE_COUNT;
}
Пример #2
0
/* Initializes the representations registry, building up all of the various
 * representations. */
void MVM_repr_initialize_registry(MVMThreadContext *tc) {
    tc->instance->repr_list = MVM_malloc(
            MVM_REPR_MAX_COUNT * sizeof *tc->instance->repr_list);

    /* Add all core representations. */
    register_core_repr(String);
    register_core_repr(Array);
    register_core_repr(Hash);
    register_core_repr(CFunction);
    register_core_repr(KnowHOWREPR);
    register_core_repr(P6opaque);
    register_core_repr(Code);
    register_core_repr(OSHandle);
    register_core_repr(P6int);
    register_core_repr(P6num);
    register_core_repr(Uninstantiable);
    register_core_repr(HashAttrStore);
    register_core_repr(KnowHOWAttributeREPR);
    register_core_repr(P6str);
    register_core_repr(Thread);
    register_core_repr(Iter);
    register_core_repr(Context);
    register_core_repr(SCRef);
    register_core_repr(CallCapture);
    register_core_repr(P6bigint);
    register_core_repr(NFA);
    register_core_repr(Exception);
    register_core_repr(StaticFrame);
    register_core_repr(CompUnit);
    register_core_repr(DLLSym);
    register_core_repr(MultiCache);
    register_core_repr(Continuation);
    register_core_repr(NativeCall);
    register_core_repr(CPointer);
    register_core_repr(CStr);
    register_core_repr(CArray);
    register_core_repr(CStruct);
    register_core_repr(CUnion);
    register_core_repr(ReentrantMutex);
    register_core_repr(ConditionVariable);
    register_core_repr(Semaphore);
    register_core_repr(ConcBlockingQueue);
    register_core_repr(AsyncTask);
    register_core_repr(Null);
    register_core_repr(CPPStruct);
    register_core_repr(NativeRef);
    register_core_repr(MultiDimArray);
    register_core_repr(Decoder);
    register_core_repr(SpeshLog);
    register_core_repr(StaticFrameSpesh);

    tc->instance->num_reprs = MVM_REPR_CORE_COUNT;
}