refactored cosmoV_set & cosmoV_get, renamed COSMO_TOBJ->COSMO_TREF

also changed print() to print raw primitives instead of generating a <string> needlessly. helped performance immensely in scripts like `examples/increment.cosmo`
This commit is contained in:
2021-02-07 14:32:39 -06:00
parent 0d344f65df
commit 78e21a0f28
8 changed files with 92 additions and 38 deletions

View File

@@ -66,7 +66,7 @@ uint32_t getObjectHash(CObj *obj) {
uint32_t getValueHash(CValue *val) {
switch (GET_TYPE(*val)) {
case COSMO_TOBJ:
case COSMO_TREF:
return getObjectHash(cosmoV_readRef(*val));
case COSMO_TNUMBER: {
uint32_t buf[sizeof(cosmo_Number)/sizeof(uint32_t)];