Lines Matching defs:length
451 if (name_str->length() == 0) return msg_str;
452 if (msg_str->length() == 0) return name_str;
458 if (builder.Length() + msg_str->length() <= String::kMaxLength) {
505 if (fun_str->length() > 128) {
510 fun_str, fun_str->length() - 2, fun_str->length()));
559 if (ctor_name->length() != 0) {
654 if (IsString()) return String::cast(*this).length() != 0;
1026 uint32_t length;
1028 !array->length().ToUint32(&length) || !array->HasFastElements() ||
1033 isolate, array, length);
1036 size_t length = array->length();
1038 length > static_cast<size_t>(FixedArray::kMaxLength)) {
1044 isolate, array, static_cast<uint32_t>(length));
1070 // 4. Let len be ? ToLength(? Get(obj, "length")).
1332 int index = list->length() + 1;
1884 os << "<BlockContext[" << Context::cast(*this).length() << "]>";
1887 os << "<CatchContext[" << Context::cast(*this).length() << "]>";
1890 os << "<DebugEvaluateContext[" << Context::cast(*this).length() << "]>";
1893 os << "<EvalContext[" << Context::cast(*this).length() << "]>";
1896 os << "<FunctionContext[" << Context::cast(*this).length() << "]>";
1899 os << "<ModuleContext[" << Context::cast(*this).length() << "]>";
1902 os << "<NativeContext[" << Context::cast(*this).length() << "]>";
1905 os << "<ScriptContext[" << Context::cast(*this).length() << "]>";
1908 os << "<WithContext[" << Context::cast(*this).length() << "]>";
1911 os << "<ScriptContextTable[" << FixedArray::cast(*this).length() << "]>";
1914 os << "<HashTable[" << FixedArray::cast(*this).length() << "]>";
1917 os << "<OrderedHashMap[" << FixedArray::cast(*this).length() << "]>";
1920 os << "<OrderedHashSet[" << FixedArray::cast(*this).length() << "]>";
1923 os << "<OrderedNameDictionary[" << FixedArray::cast(*this).length()
1927 os << "<NameDictionary[" << FixedArray::cast(*this).length() << "]>";
1934 os << "<GlobalDictionary[" << FixedArray::cast(*this).length() << "]>";
1937 os << "<NumberDictionary[" << FixedArray::cast(*this).length() << "]>";
1940 os << "<SimpleNumberDictionary[" << FixedArray::cast(*this).length()
1944 os << "<FixedArray[" << FixedArray::cast(*this).length() << "]>";
1947 os << "<ObjectBoilerplateDescription[" << FixedArray::cast(*this).length()
1951 os << "<FixedDoubleArray[" << FixedDoubleArray::cast(*this).length()
1955 os << "<ByteArray[" << ByteArray::cast(*this).length() << "]>";
1958 os << "<BytecodeArray[" << BytecodeArray::cast(*this).length() << "]>";
1965 os << "<TransitionArray[" << TransitionArray::cast(*this).length()
1969 os << "<PropertyArray[" << PropertyArray::cast(*this).length() << "]>";
1990 << ClosureFeedbackCellArray::cast(*this).length() << "]>";
1993 os << "<FeedbackVector[" << FeedbackVector::cast(*this).length() << "]>";
2199 FixedArray::unchecked_cast(*this).length(kAcquireLoad));
2203 return Context::SizeFor(Context::unchecked_cast(*this).length());
2209 // length synchronized.
2211 SeqOneByteString::unchecked_cast(*this).length(kAcquireLoad));
2215 ByteArray::unchecked_cast(*this).length(kAcquireLoad));
2219 BytecodeArray::unchecked_cast(*this).length(kAcquireLoad));
2228 // length synchronized.
2230 SeqTwoByteString::unchecked_cast(*this).length(kAcquireLoad));
2234 FixedDoubleArray::unchecked_cast(*this).length(kAcquireLoad));
2248 WeakFixedArray::unchecked_cast(*this).length(kAcquireLoad));
2272 PropertyArray::cast(*this).length(kAcquireLoad));
2276 FeedbackVector::unchecked_cast(*this).length());
2279 return BigInt::SizeFor(BigInt::unchecked_cast(*this).length());
2304 return WasmArray::SizeFor(map, WasmArray::cast(*this).length());
2309 EmbedderDataArray::unchecked_cast(*this).length());
2454 int length = number_of_descriptors();
2455 for (InternalIndex i : InternalIndex::Range(length)) {
2804 // We have to recheck the length. However, it can only change if the
2814 // We have to recheck the length. However, it can only change if the
2978 int nof_callbacks = callbacks->length();
3017 DCHECK_GE(array->length(), callbacks->length() + valid_descriptors);
3274 bool PropertyKeyToArrayLength(Handle<Object> value, uint32_t* length) {
3276 if (value->ToArrayLength(length)) return true;
3277 if (value->IsString()) return String::cast(*value).AsArrayIndex(length);
3292 // 2. If P is "length", then:
3301 // 3a. Let oldLenDesc be OrdinaryGetOwnProperty(A, "length").
3333 // OrdinaryDefineOwnProperty(A, "length", oldLenDesc).
3392 // 1a. Return OrdinaryDefineOwnProperty(A, "length", Desc).
3407 // 9. Let oldLenDesc be OrdinaryGetOwnProperty(A, "length").
3420 // 12a. Return OrdinaryDefineOwnProperty(A, "length", newLenDesc).
3430 // OrdinaryDefineOwnProperty to change the length,
3465 CHECK(a->length().ToArrayLength(&actual_new_len));
3990 if (index < array->length()) {
3994 int capacity = array->length();
3999 array->CopyTo(0, *new_array, 0, array->length());
4000 new_array->FillWithHoles(array->length(), new_array->length());
4017 DCHECK(0 < new_length && new_length <= length());
4018 if (new_length < length()) {
4019 isolate->heap()->RightTrimFixedArray(*this, length() - new_length);
4037 int length = array->Length();
4038 array = EnsureSpace(isolate, array, length + 1);
4040 DCHECK_EQ(array->Length(), length);
4044 raw_array.Set(length, *obj);
4045 raw_array.SetLength(length + 1);
4053 int length = array->Length();
4054 array = EnsureSpace(isolate, array, length + 2);
4056 DCHECK_EQ(array->Length(), length);
4060 raw_array.Set(length, *obj1);
4061 raw_array.Set(length + 1, *obj2);
4062 raw_array.SetLength(length + 2);
4070 int length = array->Length();
4071 array = EnsureSpace(isolate, array, length + 4);
4073 DCHECK_EQ(array->Length(), length);
4077 raw_array.Set(length, *obj1);
4078 raw_array.Set(length + 1, obj2);
4079 raw_array.Set(length + 2, obj3);
4080 raw_array.Set(length + 3, obj4);
4081 raw_array.SetLength(length + 4);
4093 int length = array->Length();
4094 Handle<FixedArray> result = isolate->factory()->NewFixedArray(length);
4095 // Do not copy the first entry, i.e., the length.
4096 array->CopyTo(kFirstIndex, *result, 0, length);
4104 int length) {
4105 int capacity = array->length();
4106 if (capacity < length) {
4107 int new_capacity = length;
4119 Handle<ArrayList> array, int length) {
4120 DCHECK_LT(0, length);
4122 EnsureSpaceInFixedArray(isolate, array, kFirstIndex + length));
4131 int length = array->length();
4132 array = EnsureSpace(isolate, array, length + 1);
4136 // Reload length; GC might have removed elements from the array.
4137 length = raw.length();
4138 raw.Set(length, *value);
4139 raw.set_length(length + 1);
4148 int length = array->length();
4149 array = EnsureSpace(isolate, array, length + 2);
4153 // Reload length; GC might have removed elements from the array.
4154 length = array->length();
4155 raw.Set(length, *value1);
4156 raw.Set(length + 1, *value2);
4157 raw.set_length(length + 2);
4167 int length = 0;
4172 length = raw.length();
4174 if (length < raw.capacity()) {
4175 raw.Set(length, *value);
4176 raw.set_length(length + 1);
4185 bool shrink = new_length < length / 4;
4186 bool grow = 3 * (length / 4) < new_length;
4200 DCHECK_LT(array->length(), array->capacity());
4205 // Reload length, allocation might have killed some weak refs.
4206 int index = raw.length();
4215 int length = this->length();
4218 for (int i = 0; i < length; i++) {
4232 bool WeakArrayList::IsFull() const { return length() == capacity(); }
4237 int length,
4240 if (capacity < length) {
4241 int grow_by = CapacityForLength(length) - capacity;
4250 for (int i = 0; i < length(); i++) {
4260 for (int i = 0; i < length(); i++) {
4269 if (length() == 0) return false;
4273 int last_index = length() - 1;
4292 int length = array->length();
4293 if (length == 0) {
4305 array->Set(length, HeapObjectReference::Weak(*value));
4306 array->set_length(length + 1);
4307 if (assigned_index != nullptr) *assigned_index = length;
4322 CHECK_LT(empty_slot, array->length());
4335 array = WeakArrayList::EnsureSpace(isolate, array, length + 1);
4336 array->Set(length, HeapObjectReference::Weak(*value));
4337 array->set_length(length + 1);
4338 if (assigned_index != nullptr) *assigned_index = length;
4344 for (int i = kFirstIndex; i < array.length(); i++) {
4354 if (array->length() == 0) {
4358 if (new_length == array->length()) {
4369 for (int i = kFirstIndex; i < array->length(); i++) {
4392 DCHECK_GE(match_info->length(), kLastMatchOverhead);
4654 void WriteFixedArrayToFlat(FixedArray fixed_array, int length, String separator,
4657 CHECK_GT(length, 0);
4658 CHECK_LE(length, fixed_array.length());
4663 const int separator_length = separator.length();
4670 CHECK_EQ(separator.length(), 1);
4675 for (int i = 0; i < length; i++) {
4688 DCHECK(i == 0 || i == length - 1 || num_separators > 1);
4715 const int string_length = string.length();
4735 intptr_t length,
4748 WriteFixedArrayToFlat(fixed_array, static_cast<int>(length), separator,
4750 dest.length());
4753 WriteFixedArrayToFlat(fixed_array, static_cast<int>(length), separator,
4755 dest.length());
4760 uint32_t StringHasher::MakeArrayIndexHash(uint32_t value, int length) {
4761 // For array indexes mix the length into the hash as an array index could
4763 DCHECK_GT(length, 0);
4764 DCHECK_LE(length, String::kMaxArrayIndexSize);
4769 value |= length << String::ArrayIndexLengthBits::kShift;
4772 DCHECK_EQ(length <= String::kMaxCachedArrayIndexLength,
4954 const int ends_len = ends.length();
4997 if (src.length() >= info->line_end &&
5128 if (new_length > old_infos->length()) {
5158 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) {
5161 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE);
5243 uint32_t capacity = static_cast<uint32_t>(elements().length());
5304 // Fast path: "length" is the first fast property of arrays with non
5316 // If map guarantees that there can't be a read-only length, we are done.
5328 uint32_t length = 0;
5329 CHECK(array->length().ToArrayLength(&length));
5330 if (length <= index) return HasReadOnlyLength(array);
5357 description_as_string.PrintUC16(os, 0, description_as_string.length());
5696 SizeFor(length()), v);
5722 int length = EntryToIndex(InternalIndex(capacity));
5724 Derived::GetMap(ReadOnlyRoots(isolate)), length, allocation);
6042 int length = iteration_order->length();
6043 DCHECK_LE(length, dictionary->NumberOfElements());
6047 for (int i = 0; i < length; i++) {
6059 index = PropertyDetails::kInitialIndex + length;
6211 DCHECK_EQ(pos, elements.length());
6279 int length = table->length();
6280 for (int i = Derived::EntryToIndex(InternalIndex(0)); i < length; i++) {
6851 // past the length of the shorter integer.