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, |