Seperate DNode pools causing issues #48

Closed
opened 2022-12-15 09:35:39 +00:00 by deavmi · 3 comments
Owner

Problem

We have a seperate nodePool whenever we do function definitions, this should be some sort of shared pool. The issue we run into when we have issue #46 sorted out is that we actually get a new varDecDNode and of course it hans't yet been visited.

I really recommend we do the whole dependency thing one-shot, somehow. I think we would need to make a "Function definition" instruction of some sorts, then the CodeEmitter can pick up on this and emit the needed things.

## Problem We have a seperate `nodePool` whenever we do function definitions, this should be some sort of shared pool. The issue we run into when we have issue #46 sorted out is that we actually get a new `varDecDNode` and of course it hans't yet been visited. I really recommend we do the whole dependency thing one-shot, somehow. I think we would need to make a "Function definition" instruction of some sorts, then the `CodeEmitter` can pick up on this and emit the needed things.
deavmi changed title from Dependencyies to Seperate DNode pools causing issues 2022-12-15 09:35:54 +00:00
deavmi added the
dependency
needsfix
labels 2022-12-15 09:35:58 +00:00
deavmi self-assigned this 2022-12-15 09:36:01 +00:00
deavmi added this to the Dependency tree, type-checking and codegen project 2022-12-15 09:36:04 +00:00
Author
Owner

The fix

  1. I think I found the problem, removed the generalPass() call that was being done on globals queue pass, just left the addFuncDef(tc, functionName) thing, as generalPass() happens on funciton bodies in type checker later.
  2. Make the DNode[] pool -> static DNode[] pool
## The fix 1. I think I found the problem, removed the `generalPass()` call that was being done on globals queue pass, just left the `addFuncDef(tc, functionName)` thing, as `generalPass()` happens on funciton bodies in type checker later. 2. Make the `DNode[] pool` -> `static DNode[] pool`
deavmi added reference vardec_varass_dependency 2022-12-15 10:53:08 +00:00
Author
Owner

Going with the fix above ☝️

Going with the fix above ☝️
Author
Owner

Fixed with commit 2a12c310a66e42783a524cd58f040454c1c36197 on branch vardec_varass_dependency

Fixed with commit `2a12c310a66e42783a524cd58f040454c1c36197` on branch `vardec_varass_dependency`
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tlang/tlang#48
No description provided.