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

Unified Diff: src/ic.cc

Issue 371463003: Use hydrogenized KeyedLoadGeneric stub for generic named loads too (with --compiled-keyed-generic-l… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/ic.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 39b94162285291ebafd899f5fc2446127e404a42..e6c831c4178749aa2250a5230c2d27b162350197 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -598,9 +598,11 @@ MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<String> name) {
} else if (state() == PREMONOMORPHIC) {
FunctionPrototypeStub function_prototype_stub(isolate(), kind());
stub = function_prototype_stub.GetCode();
- } else if (state() != MEGAMORPHIC) {
+ } else if (!FLAG_compiled_keyed_generic_loads && state() != MEGAMORPHIC) {
ASSERT(state() != GENERIC);
stub = megamorphic_stub();
+ } else if (FLAG_compiled_keyed_generic_loads && state() != GENERIC) {
+ stub = generic_stub();
}
if (!stub.is_null()) {
set_target(*stub);
@@ -821,6 +823,10 @@ void IC::PatchCache(Handle<HeapType> type,
if (UpdatePolymorphicIC(type, name, code)) break;
CopyICToMegamorphicCache(name);
}
+ if (FLAG_compiled_keyed_generic_loads && (kind() == Code::LOAD_IC)) {
+ set_target(*generic_stub());
+ break;
+ }
set_target(*megamorphic_stub());
// Fall through.
case MEGAMORPHIC:
@@ -852,6 +858,11 @@ Handle<Code> LoadIC::megamorphic_stub() {
}
+Handle<Code> LoadIC::generic_stub() const {
+ return KeyedLoadGenericElementStub(isolate()).GetCode();
+}
+
+
Handle<Code> LoadIC::SimpleFieldLoad(FieldIndex index) {
if (kind() == Code::LOAD_IC) {
LoadFieldStub stub(isolate(), index);
« no previous file with comments | « src/ic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698