d4b533d41b
R=svenpanne@chromium.org Review URL: https://codereview.chromium.org/259183002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@21035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
29 lines
731 B
C++
29 lines
731 B
C++
// 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.
|
|
|
|
#ifndef V8_PROPERTY_DETAILS_INL_H_
|
|
#define V8_PROPERTY_DETAILS_INL_H_
|
|
|
|
#include "conversions.h"
|
|
#include "objects.h"
|
|
#include "property-details.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
inline bool Representation::CanContainDouble(double value) {
|
|
if (IsDouble() || is_more_general_than(Representation::Double())) {
|
|
return true;
|
|
}
|
|
if (IsInt32Double(value)) {
|
|
if (IsInteger32()) return true;
|
|
if (IsSmi()) return Smi::IsValid(static_cast<int32_t>(value));
|
|
}
|
|
return false;
|
|
}
|
|
|
|
} } // namespace v8::internal
|
|
|
|
#endif // V8_PROPERTY_DETAILS_INL_H_
|