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

Unified Diff: src/builtins.cc

Issue 2144643004: [builtins] Turn StoreIC_Miss and StoreIC_Slow builtins to TurboFan code stubs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/builtins.h ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index d386ae9cf6ff01693434e99766b3a2d0bb7933f4..41a61f08f515ba2563fa781f5ebe22ed36a2145d 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -6136,26 +6136,24 @@ void Generate_LoadIC_Slow(CodeStubAssembler* assembler) {
assembler->TailCallRuntime(Runtime::kGetProperty, context, receiver, name);
}
-void Generate_LoadGlobalIC_SlowInsideTypeof(CodeStubAssembler* assembler) {
+void Generate_LoadGlobalIC_Slow(CodeStubAssembler* assembler, TypeofMode mode) {
typedef compiler::Node Node;
Node* slot = assembler->Parameter(0);
Node* vector = assembler->Parameter(1);
Node* context = assembler->Parameter(2);
+ Node* typeof_mode = assembler->SmiConstant(Smi::FromInt(mode));
- assembler->TailCallRuntime(Runtime::kGetGlobalInsideTypeof, context, slot,
- vector);
+ assembler->TailCallRuntime(Runtime::kGetGlobal, context, slot, vector,
+ typeof_mode);
}
-void Generate_LoadGlobalIC_SlowNotInsideTypeof(CodeStubAssembler* assembler) {
- typedef compiler::Node Node;
-
- Node* slot = assembler->Parameter(0);
- Node* vector = assembler->Parameter(1);
- Node* context = assembler->Parameter(2);
+void Generate_LoadGlobalIC_SlowInsideTypeof(CodeStubAssembler* assembler) {
+ Generate_LoadGlobalIC_Slow(assembler, INSIDE_TYPEOF);
+}
- assembler->TailCallRuntime(Runtime::kGetGlobalNotInsideTypeof, context, slot,
- vector);
+void Generate_LoadGlobalIC_SlowNotInsideTypeof(CodeStubAssembler* assembler) {
+ Generate_LoadGlobalIC_Slow(assembler, NOT_INSIDE_TYPEOF);
}
void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) {
@@ -6170,16 +6168,48 @@ void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) {
KeyedLoadIC::GenerateMegamorphic(masm);
}
-void Generate_StoreIC_Miss(MacroAssembler* masm) {
- StoreIC::GenerateMiss(masm);
+void Generate_StoreIC_Miss(CodeStubAssembler* assembler) {
+ typedef compiler::Node Node;
+
+ Node* receiver = assembler->Parameter(0);
+ Node* name = assembler->Parameter(1);
+ Node* value = assembler->Parameter(2);
+ Node* slot = assembler->Parameter(3);
+ Node* vector = assembler->Parameter(4);
+ Node* context = assembler->Parameter(5);
+
+ assembler->TailCallRuntime(Runtime::kStoreIC_Miss, context, receiver, name,
+ value, slot, vector);
}
void Generate_StoreIC_Normal(MacroAssembler* masm) {
StoreIC::GenerateNormal(masm);
}
-void Generate_StoreIC_Slow(MacroAssembler* masm) {
- NamedStoreHandlerCompiler::GenerateSlow(masm);
+void Generate_StoreIC_Slow(CodeStubAssembler* assembler,
+ LanguageMode language_mode) {
+ typedef compiler::Node Node;
+
+ Node* receiver = assembler->Parameter(0);
+ Node* name = assembler->Parameter(1);
+ Node* value = assembler->Parameter(2);
+ // Node* slot = assembler->Parameter(3);
+ // Node* vector = assembler->Parameter(4);
+ Node* context = assembler->Parameter(5);
+ Node* lang_mode = assembler->SmiConstant(Smi::FromInt(language_mode));
+
+ // The slow case calls into the runtime to complete the store without causing
+ // an IC miss that would otherwise cause a transition to the generic stub.
+ assembler->TailCallRuntime(Runtime::kSetProperty, context, receiver, name,
+ value, lang_mode);
+}
+
+void Generate_StoreIC_SlowSloppy(CodeStubAssembler* assembler) {
+ Generate_StoreIC_Slow(assembler, SLOPPY);
+}
+
+void Generate_StoreIC_SlowStrict(CodeStubAssembler* assembler) {
+ Generate_StoreIC_Slow(assembler, STRICT);
}
void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) {
« no previous file with comments | « src/builtins.h ('k') | src/compiler/code-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698