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

Unified Diff: src/code-stubs.cc

Issue 2327103002: [stubs] Port KeyedLoadSloppyArgumentsStub and KeyedStoreSloppyArgumentsStub to TurboFan. (Closed)
Patch Set: Addressing comments 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 53027574d40ee1cee8b2e509987bf16b6e8398ea..bcfb4edd295c0d0e803f7e902a55e5c1fe412ddd 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -4566,6 +4566,55 @@ void StoreGlobalStub::GenerateAssembly(CodeStubAssembler* assembler) const {
}
}
+void KeyedLoadSloppyArgumentsStub::GenerateAssembly(
+ CodeStubAssembler* assembler) const {
+ typedef CodeStubAssembler::Label Label;
+ typedef compiler::Node Node;
+
+ Node* receiver = assembler->Parameter(Descriptor::kReceiver);
+ Node* key = assembler->Parameter(Descriptor::kName);
+ Node* slot = assembler->Parameter(Descriptor::kSlot);
+ Node* vector = assembler->Parameter(Descriptor::kVector);
+ Node* context = assembler->Parameter(Descriptor::kContext);
+
+ Label miss(assembler);
+
+ Node* result = assembler->LoadKeyedSloppyArguments(receiver, key, &miss);
+ assembler->Return(result);
+
+ assembler->Bind(&miss);
+ {
+ assembler->Comment("Miss");
+ assembler->TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver,
+ key, slot, vector);
+ }
+}
+
+void KeyedStoreSloppyArgumentsStub::GenerateAssembly(
+ CodeStubAssembler* assembler) const {
+ typedef CodeStubAssembler::Label Label;
+ typedef compiler::Node Node;
+
+ 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->StoreKeyedSloppyArguments(receiver, key, value, &miss);
+ assembler->Return(value);
+
+ assembler->Bind(&miss);
+ {
+ assembler->Comment("Miss");
+ assembler->TailCallRuntime(Runtime::kKeyedStoreIC_Miss, context, receiver,
+ key, value, slot, vector);
+ }
+}
+
// static
compiler::Node* LessThanStub::Generate(CodeStubAssembler* assembler,
compiler::Node* lhs, compiler::Node* rhs,
« 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