You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/12/20 02:45:32 UTC

[nuttx-apps] branch master updated (cfc005a46 -> 867897ad5)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


    from cfc005a46 arp: Remove the unnecessary inclusion of nuttx/net/arp
     new 7d6e12917 interpreter/toywasm: Update toywasm version
     new 867897ad5 interpreters/toywasm/src/toywasm_config.c: add an empty section

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 interpreters/toywasm/Kconfig                       |  5 +++
 interpreters/toywasm/Makefile                      | 13 ++++++-
 interpreters/toywasm/include/toywasm_config.h      |  2 ++
 .../toywasm/src/toywasm_config.c                   | 40 +++++++++-------------
 4 files changed, 36 insertions(+), 24 deletions(-)
 copy examples/elf/tests/struct/struct_dummy.c => interpreters/toywasm/src/toywasm_config.c (67%)


[nuttx-apps] 01/02: interpreter/toywasm: Update toywasm version

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 7d6e12917f7c73b20d8d959c19d5b26a47cce363
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Dec 20 01:07:50 2022 +0900

    interpreter/toywasm: Update toywasm version
    
    The situation of toywasm_config.c is similar to toywasm_config.h.
    It's cmake-generated in the upstream. The original template is covered
    by a different license. I'm the author of the file and hereby re-license
    this copy.
    
    Tested on sim/macOS.
---
 interpreters/toywasm/Kconfig                       |  5 +++
 interpreters/toywasm/Makefile                      | 13 +++++++-
 interpreters/toywasm/include/toywasm_config.h      |  2 ++
 .../toywasm_config.h => src/toywasm_config.c}      | 36 ++++++++++++----------
 4 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/interpreters/toywasm/Kconfig b/interpreters/toywasm/Kconfig
index aa71eb526..d849f7ac2 100644
--- a/interpreters/toywasm/Kconfig
+++ b/interpreters/toywasm/Kconfig
@@ -7,6 +7,11 @@ config INTERPRETERS_TOYWASM
 	tristate "Toywasm Webassembly Runtime"
 	default n
 
+	# TOYWASM_ENABLE_WASM_THREADS and TOYWASM_ENABLE_WASI_THREADS
+	# depends on pthread
+	# REVISIT: make these Kconfig
+	depends on !DISABLE_PTHREAD
+
 if INTERPRETERS_TOYWASM
 
 config INTERPRETERS_TOYWASM_PRIORITY
diff --git a/interpreters/toywasm/Makefile b/interpreters/toywasm/Makefile
index c975386c7..1818e5578 100644
--- a/interpreters/toywasm/Makefile
+++ b/interpreters/toywasm/Makefile
@@ -28,6 +28,7 @@ MODULE    = $(CONFIG_INTERPRETERS_TOYWASM)
 # cli
 MAINSRC = main.c
 CSRCS += repl.c
+CSRCS += toywasm_config.c
 
 # lib
 CSRCS += bitmap.c
@@ -39,6 +40,7 @@ CSRCS += exec.c
 CSRCS += expr.c
 CSRCS += fileio.c
 CSRCS += host_instance.c
+CSRCS += idalloc.c
 CSRCS += import_object.c
 CSRCS += insn.c
 CSRCS += instance.c
@@ -46,6 +48,7 @@ CSRCS += leb128.c
 CSRCS += module.c
 CSRCS += module_writer.c
 CSRCS += report.c
+CSRCS += timeutil.c
 CSRCS += type.c
 CSRCS += util.c
 CSRCS += validation.c
@@ -53,10 +56,17 @@ CSRCS += vec.c
 CSRCS += wasi.c
 CSRCS += xlog.c
 
+# TOYWASM_ENABLE_WASM_THREADS
+CSRCS += lock.c
+CSRCS += waitlist.c
+
+# TOYWASM_ENABLE_WASI_THREADS
+CSRCS += wasi_threads.c
+
 CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/interpreters/toywasm/include}
 CFLAGS += ${shell $(INCDIR) "$(CC)" $(APPDIR)/interpreters/toywasm/toywasm/lib}
 
-TOYWASM_VERSION  = ab861c89be54144d2bdff432e21d431c8a1c1e74
+TOYWASM_VERSION  = 7c55fe4478e01ae651967f7c5d3fd3fa98a851ba
 TOYWASM_UNPACK   = toywasm
 TOYWASM_TARBALL  = $(TOYWASM_VERSION).zip
 TOYWASM_URL_BASE = https://github.com/yamt/toywasm/archive/
@@ -64,6 +74,7 @@ TOYWASM_URL      = $(TOYWASM_URL_BASE)/$(TOYWASM_TARBALL)
 
 VPATH += $(TOYWASM_UNPACK)/cli
 VPATH += $(TOYWASM_UNPACK)/lib
+VPATH += src
 
 $(TOYWASM_TARBALL):
 	$(Q) echo "Downloading $(TOYWASM_TARBALL)"
diff --git a/interpreters/toywasm/include/toywasm_config.h b/interpreters/toywasm/include/toywasm_config.h
index fd018d13f..70f61517c 100644
--- a/interpreters/toywasm/include/toywasm_config.h
+++ b/interpreters/toywasm/include/toywasm_config.h
@@ -33,5 +33,7 @@
 #define TOYWASM_USE_RESULTTYPE_CELLIDX
 #define TOYWASM_USE_LOCALTYPE_CELLIDX
 #define TOYWASM_ENABLE_WRITER
+#define TOYWASM_ENABLE_WASM_THREADS
+#define TOYWASM_ENABLE_WASI_THREADS
 
 #endif /* !defined(_TOYWASM_CONFIG_H) */
diff --git a/interpreters/toywasm/include/toywasm_config.h b/interpreters/toywasm/src/toywasm_config.c
similarity index 55%
copy from interpreters/toywasm/include/toywasm_config.h
copy to interpreters/toywasm/src/toywasm_config.c
index fd018d13f..56c7f85d1 100644
--- a/interpreters/toywasm/include/toywasm_config.h
+++ b/interpreters/toywasm/src/toywasm_config.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * apps/interpreters/toywasm/include/toywasm_config.h
+ * apps/interpreters/toywasm/src/toywasm_config.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,20 +18,22 @@
  *
  ****************************************************************************/
 
-#if !defined(_TOYWASM_CONFIG_H)
-#define _TOYWASM_CONFIG_H
-
-#define TOYWASM_USE_SEPARATE_EXECUTE
-#define TOYWASM_USE_TAILCALL
-/* #undef TOYWASM_ENABLE_TRACING */
-#define TOYWASM_USE_JUMP_BINARY_SEARCH
-/* #undef TOYWASM_USE_JUMP_CACHE */
-#define TOYWASM_JUMP_CACHE2_SIZE 4
-#define TOYWASM_USE_LOCALS_CACHE
-#define TOYWASM_USE_SEPARATE_LOCALS
-#define TOYWASM_USE_SMALL_CELLS
-#define TOYWASM_USE_RESULTTYPE_CELLIDX
-#define TOYWASM_USE_LOCALTYPE_CELLIDX
-#define TOYWASM_ENABLE_WRITER
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
 
-#endif /* !defined(_TOYWASM_CONFIG_H) */
+const char *toywasm_config_string =
+"\tTOYWASM_USE_SEPARATE_EXECUTE = ON\n"
+"\tTOYWASM_USE_TAILCALL = ON\n"
+"\tTOYWASM_ENABLE_TRACING = OFF\n"
+"\tTOYWASM_USE_JUMP_BINARY_SEARCH = ON\n"
+"\tTOYWASM_USE_JUMP_CACHE = OFF\n"
+"\tTOYWASM_JUMP_CACHE2_SIZE = 4\n"
+"\tTOYWASM_USE_LOCALS_CACHE = ON\n"
+"\tTOYWASM_USE_SEPARATE_LOCALS = ON\n"
+"\tTOYWASM_USE_SMALL_CELLS = ON\n"
+"\tTOYWASM_USE_RESULTTYPE_CELLIDX = ON\n"
+"\tTOYWASM_USE_LOCALTYPE_CELLIDX = ON\n"
+"\tTOYWASM_ENABLE_WRITER = ON\n"
+"\tTOYWASM_ENABLE_WASM_THREADS = ON\n"
+"\tTOYWASM_ENABLE_WASI_THREADS = ON\n";


[nuttx-apps] 02/02: interpreters/toywasm/src/toywasm_config.c: add an empty section

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 867897ad533648540c1379c7e68b18676734d6b9
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Tue Dec 20 01:28:28 2022 +0900

    interpreters/toywasm/src/toywasm_config.c: add an empty section
    
    I feel this should be fixed in nxstyle.
    This is a separate commit to make a revert easier.
---
 interpreters/toywasm/src/toywasm_config.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/interpreters/toywasm/src/toywasm_config.c b/interpreters/toywasm/src/toywasm_config.c
index 56c7f85d1..26c13da43 100644
--- a/interpreters/toywasm/src/toywasm_config.c
+++ b/interpreters/toywasm/src/toywasm_config.c
@@ -18,6 +18,10 @@
  *
  ****************************************************************************/
 
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
 /****************************************************************************
  * Public Data
  ****************************************************************************/