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

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

Issue 2810363003: [builtins] Introduce DeleteProperty builtin (Closed)
Patch Set: ready for review 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
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 4d45576b663fd76d6c1755bb3dfed9f2b9df2af4..93b6cc3ab59ca72b5cb013320bdd3e665a0da1aa 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -1000,16 +1000,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 +1363,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 +1409,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,

Powered by Google App Engine
This is Rietveld 408576698