Skip to content

Commit ba5ec30

Browse files
committed
Remove TODOs for things that have been done
Also fix comment as OP_GC_BIF3 is covered by tests Signed-off-by: Paul Guyot <pguyot@kallisys.net>
1 parent 4f563ac commit ba5ec30

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/libAtomVM/opcodesswitch.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,7 +2605,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
26052605
break;
26062606
}
26072607

2608-
//TODO: implement wait/1
26092608
case OP_WAIT: {
26102609
uint32_t label;
26112610
DECODE_LABEL(label, pc)
@@ -2622,7 +2621,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
26222621
break;
26232622
}
26242623

2625-
//TODO: implement wait_timeout/2
26262624
case OP_WAIT_TIMEOUT: {
26272625
#ifdef IMPL_EXECUTE_LOOP
26282626
// PC for wait_timeout_trap_handler, just before label
@@ -2936,7 +2934,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
29362934
#ifdef IMPL_EXECUTE_LOOP
29372935
TRACE("is_number/2, label=%i, arg1=%lx\n", label, arg1);
29382936

2939-
//TODO: check for floats too
29402937
if (!term_is_number(arg1)) {
29412938
pc = mod->labels[label];
29422939
}
@@ -3278,7 +3275,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
32783275
#endif
32793276

32803277
#ifdef IMPL_EXECUTE_LOOP
3281-
//TODO: check if src_value is a tuple
32823278
if (!jump_to_address && ((uint32_t) arity == cmp_value)) {
32833279
jump_to_address = mod->labels[jmp_label];
32843280
}
@@ -3707,7 +3703,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
37073703

37083704
#ifdef IMPL_EXECUTE_LOOP
37093705
term catch_term = term_from_catch_label(mod->module_index, label);
3710-
//TODO: here just write to y registers is enough
37113706
WRITE_REGISTER(dreg, catch_term);
37123707
#endif
37133708
break;
@@ -3720,7 +3715,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
37203715
TRACE("try_end/1, reg=%c%i\n", T_DEST_REG(dreg));
37213716

37223717
#ifdef IMPL_EXECUTE_LOOP
3723-
//TODO: here just write to y registers is enough
37243718
WRITE_REGISTER(dreg, term_nil());
37253719
#endif
37263720
break;
@@ -3801,7 +3795,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
38013795

38023796
#ifdef IMPL_EXECUTE_LOOP
38033797
term catch_term = term_from_catch_label(mod->module_index, label);
3804-
// TODO: here just write to y registers is enough
38053798
WRITE_REGISTER(dreg, catch_term);
38063799
#endif
38073800
break;
@@ -3814,7 +3807,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
38143807
TRACE("catch_end/1, reg=%c%i\n", T_DEST_REG(dreg));
38153808

38163809
#ifdef IMPL_EXECUTE_LOOP
3817-
// TODO: here just write to y registers is enough
38183810
WRITE_REGISTER(dreg, term_nil());
38193811
// C.f. https://www.erlang.org/doc/reference_manual/expressions.html#catch-and-throw
38203812
switch (term_to_atom_index(x_regs[0])) {
@@ -5556,7 +5548,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
55565548
break;
55575549
}
55585550

5559-
//TODO: stub, always false
55605551
case OP_IS_BITSTR: {
55615552
uint32_t label;
55625553
DECODE_LABEL(label, pc)
@@ -5579,8 +5570,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
55795570
break;
55805571
}
55815572

5582-
// TODO: This opcode is currently uncovered by tests.
5583-
// We need to implement GC bifs with arity 3, e.g. binary_part/3.
55845573
case OP_GC_BIF3: {
55855574
uint32_t fail_label;
55865575
DECODE_LABEL(fail_label, pc);
@@ -5654,7 +5643,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
56545643
}
56555644

56565645
#if MINIMUM_OTP_COMPILER_VERSION <= 23
5657-
//TODO: stub, implement recv_mark/1
56585646
//it looks like it can be safely left unimplemented
56595647
case OP_RECV_MARK: {
56605648
uint32_t label;
@@ -5665,7 +5653,6 @@ HOT_FUNC int scheduler_entry_point(GlobalContext *glb)
56655653
break;
56665654
}
56675655

5668-
//TODO: stub, implement recv_set/1
56695656
//it looks like it can be safely left unimplemented
56705657
case OP_RECV_SET: {
56715658
uint32_t label;

0 commit comments

Comments
 (0)