Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1123)

Unified Diff: third_party/lk/dartino/app/dartino-fixed/fletch_runner.c

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/lk/README ('k') | third_party/lk/dartino/app/dartino-fixed/missing.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/lk/dartino/app/dartino-fixed/fletch_runner.c
diff --git a/third_party/lk/fletch/app/fletch-fixed/fletch_runner.c b/third_party/lk/dartino/app/dartino-fixed/fletch_runner.c
similarity index 57%
rename from third_party/lk/fletch/app/fletch-fixed/fletch_runner.c
rename to third_party/lk/dartino/app/dartino-fixed/fletch_runner.c
index 30097fb16981e9db15312dd89f1d2500b07852f4..fb1ace70c494b8bea5cfb633b95b2ad688e276b1 100644
--- a/third_party/lk/fletch/app/fletch-fixed/fletch_runner.c
+++ b/third_party/lk/dartino/app/dartino-fixed/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>
@@ -33,46 +33,46 @@ int GetWidth(gfx_surface* surface) { return surface->width; }
int GetHeight(gfx_surface* surface) { return surface->height; }
#endif
-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
-extern __attribute__((weak)) char __fletch_lines_heap_start;
-extern __attribute__((weak)) char __fletch_lines_heap_end;
-extern __attribute__((weak)) char __fletch_lines_start;
+extern __attribute__((weak)) char __dartino_lines_heap_start;
+extern __attribute__((weak)) char __dartino_lines_heap_end;
+extern __attribute__((weak)) char __dartino_lines_start;
int Run(void* ptr) {
int* pointer = 0xE000E008;
*pointer = *pointer | 2;
printf("Set debugging flag to %d\n", *((int *) 0xE000E008));
- printf("STARTING fletch-vm...\n");
- FletchSetup();
- void* program_heap = &__fletch_lines_heap_start;
- size_t size = ((intptr_t) &__fletch_lines_heap_end) - ((intptr_t) &__fletch_lines_heap_start);
+ printf("STARTING dartino-vm...\n");
+ DartinoSetup();
+ void* program_heap = &__dartino_lines_heap_start;
+ size_t size = ((intptr_t) &__dartino_lines_heap_end) - ((intptr_t) &__dartino_lines_heap_start);
printf("LOADING PROGRAM AT %p size %d...\n", program_heap, size);
- FletchProgram program = FletchLoadProgramFromFlash(program_heap, size);
+ DartinoProgram program = DartinoLoadProgramFromFlash(program_heap, size);
printf("RUNNING program...\n");
- int result = FletchRunMain(program);
+ int result = DartinoRunMain(program);
printf("EXIT CODE: %i\n", result);
- printf("TEARING DOWN fletch-vm...\n");
- FletchTearDown();
+ printf("TEARING DOWN dartino-vm...\n");
+ DartinoTearDown();
return result;
}
#if defined(WITH_LIB_CONSOLE)
#include <lib/console.h>
-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 instead of
// the Dart main thread. Currently, we get stack overflows (into the kernel)
// when using the shell thread.
@@ -88,11 +88,11 @@ static int FletchRunner(int argc, const cmd_args* argv) {
}
STATIC_COMMAND_START
-{ "fletch", "fletch vm", &FletchRunner },
-STATIC_COMMAND_END(fletchrunner);
+{ "dartino", "dartino vm", &DartinoRunner },
+STATIC_COMMAND_END(dartinorunner);
#endif
-APP_START(fletchrunner)
+APP_START(dartinorunner)
.entry = (void *)&Run,
.flags = APP_FLAG_CUSTOM_STACK_SIZE,
.stack_size = 8192,
« no previous file with comments | « third_party/lk/README ('k') | third_party/lk/dartino/app/dartino-fixed/missing.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698