forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for WASM intrinsic globals. (STACKED on wasm-module, see …
…commit messages) (envoyproxy#36) * Add support for WASM intrinsic globals.
- Loading branch information
Showing
8 changed files
with
12,037 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
NO_CONTEXT = true | ||
|
||
all: logging.wasm bad_signature.wasm segv.wasm | ||
all: logging.wasm bad_signature.wasm segv.wasm emscript.wasm | ||
|
||
include ../../../../api/wasm/cpp/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// NOLINT(namespace-envoy) | ||
#include <cmath> | ||
#include <limits> | ||
#include <string> | ||
|
||
#include "proxy_wasm_intrinsics.h" | ||
|
||
float gNan = std::nan("1"); | ||
float gInfinity = INFINITY; | ||
|
||
extern "C" EMSCRIPTEN_KEEPALIVE void proxy_onStart() { | ||
logInfo(std::string("NaN ") + std::to_string(gNan)); | ||
// For some reason these return "inf nan": | ||
// logWarn("inf " + std::to_string(gInfinity)); | ||
// logInfo("inf " + std::to_string(1.0/0.0)); | ||
logWarn(std::string("inf ") + (std::isinf(gInfinity) ? "inf" : "nan")); | ||
} |
Binary file not shown.
Oops, something went wrong.