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

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

Issue 508643002: Vector-ic project, current state (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added platform dependent version of dispatchers. Created 6 years 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/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 &&
+ (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
+ if (FLAG_vector_ics &&
+ (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC)) {
+ if (reg.is(VectorLoadICDescriptor::VectorRegister()) &&
+ !reg.is(object_reg)) {
+ 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);
« no previous file with comments | « src/ic/handler-compiler.h ('k') | src/ic/ia32/handler-compiler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698