Simplified type system
This commit is contained in:
parent
71d7cdf5b2
commit
bd0a468282
16 changed files with 70 additions and 55 deletions
|
@ -11,7 +11,7 @@ func (f *Function) CompileNew(root *expression.Expression) error {
|
|||
structName := parameters[0].Token.Text(f.File.Bytes)
|
||||
typ := f.Types[structName]
|
||||
f.SaveRegister(f.CPU.Input[0])
|
||||
f.RegisterNumber(asm.MOVE, f.CPU.Input[0], int(typ.TotalSize()))
|
||||
f.RegisterNumber(asm.MOVE, f.CPU.Input[0], typ.Size())
|
||||
|
||||
for _, register := range f.CPU.General {
|
||||
if f.RegisterIsUsed(register) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue