Lines Matching defs:length

99 Handle<FixedArray> FactoryBase<Impl>::NewFixedArray(int length,
101 if (length == 0) return impl()->empty_fixed_array();
102 if (length < 0 || length > FixedArray::kMaxLength) {
103 FATAL("Fatal JavaScript invalid size error %d", length);
107 read_only_roots().fixed_array_map_handle(), length,
113 Handle<Map> map, int length, AllocationType allocation) {
114 // Zero-length case must be handled outside, where the knowledge about
116 DCHECK_LT(0, length);
118 map, length, read_only_roots().undefined_value_handle(), allocation);
123 int length, AllocationType allocation) {
124 DCHECK_LE(0, length);
125 if (length == 0) return impl()->empty_fixed_array();
127 read_only_roots().fixed_array_map_handle(), length,
133 Handle<Map> map, int length, Handle<Oddball> filler,
135 HeapObject result = AllocateRawFixedArray(length, allocation);
141 array.set_length(length);
142 MemsetTagged(array.data_start(), *filler, length);
148 int length, AllocationType allocation) {
149 DCHECK_LE(0, length);
150 if (length == 0) return impl()->empty_fixed_array();
151 if (length > FixedArray::kMaxLength) {
152 FATAL("Invalid FixedArray size %d", length);
154 HeapObject result = AllocateRawFixedArray(length, allocation);
159 array.set_length(length);
160 MemsetTagged(array.data_start(), Smi::zero(), length);
166 int length, AllocationType allocation) {
167 if (length == 0) return impl()->empty_fixed_array();
168 if (length < 0 || length > FixedDoubleArray::kMaxLength) {
169 FATAL("Fatal JavaScript invalid size error %d", length);
172 int size = FixedDoubleArray::SizeFor(length);
178 array.set_length(length);
184 Map map, int length, AllocationType allocation) {
185 // Zero-length case must be handled outside.
186 DCHECK_LT(0, length);
190 AllocateRawArray(WeakFixedArray::SizeFor(length), allocation);
194 array.set_length(length);
196 read_only_roots().undefined_value(), length);
203 int length, AllocationType allocation) {
204 DCHECK_LE(0, length);
205 if (length == 0) return impl()->empty_weak_fixed_array();
207 length, allocation);
211 Handle<ByteArray> FactoryBase<Impl>::NewByteArray(int length,
213 if (length < 0 || length > ByteArray::kMaxLength) {
214 FATAL("Fatal JavaScript invalid size error %d", length);
217 if (length == 0) return impl()->empty_byte_array();
218 int size = ByteArray::SizeFor(length);
223 array.set_length(length);
230 int length, const byte* raw_bytecodes, int frame_size, int parameter_count,
232 if (length < 0 || length > BytecodeArray::kMaxLength) {
233 FATAL("Fatal JavaScript invalid size error %d", length);
240 int size = BytecodeArray::SizeFor(length);
245 instance.set_length(length);
258 raw_bytecodes, length);
521 DCHECK_EQ(raw_strings->length(), cooked_strings->length());
522 DCHECK_LT(0, raw_strings->length());
625 AllocateRawOneByteInternalizedString(str.length(), raw_hash_field);
630 str.begin(), str.length());
638 AllocateRawTwoByteInternalizedString(str.length(), raw_hash_field);
643 str.begin(), str.length() * base::kUC16Size);
650 int length, Map map, AllocationType allocation) {
655 if (length > String::kMaxLength || length < 0) {
658 DCHECK_GT(length, 0); // Use Factory::empty_string() instead.
659 int size = SeqStringT::SizeFor(length);
665 string.set_length(length);
673 int length, AllocationType allocation) {
676 length, map,
682 int length, AllocationType allocation) {
685 length, map,
691 int length) {
693 length, read_only_roots().shared_one_byte_string_map(),
699 int length) {
701 length, read_only_roots().shared_string_map(),
714 int left_length = left->length();
716 int right_length = right->length();
719 int length = left_length + right_length;
721 if (length == 2) {
727 // Make sure that an out of memory exception is thrown if the length
729 if (length > String::kMaxLength || length < 0) {
738 if (length < ConsString::kMinLength) {
747 NewRawOneByteString(length, allocation).ToHandleChecked();
767 NewRawTwoByteString(length, allocation).ToHandleChecked();
772 String::WriteToFlat(*left, sink, 0, left->length(), isolate(),
774 String::WriteToFlat(*right, sink + left->length(), 0, right->length(),
779 return NewConsString(left, right, length, is_one_byte, allocation);
785 int length, bool one_byte,
789 DCHECK_GE(length, ConsString::kMinLength);
790 DCHECK_LE(length, String::kMaxLength);
801 result.set_length(length);
809 int length, AllocationType allocation) {
810 if (length < 0 || length > BigInt::kMaxLength) {
811 FATAL("Fatal JavaScript invalid size error %d", length);
815 BigInt::SizeFor(length), allocation, read_only_roots().bigint_map());
823 Handle<ScopeInfo> FactoryBase<Impl>::NewScopeInfo(int length,
826 int size = ScopeInfo::SizeFor(length);
831 length);
866 // Zero-length case must be handled outside.
891 int length, uint32_t raw_hash_field) {
892 CHECK_GE(String::kMaxLength, length);
893 // The canonical empty_string is the only zero-length string we allow.
894 DCHECK_IMPLIES(length == 0, !impl()->EmptyStringRootIsInitialized());
897 int size = SeqOneByteString::SizeFor(length);
907 answer.set_length(length);
916 int length, uint32_t raw_hash_field) {
917 CHECK_GE(String::kMaxLength, length);
918 DCHECK_NE(0, length); // Use Heap::empty_string() instead.
921 int size = SeqTwoByteString::SizeFor(length);
928 answer.set_length(length);
948 HeapObject FactoryBase<Impl>::AllocateRawFixedArray(int length,
950 if (length < 0 || length > FixedArray::kMaxLength) {
951 FATAL("Fatal JavaScript invalid size error %d", length);
954 return AllocateRawArray(FixedArray::SizeFor(length), allocation);