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); |