ish-app / ish

Linux shell for iOS
https://ish.app
Other
16.32k stars 855 forks source link

Rename the JIT #2398

Open saagarjha opened 3 weeks ago

saagarjha commented 3 weeks ago

This better matches how it is actually designed. Also this is probably going to fail the linux build until you apply this

diff --git a/arch/ish/ishemu/exec_user.c b/arch/ish/ishemu/exec_user.c
index f7bdd114c6b04..0e2b202cfec4e 100644
--- a/arch/ish/ishemu/exec_user.c
+++ b/arch/ish/ishemu/exec_user.c
@@ -7,8 +7,8 @@
 #include "emu/cpu.h"
 #include "emu/tlb.h"
 #include "emu/interrupt.h"
-#define ENGINE_JIT 1
-#include "jit/jit.h"
+#define ENGINE_PROP65 1
+#include "interpreter/weave.h"

 extern int current_pid(void);

@@ -80,26 +80,26 @@ void emu_flush_tlb_local(struct emu_mm *mm, unsigned long start, unsigned long e
    if (the_tlb.mmu == NULL)
        return;
    tlb_flush(&the_tlb);
-   if (mm->mmu.jit != NULL)
-       jit_invalidate_range(mm->mmu.jit, start / PAGE_SIZE, (end + PAGE_SIZE - 1) / PAGE_SIZE /* TODO DIV_ROUND_UP? */);
+   if (mm->mmu.weave != NULL)
+       weave_invalidate_range(mm->mmu.weave, start / PAGE_SIZE, (end + PAGE_SIZE - 1) / PAGE_SIZE /* TODO DIV_ROUND_UP? */);
 }

 void emu_mmu_init(struct emu_mm *mm)
 {
-   mm->mmu.jit = jit_new(&mm->mmu);
+   mm->mmu.weave = weave_new(&mm->mmu);
    mm->mmu.ops = &ishemu_ops;
 }

 void emu_mmu_destroy(struct emu_mm *mm)
 {
-   jit_free(mm->mmu.jit);
-   mm->mmu.jit = NULL;
+   weave_free(mm->mmu.weave);
+   mm->mmu.weave = NULL;
 }

 void emu_switch_mm(struct emu *emu, struct emu_mm *mm) {
    if (!mm)
        return;
-   if (mm->mmu.jit == NULL)
+   if (mm->mmu.weave == NULL)
        emu_mmu_init( mm);
    emu->cpu.mmu = &mm->mmu;
    tlb_refresh(&the_tlb, &mm->mmu);