runtime: move/refactor some GC-related code

Instead of putting tinygo_scanCurrentStack in scheduler_*.S files, put
them in dedicated files. The function tinygo_scanCurrentStack has
nothing to do with scheduling and so doesn't belong there. Additionally,
while scheduling code is made specific for the Cortex-M, the
tinygo_scanCurrentStack is generic to all ARM targets so this move
removes some duplication there.

Specifically:

  * tinygo_scanCurrentStack is moved out of scheduler_cortexm.S as it
    isn't really part of the scheduler. It is now gc_arm.S.
  * Same for the AVR target.
  * Same for the RISCV target.
  * scheduler_gba.S is removed, using gc_arm.S instead as it only
    contains tinygo_scanCurrentStack.
This commit is contained in:
Ayke van Laethem
2020-09-25 15:59:38 +02:00
committed by Ron Evans
parent 7123941df0
commit bfa29f17da
9 changed files with 70 additions and 86 deletions
+1
View File
@@ -25,6 +25,7 @@
],
"extra-files": [
"src/device/arm/cortexm.s",
"src/runtime/gc_arm.S",
"src/runtime/scheduler_cortexm.S"
],
"gdb": "gdb-multiarch"