Index: src/field-index.cc |
diff --git a/src/field-index.cc b/src/field-index.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5392afc9f2cf592746d046382db347848f047b20 |
--- /dev/null |
+++ b/src/field-index.cc |
@@ -0,0 +1,23 @@ |
+// Copyright 2014 the V8 project authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "src/v8.h" |
+ |
+#include "src/field-index.h" |
+#include "src/objects.h" |
+#include "src/objects-inl.h" |
+ |
+namespace v8 { |
+namespace internal { |
+ |
+ |
+FieldIndex FieldIndex::ForLookupResult(const LookupResult* lookup_result) { |
+ Map* map = lookup_result->holder()->map(); |
+ return ForPropertyIndex(map, |
+ lookup_result->GetFieldIndexFromMap(map), |
+ lookup_result->representation().IsDouble()); |
+} |
+ |
+ |
+} } // namespace v8::internal |