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

Unified Diff: src/code-stubs.cc

Issue 2325013003: [stubs] Port StoreFieldStub to TurboFan. (Closed)
Patch Set: 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 27f31aa81c38d550ce009f13cc8e1e50e2066efc..c8693d2f8bc2eb8998a6a7d8a06da96a78ce4f54 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -4434,6 +4434,43 @@ void LoadApiGetterStub::GenerateAssembly(CodeStubAssembler* assembler) const {
holder, callback);
}
+void StoreFieldStub::GenerateAssembly(CodeStubAssembler* assembler) const {
+ typedef CodeStubAssembler::Label Label;
+ typedef compiler::Node Node;
+
+ FieldIndex index = this->index();
+ Representation representation = this->representation();
+
+ assembler->Comment("StoreFieldStub: inobject=%d, offset=%d, rep=%s",
+ index.is_inobject(), index.offset(),
+ representation.Mnemonic());
+
+ Node* receiver = assembler->Parameter(Descriptor::kReceiver);
+ Node* name = 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);
+
+ Node* prepared_value =
+ assembler->PrepareValueForWrite(value, representation, &miss);
+ assembler->StoreNamedField(receiver, index, representation, prepared_value,
+ false);
+ assembler->Return(value);
+
+ // Only stores to tagged field can't bailout.
+ if (!representation.IsTagged()) {
+ assembler->Bind(&miss);
+ {
+ assembler->Comment("Miss");
+ assembler->TailCallRuntime(Runtime::kStoreIC_Miss, context, receiver,
+ name, 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