Skip to content
This repository
Browse code

remove the ASSERT_ARGS stuff, and other things that are borking thebu…

…ild.
  • Loading branch information...
commit 6be2b4aa79b3bb9ea5640a2dbac9dde9f9c00dfa 1 parent 2042095
Andrew Whitworth Whiteknight authored

Showing 2 changed files with 41 additions and 39 deletions. Show diff stats Hide diff stats

  1. +22 22 include/parrot/api.h
  2. +19 17 src/embed/api.c
44 include/parrot/api.h
@@ -62,21 +62,6 @@ typedef struct _Parrot_Init_Args {
62 62 /* HEADERIZER BEGIN: src/embed/api.c */
63 63 /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
64 64
65   -// TODO: This only works with the inital bytecode. After this we should use // Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_load_bytecode_file(
66   - Parrot_PMC interp_pmc,
67   - ARGIN(const char *filename),
68   - ARGOUT(Parrot_PMC * pbc))
69   - __attribute__nonnull__(2)
70   - __attribute__nonnull__(3)
71   - FUNC_MODIFIES(* pbc);
72   -
73   -// Load the bytecode into the interpreter, but don't execute it // TODO: This only works with the inital bytecode. After this we should use // Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_ready_bytecode(
74   - Parrot_PMC interp_pmc,
75   - Parrot_PMC pbc,
76   - ARGOUT(Parrot_PMC *main_sub))
77   - __attribute__nonnull__(3)
78   - FUNC_MODIFIES(*main_sub);
79   -
80 65 PARROT_API
81 66 Parrot_Int Parrot_api_add_dynext_search_path(
82 67 Parrot_PMC interp_pmc,
@@ -170,6 +155,15 @@ Parrot_Int Parrot_api_load_bytecode_bytes(
170 155 FUNC_MODIFIES(* pbcpmc);
171 156
172 157 PARROT_API
  158 +Parrot_Int Parrot_api_load_bytecode_file(
  159 + Parrot_PMC interp_pmc,
  160 + ARGIN(const char *filename),
  161 + ARGOUT(Parrot_PMC * pbc))
  162 + __attribute__nonnull__(2)
  163 + __attribute__nonnull__(3)
  164 + FUNC_MODIFIES(* pbc);
  165 +
  166 +PARROT_API
173 167 Parrot_Int Parrot_api_make_interpreter(
174 168 Parrot_PMC parent,
175 169 Parrot_Int flags,
@@ -179,6 +173,14 @@ Parrot_Int Parrot_api_make_interpreter(
179 173 FUNC_MODIFIES(*interp);
180 174
181 175 PARROT_API
  176 +Parrot_Int Parrot_api_ready_bytecode(
  177 + Parrot_PMC interp_pmc,
  178 + Parrot_PMC pbc,
  179 + ARGOUT(Parrot_PMC *main_sub))
  180 + __attribute__nonnull__(3)
  181 + FUNC_MODIFIES(*main_sub);
  182 +
  183 +PARROT_API
182 184 Parrot_Int Parrot_api_run_bytecode(
183 185 Parrot_PMC interp_pmc,
184 186 Parrot_PMC pbc,
@@ -227,13 +229,6 @@ Parrot_Int Parrot_api_wrap_imcc_hack(
227 229 int *result,
228 230 imcc_hack_func_t func);
229 231
230   -#define ASSERT_ARGS_// Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_load_bytecode_file \
231   - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
232   - PARROT_ASSERT_ARG(filename) \
233   - , PARROT_ASSERT_ARG(pbc))
234   -#define ASSERT_ARGS_// TODO: This only works with the inital bytecode. After this we should use // Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_ready_bytecode \
235   - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
236   - PARROT_ASSERT_ARG(main_sub))
237 232 #define ASSERT_ARGS_Parrot_api_add_dynext_search_path \
238 233 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
239 234 PARROT_ASSERT_ARG(path))
@@ -267,8 +262,13 @@ Parrot_Int Parrot_api_wrap_imcc_hack(
267 262 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
268 263 PARROT_ASSERT_ARG(pbc) \
269 264 , PARROT_ASSERT_ARG(pbcpmc))
  265 +#define ASSERT_ARGS_Parrot_api_load_bytecode_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
  266 + PARROT_ASSERT_ARG(filename) \
  267 + , PARROT_ASSERT_ARG(pbc))
270 268 #define ASSERT_ARGS_Parrot_api_make_interpreter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
271 269 PARROT_ASSERT_ARG(interp))
  270 +#define ASSERT_ARGS_Parrot_api_ready_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
  271 + PARROT_ASSERT_ARG(main_sub))
272 272 #define ASSERT_ARGS_Parrot_api_run_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
273 273 #define ASSERT_ARGS_Parrot_api_set_configuration_hash \
274 274 __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
36 src/embed/api.c
@@ -59,7 +59,7 @@ Parrot_Int
59 59 Parrot_api_make_interpreter(Parrot_PMC parent, Parrot_Int flags,
60 60 ARGIN_NULLOK(Parrot_Init_Args *args), ARGOUT(Parrot_PMC *interp))
61 61 {
62   - ASSERT_ARGS(Parrot_api_make_interpreter)
  62 + //ASSERT_ARGS(Parrot_api_make_interpreter)
63 63 int alt_stacktop;
64 64 Parrot_Interp interp_raw;
65 65 void *stacktop_ptr = &alt_stacktop;
@@ -88,7 +88,7 @@ Parrot_Int
88 88 Parrot_api_set_runcore(Parrot_PMC interp_pmc, ARGIN(const char * corename),
89 89 Parrot_UInt trace)
90 90 {
91   - ASSERT_ARGS(Parrot_api_set_runcore)
  91 + //ASSERT_ARGS(Parrot_api_set_runcore)
92 92 EMBED_API_CALLIN(interp_pmc, interp)
93 93 if (trace) {
94 94 Parrot_pcc_trace_flags_on(interp, interp->ctx, trace);
@@ -118,7 +118,7 @@ PARROT_API
118 118 Parrot_Int
119 119 Parrot_api_debug_flag(Parrot_PMC interp_pmc, Parrot_Int flags, Parrot_Int set)
120 120 {
121   - ASSERT_ARGS(Parrot_api_debug_flag)
  121 + //ASSERT_ARGS(Parrot_api_debug_flag)
122 122 EMBED_API_CALLIN(interp_pmc, interp)
123 123 if (set)
124 124 interp->debug_flags |= flags;
@@ -131,7 +131,7 @@ PARROT_API
131 131 Parrot_Int
132 132 Parrot_api_flag(Parrot_PMC interp_pmc, Parrot_Int flags, Parrot_Int set)
133 133 {
134   - ASSERT_ARGS(Parrot_api_flag)
  134 + //ASSERT_ARGS(Parrot_api_flag)
135 135 EMBED_API_CALLIN(interp_pmc, interp)
136 136 if (set) {
137 137 Interp_flags_SET(interp, flags);
@@ -147,7 +147,7 @@ PARROT_API
147 147 Parrot_Int
148 148 Parrot_api_set_executable_name(Parrot_PMC interp_pmc, ARGIN(const char * name))
149 149 {
150   - ASSERT_ARGS(Parrot_api_set_executable_name)
  150 + //ASSERT_ARGS(Parrot_api_set_executable_name)
151 151 EMBED_API_CALLIN(interp_pmc, interp)
152 152 STRING * const name_str = Parrot_str_new(interp, name, 0);
153 153 PMC * const name_pmc = Parrot_pmc_new(interp, enum_class_String);
@@ -161,7 +161,7 @@ PARROT_API
161 161 Parrot_Int
162 162 Parrot_api_destroy_interpreter(Parrot_PMC interp_pmc)
163 163 {
164   - ASSERT_ARGS(Parrot_api_destroy_interpreter)
  164 + //ASSERT_ARGS(Parrot_api_destroy_interpreter)
165 165 EMBED_API_CALLIN(interp_pmc, interp)
166 166 Parrot_destroy(interp);
167 167 Parrot_x_exit(interp, 0);
@@ -181,14 +181,15 @@ Load a bytecode file and return a bytecode PMC.
181 181
182 182 */
183 183
184   -// TODO: This only works with the inital bytecode. After this we should use
185   -// Parrot_append_bytecode or something similar
  184 +/* TODO: This only works with the inital bytecode. After this we should use
  185 + Parrot_append_bytecode or something similar */
  186 +
186 187 PARROT_API
187 188 Parrot_Int
188 189 Parrot_api_load_bytecode_file(Parrot_PMC interp_pmc,
189 190 ARGIN(const char *filename), ARGOUT(Parrot_PMC * pbc))
190 191 {
191   - ASSERT_ARGS(Parrot_api_load_bytecode_file)
  192 + //ASSERT_ARGS(Parrot_api_load_bytecode_file)
192 193 EMBED_API_CALLIN(interp_pmc, interp)
193 194 PackFile * const pf = Parrot_pbc_read(interp, filename, 0);
194 195 if (!pf)
@@ -218,9 +219,10 @@ Parrot_api_load_bytecode_bytes(Parrot_PMC interp_pmc,
218 219 EMBED_API_CALLOUT(interp_pmc, interp);
219 220 }
220 221
221   -// Load the bytecode into the interpreter, but don't execute it
222   -// TODO: This only works with the inital bytecode. After this we should use
223   -// Parrot_append_bytecode or something similar
  222 +/* Load the bytecode into the interpreter, but don't execute it */
  223 +/* TODO: This only works with the inital bytecode. After this we should use
  224 + Parrot_append_bytecode or something similar */
  225 +
224 226 PARROT_API
225 227 Parrot_Int
226 228 Parrot_api_ready_bytecode(Parrot_PMC interp_pmc, Parrot_PMC pbc,
@@ -252,7 +254,7 @@ Parrot_Int
252 254 Parrot_api_run_bytecode(Parrot_PMC interp_pmc, Parrot_PMC pbc,
253 255 Parrot_PMC mainargs)
254 256 {
255   - ASSERT_ARGS(Parrot_api_run_bytecode)
  257 + //ASSERT_ARGS(Parrot_api_run_bytecode)
256 258 EMBED_API_CALLIN(interp_pmc, interp)
257 259 PMC * main_sub = NULL;
258 260
@@ -306,7 +308,7 @@ Parrot_Int
306 308 Parrot_api_build_argv_array(Parrot_PMC interp_pmc, Parrot_Int argc,
307 309 ARGIN(char ** argv), ARGOUT(Parrot_PMC * args))
308 310 {
309   - ASSERT_ARGS(Parrot_api_build_argv_array)
  311 + //ASSERT_ARGS(Parrot_api_build_argv_array)
310 312 EMBED_API_CALLIN(interp_pmc, interp)
311 313 PMC * const userargv = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
312 314 Parrot_Int i;
@@ -325,7 +327,7 @@ PARROT_API
325 327 Parrot_Int
326 328 Parrot_api_set_warnings(Parrot_PMC interp_pmc, Parrot_Int flags)
327 329 {
328   - ASSERT_ARGS(Parrot_api_set_warnings)
  330 + //ASSERT_ARGS(Parrot_api_set_warnings)
329 331 EMBED_API_CALLIN(interp_pmc, interp)
330 332 /* Activates the given warnings. (Macro from warnings.h.) */
331 333 PARROT_WARNINGS_on(interp, flags);
@@ -337,7 +339,7 @@ Parrot_Int
337 339 Parrot_api_set_output_file(Parrot_PMC interp_pmc,
338 340 ARGIN_NULLOK(const char * filename))
339 341 {
340   - ASSERT_ARGS(Parrot_api_set_output_file)
  342 + //ASSERT_ARGS(Parrot_api_set_output_file)
341 343 EMBED_API_CALLIN(interp_pmc, interp)
342 344 if (!filename && !interp->output_file)
343 345 interp->output_file = "-";
@@ -396,7 +398,7 @@ Parrot_Int
396 398 Parrot_api_set_stdhandles(Parrot_PMC interp_pmc, Parrot_Int stdin,
397 399 Parrot_Int stdout, Parrot_Int stderr)
398 400 {
399   - ASSERT_ARGS(Parrot_api_set_stdhandles)
  401 + //ASSERT_ARGS(Parrot_api_set_stdhandles)
400 402 EMBED_API_CALLIN(interp_pmc, interp)
401 403 void *dummy;
402 404

0 comments on commit 6be2b4a

Please sign in to comment.
Something went wrong with that request. Please try again.