Skip to content

Commit ec19568

Browse files
committed
Make 0s strings since they're going to get stringified anyway
1 parent d8949b4 commit ec19568

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vm/moar/HLL/Backend.nqp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class HLL::Backend::MoarVM {
301301
for $v -> $gc {
302302
my @g := nqp::list_s();
303303
for <time retained_bytes promoted_bytes gen2_roots full cleared_bytes> -> $f {
304-
nqp::push_s(@g, ~($gc{$f} // 0));
304+
nqp::push_s(@g, ~($gc{$f} // '0'));
305305
}
306306
nqp::sayfh($profile_fh, 'INSERT INTO gcs VALUES (' ~ nqp::join(',', @g) ~ ');');
307307
}
@@ -311,17 +311,17 @@ class HLL::Backend::MoarVM {
311311
sub collect_callees($caller, %call_graph) {
312312
my @callee := nqp::list_s(~$caller);
313313
for <id osr spesh_entries jit_entries inlined_entries inclusive_time exclusive_time entries deopt_one> -> $f {
314-
nqp::push_s(@callee, ~(%call_graph{$f} // 0));
314+
nqp::push_s(@callee, ~(%call_graph{$f} // '0'));
315315
}
316-
my str $id := ~%call_graph<id>;
316+
my str $id := ~$caller;
317317
%callee_rec_depth{$id} := 0 unless %callee_rec_depth{$id};
318318
nqp::push_s(@callee, ~%callee_rec_depth{$id});
319319
nqp::sayfh($profile_fh, 'INSERT INTO callees VALUES (' ~ nqp::join(',', @callee) ~ ');');
320320
if %call_graph<allocations> {
321321
for %call_graph<allocations> -> $a {
322322
my @a := nqp::list_s();
323323
for <id spesh jit count> -> $f {
324-
nqp::push_s(@a, ~($a{$f} // 0));
324+
nqp::push_s(@a, ~($a{$f} // '0'));
325325
}
326326
nqp::sayfh($profile_fh, 'INSERT INTO allocations VALUES (' ~ nqp::join(',', @a) ~ ');');
327327
}

0 commit comments

Comments
 (0)