diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-04-29 22:35:21 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-04-29 22:35:21 +0200 |
commit | 2f75785c015fecc33565fe5ee3a483b0d4e5cc6d (patch) | |
tree | ad66b4eaba8cedfeb7cfb40b0871307ae08d25e8 /deps/v8/src/preparser.cc | |
parent | 5ddf7f4200894a7304d7c07bbbd8773fac3509d1 (diff) | |
download | node-2f75785c015fecc33565fe5ee3a483b0d4e5cc6d.tar.gz |
deps: upgrade v8 to 3.18.4
Diffstat (limited to 'deps/v8/src/preparser.cc')
-rw-r--r-- | deps/v8/src/preparser.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/deps/v8/src/preparser.cc b/deps/v8/src/preparser.cc index 6e8800e01..3bf88cad3 100644 --- a/deps/v8/src/preparser.cc +++ b/deps/v8/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 { |