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

Side by Side Diff: src/typedarray.js

Issue 1069883002: WIP SharedArrayBuffer implementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: merge master 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 unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-typedarray.cc ('k') | src/types.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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, shared, exports) { 5 (function(global, shared, exports) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // propagate outside the function. 108 // propagate outside the function.
109 obj[i] = arrayLike[i]; 109 obj[i] = arrayLike[i];
110 } 110 }
111 } 111 }
112 } 112 }
113 113
114 function NAMEConstructor(arg1, arg2, arg3) { 114 function NAMEConstructor(arg1, arg2, arg3) {
115 if (%_IsConstructCall()) { 115 if (%_IsConstructCall()) {
116 if (IS_ARRAYBUFFER(arg1)) { 116 if (IS_ARRAYBUFFER(arg1)) {
117 NAMEConstructByArrayBuffer(this, arg1, arg2, arg3); 117 NAMEConstructByArrayBuffer(this, arg1, arg2, arg3);
118 } else if (IS_SHAREDARRAYBUFFER(arg1)) {
119 throw MakeTypeError(kInvalidArgument);
118 } else if (IS_NUMBER(arg1) || IS_STRING(arg1) || 120 } else if (IS_NUMBER(arg1) || IS_STRING(arg1) ||
119 IS_BOOLEAN(arg1) || IS_UNDEFINED(arg1)) { 121 IS_BOOLEAN(arg1) || IS_UNDEFINED(arg1)) {
120 NAMEConstructByLength(this, arg1); 122 NAMEConstructByLength(this, arg1);
121 } else { 123 } else {
122 NAMEConstructByArrayLike(this, arg1); 124 NAMEConstructByArrayLike(this, arg1);
123 } 125 }
124 } else { 126 } else {
125 throw MakeTypeError(kConstructorNotFunction, "NAME") 127 throw MakeTypeError(kConstructorNotFunction, "NAME")
126 } 128 }
127 } 129 }
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 "setUint32", DataViewSetUint32JS, 453 "setUint32", DataViewSetUint32JS,
452 454
453 "getFloat32", DataViewGetFloat32JS, 455 "getFloat32", DataViewGetFloat32JS,
454 "setFloat32", DataViewSetFloat32JS, 456 "setFloat32", DataViewSetFloat32JS,
455 457
456 "getFloat64", DataViewGetFloat64JS, 458 "getFloat64", DataViewGetFloat64JS,
457 "setFloat64", DataViewSetFloat64JS 459 "setFloat64", DataViewSetFloat64JS
458 ]); 460 ]);
459 461
460 }) 462 })
OLDNEW
« no previous file with comments | « src/runtime/runtime-typedarray.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698