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

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

Issue 1124813005: WIP Atomics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AtomicsLoad type in typer.cc Created 5 years, 7 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 | « src/runtime/runtime-typedarray.cc ('k') | test/mjsunit/asm/atomics-load.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-utils.h
diff --git a/src/runtime/runtime-utils.h b/src/runtime/runtime-utils.h
index c44e40208fda9ed8bb9fad5852995349ca89d480..73e55a4ad88d65623f5c3417707f242d2af9575e 100644
--- a/src/runtime/runtime-utils.h
+++ b/src/runtime/runtime-utils.h
@@ -54,6 +54,15 @@ namespace internal {
RUNTIME_ASSERT(args[index]->IsNumber()); \
double name = args.number_at(index);
+
+// TODO(binji): document
+#define CONVERT_SIZE_ARG_CHECKED(name, index) \
+ RUNTIME_ASSERT(args[index]->IsNumber()); \
+ Handle<Object> name##_object = args.at<Object>(index); \
+ size_t name = 0; \
+ RUNTIME_ASSERT(TryNumberToSize(isolate, *name##_object, &name));
+
+
// Call the specified converter on the object *comand store the result in
// a variable of the specified type with the given name. If the
// object is not a Number call IllegalOperation and return.
« no previous file with comments | « src/runtime/runtime-typedarray.cc ('k') | test/mjsunit/asm/atomics-load.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698