Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Some fix. do_sub_pragmas is back public for now

  • Loading branch information...
commit 39626b84ddbaf6676342c996991e82eb43d3a1cc 1 parent 74168f9
Léo Grange Kristaba authored cotto committed
16 config/gen/makefiles/root.in
View
@@ -491,7 +491,7 @@ INTERP_O_FILES = \
src/oo$(O) \
src/platform$(O) \
src/packfile/object_serialization$(O) \
- src/packfile/execute$(O) \
+ src/packfile/execute$(O) \
src/pmc$(O) \
src/runcore/main$(O) \
src/runcore/cores$(O) \
@@ -696,7 +696,7 @@ STR_FILES = \
#IF(has_extra_nci_thunks): src/nci/extra_thunks.str \
src/nci/signatures.str \
src/packfile/api.str \
- src/packfile/execute.str \
+ src/packfile/execute.str \
src/packfile/object_serialization.str \
src/packfile/pf_items.str \
src/pmc.str \
@@ -1599,7 +1599,7 @@ src/multidispatch$(O) : \
src/packfile/api$(O) : \
src/packfile/api.str \
src/packfile/api.c \
- src/packfile/packfile_private.h \
+ src/packfile/packfile_private.h \
include/pmc/pmc_sub.h \
include/pmc/pmc_key.h \
include/pmc/pmc_parrotlibrary.h \
@@ -1620,11 +1620,11 @@ src/packfile/api$(O) : \
$(INC_DIR)/runcore_api.h
src/packfile/execute$(O) : \
- $(PARROT_H_HEADERS) \
- src/packfile/execute.str \
- src/packfile/execute.c \
- src/packfile/packfile_private.h \
- include/pmc/pmc_sub.h
+ $(PARROT_H_HEADERS) \
+ src/packfile/execute.str \
+ src/packfile/execute.c \
+ src/packfile/packfile_private.h \
+ include/pmc/pmc_sub.h
src/packfile/output$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h src/packfile/output.c
20 include/parrot/packfile.h
View
@@ -1111,6 +1111,26 @@ opcode_t PackFile_pack_size(PARROT_INTERP, ARGMOD(PackFile *self))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/packfile/output.c */
+
+/* This is temporary, to make do_sub_pragmas public... */
+/* HEADERIZER BEGIN: src/packfile/execute.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+void do_sub_pragmas(PARROT_INTERP,
+ ARGIN(PackFile_ByteCode *self),
+ pbc_action_enum_t action,
+ ARGIN_NULLOK(PMC *eval_pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_do_sub_pragmas __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/packfile/execute.c */
+
+
+
#endif /* PARROT_PACKFILE_H_GUARD */
/*
8 src/embed.c
View
@@ -563,12 +563,8 @@ Parrot_pbc_read(PARROT_INTERP, ARGIN_NULLOK(const char *fullname), const int deb
}
/* Set :main routine */
- if (!(pf->options & PFOPT_HEADERONLY)) {
- if (pf->cur_cs != NULL)
- Parrot_pbc_load(interp, pf);
- PackFile_fixup_subs(interp, PBC_PBC, NULL);
- }
-
+ if (!(pf->options & PFOPT_HEADERONLY))
+ do_sub_pragmas(interp, pf->cur_cs, PBC_PBC, NULL);
/* Prederefing the sub/the bytecode is done in switch_to_cs before
* actual usage of the segment */
9 src/embed/api.c
View
@@ -329,10 +329,7 @@ Parrot_api_load_bytecode_file(Parrot_PMC interp_pmc,
PackFile * const pf = Parrot_pbc_read(interp, filename, 0);
if (!pf)
Parrot_ex_throw_from_c_args(interp, NULL, 1, "Could not load packfile");
- if (pf->cur_cs != NULL)
- Parrot_pbc_load(interp, pf);
- PackFile_fixup_subs(interp, PBC_PBC, NULL);
- *pbc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ do_sub_pragmas(interp, pf->cur_cs, PBC_PBC, NULL); *pbc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, *pbc, pf);
EMBED_API_CALLOUT(interp_pmc, interp)
}
@@ -364,9 +361,7 @@ Parrot_api_load_bytecode_bytes(Parrot_PMC interp_pmc,
if (!PackFile_unpack(interp, pf, (const opcode_t *)pbc, bytecode_size))
Parrot_ex_throw_from_c_args(interp, NULL, 1, "could not unpack packfile");
- if (pf->cur_cs != NULL)
- Parrot_pbc_load(interp, pf);
- PackFile_fixup_subs(interp, PBC_PBC, NULL);
+ do_sub_pragmas(interp, pf->cur_cs, PBC_PBC, NULL);
*pbcpmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, *pbcpmc, pf);
EMBED_API_CALLOUT(interp_pmc, interp);
4 src/packfile/execute.c
View
@@ -22,8 +22,8 @@ This file contain some private functions relating to executing functions.
#include "execute.str"
-
-/* HEADERIZER HFILE: src/packfile/packfile_private.h */
+/* This is temporary, to make do_sub_pragmas public... */
+/* HEADERIZER HFILE: include/parrot/packfile.h */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
19 src/packfile/packfile_private.h
View
@@ -14,25 +14,16 @@ that are only for use in the packfile and don't need to be included in the rest
Parrot.
*/
-
+#ifndef PARROT_PACKFILE_PRIVATE_H_GUARD
+#define PARROT_PACKFILE_PRIVATE_H_GUARD
/* HEADERIZER BEGIN: src/packfile/execute.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-void do_sub_pragmas(PARROT_INTERP,
- ARGIN(PackFile_ByteCode *self),
- pbc_action_enum_t action,
- ARGIN_NULLOK(PMC *eval_pmc))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_do_sub_pragmas __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(self))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
/* HEADERIZER END: src/packfile/execute.c */
+#endif // PARROT_PACKFILE_PRIVATE_H_GUARD
+
/*
* Local variables:
* c-file-style: "parrot"
4 src/pmc/eval.pmc
View
@@ -325,9 +325,7 @@ Unarchives the code.
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_EXTERNAL_ERROR,
"couldn't unpack packfile");
- if (pf->cur_cs != NULL)
- Parrot_pbc_load(interp, pf);
- PackFile_fixup_subs(INTERP, PBC_PBC, SELF);
+ do_sub_pragmas(INTERP, pf->cur_cs, PBC_PBC, SELF);
for (i = 0; i < pf->directory.num_segments; ++i) {
seg = pf->directory.segments[i];
Please sign in to comment.
Something went wrong with that request. Please try again.