Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Unified Diff: src/code-stub-assembler.h

Issue 2810363003: [builtins] Introduce DeleteProperty builtin (Closed)
Patch Set: fix CallableFor not to create handles Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-internal-gen.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 4d45576b663fd76d6c1755bb3dfed9f2b9df2af4..5ff55fd751c84e9dff59414370d19964b700a6fd 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -988,11 +988,13 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Stores the value for the entry with the given key_index.
template <class ContainerType>
- void StoreValueByKeyIndex(Node* container, Node* key_index, Node* value) {
+ void StoreValueByKeyIndex(
+ Node* container, Node* key_index, Node* value,
+ WriteBarrierMode write_barrier = UPDATE_WRITE_BARRIER) {
const int kKeyToValueOffset =
(ContainerType::kEntryValueIndex - ContainerType::kEntryKeyIndex) *
kPointerSize;
- StoreFixedArrayElement(container, key_index, value, UPDATE_WRITE_BARRIER,
+ StoreFixedArrayElement(container, key_index, value, write_barrier,
kKeyToValueOffset);
}
@@ -1000,16 +1002,34 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* HashTableComputeCapacity(Node* at_least_space_for);
template <class Dictionary>
- Node* GetNumberOfElements(Node* dictionary);
+ Node* GetNumberOfElements(Node* dictionary) {
+ return LoadFixedArrayElement(dictionary,
+ Dictionary::kNumberOfElementsIndex);
+ }
template <class Dictionary>
- void SetNumberOfElements(Node* dictionary, Node* num_elements_smi);
+ void SetNumberOfElements(Node* dictionary, Node* num_elements_smi) {
+ StoreFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex,
+ num_elements_smi, SKIP_WRITE_BARRIER);
+ }
template <class Dictionary>
- Node* GetNumberOfDeletedElements(Node* dictionary);
+ Node* GetNumberOfDeletedElements(Node* dictionary) {
+ return LoadFixedArrayElement(dictionary,
+ Dictionary::kNumberOfDeletedElementsIndex);
+ }
template <class Dictionary>
- Node* GetCapacity(Node* dictionary);
+ void SetNumberOfDeletedElements(Node* dictionary, Node* num_deleted_smi) {
+ StoreFixedArrayElement(dictionary,
+ Dictionary::kNumberOfDeletedElementsIndex,
+ num_deleted_smi, SKIP_WRITE_BARRIER);
+ }
+
+ template <class Dictionary>
+ Node* GetCapacity(Node* dictionary) {
+ return LoadFixedArrayElement(dictionary, Dictionary::kCapacityIndex);
+ }
template <class Dictionary>
Node* GetNextEnumerationIndex(Node* dictionary);
@@ -1345,6 +1365,9 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
void DescriptorLookupBinary(Node* unique_name, Node* descriptors, Node* nof,
Label* if_found, Variable* var_name_index,
Label* if_not_found);
+ // Implements DescriptorArray::ToKeyIndex.
+ // Returns an untagged IntPtr.
+ Node* DescriptorArrayToKeyIndex(Node* descriptor_number);
Node* CallGetterIfAccessor(Node* value, Node* details, Node* context,
Node* receiver, Label* if_bailout);
@@ -1388,9 +1411,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Implements DescriptorArray::number_of_entries.
// Returns an untagged int32.
Node* DescriptorArrayNumberOfEntries(Node* descriptors);
- // Implements DescriptorArray::ToKeyIndex.
- // Returns an untagged IntPtr.
- Node* DescriptorArrayToKeyIndex(Node* descriptor_number);
// Implements DescriptorArray::GetSortedKeyIndex.
// Returns an untagged int32.
Node* DescriptorArrayGetSortedKeyIndex(Node* descriptors,
« no previous file with comments | « src/builtins/builtins-internal-gen.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698