Ticket #1323 (new todo)

Opened 5 years ago

Last modified 4 years ago

t/compilers/imcc/syn/clash.t: Is test complete?

Reported by: jkeenan Owned by: plobsing
Priority: normal Milestone:
Component: imcc Version: 1.8.0
Severity: medium Keywords:
Cc: barney kjs Language:
Patch status: Platform:

Description

In the file in question we see this:

173 pir_error_output_like( <<'CODE', <<'OUTPUT', 'new with a native type, no str    ing constant', todo => 'RT #51662 not done yet' );
174 .sub test :main
175         $P1 = new INTVAL
176     print "never\n"
177     end
178 .end
179 CODE
180 /error:imcc:syntax error, unexpected IDENTIFIER \('INTVAL'\)/
181 OUTPUT

 RT #51662 was resolved, but the 'todo' reference was left in the test file.

This must be tracked in Trac.

Change History

Changed 5 years ago by plobsing

  • owner set to plobsing

The error messages is currently:

error:imcc:The opcode 'new_p_ic' (new<2>) was not found. Check the type and number of the arguments

Here's why:

  • Barewords that aren't predefined variables are assumed to be labels.
  • The 'ic' op fullname arg code is used both for integer constants and labels.
  • Instruction selection occurs right as we parse the op, meaning we cannot know that there isn't a label 'INTVAL' somewhere.

Here's how we might improve the situation:

  • Make label op arguments take a prefix (eg: '&')
  • Make label op arguments represented by a different code in fullnames (eg: 'lbl')
  • Require predeclaration of labels
  • Parse all the way through a sub before selecting instructions

I'm open to suggestions.

Changed 5 years ago by plobsing

  • component changed from testing to imcc

Changed 4 years ago by jkeenan

Can anyone comment on plobsing's suggestions?

Thank you very much.

kid51

Note: See TracTickets for help on using tickets.