Skip to content

Commit

Permalink
Disable computed goto under emscripten
Browse files Browse the repository at this point in the history
Computed goto is apparently supported using the fastcomp/LLVM -> asm.js -> wasm path,
but not the upstream LLVM -> wasm path (at least not at the moment). For now simply
always disable computed goto under Emscripten.
  • Loading branch information
Keno committed Jun 26, 2019
1 parent cb1e583 commit 4671644
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/flisp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ FLAGS := -I$(LLTDIR) $(JCFLAGS) $(HFILEDIRS:%=-I%) \
-I$(LIBUV_INC) -I$(UTF8PROC_INC) -I$(build_includedir) $(LIBDIRS:%=-L%) \
-DLIBRARY_EXPORTS -DUTF8PROC_EXPORTS
ifneq ($(USEMSVC), 1)
FLAGS += -Wall -Wno-strict-aliasing -DUSE_COMPUTED_GOTO -fvisibility=hidden -Wpointer-arith -Wundef
ifneq ($(OS), emscripten)
FLAGS += -DUSE_COMPUTED_GOTO
endif
FLAGS += -Wall -Wno-strict-aliasing -fvisibility=hidden -Wpointer-arith -Wundef
FLAGS += -Wold-style-definition -Wstrict-prototypes -Wc++-compat
endif

Expand Down
2 changes: 1 addition & 1 deletion src/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ STATIC_INLINE int gc_mark_scan_obj32(jl_ptls_t ptls, jl_gc_mark_sp_t *sp, gc_mar
return 0;
}

#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__OS_EMSCRIPTEN__)
# define gc_mark_laddr(name) (&&name)
# define gc_mark_jmp(ptr) goto *(ptr)
#else
Expand Down

0 comments on commit 4671644

Please sign in to comment.