@@ -426,7 +426,7 @@ static void findMerges(const RBCCode& bytecode, CompilerInfo& info) {
426
426
427
427
struct BCCompiler {
428
428
CompilerInfo& cmp;
429
- BCCompiler (CompilerInfo& cmp) : cmp(cmp) {}
429
+ explicit BCCompiler (CompilerInfo& cmp) : cmp(cmp) {}
430
430
431
431
void push (Value* v) { cmp.stack .push (v); }
432
432
@@ -447,29 +447,29 @@ struct BCCompiler {
447
447
Value* env () { return cmp.insert .env ; }
448
448
449
449
template <RBC::Id BC>
450
- void compile (RBC);
450
+ void compile (const RBC& );
451
451
};
452
452
453
453
// Start instructions translation
454
454
455
455
template <>
456
- void BCCompiler::compile<RBC::GETVAR_OP>(RBC bc) {
456
+ void BCCompiler::compile<RBC::GETVAR_OP>(const RBC& bc) {
457
457
auto v = insert (new LdVar (cnst (bc.imm (0 )), env ()));
458
458
insertPush (new Force (v, env (), Tombstone::framestate ()));
459
459
}
460
460
461
461
template <>
462
- void BCCompiler::compile<RBC::RETURN_OP>(RBC bc) {
462
+ void BCCompiler::compile<RBC::RETURN_OP>(const RBC& bc) {
463
463
insert (new Return (pop ()));
464
464
}
465
465
466
466
template <>
467
- void BCCompiler::compile<RBC::LDCONST_OP>(RBC bc) {
467
+ void BCCompiler::compile<RBC::LDCONST_OP>(const RBC& bc) {
468
468
push (insert (new LdConst (cnst (bc.imm (0 )))));
469
469
}
470
470
471
471
template <>
472
- void BCCompiler::compile<RBC::ADD_OP>(RBC bc) {
472
+ void BCCompiler::compile<RBC::ADD_OP>(const RBC& bc) {
473
473
auto a = pop ();
474
474
auto b = pop ();
475
475
insertPush (new Add (a, b, env (), bc.imm (0 )));
0 commit comments