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

Unified Diff: src/js/harmony-atomics.js

Issue 1617503003: [Atomics] code stubs for atomic operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master + reduce kSlotIndexBits Created 4 years, 8 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/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/harmony-atomics.js
diff --git a/src/js/harmony-atomics.js b/src/js/harmony-atomics.js
index 9f80227426b41f106d34bf1604702be0ad2ae377..598468084a3cff9f89c991d7df4370ef66a44cf5 100644
--- a/src/js/harmony-atomics.js
+++ b/src/js/harmony-atomics.js
@@ -62,12 +62,6 @@ function AtomicsCompareExchangeJS(sta, index, oldValue, newValue) {
return %_AtomicsCompareExchange(sta, index, oldValue, newValue);
}
-function AtomicsLoadJS(sta, index) {
- CheckSharedIntegerTypedArray(sta);
- index = ValidateIndex(index, %_TypedArrayGetLength(sta));
- return %_AtomicsLoad(sta, index);
-}
-
function AtomicsStoreJS(sta, index, value) {
CheckSharedIntegerTypedArray(sta);
index = ValidateIndex(index, %_TypedArrayGetLength(sta));
@@ -161,13 +155,9 @@ function AtomicsFutexWakeOrRequeueJS(ia, index1, count, value, index2) {
// -------------------------------------------------------------------
-function AtomicsConstructor() {}
-
-var Atomics = new AtomicsConstructor();
+var Atomics = global.Atomics;
-%InternalSetPrototype(Atomics, GlobalObject.prototype);
-%AddNamedProperty(global, "Atomics", Atomics, DONT_ENUM);
-%FunctionSetInstanceClassName(AtomicsConstructor, 'Atomics');
+// The Atomics global is defined by the bootstrapper.
%AddNamedProperty(Atomics, toStringTagSymbol, "Atomics", READ_ONLY | DONT_ENUM);
@@ -179,8 +169,9 @@ utils.InstallConstants(Atomics, [
]);
utils.InstallFunctions(Atomics, DONT_ENUM, [
+ // TODO(binji): remove the rest of the (non futex) Atomics functions as they
+ // become builtins.
"compareExchange", AtomicsCompareExchangeJS,
- "load", AtomicsLoadJS,
"store", AtomicsStoreJS,
"add", AtomicsAddJS,
"sub", AtomicsSubJS,
« no previous file with comments | « src/interface-descriptors.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698