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

Unified Diff: src/code-stubs.cc

Issue 2031753003: [stubs] Introducing LoadICTFStub and LoadICTrampolineTFStub and a switch to enable them instead of … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 4 years, 6 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
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index e6a9d78f05c3476c8a67ca2ad264446754d837d5..a4e6a50efa88b76b80a0c867d2fa28ed725edc06 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -443,7 +443,6 @@ void CompareICStub::Generate(MacroAssembler* masm) {
}
}
-
Handle<Code> TurboFanCodeStub::GenerateCode() {
const char* name = CodeStub::MajorName(MajorKey());
Zone zone(isolate()->allocator());
@@ -454,6 +453,45 @@ Handle<Code> TurboFanCodeStub::GenerateCode() {
return assembler.GenerateCode();
}
+void LoadICTrampolineTFStub::GenerateAssembly(
+ CodeStubAssembler* assembler) const {
+ typedef compiler::Node Node;
+ typedef CodeStubAssembler::Label Label;
+
+ Node* receiver = assembler->Parameter(0);
+ Node* name = assembler->Parameter(1);
+ Node* slot = assembler->Parameter(2);
+ Node* context = assembler->Parameter(3);
+ Node* vector = assembler->LoadTypeFeedbackVectorForStub();
+
+ CodeStubAssembler::LoadICParameters p(context, receiver, name, slot, vector);
+ Label miss(assembler);
+ assembler->LoadIC(&p, &miss);
+
+ assembler->Bind(&miss);
+ assembler->TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name,
+ slot, vector);
+}
+
+void LoadICTFStub::GenerateAssembly(CodeStubAssembler* assembler) const {
+ typedef compiler::Node Node;
+ typedef CodeStubAssembler::Label Label;
+
+ Node* receiver = assembler->Parameter(0);
+ Node* name = assembler->Parameter(1);
+ Node* slot = assembler->Parameter(2);
+ Node* vector = assembler->Parameter(3);
+ Node* context = assembler->Parameter(4);
+
+ CodeStubAssembler::LoadICParameters p(context, receiver, name, slot, vector);
+ Label miss(assembler);
+ assembler->LoadIC(&p, &miss);
+
+ assembler->Bind(&miss);
+ assembler->TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name,
+ slot, vector);
+}
+
void AllocateHeapNumberStub::GenerateAssembly(
CodeStubAssembler* assembler) const {
typedef compiler::Node Node;
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler.cc » ('j') | test/cctest/test-code-stub-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698