#include "assert.h" #include "commandline/parameters.h" #include "memory/virtualmemory.h" #include "object.h" #include "resources/categories.h" #include "resources/resources.h" #include "types/attributes.h" #include "types/composites/composites.h" #include "types/composites/dictionary.h" #include "types/typestrings.h" object resources; object defineresources(const configure interpreter) { const boolean previous = vm.allocationmode; vm.allocationmode = true; const object Category = compile( defineGeneric(interpreter), array(((object []){ string("Category"), cvn(string("Category")), string("InstanceType"), cvn(typestring((object){.type = dicttype})) })) ); put[dicttype](string("globalinstances"), readonly(compiled(array(((object []){ cvn(string("Category")), Category, cvn(string("Filter")), readonly(defineFilter(interpreter)), cvn(string("Generic")), readonly(defineGeneric(interpreter)), cvn(string("IODevice")), readonly(defineIODevice(interpreter)) })))), Category); vm.allocationmode = previous; return readonly(Category); }