Index: third_party/lk/dartino/app/dartino/fletch_runner.c |
diff --git a/third_party/lk/fletch/app/fletch/fletch_runner.c b/third_party/lk/dartino/app/dartino/fletch_runner.c |
similarity index 63% |
rename from third_party/lk/fletch/app/fletch/fletch_runner.c |
rename to third_party/lk/dartino/app/dartino/fletch_runner.c |
index d46819cae1bd6c38eaa612e14a56b92b2ddd5070..903ccd35e1205b36b5955f99d536c856645eead6 100644 |
--- a/third_party/lk/fletch/app/fletch/fletch_runner.c |
+++ b/third_party/lk/dartino/app/dartino/fletch_runner.c |
@@ -8,7 +8,7 @@ |
#include <stdlib.h> |
#include <malloc.h> |
#include <app.h> |
-#include <include/fletch_api.h> |
+#include <include/dartino_api.h> |
#include <include/static_ffi.h> |
#include <endian.h> |
#include <kernel/thread.h> |
@@ -38,31 +38,31 @@ int GetHeight(gfx_surface* surface) { return surface->height; } |
#endif // WITH_LIB_GFX |
#if 1 |
-FLETCH_EXPORT_TABLE_BEGIN |
- FLETCH_EXPORT_TABLE_ENTRY("magic_meat", FFITestMagicMeat) |
- FLETCH_EXPORT_TABLE_ENTRY("magic_veg", FFITestMagicVeg) |
+DARTINO_EXPORT_TABLE_BEGIN |
+ DARTINO_EXPORT_TABLE_ENTRY("magic_meat", FFITestMagicMeat) |
+ DARTINO_EXPORT_TABLE_ENTRY("magic_veg", FFITestMagicVeg) |
#if WITH_LIB_GFX |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_create", GetFullscreenSurface) |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_width", GetWidth) |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_height", GetHeight) |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_destroy", gfx_surface_destroy) |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_pixel", gfx_putpixel) |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_clear", gfx_clear) |
- FLETCH_EXPORT_TABLE_ENTRY("gfx_flush", gfx_flush) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_create", GetFullscreenSurface) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_width", GetWidth) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_height", GetHeight) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_destroy", gfx_surface_destroy) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_pixel", gfx_putpixel) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_clear", gfx_clear) |
+ DARTINO_EXPORT_TABLE_ENTRY("gfx_flush", gfx_flush) |
#endif // WITH_LIB_GFX |
-FLETCH_EXPORT_TABLE_END |
+DARTINO_EXPORT_TABLE_END |
#else |
-FLETCH_EXPORT_STATIC_RENAME(magic_meat, FFITestMagicMeat); |
-FLETCH_EXPORT_STATIC_RENAME(magic_veg, FFITestMagicVeg); |
+DARTINO_EXPORT_STATIC_RENAME(magic_meat, FFITestMagicMeat); |
+DARTINO_EXPORT_STATIC_RENAME(magic_veg, FFITestMagicVeg); |
#ifdef WITH_LIB_GFX |
-FLETCH_EXPORT_STATIC_RENAME(gfx_create, GetFullscreenSurface); |
-FLETCH_EXPORT_STATIC_RENAME(gfx_width, GetWidth); |
-FLETCH_EXPORT_STATIC_RENAME(gfx_height, GetHeight); |
-FLETCH_EXPORT_STATIC_RENAME(gfx_destroy, gfx_surface_destroy); |
-FLETCH_EXPORT_STATIC_RENAME(gfx_pixel, gfx_putpixel); |
-FLETCH_EXPORT_STATIC(gfx_clear); |
-FLETCH_EXPORT_STATIC(gfx_flush); |
+DARTINO_EXPORT_STATIC_RENAME(gfx_create, GetFullscreenSurface); |
+DARTINO_EXPORT_STATIC_RENAME(gfx_width, GetWidth); |
+DARTINO_EXPORT_STATIC_RENAME(gfx_height, GetHeight); |
+DARTINO_EXPORT_STATIC_RENAME(gfx_destroy, gfx_surface_destroy); |
+DARTINO_EXPORT_STATIC_RENAME(gfx_pixel, gfx_putpixel); |
+DARTINO_EXPORT_STATIC(gfx_clear); |
+DARTINO_EXPORT_STATIC(gfx_flush); |
#endif |
#endif |
@@ -93,18 +93,18 @@ int ReadSnapshot(unsigned char** snapshot) { |
} |
int RunSnapshot(unsigned char* snapshot, int size) { |
- printf("STARTING fletch-vm...\n"); |
- FletchSetup(); |
+ printf("STARTING dartino-vm...\n"); |
+ DartinoSetup(); |
printf("LOADING snapshot...\n"); |
- FletchProgram program = FletchLoadSnapshot(snapshot, size); |
+ DartinoProgram program = DartinoLoadSnapshot(snapshot, size); |
free(snapshot); |
printf("RUNNING program...\n"); |
- int result = FletchRunMain(program); |
+ int result = DartinoRunMain(program); |
printf("DELETING program...\n"); |
- FletchDeleteProgram(program); |
- printf("TEARING DOWN fletch-vm...\n"); |
+ DartinoDeleteProgram(program); |
+ printf("TEARING DOWN dartino-vm...\n"); |
printf("EXIT CODE: %i\n", result); |
- FletchTearDown(); |
+ DartinoTearDown(); |
return result; |
} |
@@ -117,7 +117,7 @@ int Run(void* ptr) { |
return RunSnapshot(snapshot, length); |
} |
-static int FletchRunner(int argc, const cmd_args *argv) { |
+static int DartinoRunner(int argc, const cmd_args *argv) { |
// TODO(ajohnsen): Investigate if we can use the 'shell' thread instaed of |
// the Dart main thread. Currently, we get stack overflows (into the kernel) |
// when using the shell thread. |
@@ -133,11 +133,11 @@ static int FletchRunner(int argc, const cmd_args *argv) { |
} |
STATIC_COMMAND_START |
-STATIC_COMMAND("fletch", "fletch vm", &FletchRunner) |
-STATIC_COMMAND_END(fletchrunner); |
+STATIC_COMMAND("dartino", "dartino vm", &DartinoRunner) |
+STATIC_COMMAND_END(dartinorunner); |
#endif |
-APP_START(fletchrunner) |
+APP_START(dartinorunner) |
.flags = APP_FLAG_CUSTOM_STACK_SIZE, |
.stack_size = 8192, |
APP_END |