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

Unified Diff: src/ic/handler-compiler.cc

Issue 767743002: Hydrogen code stubs for vector-based ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Patch One. Created 6 years, 1 month 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/ic/handler-compiler.cc
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc
index 22135735f32fdca0639856c2d0a20563612d4da4..7f9ac67c03085ddef523e332d54bda5c64ae8496 100644
--- a/src/ic/handler-compiler.cc
+++ b/src/ic/handler-compiler.cc
@@ -132,8 +132,27 @@ Register NamedStoreHandlerCompiler::FrontendHeader(Register object_reg,
Register PropertyHandlerCompiler::Frontend(Register object_reg,
Handle<Name> name) {
Label miss;
+ if (FLAG_vector_ics &&
Jakob Kummerow 2014/12/02 08:43:07 Can we re-use IC::ICUseVector here and below?
mvstanton 2014/12/03 11:48:30 Done.
+ (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC)) {
+ if (object_reg.is(VectorLoadICDescriptor::VectorRegister())) {
+ PushVectorAndSlot(scratch2(), scratch3());
+ } else {
+ PushVectorAndSlot();
+ }
+ }
Register reg = FrontendHeader(object_reg, name, &miss);
FrontendFooter(name, &miss);
+ // The footer consumes the vector and slot from the stack if
+ // miss occurs
Jakob Kummerow 2014/12/02 08:43:07 nit: Trailing full stop.
mvstanton 2014/12/03 11:48:30 Done.
+ if (FLAG_vector_ics &&
+ (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC)) {
+ if (reg.is(VectorLoadICDescriptor::VectorRegister()) &&
+ !reg.is(object_reg)) {
Jakob Kummerow 2014/12/02 08:43:07 Uhm... you've pushed scratch2/scratch3 if object_r
mvstanton 2014/12/03 11:48:30 Okay, I've refactored this. The problem is that Fr
+ PopVectorAndSlot(scratch2(), scratch3());
+ } else {
+ DiscardVectorAndSlot();
+ }
+ }
return reg;
}
@@ -200,7 +219,15 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadConstant(Handle<Name> name,
Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
Handle<Name> name) {
Label miss;
+ if (FLAG_vector_ics) {
+ DCHECK(kind() == Code::LOAD_IC);
+ PushVectorAndSlot();
+ }
NonexistentFrontendHeader(name, &miss, scratch2(), scratch3());
+ if (FLAG_vector_ics &&
+ (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC)) {
+ DiscardVectorAndSlot();
+ }
GenerateLoadConstant(isolate()->factory()->undefined_value());
FrontendFooter(name, &miss);
return GetCode(kind(), Code::FAST, name);

Powered by Google App Engine
This is Rietveld 408576698