/third_party/python/Lib/test/ |
H A D | test_slice.py | 1 # tests for slice objects; in particular the indices method. 16 Helper function to convert a slice argument to an integer, and raise 24 "slice indices must be integers or " 27 def slice_indices(slice, length): 29 Reference implementation for the slice.indices method. 34 step = 1 if slice.step is None else evaluate_slice_index(slice.step) 40 raise ValueError("slice step cannot be zero") 47 if slice.start is None: 50 start = evaluate_slice_index(slice [all...] |
/third_party/jerryscript/tests/jerry/ |
H A D | array-prototype-slice.js | 19 var array1 = array.slice(); 20 var array2 = array.slice("a", "3"); 21 var array3 = array.slice(-2); 22 var array4 = array.slice(-12, undefined); 23 var array5 = array.slice(undefined, -3); 24 var array6 = array.slice(Infinity, NaN); 25 var array7 = array.slice(-Infinity, Infinity); 26 var array8 = array.slice(NaN, -Infinity); 65 var result = array.slice(4294967293, -1) 70 var result = array.slice( [all...] |
H A D | string-prototype-slice.js | 18 res = str.slice(); 21 res = str.slice(1, 6); 24 res = str.slice("a", "-4"); 27 res = str.slice(-5); 30 res = str.slice(-12, undefined); 33 res = str.slice(undefined, -20); 36 res = str.slice(undefined, undefined); 39 res = str.slice(Infinity, NaN); 42 res = str.slice(-Infinity, Infinity); 45 res = str.slice(Na [all...] |
/third_party/jerryscript/tests/jerry/es2015/ |
H A D | typedarray-prototype-slice-ext-arraybuffer.js | 32 typed.prototype.slice.call(undefined); 43 assert(typed.slice(1, 3).toString() === "1,2"); 44 assert(typed.slice(2, 5).toString() === "2,3,4"); 45 assert(typed.slice(0, 6).toString() === "0,1,2,3,4,5"); 48 assert(typed.slice(-2, 5).toString() === "4"); 49 assert(typed.slice(0, -3).toString() === "0,1,2"); 50 assert(typed.slice(-1, -4).toString() === ""); 53 assert(typed.slice(7, 1).toString() === ""); 54 assert(typed.slice(2, 9).toString() === "2,3,4,5"); 57 assert(typed.slice(undefine [all...] |
H A D | typedarray-prototype-slice.js | 30 e.prototype.slice.call (undefined); 37 assert(e.slice(1, 3).toString() === "1,2"); 38 assert(e.slice(2, 5).toString() === "2,3,4"); 39 assert(e.slice(0, 6).toString() === "0,1,2,3,4,5"); 42 assert(e.slice(-2, 5).toString() === "4"); 43 assert(e.slice(0, -3).toString() === "0,1,2"); 44 assert(e.slice(-1, -4).toString() === ""); 47 assert(e.slice(7, 1).toString() === ""); 48 assert(e.slice(2, 9).toString() === "2,3,4,5"); 51 assert(e.slice(undefine [all...] |
/third_party/ffmpeg/libavcodec/ |
H A D | hqx.c | 156 HQXSlice *slice = &ctx->slice[slice_no]; in hqx_decode_422() local 157 GetBitContext *gb = &slice->gb; in hqx_decode_422() 175 ctx->dcb, slice->block[i], &last_dc); in hqx_decode_422() 180 put_blocks(ctx, 0, x, y, flag, slice->block[0], slice->block[2], hqx_quant_luma); in hqx_decode_422() 181 put_blocks(ctx, 0, x + 8, y, flag, slice->block[1], slice->block[3], hqx_quant_luma); in hqx_decode_422() 182 put_blocks(ctx, 2, x >> 1, y, flag, slice->block[4], slice in hqx_decode_422() 190 HQXSlice *slice = &ctx->slice[slice_no]; hqx_decode_422a() local 240 HQXSlice *slice = &ctx->slice[slice_no]; hqx_decode_444() local 276 HQXSlice *slice = &ctx->slice[slice_no]; hqx_decode_444a() local [all...] |
H A D | dxva2_h264.c | 119 * intra slice in dxva2_h264_decode_slice) */ in fill_picture_parameters() 199 static void fill_slice_short(DXVA_Slice_H264_Short *slice, in fill_slice_short() argument 202 memset(slice, 0, sizeof(*slice)); in fill_slice_short() 203 slice->BSNALunitDataLocation = position; in fill_slice_short() 204 slice->SliceBytesInBuffer = size; in fill_slice_short() 205 slice->wBadSliceChopping = 0; in fill_slice_short() 218 static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, in fill_slice_long() argument 226 memset(slice, 0, sizeof(*slice)); in fill_slice_long() 308 DXVA_Slice_H264_Short *slice = NULL; commit_bitstream_and_slice_buffer() local [all...] |
H A D | dxva2_vc1.c | 36 DXVA_SliceInfo slice[MAX_SLICES]; member 165 static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice, in fill_slice() argument 171 memset(slice, 0, sizeof(*slice)); in fill_slice() 172 slice->wHorizontalPosition = 0; in fill_slice() 173 slice->wVerticalPosition = s->mb_y; in fill_slice() 174 slice->dwSliceBitsInBuffer = 8 * size; in fill_slice() 175 slice->dwSliceDataLocation = position; in fill_slice() 176 slice->bStartCodeBitOffset = 0; in fill_slice() 177 slice in fill_slice() 197 DXVA_SliceInfo *slice = NULL; commit_bitstream_and_slice_buffer() local [all...] |
H A D | dxva2_mpeg2.c | 36 DXVA_SliceInfo slice[MAX_SLICES]; member 127 DXVA_SliceInfo *slice, in fill_slice() 134 memset(slice, 0, sizeof(*slice)); in fill_slice() 135 slice->wHorizontalPosition = s->mb_x; in fill_slice() 136 slice->wVerticalPosition = s->mb_y >> is_field; in fill_slice() 137 slice->dwSliceBitsInBuffer = 8 * size; in fill_slice() 138 slice->dwSliceDataLocation = position; in fill_slice() 139 slice->bStartCodeBitOffset = 0; in fill_slice() 140 slice in fill_slice() 125 fill_slice(AVCodecContext *avctx, const struct MpegEncContext *s, DXVA_SliceInfo *slice, unsigned position, const uint8_t *buffer, unsigned size) fill_slice() argument 193 DXVA_SliceInfo *slice = &ctx_pic->slice[i]; commit_bitstream_and_slice_buffer() local [all...] |
/third_party/rust/crates/nix/test/sys/ |
H A D | test_mman.rs | 31 let slice: &mut [u8] = unsafe { in test_mremap_grow() 41 std::slice::from_raw_parts_mut(mem as *mut u8, ONE_K) in test_mremap_grow() 43 assert_eq!(slice[ONE_K - 1], 0x00); in test_mremap_grow() 44 slice[ONE_K - 1] = 0xFF; in test_mremap_grow() 45 assert_eq!(slice[ONE_K - 1], 0xFF); in test_mremap_grow() 47 let slice: &mut [u8] = unsafe { in test_mremap_grow() 50 slice.as_mut_ptr() as *mut c_void, in test_mremap_grow() 59 slice.as_mut_ptr() as *mut c_void, in test_mremap_grow() 66 std::slice::from_raw_parts_mut(mem as *mut u8, 10 * ONE_K) in test_mremap_grow() 70 assert_eq!(slice[ONE_ in test_mremap_grow() [all...] |
/third_party/skia/third_party/externals/tint/tools/src/list/ |
H A D | list_test.go | 56 slice := []int{1, 2, 3} 57 l := list.Wrap(&slice) 76 slice := make([]int, 5) 77 l := list.Wrap(&slice) 85 slice := []int{} 86 l := list.Wrap(&slice) 90 if len(slice) != 10 { 91 t.Errorf("len(slice) after Resize(10) is %v", len(slice)) 96 slice [all...] |
/third_party/typescript/tests/baselines/reference/ |
H A D | typeGuardsAsAssertions.js | 36 x = typeof x === "string" ? x.slice() : "abc"; 48 x = x.slice(); 108 x!.slice(); 110 x!.slice(); 112 x!.slice(); 114 x!.slice(); 116 x!.slice(); 118 x!.slice(); 120 x!.slice(); 125 x!.slice(); [all...] |
H A D | thisTypeInTuples.js | 3 slice(): this; 7 let a = t.slice(); 8 let b = t.slice(1); 9 let c = t.slice(0, 1); 14 var a = t.slice();
15 var b = t.slice(1);
16 var c = t.slice(0, 1);
|
H A D | library_ArraySlice.js | 2 // Array.prototype.slice can have zero, one, or two arguments 3 Array.prototype.slice(); 4 Array.prototype.slice(0); 5 Array.prototype.slice(0, 1);
8 // Array.prototype.slice can have zero, one, or two arguments
9 Array.prototype.slice();
10 Array.prototype.slice(0);
11 Array.prototype.slice(0, 1);
|
H A D | library_RegExpExecArraySlice.js | 2 // RegExpExecArray.slice can have zero, one, or two arguments 4 regExpExecArrayValue.slice(); 5 regExpExecArrayValue.slice(0); 6 regExpExecArrayValue.slice(0,1);
9 // RegExpExecArray.slice can have zero, one, or two arguments
11 regExpExecArrayValue.slice();
12 regExpExecArrayValue.slice(0);
13 regExpExecArrayValue.slice(0, 1);
|
H A D | library_StringSlice.js | 2 // String.prototype.slice can have zero, one, or two arguments 3 String.prototype.slice(); 4 String.prototype.slice(0); 5 String.prototype.slice(0,1); 9 // String.prototype.slice can have zero, one, or two arguments
10 String.prototype.slice();
11 String.prototype.slice(0);
12 String.prototype.slice(0, 1);
|
/third_party/rust/crates/cxx/tests/ffi/ |
H A D | cast.rs | 2 use std::slice; 4 pub fn c_char_to_unsigned(slice: &[c_char]) -> &[u8] { in c_char_to_unsigned() 5 let ptr = slice.as_ptr().cast::<u8>(); in c_char_to_unsigned() 6 let len = slice.len(); in c_char_to_unsigned() 7 unsafe { slice::from_raw_parts(ptr, len) } in c_char_to_unsigned() 10 pub fn unsigned_to_c_char(slice: &[u8]) -> &[c_char] { in unsigned_to_c_char() 11 let ptr = slice.as_ptr().cast::<c_char>(); in unsigned_to_c_char() 12 let len = slice.len(); in unsigned_to_c_char() 13 unsafe { slice::from_raw_parts(ptr, len) } in unsigned_to_c_char()
|
/third_party/mesa3d/src/panfrost/lib/ |
H A D | pan_layout.c | 206 struct pan_image_slice_layout *slice, in panfrost_compute_checksum_size() 213 slice->crc.stride = tile_count_x * CHECKSUM_BYTES_PER_TILE; in panfrost_compute_checksum_size() 215 return slice->crc.stride * tile_count_y; in panfrost_compute_checksum_size() 360 struct pan_image_slice_layout *slice = &layout->slices[l]; in pan_image_layout_init() local 370 slice->offset = offset; in pan_image_layout_init() 398 slice->row_stride = in pan_image_layout_init() 400 slice->afbc.header_size = in pan_image_layout_init() 401 ALIGN_POT(slice->row_stride * (effective_height / align_h), in pan_image_layout_init() 404 if (explicit_layout && explicit_layout->row_stride < slice->row_stride) in pan_image_layout_init() 408 slice in pan_image_layout_init() 205 panfrost_compute_checksum_size( struct pan_image_slice_layout *slice, unsigned width, unsigned height) panfrost_compute_checksum_size() argument 484 const struct pan_image_slice_layout *slice = &iview->image->layout.slices[level]; pan_iview_get_surface() local [all...] |
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ |
H A D | NioByteString.java | 55 this.buffer = buffer.slice().order(ByteOrder.nativeOrder()); in NioByteString() 63 return ByteString.copyFrom(buffer.slice()); in writeReplace() 99 ByteBuffer slice = slice(beginIndex, endIndex); in substring() 100 return new NioByteString(slice); in substring() 111 ByteBuffer slice = buffer.slice(); in copyToInternal() 112 slice.position(sourceOffset); in copyToInternal() 113 slice.get(target, targetOffset, numberToCopy); in copyToInternal() 118 target.put(buffer.slice()); in copyTo() 281 private ByteBuffer slice(int beginIndex, int endIndex) { slice() method in NioByteString [all...] |
/third_party/node/deps/v8/src/interpreter/ |
H A D | constant-array-builder.cc | 115 // Print all the entries in the slice to help debug duplicates. in CheckAllElementsAreUnique() 149 ConstantArraySlice* slice = idx_slice_[--i]; in size() local 150 if (slice->size() > 0) { in size() 151 return slice->start_index() + slice->size(); in size() 159 for (ConstantArraySlice* slice : idx_slice_) { in IndexToSlice() 160 if (index <= slice->max_index()) { in IndexToSlice() 161 return slice; in IndexToSlice() 170 const ConstantArraySlice* slice = IndexToSlice(index); in At() local 171 DCHECK_LT(index, slice in At() 293 ConstantArraySlice* slice = nullptr; OperandSizeToSlice() local 320 ConstantArraySlice* slice = IndexToSlice(index); SetDeferredAt() local 325 ConstantArraySlice* slice = IndexToSlice(index); SetJumpTableSmi() local 358 ConstantArraySlice* slice = OperandSizeToSlice(operand_size); CommitReservedEntry() local [all...] |
/third_party/node/deps/npm/node_modules/iconv-lite/encodings/ |
H A D | utf7.js | 68 res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. 77 var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); 92 res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. 94 var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); 97 base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. 98 b64str = b64str.slice(0, canBeDecoded); 162 bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); 197 return buf.slice(0, bufIdx); 204 bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); 212 return buf.slice( [all...] |
/foundation/communication/ipc/interfaces/innerkits/rust/include/ |
H A D | parcel_wrapper.h | 42 bool WriteBuffer(MessageParcel &msgParcel, rust::slice<const uint8_t> buffer); 54 bool WriteBoolVector(Parcel &parcel, rust::slice<const bool> val); 55 bool WriteInt8Vector(Parcel &parcel, rust::slice<const int8_t> val); 56 bool WriteInt16Vector(Parcel &parcel, rust::slice<const int16_t> val); 57 bool WriteInt32Vector(Parcel &parcel, rust::slice<const int32_t> val); 58 bool WriteInt64Vector(Parcel &parcel, rust::slice<const int64_t> val); 59 bool WriteUInt8Vector(Parcel &parcel, rust::slice<const uint8_t> val); 60 bool WriteUInt16Vector(Parcel &parcel, rust::slice<const uint16_t> val); 61 bool WriteUInt32Vector(Parcel &parcel, rust::slice<const uint32_t> val); 62 bool WriteUInt64Vector(Parcel &parcel, rust::slice<cons [all...] |
/third_party/skia/platform_tools/android/apps/skottie/ |
H A D | skottie_metric.sql | 11 FROM slice 12 INNER JOIN thread_track ON (thread_track.id = slice.track_id) 13 WHERE slice.name='dequeueBuffer' AND slice.dur >= 0 22 FROM slice 23 INNER JOIN thread_track ON (thread_track.id = slice.track_id) 25 WHERE slice.name='DrawFrame' AND slice.dur >= 0 26 ORDER BY slice.ts 36 FROM slice [all...] |
/third_party/node/test/fixtures/crypto/ |
H A D | rsa.js | 179 plaintext: plaintext.slice(0, 214), 192 plaintext: plaintext.slice(0, 190), 205 plaintext: plaintext.slice(0, 158), 218 plaintext: plaintext.slice(0, 126), 231 plaintext: plaintext.slice(0, 214), 244 plaintext: plaintext.slice(0, 190), 257 plaintext: plaintext.slice(0, 158), 270 plaintext: plaintext.slice(0, 126), 283 plaintext: plaintext.slice(0, 214), 296 plaintext: plaintext.slice( [all...] |
/third_party/node/test/fixtures/wpt/WebCryptoAPI/encrypt_decrypt/ |
H A D | rsa_vectors.js | 53 plaintext: plaintext.slice(0, 214), 66 plaintext: plaintext.slice(0, 190), 79 plaintext: plaintext.slice(0, 158), 92 plaintext: plaintext.slice(0, 126), 105 plaintext: plaintext.slice(0, 214), 118 plaintext: plaintext.slice(0, 190), 131 plaintext: plaintext.slice(0, 158), 144 plaintext: plaintext.slice(0, 126), 157 plaintext: plaintext.slice(0, 214), 170 plaintext: plaintext.slice( [all...] |