���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /home/real/node-v13.0.1/deps/v8/src/builtins/ |
// Copyright 2019 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. namespace growable_fixed_array { // TODO(pwong): Support FixedTypedArrays. struct GrowableFixedArray { Push(obj: Object) { this.EnsureCapacity(); this.array.objects[this.length++] = obj; } ResizeFixedArray(newCapacity: intptr): FixedArray { assert(this.length >= 0); assert(newCapacity >= 0); assert(newCapacity >= this.length); const first: intptr = 0; return ExtractFixedArray( this.array, first, this.length, newCapacity, kFixedArrays); } EnsureCapacity() { assert(this.length <= this.capacity); if (this.capacity == this.length) { // Growth rate is analog to JSObject::NewElementsCapacity: // new_capacity = (current_capacity + (current_capacity >> 1)) + 16. this.capacity = this.capacity + (this.capacity >> 1) + 16; this.array = this.ResizeFixedArray(this.capacity); } } ToJSArray(implicit context: Context)(): JSArray { const nativeContext: NativeContext = LoadNativeContext(context); const map: Map = LoadJSArrayElementsMap(PACKED_ELEMENTS, nativeContext); const fixedArray: FixedArray = this.ResizeFixedArray(this.length); const lengthSmi = Convert<Smi>(this.length); return AllocateJSArray(map, fixedArray, lengthSmi); } array: FixedArray; capacity: intptr; length: intptr; } macro NewGrowableFixedArray(): GrowableFixedArray { return GrowableFixedArray{array: kEmptyFixedArray, capacity: 0, length: 0}; } }