Skip to content

Commit

Permalink
6model: initialize in Parrot_interp_initialize_interpreter
Browse files Browse the repository at this point in the history
200 new ops, but bootstrap-ops not yet successful
  • Loading branch information
Reini Urban committed Mar 17, 2014
1 parent 14aa664 commit ce24dad
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 617 deletions.
1 change: 1 addition & 0 deletions config/gen/makefiles/root.in
Expand Up @@ -1793,6 +1793,7 @@ src/call/context$(O) : $(PARROT_H_HEADERS) \

src/interp/inter_cb$(O) : $(PARROT_H_HEADERS) \
$(INC_PMC_DIR)/pmc_parrotinterpreter.h \
$(INC_PMC_DIR)/pmc_callback.h \
$(EXTEND_HEADERS) \
src/interp/inter_cb.str \
src/interp/inter_cb.c
Expand Down
15 changes: 15 additions & 0 deletions src/interp/api.c
Expand Up @@ -39,6 +39,10 @@ static Interp* emergency_interp = NULL;
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */

static void
intern_initialize_6model(PARROT_INTERP)
__attribute__nonnull__(1);

PARROT_WARN_UNUSED_RESULT
static int Parrot_interp_is_env_var_set(PARROT_INTERP, ARGIN(STRING* var))
__attribute__nonnull__(1)
Expand Down Expand Up @@ -361,9 +365,20 @@ Parrot_interp_initialize_interpreter(PARROT_INTERP, ARGIN(Parrot_GC_Init_Args *a
Parrot_x_on_exit(interp, Parrot_interp_really_destroy, NULL);
#endif

intern_initialize_6model(interp);
return interp;
}

static void
intern_initialize_6model(PARROT_INTERP)
{
PMC * KnowHOW, * KnowHOWAttribute;
SixModelObject_initialize(interp, &KnowHOW, &KnowHOWAttribute);
VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_KNOWHOW, KnowHOW);
VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_KNOWHOWATTRIBUTE,
KnowHOWAttribute);
}

/*
=item C<void Parrot_interp_destroy(PARROT_INTERP)>
Expand Down

0 comments on commit ce24dad

Please sign in to comment.