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, utils) { | 5 (function(global, utils) { |
6 | 6 |
7 "use strict"; | 7 "use strict"; |
8 | 8 |
9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
10 | 10 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 } | 330 } |
331 if (intOffset + l > this.length) { | 331 if (intOffset + l > this.length) { |
332 throw MakeRangeError(kTypedArraySetSourceTooLarge); | 332 throw MakeRangeError(kTypedArraySetSourceTooLarge); |
333 } | 333 } |
334 TypedArraySetFromArrayLike(this, obj, l, intOffset); | 334 TypedArraySetFromArrayLike(this, obj, l, intOffset); |
335 return; | 335 return; |
336 } | 336 } |
337 } | 337 } |
338 | 338 |
339 function TypedArrayGetToStringTag() { | 339 function TypedArrayGetToStringTag() { |
340 if (!%IsTypedArray(this)) return; | 340 if (!%_IsTypedArray(this)) return; |
341 var name = %_ClassOf(this); | 341 var name = %_ClassOf(this); |
342 if (IS_UNDEFINED(name)) return; | 342 if (IS_UNDEFINED(name)) return; |
343 return name; | 343 return name; |
344 } | 344 } |
345 | 345 |
346 // ------------------------------------------------------------------- | 346 // ------------------------------------------------------------------- |
347 | 347 |
348 macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE) | 348 macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE) |
349 %SetCode(GlobalNAME, NAMEConstructor); | 349 %SetCode(GlobalNAME, NAMEConstructor); |
350 %FunctionSetPrototype(GlobalNAME, new GlobalObject()); | 350 %FunctionSetPrototype(GlobalNAME, new GlobalObject()); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 "setUint32", DataViewSetUint32JS, | 498 "setUint32", DataViewSetUint32JS, |
499 | 499 |
500 "getFloat32", DataViewGetFloat32JS, | 500 "getFloat32", DataViewGetFloat32JS, |
501 "setFloat32", DataViewSetFloat32JS, | 501 "setFloat32", DataViewSetFloat32JS, |
502 | 502 |
503 "getFloat64", DataViewGetFloat64JS, | 503 "getFloat64", DataViewGetFloat64JS, |
504 "setFloat64", DataViewSetFloat64JS | 504 "setFloat64", DataViewSetFloat64JS |
505 ]); | 505 ]); |
506 | 506 |
507 }) | 507 }) |
OLD | NEW |