Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / v8 / src / property-details-inl.h
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 #ifndef V8_PROPERTY_DETAILS_INL_H_
6 #define V8_PROPERTY_DETAILS_INL_H_
7
8 #include "conversions.h"
9 #include "objects.h"
10 #include "property-details.h"
11
12 namespace v8 {
13 namespace internal {
14
15 inline bool Representation::CanContainDouble(double value) {
16   if (IsDouble() || is_more_general_than(Representation::Double())) {
17     return true;
18   }
19   if (IsInt32Double(value)) {
20     if (IsInteger32()) return true;
21     if (IsSmi()) return Smi::IsValid(static_cast<int32_t>(value));
22   }
23   return false;
24 }
25
26 } }  // namespace v8::internal
27
28 #endif  // V8_PROPERTY_DETAILS_INL_H_