OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 target[offset + i] = temp[i - leftIndex]; | 250 target[offset + i] = temp[i - leftIndex]; |
251 } | 251 } |
252 } | 252 } |
253 | 253 |
254 function TypedArraySet(obj, offset) { | 254 function TypedArraySet(obj, offset) { |
255 var intOffset = IS_UNDEFINED(offset) ? 0 : TO_INTEGER(offset); | 255 var intOffset = IS_UNDEFINED(offset) ? 0 : TO_INTEGER(offset); |
256 if (intOffset < 0) { | 256 if (intOffset < 0) { |
257 throw MakeTypeError("typed_array_set_negative_offset"); | 257 throw MakeTypeError("typed_array_set_negative_offset"); |
258 } | 258 } |
259 | 259 |
260 if (intOffset > %MaxSmi()) { | 260 if (intOffset > %_MaxSmi()) { |
261 throw MakeRangeError("typed_array_set_source_too_large"); | 261 throw MakeRangeError("typed_array_set_source_too_large"); |
262 } | 262 } |
263 switch (%TypedArraySetFastCases(this, obj, intOffset)) { | 263 switch (%TypedArraySetFastCases(this, obj, intOffset)) { |
264 // These numbers should be synchronized with runtime.cc. | 264 // These numbers should be synchronized with runtime.cc. |
265 case 0: // TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE | 265 case 0: // TYPED_ARRAY_SET_TYPED_ARRAY_SAME_TYPE |
266 return; | 266 return; |
267 case 1: // TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING | 267 case 1: // TYPED_ARRAY_SET_TYPED_ARRAY_OVERLAPPING |
268 TypedArraySetFromOverlappingTypedArray(this, obj, intOffset); | 268 TypedArraySetFromOverlappingTypedArray(this, obj, intOffset); |
269 return; | 269 return; |
270 case 2: // TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING | 270 case 2: // TYPED_ARRAY_SET_TYPED_ARRAY_NONOVERLAPPING |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 | 462 |
463 "getFloat32", DataViewGetFloat32, | 463 "getFloat32", DataViewGetFloat32, |
464 "setFloat32", DataViewSetFloat32, | 464 "setFloat32", DataViewSetFloat32, |
465 | 465 |
466 "getFloat64", DataViewGetFloat64, | 466 "getFloat64", DataViewGetFloat64, |
467 "setFloat64", DataViewSetFloat64 | 467 "setFloat64", DataViewSetFloat64 |
468 )); | 468 )); |
469 } | 469 } |
470 | 470 |
471 SetupDataView(); | 471 SetupDataView(); |
OLD | NEW |