1 // Copyright 2014 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "src/v8.h" 6 7 #include "src/field-index.h" 8 #include "src/objects.h" 9 #include "src/objects-inl.h" 10 11 namespace v8 { 12 namespace internal { 13 14 ForLookupResult(const LookupResult * lookup_result)15FieldIndex FieldIndex::ForLookupResult(const LookupResult* lookup_result) { 16 Map* map = lookup_result->holder()->map(); 17 return ForPropertyIndex(map, 18 lookup_result->GetFieldIndexFromMap(map), 19 lookup_result->representation().IsDouble()); 20 } 21 22 23 } } // namespace v8::internal 24