| Index: src/preparser.cc
|
| diff --git a/src/preparser.cc b/src/preparser.cc
|
| index 6e8800e019aeafca8434af95a0c47e52e56202f2..3bf88cad352935a342a24bf2e1e76563649539a8 100644
|
| --- a/src/preparser.cc
|
| +++ b/src/preparser.cc
|
| @@ -25,7 +25,7 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#include <math.h>
|
| +#include <cmath>
|
|
|
| #include "../include/v8stdint.h"
|
|
|
| @@ -42,14 +42,18 @@
|
| #include "unicode.h"
|
| #include "utils.h"
|
|
|
| -namespace v8 {
|
| -
|
| #ifdef _MSC_VER
|
| +namespace std {
|
| +
|
| // Usually defined in math.h, but not in MSVC.
|
| // Abstracted to work
|
| int isfinite(double value);
|
| +
|
| +} // namespace std
|
| #endif
|
|
|
| +namespace v8 {
|
| +
|
| namespace preparser {
|
|
|
| PreParser::PreParseResult PreParser::PreParseLazyFunction(
|
| @@ -1712,7 +1716,7 @@ int DuplicateFinder::AddNumber(i::Vector<const char> key, int value) {
|
| double double_value = StringToDouble(unicode_constants_, key, flags, 0.0);
|
| int length;
|
| const char* string;
|
| - if (!isfinite(double_value)) {
|
| + if (!std::isfinite(double_value)) {
|
| string = "Infinity";
|
| length = 8; // strlen("Infinity");
|
| } else {
|
|
|