diff options
author | Michaël Zasso <targos@protonmail.com> | 2016-09-06 22:49:51 +0200 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2016-09-22 09:51:19 +0200 |
commit | ec02b811a8a5c999bab4de312be2d732b7d9d50b (patch) | |
tree | ca3068017254f238cf413a451c57a803572983a4 /deps/v8/src/runtime/runtime-futex.cc | |
parent | d2eb7ce0105369a9cad82787cb33a665e9bd00ad (diff) | |
download | android-node-v8-ec02b811a8a5c999bab4de312be2d732b7d9d50b.tar.gz android-node-v8-ec02b811a8a5c999bab4de312be2d732b7d9d50b.tar.bz2 android-node-v8-ec02b811a8a5c999bab4de312be2d732b7d9d50b.zip |
deps: update V8 to 5.4.500.27
Pick up latest commit from the 5.4-lkgr branch.
deps: edit V8 gitignore to allow trace event copy
deps: update V8 trace event to 315bf1e2d45be7d53346c31cfcc37424a32c30c8
deps: edit V8 gitignore to allow gtest_prod.h copy
deps: update V8 gtest to 6f8a66431cb592dad629028a50b3dd418a408c87
PR-URL: https://github.com/nodejs/node/pull/8317
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/runtime/runtime-futex.cc')
-rw-r--r-- | deps/v8/src/runtime/runtime-futex.cc | 58 |
1 files changed, 17 insertions, 41 deletions
diff --git a/deps/v8/src/runtime/runtime-futex.cc b/deps/v8/src/runtime/runtime-futex.cc index f4ef679bf6..a93bb23645 100644 --- a/deps/v8/src/runtime/runtime-futex.cc +++ b/deps/v8/src/runtime/runtime-futex.cc @@ -12,80 +12,56 @@ // Implement Futex API for SharedArrayBuffers as defined in the // SharedArrayBuffer draft spec, found here: -// https://github.com/lars-t-hansen/ecmascript_sharedmem +// https://github.com/tc39/ecmascript_sharedmem namespace v8 { namespace internal { -RUNTIME_FUNCTION(Runtime_AtomicsFutexWait) { +RUNTIME_FUNCTION(Runtime_AtomicsWait) { HandleScope scope(isolate); DCHECK(args.length() == 4); CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0); CONVERT_SIZE_ARG_CHECKED(index, 1); CONVERT_INT32_ARG_CHECKED(value, 2); CONVERT_DOUBLE_ARG_CHECKED(timeout, 3); - RUNTIME_ASSERT(sta->GetBuffer()->is_shared()); - RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length())); - RUNTIME_ASSERT(sta->type() == kExternalInt32Array); - RUNTIME_ASSERT(timeout == V8_INFINITY || !std::isnan(timeout)); + CHECK(sta->GetBuffer()->is_shared()); + CHECK_LT(index, NumberToSize(sta->length())); + CHECK_EQ(sta->type(), kExternalInt32Array); + CHECK(timeout == V8_INFINITY || !std::isnan(timeout)); Handle<JSArrayBuffer> array_buffer = sta->GetBuffer(); - size_t addr = (index << 2) + NumberToSize(isolate, sta->byte_offset()); + size_t addr = (index << 2) + NumberToSize(sta->byte_offset()); return FutexEmulation::Wait(isolate, array_buffer, addr, value, timeout); } - -RUNTIME_FUNCTION(Runtime_AtomicsFutexWake) { +RUNTIME_FUNCTION(Runtime_AtomicsWake) { HandleScope scope(isolate); DCHECK(args.length() == 3); CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0); CONVERT_SIZE_ARG_CHECKED(index, 1); CONVERT_INT32_ARG_CHECKED(count, 2); - RUNTIME_ASSERT(sta->GetBuffer()->is_shared()); - RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length())); - RUNTIME_ASSERT(sta->type() == kExternalInt32Array); + CHECK(sta->GetBuffer()->is_shared()); + CHECK_LT(index, NumberToSize(sta->length())); + CHECK_EQ(sta->type(), kExternalInt32Array); Handle<JSArrayBuffer> array_buffer = sta->GetBuffer(); - size_t addr = (index << 2) + NumberToSize(isolate, sta->byte_offset()); + size_t addr = (index << 2) + NumberToSize(sta->byte_offset()); return FutexEmulation::Wake(isolate, array_buffer, addr, count); } - -RUNTIME_FUNCTION(Runtime_AtomicsFutexWakeOrRequeue) { - HandleScope scope(isolate); - DCHECK(args.length() == 5); - CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0); - CONVERT_SIZE_ARG_CHECKED(index1, 1); - CONVERT_INT32_ARG_CHECKED(count, 2); - CONVERT_INT32_ARG_CHECKED(value, 3); - CONVERT_SIZE_ARG_CHECKED(index2, 4); - RUNTIME_ASSERT(sta->GetBuffer()->is_shared()); - RUNTIME_ASSERT(index1 < NumberToSize(isolate, sta->length())); - RUNTIME_ASSERT(index2 < NumberToSize(isolate, sta->length())); - RUNTIME_ASSERT(sta->type() == kExternalInt32Array); - - Handle<JSArrayBuffer> array_buffer = sta->GetBuffer(); - size_t addr1 = (index1 << 2) + NumberToSize(isolate, sta->byte_offset()); - size_t addr2 = (index2 << 2) + NumberToSize(isolate, sta->byte_offset()); - - return FutexEmulation::WakeOrRequeue(isolate, array_buffer, addr1, count, - value, addr2); -} - - -RUNTIME_FUNCTION(Runtime_AtomicsFutexNumWaitersForTesting) { +RUNTIME_FUNCTION(Runtime_AtomicsNumWaitersForTesting) { HandleScope scope(isolate); DCHECK(args.length() == 2); CONVERT_ARG_HANDLE_CHECKED(JSTypedArray, sta, 0); CONVERT_SIZE_ARG_CHECKED(index, 1); - RUNTIME_ASSERT(sta->GetBuffer()->is_shared()); - RUNTIME_ASSERT(index < NumberToSize(isolate, sta->length())); - RUNTIME_ASSERT(sta->type() == kExternalInt32Array); + CHECK(sta->GetBuffer()->is_shared()); + CHECK_LT(index, NumberToSize(sta->length())); + CHECK_EQ(sta->type(), kExternalInt32Array); Handle<JSArrayBuffer> array_buffer = sta->GetBuffer(); - size_t addr = (index << 2) + NumberToSize(isolate, sta->byte_offset()); + size_t addr = (index << 2) + NumberToSize(sta->byte_offset()); return FutexEmulation::NumWaitersForTesting(isolate, array_buffer, addr); } |