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

Unified Diff: src/code-stubs.cc

Issue 1989363004: [turbofan] Add FixedArray peephole optimizations to CodeStubAssembler (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Final review feedback Created 4 years, 7 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/code-stub-assembler.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 414af170a279c6d282353b3ef5182263c0da0df0..d7ea506671401dcfae0c4a13bcf175f60507394c 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -3496,8 +3496,7 @@ void LoadApiGetterStub::GenerateAssembly(CodeStubAssembler* assembler) const {
Node* descriptors = assembler->LoadMapDescriptors(map);
Node* offset =
assembler->Int32Constant(DescriptorArray::ToValueIndex(index()));
- Node* callback =
- assembler->LoadFixedArrayElementInt32Index(descriptors, offset);
+ Node* callback = assembler->LoadFixedArrayElement(descriptors, offset);
assembler->TailCallStub(CodeFactory::ApiGetter(isolate()), context, receiver,
holder, callback);
}
@@ -3873,9 +3872,10 @@ compiler::Node* FastCloneShallowObjectStub::GenerateFastPath(
Node* undefined = assembler->UndefinedConstant();
Node* literals_array =
assembler->LoadObjectField(closure, JSFunction::kLiteralsOffset);
- Node* allocation_site = assembler->LoadFixedArrayElementSmiIndex(
+ Node* allocation_site = assembler->LoadFixedArrayElement(
literals_array, literals_index,
- LiteralsArray::kFirstLiteralIndex * kPointerSize);
+ LiteralsArray::kFirstLiteralIndex * kPointerSize,
+ CodeStubAssembler::SMI_PARAMETERS);
assembler->GotoIf(assembler->WordEqual(allocation_site, undefined),
call_runtime);
@@ -4473,9 +4473,10 @@ void ArrayNoArgumentConstructorStub::GenerateAssembly(
: nullptr;
Node* array_map =
assembler->LoadJSArrayElementsMap(elements_kind(), native_context);
- Node* array = assembler->AllocateJSArray(elements_kind(), array_map,
- JSArray::kPreallocatedArrayElements,
- 0, allocation_site);
+ Node* array = assembler->AllocateJSArray(
+ elements_kind(), array_map,
+ assembler->IntPtrConstant(JSArray::kPreallocatedArrayElements),
+ assembler->IntPtrConstant(0), allocation_site);
assembler->Return(array);
}
@@ -4486,9 +4487,10 @@ void InternalArrayNoArgumentConstructorStub::GenerateAssembly(
assembler->Parameter(
ArrayNoArgumentConstructorDescriptor::kFunctionIndex),
JSFunction::kPrototypeOrInitialMapOffset);
- Node* array = assembler->AllocateJSArray(elements_kind(), array_map,
- JSArray::kPreallocatedArrayElements,
- 0, nullptr);
+ Node* array = assembler->AllocateJSArray(
+ elements_kind(), array_map,
+ assembler->IntPtrConstant(JSArray::kPreallocatedArrayElements),
+ assembler->IntPtrConstant(0), nullptr);
assembler->Return(array);
}
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698