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

Unified Diff: src/builtins/builtins-handler.cc

Issue 2688573003: [cleanup] CSA: add helpers for accessing details/value via key_index (Closed)
Patch Set: rebased Created 3 years, 10 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 | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-handler.cc
diff --git a/src/builtins/builtins-handler.cc b/src/builtins/builtins-handler.cc
index 8be2a3beaa81a675784de1781fe7174ee478f5c2..6a9eb3a9550d1ad0027bc59ce1b2f9f37381f3d1 100644
--- a/src/builtins/builtins-handler.cc
+++ b/src/builtins/builtins-handler.cc
@@ -239,21 +239,15 @@ TF_BUILTIN(StoreIC_Normal, CodeStubAssembler) {
&var_name_index, &slow);
Bind(&found);
{
- const int kNameToDetailsOffset = (NameDictionary::kEntryDetailsIndex -
- NameDictionary::kEntryKeyIndex) *
- kPointerSize;
- Node* details = LoadFixedArrayElement(properties, var_name_index.value(),
- kNameToDetailsOffset);
+ Node* details = LoadDetailsByKeyIndex<NameDictionary>(
+ properties, var_name_index.value());
// Check that the property is a writable data property (no accessor).
const int kTypeAndReadOnlyMask = PropertyDetails::KindField::kMask |
PropertyDetails::kAttributesReadOnlyMask;
STATIC_ASSERT(kData == 0);
- GotoIf(IsSetSmi(details, kTypeAndReadOnlyMask), &slow);
- const int kNameToValueOffset =
- (NameDictionary::kEntryValueIndex - NameDictionary::kEntryKeyIndex) *
- kPointerSize;
- StoreFixedArrayElement(properties, var_name_index.value(), value,
- UPDATE_WRITE_BARRIER, kNameToValueOffset);
+ GotoIf(IsSetWord32(details, kTypeAndReadOnlyMask), &slow);
+ StoreValueByKeyIndex<NameDictionary>(properties, var_name_index.value(),
+ value);
Return(value);
}
}
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698