Skip to content

Commit

Permalink
Upgrade V8 to 3.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Sep 8, 2011
1 parent 0a127d6 commit a785c29
Show file tree
Hide file tree
Showing 61 changed files with 3,963 additions and 2,777 deletions.
5 changes: 3 additions & 2 deletions deps/v8/.gitignore
@@ -1,17 +1,18 @@
*.a
*.exe
*.idb
*.lib
*.log
*.map
*.mk
*.ncb
*.pdb
*.pyc
*.scons*
*.so
*.suo
*.user
*.xcodeproj
*.idb
*.pdb
#*#
*~
.cpplint-cache
Expand Down
31 changes: 21 additions & 10 deletions deps/v8/ChangeLog
@@ -1,3 +1,14 @@
2011-09-08: Version 3.6.2

Added "dependencies" target to top-level Makefile.

Added ability to turn profiler on/off in d8.

Added "soname_version" parameter to common.gypi, v8.gyp, and Makefile.

Fixed several crash bugs.


2011-09-07: Version 3.6.1

Fixed a bug in abrupt exit from with or catch inside finally.
Expand All @@ -14,23 +25,23 @@

2011-09-05: Version 3.6.0

Fixed a bug when optimizing named function expression (issue 1647).
Fixed a bug when optimizing named function expression (issue 1647).

Fixed a bug when optimizing f.call.apply (issue 1650).
Fixed a bug when optimizing f.call.apply (issue 1650).

Made arguments and caller always be null on native functions
(issues 1548 and 1643).
Made arguments and caller always be null on native functions
(issues 1548 and 1643).

Fixed issue 1648 (cross-compiling x64 targeting ia32).
Fixed issue 1648 (cross-compiling x64 targeting ia32).

Fixed issue 371 (d8 printing of strings containing \0).
Fixed issue 371 (d8 printing of strings containing \0).

Fixed order of evaluation in arguments to parseInt (issue 1649).
Fixed order of evaluation in arguments to parseInt (issue 1649).

Fixed a problem with large heap snapshots in Chrome DevTools
(issue 1658, chromium issue 89268).
Fixed a problem with large heap snapshots in Chrome DevTools
(issue 1658, chromium issue 89268).

Upped default maximum heap size from 512M to 700M.
Upped default maximum heap size from 512M to 700M.


2011-08-31: Version 3.5.10
Expand Down
12 changes: 11 additions & 1 deletion deps/v8/Makefile
Expand Up @@ -68,8 +68,13 @@ ifeq ($(vfp3), off)
else
GYPFLAGS += -Dv8_can_use_vfp_instructions=true
endif
# soname_version=1.2.3
ifdef soname_version
GYPFLAGS += -Dsoname_version=$(soname_version)
endif

# ----------------- available targets: --------------------
# - "dependencies": pulls in external dependencies (currently: GYP)
# - any arch listed in ARCHES (see below)
# - any mode listed in MODES
# - every combination <arch>.<mode>, e.g. "ia32.release"
Expand Down Expand Up @@ -98,7 +103,7 @@ CHECKS = $(addsuffix .check,$(BUILDS))
# File where previously used GYPFLAGS are stored.
ENVFILE = $(OUTDIR)/environment

.PHONY: all check clean $(ENVFILE).new \
.PHONY: all check clean dependencies $(ENVFILE).new \
$(ARCHES) $(MODES) $(BUILDS) $(CHECKS) $(addsuffix .clean,$(ARCHES)) \
$(addsuffix .check,$(MODES)) $(addsuffix .check,$(ARCHES))

Expand Down Expand Up @@ -170,3 +175,8 @@ $(ENVFILE): $(ENVFILE).new
# Stores current GYPFLAGS in a file.
$(ENVFILE).new:
@mkdir -p $(OUTDIR); echo "GYPFLAGS=$(GYPFLAGS)" > $(ENVFILE).new;

# Dependencies.
dependencies:
svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
--revision 1026
3 changes: 2 additions & 1 deletion deps/v8/SConstruct
Expand Up @@ -288,6 +288,7 @@ V8_EXTRA_FLAGS = {
'gcc': {
'all': {
'WARNINGFLAGS': ['-Wall',
'-Werror',
'-W',
'-Wno-unused-parameter',
'-Wnon-virtual-dtor']
Expand Down Expand Up @@ -381,7 +382,7 @@ MKSNAPSHOT_EXTRA_FLAGS = {
DTOA_EXTRA_FLAGS = {
'gcc': {
'all': {
'WARNINGFLAGS': ['-Wno-uninitialized'],
'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'],
'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS
}
},
Expand Down
3 changes: 3 additions & 0 deletions deps/v8/build/common.gypi
Expand Up @@ -72,6 +72,9 @@
'v8_use_snapshot%': 'true',
'host_os%': '<(OS)',
'v8_use_liveobjectlist%': 'false',

# For a shared library build, results in "libv8-<(soname_version).so".
'soname_version%': '',
},
'target_defaults': {
'conditions': [
Expand Down
18 changes: 14 additions & 4 deletions deps/v8/src/SConscript
Expand Up @@ -111,8 +111,8 @@ SOURCES = {
runtime.cc
runtime-profiler.cc
safepoint-table.cc
scanner-base.cc
scanner.cc
scanner-character-streams.cc
scopeinfo.cc
scopes.cc
serialize.cc
Expand Down Expand Up @@ -222,7 +222,7 @@ SOURCES = {
'os:solaris': ['platform-solaris.cc', 'platform-posix.cc'],
'os:cygwin': ['platform-cygwin.cc', 'platform-posix.cc'],
'os:nullos': ['platform-nullos.cc'],
'os:win32': ['platform-win32.cc'],
'os:win32': ['platform-win32.cc', 'win32-math.cc'],
'mode:release': [],
'mode:debug': [
'objects-debug.cc', 'prettyprinter.cc', 'regexp-macro-assembler-tracer.cc'
Expand All @@ -233,15 +233,25 @@ SOURCES = {
PREPARSER_SOURCES = {
'all': Split("""
allocation.cc
bignum.cc
bignum-dtoa.cc
cached-powers.cc
conversions.cc
diy-fp.cc
dtoa.cc
fast-dtoa.cc
fixed-dtoa.cc
hashmap.cc
preparse-data.cc
preparser.cc
preparser-api.cc
scanner-base.cc
scanner.cc
strtod.cc
token.cc
unicode.cc
utils.cc
""")
"""),
'os:win32': ['win32-math.cc']
}


Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/api.cc
Expand Up @@ -44,6 +44,7 @@
#include "platform.h"
#include "profile-generator-inl.h"
#include "runtime-profiler.h"
#include "scanner-character-streams.h"
#include "serialize.h"
#include "snapshot.h"
#include "v8threads.h"
Expand Down
5 changes: 0 additions & 5 deletions deps/v8/src/ast.cc
Expand Up @@ -404,11 +404,6 @@ bool WithStatement::IsInlineable() const {
}


bool ExitContextStatement::IsInlineable() const {
return false;
}


bool SwitchStatement::IsInlineable() const {
return false;
}
Expand Down
9 changes: 0 additions & 9 deletions deps/v8/src/ast.h
Expand Up @@ -62,7 +62,6 @@ namespace internal {
V(BreakStatement) \
V(ReturnStatement) \
V(WithStatement) \
V(ExitContextStatement) \
V(SwitchStatement) \
V(DoWhileStatement) \
V(WhileStatement) \
Expand Down Expand Up @@ -681,14 +680,6 @@ class WithStatement: public Statement {
};


class ExitContextStatement: public Statement {
public:
virtual bool IsInlineable() const;

DECLARE_NODE_TYPE(ExitContextStatement)
};


class CaseClause: public ZoneObject {
public:
CaseClause(Isolate* isolate,
Expand Down
7 changes: 5 additions & 2 deletions deps/v8/src/bignum-dtoa.cc
@@ -1,4 +1,4 @@
// Copyright 2010 the V8 project authors. All rights reserved.
// Copyright 2011 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
Expand Down Expand Up @@ -27,7 +27,10 @@

#include <math.h>

#include "v8.h"
#include "../include/v8stdint.h"
#include "checks.h"
#include "utils.h"

#include "bignum-dtoa.h"

#include "bignum.h"
Expand Down
1 change: 1 addition & 0 deletions deps/v8/src/compiler.cc
Expand Up @@ -41,6 +41,7 @@
#include "parser.h"
#include "rewriter.h"
#include "runtime-profiler.h"
#include "scanner-character-streams.h"
#include "scopeinfo.h"
#include "scopes.h"
#include "vm-state-inl.h"
Expand Down
20 changes: 13 additions & 7 deletions deps/v8/src/conversions-inl.h
Expand Up @@ -32,13 +32,16 @@
#include <math.h>
#include <float.h> // Required for DBL_MAX and on Win32 for finite()
#include <stdarg.h>
#include "globals.h" // Required for V8_INFINITY

// ----------------------------------------------------------------------------
// Extra POSIX/ANSI functions for Win32/MSVC.

#include "conversions.h"
#include "strtod.h"
#include "double.h"
#include "platform.h"
#include "scanner.h"
#include "strtod.h"

namespace v8 {
namespace internal {
Expand Down Expand Up @@ -87,12 +90,15 @@ static inline double DoubleToInteger(double x) {
int32_t DoubleToInt32(double x) {
int32_t i = FastD2I(x);
if (FastI2D(i) == x) return i;
static const double two32 = 4294967296.0;
static const double two31 = 2147483648.0;
if (!isfinite(x) || x == 0) return 0;
if (x < 0 || x >= two32) x = modulo(x, two32);
x = (x >= 0) ? floor(x) : ceil(x) + two32;
return (int32_t) ((x >= two31) ? x - two32 : x);
Double d(x);
int exponent = d.Exponent();
if (exponent < 0) {
if (exponent <= -Double::kSignificandSize) return 0;
return d.Sign() * static_cast<int32_t>(d.Significand() >> -exponent);
} else {
if (exponent > 31) return 0;
return d.Sign() * static_cast<int32_t>(d.Significand() << exponent);
}
}


Expand Down
5 changes: 2 additions & 3 deletions deps/v8/src/conversions.cc
Expand Up @@ -26,19 +26,18 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include <stdarg.h>
#include <math.h>
#include <limits.h>

#include "conversions-inl.h"
#include "dtoa.h"
#include "scanner-base.h"
#include "strtod.h"
#include "utils.h"

namespace v8 {
namespace internal {



double StringToDouble(UnicodeCache* unicode_cache,
const char* str, int flags, double empty_string_val) {
const char* end = str + StrLength(str);
Expand Down Expand Up @@ -390,7 +389,7 @@ char* DoubleToRadixCString(double value, int radix) {
int integer_pos = kBufferSize - 2;
do {
integer_buffer[integer_pos--] =
chars[static_cast<int>(modulo(integer_part, radix))];
chars[static_cast<int>(fmod(integer_part, radix))];
integer_part /= radix;
} while (integer_part >= 1.0);
// Sanity check.
Expand Down
6 changes: 5 additions & 1 deletion deps/v8/src/conversions.h
Expand Up @@ -30,11 +30,13 @@

#include <limits>

#include "scanner-base.h"
#include "utils.h"

namespace v8 {
namespace internal {

class UnicodeCache;

// Maximum number of significant digits in decimal representation.
// The longest possible double in decimal representation is
// (2^53 - 1) * 2 ^ -1074 that is (2 ^ 53 - 1) * 5 ^ 1074 / 10 ^ 1074
Expand Down Expand Up @@ -125,6 +127,8 @@ double StringToDouble(UnicodeCache* unicode_cache,
int flags,
double empty_string_val = 0);

const int kDoubleToCStringMinBufferSize = 100;

// Converts a double to a string value according to ECMA-262 9.8.1.
// The buffer should be large enough for any floating point number.
// 100 characters is enough.
Expand Down

0 comments on commit a785c29

Please sign in to comment.