Permalink
Browse files

imcc_run is now static because it's only used in compilers/imcc/main.…

…c. With that, we can get rid of include/parrot/imcc.h entirely. Good riddance.
  • Loading branch information...
1 parent 4357d74 commit c68e224154e0f468d74ea2ed8c697096393352c3 @Whiteknight Whiteknight committed Jan 14, 2011
Showing with 20 additions and 25 deletions.
  1. +0 −1 MANIFEST
  2. +0 −1 compilers/imcc/Rules.in
  3. +19 −4 compilers/imcc/main.c
  4. +1 −2 include/parrot/api.h
  5. +0 −17 include/parrot/imcc.h
View
1 MANIFEST
@@ -949,7 +949,6 @@ include/parrot/global_setup.h [main]include
include/parrot/hash.h [main]include
include/parrot/hll.h [main]include
include/parrot/imageio.h [main]include
-include/parrot/imcc.h [main]include
include/parrot/interpreter.h [main]include
include/parrot/io.h [main]include
include/parrot/io_portable.h [main]include
View
1 compilers/imcc/Rules.in
@@ -154,7 +154,6 @@ compilers/imcc/main$(O) : \
compilers/imcc/symreg.h \
compilers/imcc/unit.h \
$(INC_DIR)/embed.h \
- $(INC_DIR)/imcc.h \
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h \
$(INC_DIR)/api.h \
View
23 compilers/imcc/main.c
@@ -31,7 +31,6 @@ IMCC helpers.
#include "imc.h"
#include "parrot/embed.h"
#include "parrot/longopt.h"
-#include "parrot/imcc.h"
#include "parrot/runcore_api.h"
#include "pmc/pmc_callcontext.h"
#include "pbc.h"
@@ -82,6 +81,17 @@ static void imcc_parseflags(PARROT_INTERP,
__attribute__nonnull__(1)
__attribute__nonnull__(3);
+static int imcc_run(PARROT_INTERP,
+ ARGIN(const char *sourcefile),
+ int argc,
+ ARGIN(const char **argv),
+ ARGOUT(PMC **pbcpmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(4)
+ __attribute__nonnull__(5)
+ FUNC_MODIFIES(*pbcpmc);
+
static void imcc_write_pbc(PARROT_INTERP, ARGIN(const char *output_file))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -114,6 +124,11 @@ static const struct longopt_opt_decl * Parrot_cmd_options(void);
#define ASSERT_ARGS_imcc_parseflags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(argv))
+#define ASSERT_ARGS_imcc_run __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(sourcefile) \
+ , PARROT_ASSERT_ARG(argv) \
+ , PARROT_ASSERT_ARG(pbcpmc))
#define ASSERT_ARGS_imcc_write_pbc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(output_file))
@@ -651,8 +666,8 @@ imcc_run_api(ARGMOD(PMC * interp_pmc), ARGIN(const char *sourcefile), int argc,
/*
-=item C<int imcc_run(PARROT_INTERP, const char *sourcefile, int argc, const char
-**argv, PMC **pbcpmc)>
+=item C<static int imcc_run(PARROT_INTERP, const char *sourcefile, int argc,
+const char **argv, PMC **pbcpmc)>
Entry point of IMCC, as invoked by Parrot's main function.
Compile source code (if required), write bytecode file (if required)
@@ -662,7 +677,7 @@ and run. This function always returns 0.
*/
-int
+static int
imcc_run(PARROT_INTERP, ARGIN(const char *sourcefile), int argc,
ARGIN(const char **argv), ARGOUT(PMC **pbcpmc))
{
View
3 include/parrot/api.h
@@ -726,8 +726,7 @@ Parrot_Int Parrot_api_pmc_wrap_string_array(
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/embed/pmc.c */
-/* Forward declaration because IMCC is still part of libparrot, but we don't
- want to include parrot/imcc.h */
+/* Forward declaration because IMCC is still part of libparrot */
PARROT_API
int
View
17 include/parrot/imcc.h
@@ -1,17 +0,0 @@
-/*
- * Copyright (C) 2007-2010, Parrot Foundation.
- */
-
-#ifndef PARROT_IMCC_H_GUARD
-#define PARROT_IMCC_H_GUARD
-
-PARROT_EXPORT int imcc_run(PARROT_INTERP, const char *sourcefile, int argc, const char **argv, ARGOUT(PMC **pbcpmc));
-
-#endif /* PARROT_IMCC_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
- */

0 comments on commit c68e224

Please sign in to comment.