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

Unified Diff: src/runtime/runtime-typedarray.cc

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-atomics.cc ('k') | src/runtime/runtime-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-typedarray.cc
diff --git a/src/runtime/runtime-typedarray.cc b/src/runtime/runtime-typedarray.cc
index d173d76fb704ac538a7df373bc0f58352a5c3536..d822d2e8fb2b9ad2f31d306ec31447213e292f85 100644
--- a/src/runtime/runtime-typedarray.cc
+++ b/src/runtime/runtime-typedarray.cc
@@ -475,6 +475,28 @@ RUNTIME_FUNCTION(Runtime_IsTypedArray) {
}
+RUNTIME_FUNCTION(Runtime_IsSharedTypedArray) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ return isolate->heap()->ToBoolean(args[0]->IsJSTypedArray() &&
+ JSTypedArray::cast(args[0])->is_shared());
+}
+
+
+RUNTIME_FUNCTION(Runtime_IsSharedIntegerTypedArray) {
+ HandleScope scope(isolate);
+ DCHECK(args.length() == 1);
+ if (!args[0]->IsJSTypedArray()) {
+ return isolate->heap()->false_value();
+ }
+
+ Handle<JSTypedArray> obj(JSTypedArray::cast(args[0]));
+ return isolate->heap()->ToBoolean(obj->is_shared() &&
+ obj->type() != kExternalFloat32Array &&
+ obj->type() != kExternalFloat64Array);
+}
+
+
RUNTIME_FUNCTION(Runtime_DataViewInitialize) {
HandleScope scope(isolate);
DCHECK(args.length() == 4);
« no previous file with comments | « src/runtime/runtime-atomics.cc ('k') | src/runtime/runtime-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698