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 |