OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
7 #include "src/frames.h" | 7 #include "src/frames.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4373 Node* capacity = IntPtrRoundUpToPowerOfTwo32( | 4373 Node* capacity = IntPtrRoundUpToPowerOfTwo32( |
4374 WordShl(at_least_space_for, IntPtrConstant(1))); | 4374 WordShl(at_least_space_for, IntPtrConstant(1))); |
4375 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); | 4375 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); |
4376 } | 4376 } |
4377 | 4377 |
4378 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) { | 4378 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) { |
4379 return SelectConstant(IntPtrGreaterThanOrEqual(left, right), left, right, | 4379 return SelectConstant(IntPtrGreaterThanOrEqual(left, right), left, right, |
4380 MachineType::PointerRepresentation()); | 4380 MachineType::PointerRepresentation()); |
4381 } | 4381 } |
4382 | 4382 |
| 4383 Node* CodeStubAssembler::IntPtrMin(Node* left, Node* right) { |
| 4384 return SelectConstant(IntPtrLessThanOrEqual(left, right), left, right, |
| 4385 MachineType::PointerRepresentation()); |
| 4386 } |
| 4387 |
4383 template <class Dictionary> | 4388 template <class Dictionary> |
4384 Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) { | 4389 Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) { |
4385 return LoadFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex); | 4390 return LoadFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex); |
4386 } | 4391 } |
4387 | 4392 |
4388 template <class Dictionary> | 4393 template <class Dictionary> |
4389 void CodeStubAssembler::SetNumberOfElements(Node* dictionary, | 4394 void CodeStubAssembler::SetNumberOfElements(Node* dictionary, |
4390 Node* num_elements_smi) { | 4395 Node* num_elements_smi) { |
4391 StoreFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex, | 4396 StoreFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex, |
4392 num_elements_smi, SKIP_WRITE_BARRIER); | 4397 num_elements_smi, SKIP_WRITE_BARRIER); |
(...skipping 3896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8289 Heap::kUndefinedValueRootIndex); | 8294 Heap::kUndefinedValueRootIndex); |
8290 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, | 8295 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, |
8291 Heap::kUndefinedValueRootIndex); | 8296 Heap::kUndefinedValueRootIndex); |
8292 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8297 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
8293 context); | 8298 context); |
8294 return result; | 8299 return result; |
8295 } | 8300 } |
8296 | 8301 |
8297 } // namespace internal | 8302 } // namespace internal |
8298 } // namespace v8 | 8303 } // namespace v8 |
OLD | NEW |