svhawkins / B-Minor-Compiler

COMP 4060 B-Minor Compiler
2 stars 0 forks source link

symbol table should keep track of string literal labels #13

Closed svhawkins closed 6 months ago

svhawkins commented 7 months ago

String literals need some way to keep track of their generated labels so that during code generation the label is passed in instructions and not the literal, since strings in B-Minor are pass by reference. These labels and associated literals must also be generated in the global scope during code generation.

Arrays are also pass by reference, but they always have a place in memory (stack or otherwise).

One way is just not keep track of labels at all, though would generate an unnecessary amount of labels.

svhawkins commented 6 months ago

12.27.2023::19:24: hidden symbol table has been made part of symbol table structure (with trial and error of HOW because of silly memory issues...). Currently unintegrated with declaration and expression structures.

svhawkins commented 6 months ago

12.29.2023::14:54: hidden symbol table has been integrated and tested. has its own code generation function.