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

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

Issue 2541843006: [stubs] Add LoadFixedArrayElements with int index (Closed)
Patch Set: Address comments Created 4 years 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/code-stub-assembler.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 10c83a18f9539d600f281e192637e179ee3a2fef..d2d784c6116b03988c9a51ceaeae5709a1c801b0 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -1315,8 +1315,7 @@ Node* CodeStubAssembler::LoadNativeContext(Node* context) {
Node* CodeStubAssembler::LoadJSArrayElementsMap(ElementsKind kind,
Node* native_context) {
CSA_ASSERT(this, IsNativeContext(native_context));
- return LoadFixedArrayElement(native_context,
- IntPtrConstant(Context::ArrayMapIndex(kind)));
+ return LoadContextElement(native_context, Context::ArrayMapIndex(kind));
}
Node* CodeStubAssembler::StoreHeapNumberValue(Node* object, Node* value) {
@@ -4275,9 +4274,7 @@ Node* CodeStubAssembler::IntPtrMax(Node* left, Node* right) {
template <class Dictionary>
Node* CodeStubAssembler::GetNumberOfElements(Node* dictionary) {
- return LoadFixedArrayElement(
- dictionary, IntPtrConstant(Dictionary::kNumberOfElementsIndex), 0,
- INTPTR_PARAMETERS);
+ return LoadFixedArrayElement(dictionary, Dictionary::kNumberOfElementsIndex);
}
template <class Dictionary>
@@ -4289,23 +4286,19 @@ void CodeStubAssembler::SetNumberOfElements(Node* dictionary,
template <class Dictionary>
Node* CodeStubAssembler::GetNumberOfDeletedElements(Node* dictionary) {
- return LoadFixedArrayElement(
- dictionary, IntPtrConstant(Dictionary::kNumberOfDeletedElementsIndex), 0,
- INTPTR_PARAMETERS);
+ return LoadFixedArrayElement(dictionary,
+ Dictionary::kNumberOfDeletedElementsIndex);
}
template <class Dictionary>
Node* CodeStubAssembler::GetCapacity(Node* dictionary) {
- return LoadFixedArrayElement(dictionary,
- IntPtrConstant(Dictionary::kCapacityIndex), 0,
- INTPTR_PARAMETERS);
+ return LoadFixedArrayElement(dictionary, Dictionary::kCapacityIndex);
}
template <class Dictionary>
Node* CodeStubAssembler::GetNextEnumerationIndex(Node* dictionary) {
- return LoadFixedArrayElement(
- dictionary, IntPtrConstant(Dictionary::kNextEnumerationIndexIndex), 0,
- INTPTR_PARAMETERS);
+ return LoadFixedArrayElement(dictionary,
+ Dictionary::kNextEnumerationIndexIndex);
}
template <class Dictionary>
@@ -5578,8 +5571,7 @@ Node* CodeStubAssembler::EmitKeyedSloppyArguments(Node* receiver, Node* key,
{
CSA_ASSERT(this, TaggedIsSmi(mapped_index));
mapped_index = SmiUntag(mapped_index);
- Node* the_context = LoadFixedArrayElement(elements, IntPtrConstant(0), 0,
- INTPTR_PARAMETERS);
+ Node* the_context = LoadFixedArrayElement(elements, 0);
// Assert that we can use LoadFixedArrayElement/StoreFixedArrayElement
// methods for accessing Context.
STATIC_ASSERT(Context::kHeaderSize == FixedArray::kHeaderSize);
@@ -5599,8 +5591,7 @@ Node* CodeStubAssembler::EmitKeyedSloppyArguments(Node* receiver, Node* key,
Bind(&if_unmapped);
{
- Node* backing_store = LoadFixedArrayElement(elements, IntPtrConstant(1), 0,
- INTPTR_PARAMETERS);
+ Node* backing_store = LoadFixedArrayElement(elements, 1);
GotoIf(WordNotEqual(LoadMap(backing_store), FixedArrayMapConstant()),
bailout);
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698