[svn:parrot] r47396 - in trunk: compilers/imcc src src/interp t/codingstd
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Sat Jun 5 22:31:52 UTC 2010
Author: plobsing
Date: Sat Jun 5 22:31:52 2010
New Revision: 47396
URL: https://trac.parrot.org/parrot/changeset/47396
Log:
function documentation for compilers/imcc/parser_util.c
Modified:
trunk/compilers/imcc/imc.h
trunk/compilers/imcc/parser_util.c
trunk/src/interp/inter_misc.c
trunk/src/packfile.c
trunk/t/codingstd/c_function_docs.t
Modified: trunk/compilers/imcc/imc.h
==============================================================================
--- trunk/compilers/imcc/imc.h Sat Jun 5 22:26:27 2010 (r47395)
+++ trunk/compilers/imcc/imc.h Sat Jun 5 22:31:52 2010 (r47396)
@@ -186,6 +186,16 @@
/* HEADERIZER BEGIN: compilers/imcc/parser_util.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void * imcc_compile_file(PARROT_INTERP,
+ ARGIN(const char *fullname),
+ ARGOUT(STRING **error_message))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*error_message);
+
PARROT_WARN_UNUSED_RESULT
int check_op(PARROT_INTERP,
ARGOUT(char *fullname),
@@ -210,20 +220,6 @@
__attribute__nonnull__(4)
FUNC_MODIFIES(*error_message);
-PARROT_CANNOT_RETURN_NULL
-void * IMCC_compile_file(PARROT_INTERP, ARGIN(const char *s))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-void * IMCC_compile_file_s(PARROT_INTERP,
- ARGIN(const char *s),
- ARGOUT(STRING **error_message))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*error_message);
-
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PMC * imcc_compile_pasm(PARROT_INTERP, ARGIN(const char *s))
@@ -335,6 +331,10 @@
FUNC_MODIFIES(*unit)
FUNC_MODIFIES(*r);
+#define ASSERT_ARGS_imcc_compile_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(fullname) \
+ , PARROT_ASSERT_ARG(error_message))
#define ASSERT_ARGS_check_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(fullname) \
@@ -344,13 +344,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s) \
, PARROT_ASSERT_ARG(error_message))
-#define ASSERT_ARGS_IMCC_compile_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(s))
-#define ASSERT_ARGS_IMCC_compile_file_s __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(s) \
- , PARROT_ASSERT_ARG(error_message))
#define ASSERT_ARGS_imcc_compile_pasm __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
Modified: trunk/compilers/imcc/parser_util.c
==============================================================================
--- trunk/compilers/imcc/parser_util.c Sat Jun 5 22:26:27 2010 (r47395)
+++ trunk/compilers/imcc/parser_util.c Sat Jun 5 22:31:52 2010 (r47396)
@@ -58,15 +58,6 @@
FUNC_MODIFIES(*unit)
FUNC_MODIFIES(*r);
-PARROT_CANNOT_RETURN_NULL
-static void * imcc_compile_file(PARROT_INTERP,
- ARGIN(const char *fullname),
- ARGOUT(STRING **error_message))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*error_message);
-
static void imcc_destroy_macro_values(ARGMOD(void *value))
__attribute__nonnull__(1)
FUNC_MODIFIES(*value);
@@ -98,10 +89,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(r))
-#define ASSERT_ARGS_imcc_compile_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(fullname) \
- , PARROT_ASSERT_ARG(error_message))
#define ASSERT_ARGS_imcc_destroy_macro_values __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_try_rev_cmp __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -232,6 +219,9 @@
=item C<static Instruction * var_arg_ins(PARROT_INTERP, IMC_Unit *unit, const
char *name, SymReg **r, int n, int emit)>
+Create an C<Instruction> object for an instruction that takes a variable
+number of arguments.
+
=cut
*/
@@ -686,6 +676,8 @@
=item C<PMC * IMCC_compile_pir_s(PARROT_INTERP, const char *s, STRING
**error_message)>
+Compile PIR code from a C string. Returns errors in the <STRING> provided.
+
=cut
*/
@@ -705,6 +697,8 @@
=item C<PMC * IMCC_compile_pasm_s(PARROT_INTERP, const char *s, STRING
**error_message)>
+Compile PASM code from a C string. Returns errors in the <STRING> provided.
+
=cut
*/
@@ -723,6 +717,8 @@
=item C<PMC * imcc_compile_pasm_ex(PARROT_INTERP, const char *s)>
+Compile PASM code from a C string. Throws an exception upon errors.
+
=cut
*/
@@ -748,6 +744,8 @@
=item C<PMC * imcc_compile_pir_ex(PARROT_INTERP, const char *s)>
+Compile PIR code from a C string. Throws an exception upon errors.
+
=cut
*/
@@ -771,8 +769,8 @@
/*
-=item C<static void * imcc_compile_file(PARROT_INTERP, const char *fullname,
-STRING **error_message)>
+=item C<void * imcc_compile_file(PARROT_INTERP, const char *fullname, STRING
+**error_message)>
Compile a file by filename (can be either PASM or IMCC code)
@@ -780,8 +778,9 @@
*/
+PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-static void *
+void *
imcc_compile_file(PARROT_INTERP, ARGIN(const char *fullname),
ARGOUT(STRING **error_message))
{
@@ -886,44 +885,6 @@
/*
-=item C<void * IMCC_compile_file(PARROT_INTERP, const char *s)>
-
-Note: This function is provided for backward compatibility. This
-function can go away in future.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-void *
-IMCC_compile_file(PARROT_INTERP, ARGIN(const char *s))
-{
- ASSERT_ARGS(IMCC_compile_file)
- STRING *error_message;
- return imcc_compile_file(interp, s, &error_message);
-}
-
-/*
-
-=item C<void * IMCC_compile_file_s(PARROT_INTERP, const char *s, STRING
-**error_message)>
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-void *
-IMCC_compile_file_s(PARROT_INTERP, ARGIN(const char *s),
- ARGOUT(STRING **error_message))
-{
- ASSERT_ARGS(IMCC_compile_file_s)
- return imcc_compile_file(interp, s, error_message);
-}
-
-/*
-
=item C<void register_compilers(PARROT_INTERP)>
Register additional compilers with the interpreter
@@ -1064,6 +1025,8 @@
=item C<static const char * try_rev_cmp(const char *name, SymReg **r)>
+Try to find a valid op doing the same thing by reversing comparisons.
+
=cut
*/
@@ -1133,6 +1096,8 @@
=item C<void imcc_init(PARROT_INTERP)>
+Initialize IMCC with Parrot by registering it as a PIR and PASM compiler.
+
=cut
*/
@@ -1181,6 +1146,8 @@
=item C<void imcc_destroy(PARROT_INTERP)>
+Deallocate memory associated with IMCC.
+
=cut
*/
Modified: trunk/src/interp/inter_misc.c
==============================================================================
--- trunk/src/interp/inter_misc.c Sat Jun 5 22:26:27 2010 (r47395)
+++ trunk/src/interp/inter_misc.c Sat Jun 5 22:31:52 2010 (r47396)
@@ -165,7 +165,7 @@
Parrot_compile_file(PARROT_INTERP, ARGIN(const char *fullname), ARGOUT(STRING **error))
{
ASSERT_ARGS(Parrot_compile_file)
- return IMCC_compile_file_s(interp, fullname, error);
+ return imcc_compile_file(interp, fullname, error);
}
/*
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Sat Jun 5 22:26:27 2010 (r47395)
+++ trunk/src/packfile.c Sat Jun 5 22:31:52 2010 (r47396)
@@ -4668,7 +4668,7 @@
else {
STRING *err;
PackFile_ByteCode * const cs =
- (PackFile_ByteCode *)IMCC_compile_file_s(interp,
+ (PackFile_ByteCode *)Parrot_compile_file(interp,
filename, &err);
Parrot_str_free_cstring(filename);
Modified: trunk/t/codingstd/c_function_docs.t
==============================================================================
--- trunk/t/codingstd/c_function_docs.t Sat Jun 5 22:26:27 2010 (r47395)
+++ trunk/t/codingstd/c_function_docs.t Sat Jun 5 22:31:52 2010 (r47396)
@@ -91,7 +91,6 @@
}
__DATA__
-compilers/imcc/parser_util.c
compilers/imcc/pbc.c
compilers/imcc/pcc.c
compilers/imcc/reg_alloc.c
More information about the parrot-commits
mailing list