Skip to content

Commit c7d905e

Browse files
authored
Disable ref cnt instructions for weak ptrs
1 parent 1d8c313 commit c7d905e

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

playground/umka.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/umka_types.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ int typeAlignment(Types *types, Type *type)
279279

280280
bool typeGarbageCollected(Type *type)
281281
{
282-
if (type->kind == TYPE_PTR || type->kind == TYPE_WEAKPTR || type->kind == TYPE_STR || type->kind == TYPE_MAP ||
282+
if (type->kind == TYPE_PTR || type->kind == TYPE_STR || type->kind == TYPE_MAP ||
283283
type->kind == TYPE_DYNARRAY || type->kind == TYPE_INTERFACE || type->kind == TYPE_CLOSURE || type->kind == TYPE_FIBER)
284284
return true;
285285

src/umka_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static inline bool typeStructured(Type *type)
188188

189189
static inline bool typeKindGarbageCollected(TypeKind typeKind)
190190
{
191-
return typeKind == TYPE_PTR || typeKind == TYPE_WEAKPTR ||
191+
return typeKind == TYPE_PTR ||
192192
typeKind == TYPE_STR || typeKind == TYPE_ARRAY || typeKind == TYPE_DYNARRAY || typeKind == TYPE_MAP ||
193193
typeKind == TYPE_STRUCT || typeKind == TYPE_INTERFACE || typeKind == TYPE_CLOSURE || typeKind == TYPE_FIBER;
194194
}

src/umka_vm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,6 @@ static FORCE_INLINE void doBasicChangeRefCnt(Fiber *fiber, HeapPages *pages, voi
817817
break;
818818
}
819819

820-
case TYPE_WEAKPTR:
821-
break;
822-
823820
case TYPE_STR:
824821
{
825822
doCheckStr((char *)ptr, pages->error);

0 commit comments

Comments
 (0)