Skip to content

Commit

Permalink
Use root_new opcode from parrot trunk. Bumps PARROT_REVISION.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed May 21, 2009
1 parent 79d0b9a commit 5ed6dac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 47 deletions.
2 changes: 1 addition & 1 deletion build/PARROT_REVISION
@@ -1 +1 @@
38955
39019
46 changes: 0 additions & 46 deletions src/ops/perl6.ops
Expand Up @@ -291,52 +291,6 @@ inline op get_next_candidate_info(out PMC, out PMC, out PMC) :base_core {
goto NEXT();
}

/*

=item B<root_new>(out PMC, in PMC)

Instantiate a new object from the key given by $2; the first component
of the key is the hll namespace.

=cut

*/
inline op root_new(out PMC, in PMC) {
PMC * const key = $2;
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_get_namespace_keyed(interp, root_ns, key);
PMC * classobj = PMCNULL;

if (!PMC_IS_NULL(ns))
classobj = Parrot_oo_get_class(interp, ns);
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", VTABLE_get_repr(interp, key));
goto ADDRESS(dest);
}
}

inline op root_new(out PMC, in PMC, in PMC) {
PMC * const key = $2;
PMC * const root_ns = interp->root_namespace;
PMC * const ns = Parrot_get_namespace_keyed(interp, root_ns, key);
PMC * classobj = PMCNULL;

if (!PMC_IS_NULL(ns))
classobj = Parrot_oo_get_class(interp, ns);
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, $3);
else {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", VTABLE_get_repr(interp, key));
goto ADDRESS(dest);
}
}

/*
* Local variables:
* c-file-style: "parrot"
Expand Down

0 comments on commit 5ed6dac

Please sign in to comment.