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

Unified Diff: src/ic/accessor-assembler.cc

Issue 2717203002: [StoreIC] Use StoreIC_Uninitialized for 0->PRE transitions (Closed)
Patch Set: check for map extensibility Created 3 years, 9 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/ic/accessor-assembler.h ('k') | src/ic/keyed-store-generic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/accessor-assembler.cc
diff --git a/src/ic/accessor-assembler.cc b/src/ic/accessor-assembler.cc
index eec6acc923e8b9533205ad50278e0af40bb7ef04..3575bd71620573039fe487e2fd7d666bdafbc562 100644
--- a/src/ic/accessor-assembler.cc
+++ b/src/ic/accessor-assembler.cc
@@ -2041,10 +2041,12 @@ void AccessorAssembler::KeyedLoadICGeneric(const LoadICParameters* p) {
}
}
-void AccessorAssembler::StoreIC(const StoreICParameters* p) {
+void AccessorAssembler::StoreIC(const StoreICParameters* p,
+ LanguageMode language_mode) {
Variable var_handler(this, MachineRepresentation::kTagged);
Label if_handler(this, &var_handler), try_polymorphic(this, Label::kDeferred),
- try_megamorphic(this, Label::kDeferred), miss(this, Label::kDeferred);
+ try_megamorphic(this, Label::kDeferred),
+ try_uninitialized(this, Label::kDeferred), miss(this, Label::kDeferred);
Node* receiver_map = LoadReceiverMap(p->receiver);
GotoIf(IsDeprecatedMap(receiver_map), &miss);
@@ -2074,11 +2076,21 @@ void AccessorAssembler::StoreIC(const StoreICParameters* p) {
{
// Check megamorphic case.
GotoIfNot(WordEqual(feedback, LoadRoot(Heap::kmegamorphic_symbolRootIndex)),
- &miss);
+ &try_uninitialized);
TryProbeStubCache(isolate()->store_stub_cache(), p->receiver, p->name,
&if_handler, &var_handler, &miss);
}
+ Bind(&try_uninitialized);
+ {
+ // Check uninitialized case.
+ GotoIfNot(
+ WordEqual(feedback, LoadRoot(Heap::kuninitialized_symbolRootIndex)),
+ &miss);
+ TailCallStub(CodeFactory::StoreIC_Uninitialized(isolate(), language_mode),
+ p->context, p->receiver, p->name, p->value, p->slot,
+ p->vector);
+ }
Bind(&miss);
{
TailCallRuntime(Runtime::kStoreIC_Miss, p->context, p->value, p->slot,
@@ -2376,8 +2388,7 @@ void AccessorAssembler::GenerateStoreIC(LanguageMode language_mode) {
Node* context = Parameter(Descriptor::kContext);
StoreICParameters p(context, receiver, name, value, slot, vector);
- // Current StoreIC dispatcher does not depend on the language mode.
- StoreIC(&p);
+ StoreIC(&p, language_mode);
}
void AccessorAssembler::GenerateStoreICTrampoline(LanguageMode language_mode) {
« no previous file with comments | « src/ic/accessor-assembler.h ('k') | src/ic/keyed-store-generic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698