Ticket #1967 (closed deprecation: fixed)

Opened 4 years ago

Last modified 3 years ago

Deprecate IMCC compreg

Reported by: whiteknight Owned by: whiteknight
Priority: normal Milestone:
Component: imcc Version: master
Severity: medium Keywords: imcc compreg
Cc: Language:
Patch status: Platform: all

Description

The compreg PMC for the PIR compiler (IMCC) is just an NCI and has very limited functionality. I would like to replace this with a more full-featured object type.

We still have to design what the interface of the new object is going to look like, and it is going to take time to write such a PMC type and maybe modify IMCC to fit it.

Change History

  Changed 4 years ago by jkeenan

  • component changed from none to imcc

in reply to: ↑ description   Changed 4 years ago by pmichaud

Replying to whiteknight:

The compreg PMC for the PIR compiler (IMCC) is just an NCI and has very limited functionality. I would like to replace this with a more full-featured object type. We still have to design what the interface of the new object is going to look like, and it is going to take time to write such a PMC type and maybe modify IMCC to fit it.

The API for compiler objects is given in PDD 31 -- unless there's a major reason to redesign it, I suggest using that.

In fact, it would be fairly simple to create a wrapper compiler object for the PIR compiler that meets the pdd31 API, so that others could begin migrating to it before the existing PIR compiler is eliminated.

The HLL::Compiler base class implements the API for pdd31 and would be a good base class for a PIR compiler object.

Pm

  Changed 4 years ago by whiteknight

Yes, that was basically my plan. It's going to implement the PDD31 interface, but may offer a few other features as well to account for all the abilities/options of IMCC. It's probably going to provide a VTABLE_invoke override too, to mimic the current behavior of the NCI-based PMC, at least for a deprecation cycle.

  Changed 4 years ago by cotto

  • type changed from RFC to feature

+1 to this. I'd suggest that you give the new compiler the name "IMCC" to make the transition easier.

  Changed 4 years ago by whiteknight

  • owner set to whiteknight

  Changed 4 years ago by jkeenan

whiteknight,

Given that you and atrodo did a lot of work in this area in the first quarter of this year, would it be possible for you to post an update on the status of the issues specifically discussed above?

Thank you very much.

kid51

  Changed 3 years ago by whiteknight

  • status changed from new to assigned
  • type changed from feature to deprecation

The PIR and PASM compregs are now PMCs of type IMCCompiler, not NCI any more. However, for backwards compatibility the IMCCompiler PMC implements an invoke vtable with old-style semantics. This vtable should go away, and users should invoke the compiler using the new PDD31-style .compile() and .compile_file() methods instead.

I will keep this ticket open to track the status of that upgrade path.

  Changed 3 years ago by whiteknight

  • status changed from assigned to closed
  • resolution set to fixed

We've hit a decent equilibrium with this functionality, and I don't think we're planning to make any significant changes to the existing IMCC compreg. The real big change will come later when we deprecate and remove IMCC entirely, in which case small modifications to the compreg PMC will be moot.

Note: See TracTickets for help on using tickets.