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

Unified Diff: src/field-index.cc

Issue 429053005: Avoid one repeated property lookup when computing load ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/field-index.h ('k') | src/ic.h » ('j') | src/ic.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/field-index.cc
diff --git a/src/field-index.cc b/src/field-index.cc
index 5392afc9f2cf592746d046382db347848f047b20..9670031536cf75433bb51d3ae330d4dea76233db 100644
--- a/src/field-index.cc
+++ b/src/field-index.cc
@@ -5,6 +5,7 @@
#include "src/v8.h"
#include "src/field-index.h"
+#include "src/lookup.h"
#include "src/objects.h"
#include "src/objects-inl.h"
@@ -20,4 +21,10 @@ FieldIndex FieldIndex::ForLookupResult(const LookupResult* lookup_result) {
}
+FieldIndex FieldIndex::ForLookupIterator(const LookupIterator* lookup) {
Toon Verwaest 2014/07/30 16:54:52 Let the LookupIterator calculate the FieldIndex in
Jakob Kummerow 2014/07/31 13:55:50 Done.
+ Handle<Map> map = lookup->holder_map();
+ int index =
+ map->instance_descriptors()->GetFieldIndex(lookup->descriptor_number());
+ return ForPropertyIndex(*map, index, lookup->representation().IsDouble());
+}
} } // namespace v8::internal
« no previous file with comments | « src/field-index.h ('k') | src/ic.h » ('j') | src/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698