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

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: rebase again 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/compiler/code-stub-assembler.h » ('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 cd941decf24063bc1616cefb8eda6b0f349ca3a1..709b0e58e55042a92f464547c973857f94a70bc9 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -2343,6 +2343,28 @@ void StoreInterceptorStub::GenerateAssembly(
receiver, name, value);
}
+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_keyispositivesmi(assembler), if_keyisinvalid(assembler);
+ assembler->Branch(assembler->WordIsPositiveSmi(key), &if_keyispositivesmi,
+ &if_keyisinvalid);
+ assembler->Bind(&if_keyispositivesmi);
+ assembler->TailCallRuntime(Runtime::kLoadElementWithInterceptor, context,
+ receiver, key);
+
+ assembler->Bind(&if_keyisinvalid);
+ assembler->TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, key,
+ slot, vector);
+}
+
template<class StateType>
void HydrogenCodeStub::TraceTransition(StateType from, StateType to) {
// Note: Although a no-op transition is semantically OK, it is hinting at a
« no previous file with comments | « src/code-stubs.h ('k') | src/compiler/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698