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

Unified Diff: src/ic.cc

Issue 442763002: Load constants from the DescriptorArray (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 846d361c089a593398aadf32c10b818737f56fa6..484b572093ce7d46067b26b80829c3386130987a 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1069,8 +1069,11 @@ Handle<Code> LoadIC::CompileHandler(LookupIterator* lookup,
// -------------- Constant properties --------------
DCHECK(lookup->property_details().type() == CONSTANT);
- Handle<Object> constant = lookup->GetDataValue();
- return compiler.CompileLoadConstant(name, constant);
+ if (receiver_is_holder) {
+ LoadConstantStub stub(isolate(), lookup->GetConstantIndex());
+ return stub.GetCode();
+ }
+ return compiler.CompileLoadConstant(name, lookup->GetConstantIndex());
}
« src/ia32/stub-cache-ia32.cc ('K') | « src/ia32/stub-cache-ia32.cc ('k') | src/lookup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698