Ticket #44 (closed RFC: done)

Opened 6 years ago

Last modified 4 years ago

Move commandline functions out of compilers/imcc/main.c

Reported by: whiteknight Owned by: whiteknight
Priority: minor Milestone:
Component: imcc Version:
Severity: low Keywords:
Cc: Language:
Patch status: Platform: all

Description

There are a number of functions dealing with parrot's commandline in compilers/imcc/main.c. Assuming that we're moving away from IMCC eventually, and that we're going to want this commandline behavior to remain mostly constant even after we switch the PIRC, I suggest we move these functions into src/main.c instead (if we want them to only be in ./parrot and not libparrot) or into a separate file entirely (like src/commandline.c).

Thoughts?

--Andrew Whitworth

Change History

  Changed 6 years ago by whiteknight

  • type changed from bug to RFC

in reply to: ↑ description   Changed 6 years ago by jkeenan

Replying to whiteknight:

There are a number of functions dealing with parrot's commandline in compilers/imcc/main.c.

Could you specify which functions might be moved?

My uneducated guess is:

static void
usage(ARGMOD(FILE *fp))

static void
help_debug(void)

static void
help(void)

static void
Parrot_version(PARROT_INTERP)

and possibly:

PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
static int
is_all_hex_digits(ARGIN(const char *s))

Thank you very much.
kid51

follow-up: ↓ 5   Changed 6 years ago by allison

Agreed, a sensible refactor. (But not a time-critical one, as it can be done when we switch away from IMCC.)

  Changed 6 years ago by whiteknight

  • status changed from new to assigned
  • owner set to whiteknight

in reply to: ↑ 3   Changed 5 years ago by jkeenan

Replying to allison:

Agreed, a sensible refactor. (But not a time-critical one, as it can be done when we switch away from IMCC.)

Can we assume that we consider this ticket as effectively stalled until we switch away from IMCC?

Thank you very much.
kid51

  Changed 4 years ago by bacek

Hello.

parsing flags was splitted into 3 parts: 2 in src/main.c and imcc specific in compilers/imcc/main.c. Can we close this ticket?

-- Bacek

  Changed 4 years ago by bacek

  • status changed from assigned to closed
  • resolution set to done
Note: See TracTickets for help on using tickets.