VarAssNode pushType() -> VarStdAss pop type and VarDec pop type (if has ass) #98

Closed
opened 2023-01-29 14:09:13 +00:00 by deavmi · 3 comments
Owner

What is this?

A variable assigment node pushes its type then one of the two consumes it:

  1. Standalone variable assignment node
  2. Varaiable declaration (with an assignment enabled) node

Just a reminder this was added to the above 2 (popping code/popType()):

// TODO: A popType() should be done here techncially, IF we do this then it
// ... must be pushed by VariableAssigmnetNode
Type assignmentType = popType();
assert(assignmentType);

And for the variable assignment node (pushing code/addType()):

// NOTE: DIscussion about puysuhing VariableAsignmentNode and poppiung later in varStdAssAlone and VarDecNode
addType(variableType);
### What is this? A variable assigment node pushes its type then one of the two consumes it: 1. Standalone variable assignment node 2. Varaiable declaration (with an assignment enabled) node Just a reminder this was added to the above 2 (popping code/`popType()`): ```d // TODO: A popType() should be done here techncially, IF we do this then it // ... must be pushed by VariableAssigmnetNode Type assignmentType = popType(); assert(assignmentType); ``` And for the variable assignment node (pushing code/`addType()`): ```d // NOTE: DIscussion about puysuhing VariableAsignmentNode and poppiung later in varStdAssAlone and VarDecNode addType(variableType); ```
deavmi added reference literal_encodings 2023-01-29 14:09:50 +00:00
deavmi added this to the Dependency tree, type-checking and codegen project 2023-01-29 14:09:54 +00:00
deavmi added the
typing
label 2023-01-29 14:09:59 +00:00
deavmi added this to the Basics milestone 2023-01-29 14:10:01 +00:00
deavmi self-assigned this 2023-01-29 14:10:04 +00:00
Author
Owner

Questions

Question 1: Where to perform coercion?

  1. Do coercion in VarAssNode or where we consume it (i.e. VarStdAlone and VarDec?)
## Questions ### Question 1: Where to perform coercion? 1. Do coercion in VarAssNode or where we consume it (i.e. VarStdAlone and VarDec?)
deavmi added a new dependency 2023-01-29 14:53:49 +00:00
Author
Owner

I think we should flip this around. Consumers should ehck types, makes way more sense

I think we should flip this around. Consumers should ehck types, makes way more sense
deavmi added the due date 2023-02-04 2023-02-04 12:20:05 +00:00
Author
Owner

I will be closing this now seeing that the "typequeue" is now removed.

I will be closing this now seeing that the "typequeue" is now removed.
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'.

2023-02-04

Blocks
Reference: tlang/tlang#98
No description provided.