MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove dead code

+5 -19
+5 -19
src/ant.c
··· 202 202 UT_hash_handle hh; 203 203 } ant_library_t; 204 204 205 - typedef struct { 206 - char key[64]; 207 - jsoff_t offset; 208 - uint32_t hash; 209 - UT_hash_handle hh; 210 - } prop_cache_entry_t; 211 - 212 - typedef struct { 213 - jsoff_t obj_offset; 214 - prop_cache_entry_t *cache; 215 - uint32_t hit_count; 216 - UT_hash_handle hh; 217 - } obj_prop_cache_t; 218 - 219 205 static const char *INTERN_LENGTH = NULL; 220 206 static const char *INTERN_PROTOTYPE = NULL; 221 207 static const char *INTERN_CONSTRUCTOR = NULL; ··· 243 229 jsoff_t obj_off; 244 230 const char *intern_ptr; 245 231 jsoff_t prop_off; 246 - uint32_t obj_version; 232 + jsoff_t first_prop; 247 233 } intern_prop_cache_entry_t; 248 234 static intern_prop_cache_entry_t intern_prop_cache[ANT_LIMIT_SIZE_CACHE]; 249 235 ··· 3073 3059 3074 3060 if (ce->obj_off == obj_off && ce->intern_ptr == interned) { 3075 3061 ce->obj_off = 0; ce->intern_ptr = NULL; 3076 - ce->prop_off = 0; ce->obj_version = 0; 3062 + ce->prop_off = 0; ce->first_prop = 0; 3077 3063 } 3078 3064 } 3079 3065 ··· 4678 4664 uint32_t cache_slot = (((uintptr_t)search_intern >> 3) ^ obj_off) & (ANT_LIMIT_SIZE_CACHE - 1); 4679 4665 intern_prop_cache_entry_t *ce = &intern_prop_cache[cache_slot]; 4680 4666 4681 - if (ce->obj_off == obj_off && ce->intern_ptr == search_intern && ce->obj_version == first_prop) { 4667 + if (ce->obj_off == obj_off && ce->intern_ptr == search_intern && ce->first_prop == first_prop) { 4682 4668 return ce->prop_off; 4683 4669 } 4684 4670 ··· 4695 4681 ce->obj_off = obj_off; 4696 4682 ce->intern_ptr = search_intern; 4697 4683 ce->prop_off = off; 4698 - ce->obj_version = first_prop; 4684 + ce->first_prop = first_prop; 4699 4685 return off; 4700 4686 } 4701 4687 } ··· 4705 4691 ce->obj_off = obj_off; 4706 4692 ce->intern_ptr = search_intern; 4707 4693 ce->prop_off = 0; 4708 - ce->obj_version = first_prop; 4694 + ce->first_prop = first_prop; 4709 4695 4710 4696 return 0; 4711 4697 }