Permalink
Browse files

Upgrade V8 to 3.6.2

  • Loading branch information...
1 parent 0a127d6 commit a785c29aa54bb92817e9dda5d8c6914c6b186294 @piscisaureus piscisaureus committed Sep 8, 2011
Showing with 3,963 additions and 2,777 deletions.
  1. +3 −2 deps/v8/.gitignore
  2. +21 −10 deps/v8/ChangeLog
  3. +11 −1 deps/v8/Makefile
  4. +2 −1 deps/v8/SConstruct
  5. +3 −0 deps/v8/build/common.gypi
  6. +14 −4 deps/v8/src/SConscript
  7. +1 −0 deps/v8/src/api.cc
  8. +0 −5 deps/v8/src/ast.cc
  9. +0 −9 deps/v8/src/ast.h
  10. +5 −2 deps/v8/src/bignum-dtoa.cc
  11. +1 −0 deps/v8/src/compiler.cc
  12. +13 −7 deps/v8/src/conversions-inl.h
  13. +2 −3 deps/v8/src/conversions.cc
  14. +5 −1 deps/v8/src/conversions.h
  15. +21 −6 deps/v8/src/d8.cc
  16. +8 −7 deps/v8/src/d8.h
  17. +0 −1 deps/v8/src/dateparser.h
  18. +5 −2 deps/v8/src/dtoa.cc
  19. +4 −2 deps/v8/src/fast-dtoa.cc
  20. +4 −2 deps/v8/src/fixed-dtoa.cc
  21. +3 −16 deps/v8/src/full-codegen.cc
  22. +29 −0 deps/v8/src/globals.h
  23. +23 −21 deps/v8/src/heap.cc
  24. +3 −9 deps/v8/src/hydrogen.cc
  25. +0 −1 deps/v8/src/isolate.cc
  26. +274 −351 deps/v8/src/mips/full-codegen-mips.cc
  27. +3 −3 deps/v8/src/objects-debug.cc
  28. +0 −1 deps/v8/src/objects.cc
  29. +2 −6 deps/v8/src/parser.cc
  30. +1 −2 deps/v8/src/parser.h
  31. +1 −69 deps/v8/src/platform-win32.cc
  32. +17 −52 deps/v8/src/platform.h
  33. +6 −2 deps/v8/src/preparser-api.cc
  34. +229 −41 deps/v8/src/preparser.cc
  35. +102 −1 deps/v8/src/preparser.h
  36. +0 −15 deps/v8/src/prettyprinter.cc
  37. +0 −1 deps/v8/src/rewriter.cc
  38. +217 −105 deps/v8/src/runtime.cc
  39. +0 −1,090 deps/v8/src/scanner-base.cc
  40. +0 −562 deps/v8/src/scanner-base.h
  41. +328 −0 deps/v8/src/scanner-character-streams.cc
  42. +129 −0 deps/v8/src/scanner-character-streams.h
  43. +980 −216 deps/v8/src/scanner.cc
  44. +497 −62 deps/v8/src/scanner.h
  45. +17 −26 deps/v8/src/smart-pointer.h
  46. +2 −5 deps/v8/src/strtod.cc
  47. +43 −35 deps/v8/src/utils.h
  48. +0 −1 deps/v8/src/v8conversions.cc
  49. +1 −1 deps/v8/src/version.cc
  50. +106 −0 deps/v8/src/win32-math.cc
  51. +61 −0 deps/v8/src/win32-math.h
  52. +5 −5 deps/v8/test/cctest/test-parsing.cc
  53. +3 −3 deps/v8/test/cctest/test-profile-generator.cc
  54. +12 −0 deps/v8/test/cctest/test-utils.cc
  55. +5 −0 deps/v8/test/mjsunit/string-replace.js
  56. +90 −0 deps/v8/test/preparser/duplicate-parameter.pyt
  57. +162 −0 deps/v8/test/preparser/duplicate-property.pyt
  58. +2 −4 deps/v8/test/preparser/testcfg.py
  59. +56 −5 deps/v8/tools/gyp/v8.gyp
  60. +7 −1 deps/v8/tools/presubmit.py
  61. +424 −0 deps/v8/tools/push-to-trunk.sh
View
@@ -1,17 +1,18 @@
*.a
*.exe
+*.idb
*.lib
*.log
*.map
*.mk
*.ncb
+*.pdb
*.pyc
*.scons*
+*.so
*.suo
*.user
*.xcodeproj
-*.idb
-*.pdb
#*#
*~
.cpplint-cache
View
@@ -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.
@@ -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
View
@@ -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"
@@ -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))
@@ -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
View
@@ -288,6 +288,7 @@ V8_EXTRA_FLAGS = {
'gcc': {
'all': {
'WARNINGFLAGS': ['-Wall',
+ '-Werror',
'-W',
'-Wno-unused-parameter',
'-Wnon-virtual-dtor']
@@ -381,7 +382,7 @@ MKSNAPSHOT_EXTRA_FLAGS = {
DTOA_EXTRA_FLAGS = {
'gcc': {
'all': {
- 'WARNINGFLAGS': ['-Wno-uninitialized'],
+ 'WARNINGFLAGS': ['-Werror', '-Wno-uninitialized'],
'CCFLAGS': GCC_DTOA_EXTRA_CCFLAGS
}
},
@@ -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': [
@@ -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
@@ -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'
@@ -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']
}
View
@@ -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"
View
@@ -404,11 +404,6 @@ bool WithStatement::IsInlineable() const {
}
-bool ExitContextStatement::IsInlineable() const {
- return false;
-}
-
-
bool SwitchStatement::IsInlineable() const {
return false;
}
View
@@ -62,7 +62,6 @@ namespace internal {
V(BreakStatement) \
V(ReturnStatement) \
V(WithStatement) \
- V(ExitContextStatement) \
V(SwitchStatement) \
V(DoWhileStatement) \
V(WhileStatement) \
@@ -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,
@@ -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:
@@ -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"
@@ -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"
@@ -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 {
@@ -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);
+ }
}
@@ -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);
@@ -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.
@@ -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
@@ -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.
Oops, something went wrong. Retry.

0 comments on commit a785c29

Please sign in to comment.