mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
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:
committed by
Ron Evans
parent
7123941df0
commit
bfa29f17da
@@ -13,6 +13,7 @@
|
||||
"-Wl,--gc-sections"
|
||||
],
|
||||
"extra-files": [
|
||||
"src/runtime/gc_avr.S",
|
||||
"src/runtime/scheduler_avr.S"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
],
|
||||
"extra-files": [
|
||||
"src/device/arm/cortexm.s",
|
||||
"src/runtime/gc_arm.S",
|
||||
"src/runtime/scheduler_cortexm.S"
|
||||
],
|
||||
"gdb": "gdb-multiarch"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"linkerscript": "targets/gameboy-advance.ld",
|
||||
"extra-files": [
|
||||
"targets/gameboy-advance.s",
|
||||
"src/runtime/scheduler_gba.S"
|
||||
"src/runtime/gc_arm.S"
|
||||
],
|
||||
"gdb": "gdb-multiarch",
|
||||
"emulator": ["mgba", "-3"]
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
],
|
||||
"extra-files": [
|
||||
"src/device/riscv/start.S",
|
||||
"src/runtime/scheduler_tinygoriscv.S",
|
||||
"src/runtime/gc_riscv.S",
|
||||
"src/device/riscv/handleinterrupt.S"
|
||||
],
|
||||
"gdb": "riscv64-unknown-elf-gdb"
|
||||
|
||||
Reference in New Issue
Block a user