Mars assembly: Use atoms rather than variable names

Bug #440429 reported by Matt Giuca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mars
Fix Released
Medium
Matt Giuca

Bug Description

In the Mars assembly code, all instructions refer to variable names. This means expressions with integer literals or constructor names need to be compiled into ld_intlit/ld_ctor instructions (to temporary variables), and then variable references. It would make assembly code much shorter and easier to read (by humans, anyway) if all instructions used *atoms* rather than variable names, where an atom is a variable name, constructor name, or int literal.

Tags: ir

Related branches

Revision history for this message
Matt Giuca (mgiuca) wrote :

Milestoning; it will be good to simplify the assembly representation, especially for string literals.

Changed in mars:
milestone: none → 0.3.1
Revision history for this message
Matt Giuca (mgiuca) wrote :

Note: There is no longer a ld_ctor instruction. It has been replaced by ld_ctorsym (for constructor symbols/constants) and new_closure (for constructor functions). Clearly, constructor function names should no longer be atoms (as we always treat access to global objects with an explicit instruction now). But constructor symbols might be good candidates for atoms.

Therefore, let an atom refer to an integer or constructor symbol name (not a function), and replace the ld_intlit and ld_ctorsym instructions.

Matt Giuca (mgiuca)
Changed in mars:
status: Triaged → In Progress
Revision history for this message
Matt Giuca (mgiuca) wrote :

This is now addressed in branch 'atom' r1265. It needs to be merged.

Revision history for this message
Matt Giuca (mgiuca) wrote :

Fixed in trunk r1262.

Changed in mars:
status: In Progress → Fix Committed
Matt Giuca (mgiuca)
Changed in mars:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.