| 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 4556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4567 Node* entry_index = IntPtrMul(entry, IntPtrConstant(Dictionary::kEntrySize)); | 4567 Node* entry_index = IntPtrMul(entry, IntPtrConstant(Dictionary::kEntrySize)); |
| 4568 return IntPtrAdd(entry_index, IntPtrConstant(Dictionary::kElementsStartIndex + | 4568 return IntPtrAdd(entry_index, IntPtrConstant(Dictionary::kElementsStartIndex + |
| 4569 field_index)); | 4569 field_index)); |
| 4570 } | 4570 } |
| 4571 | 4571 |
| 4572 template Node* CodeStubAssembler::EntryToIndex<NameDictionary>(Node*, int); | 4572 template Node* CodeStubAssembler::EntryToIndex<NameDictionary>(Node*, int); |
| 4573 template Node* CodeStubAssembler::EntryToIndex<GlobalDictionary>(Node*, int); | 4573 template Node* CodeStubAssembler::EntryToIndex<GlobalDictionary>(Node*, int); |
| 4574 template Node* CodeStubAssembler::EntryToIndex<SeededNumberDictionary>(Node*, | 4574 template Node* CodeStubAssembler::EntryToIndex<SeededNumberDictionary>(Node*, |
| 4575 int); | 4575 int); |
| 4576 | 4576 |
| 4577 // This must be kept in sync with HashTableBase::ComputeCapacity(). |
| 4577 Node* CodeStubAssembler::HashTableComputeCapacity(Node* at_least_space_for) { | 4578 Node* CodeStubAssembler::HashTableComputeCapacity(Node* at_least_space_for) { |
| 4578 Node* capacity = IntPtrRoundUpToPowerOfTwo32( | 4579 Node* capacity = IntPtrRoundUpToPowerOfTwo32(IntPtrAdd( |
| 4579 WordShl(at_least_space_for, IntPtrConstant(1))); | 4580 at_least_space_for, WordShr(at_least_space_for, IntPtrConstant(1)))); |
| 4580 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); | 4581 return IntPtrMax(capacity, IntPtrConstant(HashTableBase::kMinCapacity)); |
| 4581 } | 4582 } |
| 4582 | 4583 |
| 4583 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) { | 4584 Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) { |
| 4584 return SelectConstant(IntPtrGreaterThanOrEqual(left, right), left, right, | 4585 return SelectConstant(IntPtrGreaterThanOrEqual(left, right), left, right, |
| 4585 MachineType::PointerRepresentation()); | 4586 MachineType::PointerRepresentation()); |
| 4586 } | 4587 } |
| 4587 | 4588 |
| 4588 Node* CodeStubAssembler::IntPtrMin(Node* left, Node* right) { | 4589 Node* CodeStubAssembler::IntPtrMin(Node* left, Node* right) { |
| 4589 return SelectConstant(IntPtrLessThanOrEqual(left, right), left, right, | 4590 return SelectConstant(IntPtrLessThanOrEqual(left, right), left, right, |
| (...skipping 4015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8605 formatted.c_str(), TENURED); | 8606 formatted.c_str(), TENURED); |
| 8606 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), | 8607 CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), |
| 8607 HeapConstant(string)); | 8608 HeapConstant(string)); |
| 8608 } | 8609 } |
| 8609 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); | 8610 CallRuntime(Runtime::kDebugPrint, NoContextConstant(), tagged_value); |
| 8610 #endif | 8611 #endif |
| 8611 } | 8612 } |
| 8612 | 8613 |
| 8613 } // namespace internal | 8614 } // namespace internal |
| 8614 } // namespace v8 | 8615 } // namespace v8 |
| OLD | NEW |