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

Unified Diff: src/runtime/runtime-utils.h

Issue 2137993003: [wasm] Adding feature to JIT a wasm function at runtime and hook up the compiled code into the indi… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing unit test- Created 4 years, 5 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
Index: src/runtime/runtime-utils.h
diff --git a/src/runtime/runtime-utils.h b/src/runtime/runtime-utils.h
index c203b68d151861fb38cc62de024c60bd4cae606d..9982c53e1d1db3e4e4f43022a3cd79bf03ef6710 100644
--- a/src/runtime/runtime-utils.h
+++ b/src/runtime/runtime-utils.h
@@ -80,6 +80,14 @@ namespace internal {
int32_t name = 0; \
CHECK(args[index]->ToInt32(&name));
+// Assert that the given argument is a number within the Uint32 range
+// and convert it to uint32_t. If the argument is not an Uint32 call
+// IllegalOperation and return.
+#define CONVERT_UINT32_ARG_CHECKED(name, index) \
+ CHECK(args[index]->IsNumber()); \
+ uint32_t name = 0; \
+ CHECK(args[index]->ToUint32(&name));
+
// Cast the given argument to PropertyAttributes and store its value in a
// variable with the given name. If the argument is not a Smi or the
// enum value is out of range, we crash safely.

Powered by Google App Engine
This is Rietveld 408576698