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, |