Ticket #83 (closed patch: wontfix)

Opened 6 years ago

Last modified 6 years ago

[patch]remove unused code, change function to macro, redefined UNUSED macro

Reported by: jimmy Owned by: whiteknight
Priority: trivial Milestone: 0.9.0
Component: core Version:
Severity: medium Keywords: STM
Cc: Language:
Patch status: new Platform: all

Description

UNUSED macro now support multi-args, and some function changed to macro to make it does not compiled to binary code. and remove some unused codes, though there were still really unused code in src/ with USUSED macro.

Attachments

patch.patch Download (1.8 KB) - added by jimmy 6 years ago.

Change History

Changed 6 years ago by jimmy

Changed 6 years ago by jimmy

sorry,i should say 'with UNUSED macro. '

Changed 6 years ago by whiteknight

  • status changed from new to assigned
  • component changed from none to core
  • patch set to new
  • priority changed from normal to trivial
  • platform set to all
  • milestone set to 0.9.0
  • owner set to whiteknight
  • type changed from bug to patch

Variadic macros like you're using for UNUSED here aren't part of the C89 standard, and weren't added by most compilers until C99. So, we can't use them in Parrot (even if it would make some things more convenient. I'll take a look through the rest of this patch later to see if any other parts of it can be applied.

Changed 6 years ago by jimmy

In my mind, STM_TRACE(x...) is used here, UNUSED(a...) should be also right.

Changed 6 years ago by jimmy

and using STM_TRACE(x...) here is wrong?

Changed 6 years ago by whiteknight

That's very interesting. I don't think that STM_TRACE should be able to use a variadic macro since we are targetting C89. Maybe that's something that needs to be changed.

Any opinions on this?

Changed 6 years ago by whiteknight

  • keywords STM added

I added a short XXX note to src/stm/backend.c about how the definition of STM_TRACE is not C89-compliant and needs to be rewritten. See r34287.

Changed 6 years ago by jimmy

whiteknight++

Changed 6 years ago by jimmy

but, it not r34387, it should be r34278

Changed 6 years ago by jimmy

ah, still wrong. I mean it is not r34287, should be r34278

Changed 6 years ago by whiteknight

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

I'm closing this ticket now. I've heard tell that STM is being ripped out eventually, so there might not be a need for me to update this STM_TRACE macro to use a better syntax.

Note: See TracTickets for help on using tickets.