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

Side by Side Diff: src/harmony-atomics.js

Issue 1318043002: Native context: do not put public symbols and flags on the js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix and rebase Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/harmony-array.js ('k') | src/harmony-concat-spreadable.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 (function(global, utils) { 5 (function(global, utils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var GlobalObject = global.Object; 14 var GlobalObject = global.Object;
15 var MathMax; 15 var MathMax;
16 var ToNumber; 16 var ToNumber;
17 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
17 18
18 utils.Import(function(from) { 19 utils.Import(function(from) {
19 MathMax = from.MathMax; 20 MathMax = from.MathMax;
20 ToNumber = from.ToNumber; 21 ToNumber = from.ToNumber;
21 }); 22 });
22 23
23 // ------------------------------------------------------------------- 24 // -------------------------------------------------------------------
24 25
25 26
26 function CheckSharedTypedArray(sta) { 27 function CheckSharedTypedArray(sta) {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 // ------------------------------------------------------------------- 186 // -------------------------------------------------------------------
186 187
187 function AtomicsConstructor() {} 188 function AtomicsConstructor() {}
188 189
189 var Atomics = new AtomicsConstructor(); 190 var Atomics = new AtomicsConstructor();
190 191
191 %InternalSetPrototype(Atomics, GlobalObject.prototype); 192 %InternalSetPrototype(Atomics, GlobalObject.prototype);
192 %AddNamedProperty(global, "Atomics", Atomics, DONT_ENUM); 193 %AddNamedProperty(global, "Atomics", Atomics, DONT_ENUM);
193 %FunctionSetInstanceClassName(AtomicsConstructor, 'Atomics'); 194 %FunctionSetInstanceClassName(AtomicsConstructor, 'Atomics');
194 195
195 %AddNamedProperty(Atomics, symbolToStringTag, "Atomics", READ_ONLY | DONT_ENUM); 196 %AddNamedProperty(Atomics, toStringTagSymbol, "Atomics", READ_ONLY | DONT_ENUM);
196 197
197 // These must match the values in src/futex-emulation.h 198 // These must match the values in src/futex-emulation.h
198 utils.InstallConstants(Atomics, [ 199 utils.InstallConstants(Atomics, [
199 "OK", 0, 200 "OK", 0,
200 "NOTEQUAL", -1, 201 "NOTEQUAL", -1,
201 "TIMEDOUT", -2, 202 "TIMEDOUT", -2,
202 ]); 203 ]);
203 204
204 utils.InstallFunctions(Atomics, DONT_ENUM, [ 205 utils.InstallFunctions(Atomics, DONT_ENUM, [
205 "compareExchange", AtomicsCompareExchangeJS, 206 "compareExchange", AtomicsCompareExchangeJS,
206 "load", AtomicsLoadJS, 207 "load", AtomicsLoadJS,
207 "store", AtomicsStoreJS, 208 "store", AtomicsStoreJS,
208 "add", AtomicsAddJS, 209 "add", AtomicsAddJS,
209 "sub", AtomicsSubJS, 210 "sub", AtomicsSubJS,
210 "and", AtomicsAndJS, 211 "and", AtomicsAndJS,
211 "or", AtomicsOrJS, 212 "or", AtomicsOrJS,
212 "xor", AtomicsXorJS, 213 "xor", AtomicsXorJS,
213 "exchange", AtomicsExchangeJS, 214 "exchange", AtomicsExchangeJS,
214 "isLockFree", AtomicsIsLockFreeJS, 215 "isLockFree", AtomicsIsLockFreeJS,
215 "futexWait", AtomicsFutexWaitJS, 216 "futexWait", AtomicsFutexWaitJS,
216 "futexWake", AtomicsFutexWakeJS, 217 "futexWake", AtomicsFutexWakeJS,
217 "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS, 218 "futexWakeOrRequeue", AtomicsFutexWakeOrRequeueJS,
218 ]); 219 ]);
219 220
220 }) 221 })
OLDNEW
« no previous file with comments | « src/harmony-array.js ('k') | src/harmony-concat-spreadable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698