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

Unified Diff: src/code-stubs.cc

Issue 2330063002: [stubs] Port StoreFastElementsStub to TurboFan. (Closed)
Patch Set: Retain removed, a comment added Created 4 years, 3 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-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('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 016d40770208e395f8cd60aa7c845580333ff78a..8a6da764bc84d43ab0c315af941c82265f8174df 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -5122,13 +5122,6 @@ CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() const {
}
-void StoreFastElementStub::InitializeDescriptor(
- CodeStubDescriptor* descriptor) {
- descriptor->Initialize(
- FUNCTION_ADDR(Runtime_KeyedStoreIC_MissFromStubFailure));
-}
-
-
void ElementsTransitionAndStoreStub::InitializeDescriptor(
CodeStubDescriptor* descriptor) {
descriptor->Initialize(
@@ -5680,6 +5673,35 @@ void StoreElementStub::Generate(MacroAssembler* masm) {
ElementHandlerCompiler::GenerateStoreSlow(masm);
}
+void StoreFastElementStub::GenerateAssembly(
+ CodeStubAssembler* assembler) const {
+ typedef CodeStubAssembler::Label Label;
+ typedef compiler::Node Node;
+
+ assembler->Comment(
+ "StoreFastElementStub: js_array=%d, elements_kind=%s, store_mode=%d",
+ is_js_array(), ElementsKindToString(elements_kind()), store_mode());
+
+ Node* receiver = assembler->Parameter(Descriptor::kReceiver);
+ Node* key = assembler->Parameter(Descriptor::kName);
+ Node* value = assembler->Parameter(Descriptor::kValue);
+ Node* slot = assembler->Parameter(Descriptor::kSlot);
+ Node* vector = assembler->Parameter(Descriptor::kVector);
+ Node* context = assembler->Parameter(Descriptor::kContext);
+
+ Label miss(assembler);
+
+ assembler->EmitElementStore(receiver, key, value, is_js_array(),
+ elements_kind(), store_mode(), &miss);
+ assembler->Return(value);
+
+ assembler->Bind(&miss);
+ {
+ assembler->Comment("Miss");
+ assembler->TailCallRuntime(Runtime::kKeyedStoreIC_Miss, context, receiver,
+ key, value, slot, vector);
+ }
+}
// static
void StoreFastElementStub::GenerateAheadOfTime(Isolate* isolate) {
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698