| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }) |
| OLD | NEW |