esp8266: Remove scanning of GC pointers in native code block.

The native code no longer holds live GC pointers so doesn't need to be
scanned.
pull/1/head
Damien George 2018-09-27 23:46:09 +10:00
parent ac81cee3fc
commit bbccb0f630
3 changed files with 0 additions and 18 deletions

View File

@ -46,11 +46,6 @@ void gc_collect(void) {
// trace the stack, including the registers (since they live on the stack in this function)
gc_collect_root((void**)sp, (STACK_END - sp) / sizeof(uint32_t));
#if MICROPY_EMIT_XTENSA || MICROPY_EMIT_INLINE_XTENSA
// trace any native code because it can contain pointers to the heap
esp_native_code_gc_collect();
#endif
// end the GC
gc_collect_end();
}

View File

@ -40,6 +40,5 @@ extern uint32_t _heap_start;
extern uint32_t _heap_end;
void gc_collect(void);
void esp_native_code_gc_collect(void);
#endif // MICROPY_INCLUDED_ESP8266_GCCOLLECT_H

View File

@ -259,8 +259,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(esp_esf_free_bufs_obj, esp_esf_free_bufs);
// esp.set_native_code_location() function; see below. If flash is selected
// then it is erased as needed.
#include "gccollect.h"
#define IRAM1_END (0x40108000)
#define FLASH_START (0x40200000)
#define FLASH_END (0x40300000)
@ -284,16 +282,6 @@ void esp_native_code_init(void) {
esp_native_code_erased = 0;
}
void esp_native_code_gc_collect(void) {
void *src;
if (esp_native_code_location == ESP_NATIVE_CODE_IRAM1) {
src = (void*)esp_native_code_start;
} else {
src = (void*)(FLASH_START + esp_native_code_start);
}
gc_collect_root(src, (esp_native_code_end - esp_native_code_start) / sizeof(uint32_t));
}
void *esp_native_code_commit(void *buf, size_t len) {
//printf("COMMIT(buf=%p, len=%u, start=%08x, cur=%08x, end=%08x, erased=%08x)\n", buf, len, esp_native_code_start, esp_native_code_cur, esp_native_code_end, esp_native_code_erased);