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

Unified Diff: src/code-stubs.cc

Issue 1820843002: Turn LoadIndexedInterceptor into a Turbofan stub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/code-stubs.h ('k') | src/ia32/code-stubs-ia32.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 d0f9c39033223f0e0f9c5e025e8444126070072e..37df17dce412d9baea16c2b9876bb0c5f66a9238 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -2327,6 +2327,38 @@ void ToBooleanStub::GenerateAssembly(
}
}
+void LoadIndexedInterceptorStub::GenerateAssembly(
+ compiler::CodeStubAssembler* assembler) const {
+ typedef compiler::Node Node;
+ typedef compiler::CodeStubAssembler::Label Label;
+ Node* receiver = assembler->Parameter(0);
+ Node* key = assembler->Parameter(1);
+ Node* slot = assembler->Parameter(2);
+ Node* vector = assembler->Parameter(3);
+ Node* context = assembler->Parameter(4);
+
+ Label if_keyissmi(assembler), if_keyisnotsmi(assembler);
+ assembler->Branch(assembler->WordIsSmi(key), &if_keyissmi, &if_keyisnotsmi);
+ assembler->Bind(&if_keyissmi);
+ {
+ Label if_keyvalid(assembler), if_keyinvalid(assembler);
+ assembler->BranchIfSmiLessThan(key, assembler->Int32Constant(0),
Benedikt Meurer 2016/03/21 09:36:56 Nit: SmiConstant(0)
+ &if_keyvalid, &if_keyinvalid);
+ assembler->Bind(&if_keyvalid);
+ {
+ assembler->TailCallRuntime(Runtime::kLoadElementWithInterceptor, context,
+ receiver, key);
+ }
+
+ assembler->Bind(&if_keyinvalid);
+ assembler->TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver,
+ key, slot, vector);
+ }
+ assembler->Bind(&if_keyisnotsmi);
+ assembler->TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, key,
Benedikt Meurer 2016/03/21 09:36:56 Nit: Add a merge Label and Goto to it from both ca
+ slot, vector);
+}
+
void StoreInterceptorStub::GenerateAssembly(
compiler::CodeStubAssembler* assembler) const {
typedef compiler::Node Node;
« no previous file with comments | « src/code-stubs.h ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698