Skip to content

Commit 1541771

Browse files
committed
fixed nqp::objprimspec
1 parent 3e222b8 commit 1541771

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/pir2nqp.todo

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ pir::load_bytecode
4444
to be nqp::changetype
4545
pir::repr_change_type__0PP
4646

47-
to be nqp::primspec
48-
pir::repr_get_primitive_type_spec__IP
49-
5047
to be nqp::pubmethcache
5148
pir::publish_method_cache
5249

src/vm/parrot/ops/nqp.ops

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2179,7 +2179,16 @@ inline op repr_get_primitive_type_spec(out INT, invar PMC) :base_core {
21792179
PMC *var = decontainerize(interp, $2);
21802180
if (var->vtable->base_type == smo_id) {
21812181
storage_spec ss = REPR(var)->get_storage_spec(interp, STABLE(var));
2182-
$1 = ss.inlineable ? ss.boxed_primitive : STORAGE_SPEC_BP_NONE;
2182+
$1 = ss.boxed_primitive;
2183+
}
2184+
else if (var->vtable->base_type == enum_class_Integer) {
2185+
$1 = STORAGE_SPEC_BP_INT;
2186+
}
2187+
else if (var->vtable->base_type == enum_class_Float) {
2188+
$1 = STORAGE_SPEC_BP_NUM;
2189+
}
2190+
else if (var->vtable->base_type == enum_class_String) {
2191+
$1 = STORAGE_SPEC_BP_STR;
21832192
}
21842193
else {
21852194
$1 = STORAGE_SPEC_BP_NONE;

0 commit comments

Comments
 (0)