Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed nqp::objprimspec
  • Loading branch information
FROGGS committed Jul 26, 2013
1 parent 3e222b8 commit 1541771
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 0 additions & 3 deletions docs/pir2nqp.todo
Expand Up @@ -44,9 +44,6 @@ pir::load_bytecode
to be nqp::changetype
pir::repr_change_type__0PP

to be nqp::primspec
pir::repr_get_primitive_type_spec__IP

to be nqp::pubmethcache
pir::publish_method_cache

Expand Down
11 changes: 10 additions & 1 deletion src/vm/parrot/ops/nqp.ops
Expand Up @@ -2179,7 +2179,16 @@ inline op repr_get_primitive_type_spec(out INT, invar PMC) :base_core {
PMC *var = decontainerize(interp, $2);
if (var->vtable->base_type == smo_id) {
storage_spec ss = REPR(var)->get_storage_spec(interp, STABLE(var));
$1 = ss.inlineable ? ss.boxed_primitive : STORAGE_SPEC_BP_NONE;
$1 = ss.boxed_primitive;
}
else if (var->vtable->base_type == enum_class_Integer) {
$1 = STORAGE_SPEC_BP_INT;
}
else if (var->vtable->base_type == enum_class_Float) {
$1 = STORAGE_SPEC_BP_NUM;
}
else if (var->vtable->base_type == enum_class_String) {
$1 = STORAGE_SPEC_BP_STR;
}
else {
$1 = STORAGE_SPEC_BP_NONE;
Expand Down

0 comments on commit 1541771

Please sign in to comment.