From f4641bd4de566145e99b05c47c8f3d629b0223cd Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 23 Feb 2012 16:35:46 -0800 Subject: [PATCH] Update v8 to 3.9.9 --- deps/v8/.gitignore | 8 +- deps/v8/AUTHORS | 4 + deps/v8/ChangeLog | 55 ++ deps/v8/SConstruct | 5 +- deps/v8/benchmarks/base.js | 4 +- deps/v8/benchmarks/navier-stokes.js | 387 ++++++++++ deps/v8/benchmarks/run.html | 2 + deps/v8/benchmarks/run.js | 1 + deps/v8/build/common.gypi | 6 +- deps/v8/build/standalone.gypi | 3 +- deps/v8/include/v8.h | 4 +- deps/v8/preparser/preparser-process.cc | 14 +- deps/v8/src/api.cc | 4 + deps/v8/src/apinatives.js | 4 +- deps/v8/src/arm/builtins-arm.cc | 35 +- deps/v8/src/arm/code-stubs-arm.cc | 44 +- deps/v8/src/arm/codegen-arm.cc | 55 +- deps/v8/src/arm/full-codegen-arm.cc | 69 +- deps/v8/src/arm/lithium-arm.cc | 46 +- deps/v8/src/arm/lithium-arm.h | 93 ++- deps/v8/src/arm/lithium-codegen-arm.cc | 163 ++++- deps/v8/src/arm/macro-assembler-arm.cc | 66 +- deps/v8/src/arm/macro-assembler-arm.h | 8 +- deps/v8/src/arm/simulator-arm.cc | 4 +- deps/v8/src/arm/stub-cache-arm.cc | 190 ++++- deps/v8/src/array.js | 66 +- deps/v8/src/ast.cc | 22 +- deps/v8/src/ast.h | 72 +- deps/v8/src/bootstrapper.cc | 163 ++--- deps/v8/src/builtins.cc | 12 +- deps/v8/src/char-predicates.h | 2 + deps/v8/src/code-stubs.cc | 15 +- deps/v8/src/code-stubs.h | 54 +- deps/v8/src/collection.js | 7 +- deps/v8/src/compiler.cc | 36 +- deps/v8/src/compiler.h | 12 +- deps/v8/src/contexts.h | 4 + deps/v8/src/d8.js | 24 +- deps/v8/src/data-flow.h | 10 +- deps/v8/src/date.js | 5 +- deps/v8/src/debug-debugger.js | 6 +- deps/v8/src/deoptimizer.h | 4 - deps/v8/src/elements.cc | 158 ++-- deps/v8/src/execution.cc | 7 +- deps/v8/src/factory.cc | 15 +- deps/v8/src/factory.h | 2 + deps/v8/src/flag-definitions.h | 27 +- deps/v8/src/full-codegen.cc | 22 +- deps/v8/src/full-codegen.h | 46 +- deps/v8/src/globals.h | 7 +- deps/v8/src/handles.cc | 39 +- deps/v8/src/heap.cc | 63 +- deps/v8/src/heap.h | 15 +- deps/v8/src/hydrogen-instructions.cc | 76 +- deps/v8/src/hydrogen-instructions.h | 286 ++++++-- deps/v8/src/hydrogen.cc | 465 +++++++++--- deps/v8/src/hydrogen.h | 21 +- deps/v8/src/ia32/assembler-ia32.cc | 18 +- deps/v8/src/ia32/builtins-ia32.cc | 42 +- deps/v8/src/ia32/code-stubs-ia32.cc | 39 +- deps/v8/src/ia32/codegen-ia32.cc | 49 +- deps/v8/src/ia32/deoptimizer-ia32.cc | 41 +- deps/v8/src/ia32/full-codegen-ia32.cc | 189 ++--- deps/v8/src/ia32/ic-ia32.cc | 6 + deps/v8/src/ia32/lithium-codegen-ia32.cc | 165 ++++- deps/v8/src/ia32/lithium-ia32.cc | 48 +- deps/v8/src/ia32/lithium-ia32.h | 104 ++- deps/v8/src/ia32/macro-assembler-ia32.cc | 57 +- deps/v8/src/ia32/macro-assembler-ia32.h | 9 +- deps/v8/src/ia32/stub-cache-ia32.cc | 201 ++++- deps/v8/src/ic-inl.h | 7 +- deps/v8/src/ic.cc | 199 +++-- deps/v8/src/ic.h | 82 ++- deps/v8/src/isolate.cc | 10 +- deps/v8/src/isolate.h | 2 - deps/v8/src/jsregexp.cc | 30 +- deps/v8/src/lithium-allocator.cc | 119 +-- deps/v8/src/lithium-allocator.h | 46 +- deps/v8/src/lithium.h | 5 +- deps/v8/src/macro-assembler.h | 7 - deps/v8/src/mark-compact.cc | 14 +- deps/v8/src/math.js | 8 +- deps/v8/src/messages.js | 27 +- deps/v8/src/mips/builtins-mips.cc | 39 +- deps/v8/src/mips/code-stubs-mips.cc | 60 +- deps/v8/src/mips/codegen-mips.cc | 56 +- deps/v8/src/mips/deoptimizer-mips.cc | 48 +- deps/v8/src/mips/full-codegen-mips.cc | 50 +- deps/v8/src/mips/lithium-codegen-mips.cc | 82 ++- deps/v8/src/mips/lithium-mips.cc | 18 +- deps/v8/src/mips/lithium-mips.h | 30 +- deps/v8/src/mips/macro-assembler-mips.cc | 20 +- deps/v8/src/mips/macro-assembler-mips.h | 4 +- deps/v8/src/mips/simulator-mips.cc | 4 +- deps/v8/src/mips/stub-cache-mips.cc | 192 ++++- deps/v8/src/mirror-debugger.js | 84 +-- deps/v8/src/objects-debug.cc | 13 +- deps/v8/src/objects-inl.h | 40 +- deps/v8/src/objects-printer.cc | 9 + deps/v8/src/objects-visiting-inl.h | 4 +- deps/v8/src/objects.cc | 433 ++++++----- deps/v8/src/objects.h | 278 ++++--- deps/v8/src/parser.cc | 271 +++++-- deps/v8/src/parser.h | 14 +- deps/v8/src/platform-cygwin.cc | 17 +- deps/v8/src/platform-win32.cc | 94 ++- deps/v8/src/prettyprinter.cc | 4 +- deps/v8/src/profile-generator.cc | 261 ++++--- deps/v8/src/profile-generator.h | 6 +- deps/v8/src/proxy.js | 2 + deps/v8/src/regexp.js | 118 +-- deps/v8/src/runtime-profiler.cc | 78 +- deps/v8/src/runtime-profiler.h | 4 +- deps/v8/src/runtime.cc | 688 +++++++++--------- deps/v8/src/runtime.h | 6 +- deps/v8/src/runtime.js | 20 +- deps/v8/src/scopes.cc | 1 + deps/v8/src/scopes.h | 1 + deps/v8/src/string.js | 11 +- deps/v8/src/stub-cache.cc | 27 +- deps/v8/src/stub-cache.h | 17 +- deps/v8/src/type-info.cc | 21 +- deps/v8/src/uri.js | 14 +- deps/v8/src/v8globals.h | 1 + deps/v8/src/v8natives.js | 18 +- deps/v8/src/version.cc | 2 +- deps/v8/src/win32-headers.h | 6 +- deps/v8/src/x64/assembler-x64.cc | 22 +- deps/v8/src/x64/assembler-x64.h | 4 +- deps/v8/src/x64/builtins-x64.cc | 39 +- deps/v8/src/x64/code-stubs-x64.cc | 41 +- deps/v8/src/x64/codegen-x64.cc | 54 +- deps/v8/src/x64/cpu-x64.cc | 4 +- deps/v8/src/x64/full-codegen-x64.cc | 67 +- deps/v8/src/x64/lithium-codegen-x64.cc | 191 ++++- deps/v8/src/x64/lithium-gap-resolver-x64.cc | 5 +- deps/v8/src/x64/lithium-x64.cc | 46 +- deps/v8/src/x64/lithium-x64.h | 92 ++- deps/v8/src/x64/macro-assembler-x64.cc | 72 +- deps/v8/src/x64/macro-assembler-x64.h | 11 +- deps/v8/src/x64/stub-cache-x64.cc | 187 ++++- deps/v8/src/zone-inl.h | 12 - deps/v8/src/zone.h | 9 - deps/v8/test/cctest/test-api.cc | 106 +-- deps/v8/test/cctest/test-dataflow.cc | 31 +- deps/v8/test/cctest/test-debug.cc | 26 +- deps/v8/test/cctest/test-deoptimization.cc | 132 ++-- deps/v8/test/cctest/test-heap-profiler.cc | 37 + deps/v8/test/cctest/test-heap.cc | 29 - deps/v8/test/cctest/test-regexp.cc | 1 + deps/v8/test/mjsunit/array-store-and-grow.js | 183 +++++ deps/v8/test/mjsunit/builtins.js | 5 +- .../test/mjsunit/compiler/inline-literals.js | 50 ++ .../mjsunit/compiler/literals-optimized.js | 121 +++ .../test/mjsunit/compiler/optimized-for-in.js | 298 ++++++++ deps/v8/test/mjsunit/count-based-osr.js | 38 + deps/v8/test/mjsunit/elements-kind.js | 2 + .../mjsunit/elements-transition-hoisting.js | 45 +- deps/v8/test/mjsunit/external-array.js | 34 + .../test/mjsunit/harmony/block-conflicts.js | 2 +- .../v8/test/mjsunit/harmony/module-parsing.js | 80 ++ deps/v8/test/mjsunit/math-min-max.js | 8 + .../test/mjsunit/object-prevent-extensions.js | 12 + deps/v8/test/mjsunit/regexp.js | 11 + .../v8/test/mjsunit/regress/regress-113924.js | 31 + deps/v8/test/mjsunit/regress/regress-1790.js | 58 ++ deps/v8/test/mjsunit/regress/regress-1878.js | 16 +- deps/v8/test/mjsunit/regress/regress-1945.js | 34 + ...gress-inlining-function-literal-context.js | 53 ++ deps/v8/test/mjsunit/tools/tickprocessor.js | 7 +- deps/v8/test/mozilla/mozilla.status | 4 + deps/v8/test/sputnik/sputnik.status | 8 +- deps/v8/test/test262/README | 4 +- deps/v8/test/test262/test262.status | 110 --- deps/v8/tools/disasm.py | 3 +- deps/v8/tools/gcmole/gcmole.cc | 29 + deps/v8/tools/gcmole/gcmole.lua | 9 +- deps/v8/tools/tickprocessor-driver.js | 1 + deps/v8/tools/tickprocessor.js | 14 +- 179 files changed, 7422 insertions(+), 2793 deletions(-) create mode 100644 deps/v8/benchmarks/navier-stokes.js create mode 100644 deps/v8/test/mjsunit/array-store-and-grow.js create mode 100644 deps/v8/test/mjsunit/compiler/inline-literals.js create mode 100644 deps/v8/test/mjsunit/compiler/literals-optimized.js create mode 100644 deps/v8/test/mjsunit/compiler/optimized-for-in.js create mode 100644 deps/v8/test/mjsunit/count-based-osr.js create mode 100644 deps/v8/test/mjsunit/harmony/module-parsing.js create mode 100644 deps/v8/test/mjsunit/regress/regress-113924.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1790.js create mode 100644 deps/v8/test/mjsunit/regress/regress-1945.js create mode 100644 deps/v8/test/mjsunit/regress/regress-inlining-function-literal-context.js diff --git a/deps/v8/.gitignore b/deps/v8/.gitignore index b61faef74c..088daeabf9 100644 --- a/deps/v8/.gitignore +++ b/deps/v8/.gitignore @@ -23,10 +23,10 @@ shell_g /build/gyp /obj/ /out/ -/test/es5conform/data/ -/test/mozilla/data/ -/test/sputnik/sputniktests/ -/test/test262/data/ +/test/es5conform/data +/test/mozilla/data +/test/sputnik/sputniktests +/test/test262/data /tools/oom_dump/oom_dump /tools/oom_dump/oom_dump.o /tools/visual_studio/Debug diff --git a/deps/v8/AUTHORS b/deps/v8/AUTHORS index 1ff5ff604d..869be2b74b 100644 --- a/deps/v8/AUTHORS +++ b/deps/v8/AUTHORS @@ -23,14 +23,18 @@ Daniel James Dineel D Sule Erich Ocean Fedor Indutny +Ioseb Dzmanashvili Jan de Mooij Jay Freeman Joel Stanley John Jozwiak +Jonathan Liu Kun Zhang Martyn Capewell +Mathias Bynens Matt Hanselman Maxim Mossienko +Michael Lutz Michael Smith Mike Gilbert Paolo Giarrusso diff --git a/deps/v8/ChangeLog b/deps/v8/ChangeLog index 482cca8946..b299d99b09 100644 --- a/deps/v8/ChangeLog +++ b/deps/v8/ChangeLog @@ -1,3 +1,58 @@ +2012-02-23: Version 3.9.9 + + Supported fast case for-in in Crankshaft. + + Sped up heap snapshot serialization and dominators construction. + + Randomized allocation addresses on windows. (Chromium issue 115151) + + Fixed compilation with MinGW-w64. (issue 1943) + + Fixed incorrect value of assignments to non-extensible properties. + + Fixed a crash bug in generated code on ia32. + + Performance and stability improvements on all platforms. + + +2012-02-21: Version 3.9.8 + + Fixed memory leak and missing #include in StartupDataDecompressor + (issue 1960). + + Renamed static methods to avoid shadowing virtual methods and fix Clang + C++11 compile error. + + Fixed sequence of element access in array builtins (issue 1790). + + Performance and stability improvements on all platforms. + + +2012-02-16: Version 3.9.7 + + Fixed V8 issues 1322, 1878, 1942, 1945 and Chromium issue 113924. + + Fixed GCC-4.7 warnings. + + Added Navier-Stokes benchmark. + + Performance and stability improvements on all platforms. + + +2012-02-14: Version 3.9.6 + + Fix template-related linker error. (issue 1936) + + Allow inlining of functions containing object literals. (issue 1322) + + Add --call-graph-size option to tickprocessor. (issue 1937) + + Heap Snapshot maximum size limit is too low for really big apps. At the + moment the limit is 256MB. (Chromium issue 113015) + + Performance and stability improvements on all platforms. + + 2012-02-09: Version 3.9.5 Removed unused command line flags. diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct index d4eaebef8d..84863e38ca 100644 --- a/deps/v8/SConstruct +++ b/deps/v8/SConstruct @@ -1,4 +1,4 @@ -# Copyright 2011 the V8 project authors. All rights reserved. +# Copyright 2012 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: @@ -296,10 +296,11 @@ V8_EXTRA_FLAGS = { '-Werror', '-W', '-Wno-unused-parameter', + '-Woverloaded-virtual', '-Wnon-virtual-dtor'] }, 'os:win32': { - 'WARNINGFLAGS': ['-pedantic', '-Wno-long-long'] + 'WARNINGFLAGS': ['-pedantic', '-Wno-long-long', '-Wno-pedantic-ms-format'] }, 'os:linux': { 'WARNINGFLAGS': ['-pedantic'], diff --git a/deps/v8/benchmarks/base.js b/deps/v8/benchmarks/base.js index ffabf24dda..62c37e1208 100644 --- a/deps/v8/benchmarks/base.js +++ b/deps/v8/benchmarks/base.js @@ -1,4 +1,4 @@ -// Copyright 2008 the V8 project authors. All rights reserved. +// Copyright 2012 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: @@ -78,7 +78,7 @@ BenchmarkSuite.suites = []; // Scores are not comparable across versions. Bump the version if // you're making changes that will affect that scores, e.g. if you add // a new benchmark or change an existing one. -BenchmarkSuite.version = '6'; +BenchmarkSuite.version = '7'; // To make the benchmark results predictable, we replace Math.random diff --git a/deps/v8/benchmarks/navier-stokes.js b/deps/v8/benchmarks/navier-stokes.js new file mode 100644 index 0000000000..b0dc3c8645 --- /dev/null +++ b/deps/v8/benchmarks/navier-stokes.js @@ -0,0 +1,387 @@ +/** + * Copyright 2012 the V8 project authors. All rights reserved. + * Copyright 2009 Oliver Hunt + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +var NavierStokes = new BenchmarkSuite('NavierStokes', 1484000, + [new Benchmark('NavierStokes', + runNavierStokes, + setupNavierStokes, + tearDownNavierStokes)]); + +var solver = null; + +function runNavierStokes() +{ + solver.update(); +} + +function setupNavierStokes() +{ + solver = new FluidField(null); + solver.setResolution(128, 128); + solver.setIterations(20); + solver.setDisplayFunction(function(){}); + solver.setUICallback(prepareFrame); + solver.reset(); +} + +function tearDownNavierStokes() +{ + solver = null; +} + +function addPoints(field) { + var n = 64; + for (var i = 1; i <= n; i++) { + field.setVelocity(i, i, n, n); + field.setDensity(i, i, 5); + field.setVelocity(i, n - i, -n, -n); + field.setDensity(i, n - i, 20); + field.setVelocity(128 - i, n + i, -n, -n); + field.setDensity(128 - i, n + i, 30); + } +} + +var framesTillAddingPoints = 0; +var framesBetweenAddingPoints = 5; + +function prepareFrame(field) +{ + if (framesTillAddingPoints == 0) { + addPoints(field); + framesTillAddingPoints = framesBetweenAddingPoints; + framesBetweenAddingPoints++; + } else { + framesTillAddingPoints--; + } +} + +// Code from Oliver Hunt (http://nerget.com/fluidSim/pressure.js) starts here. +function FluidField(canvas) { + function addFields(x, s, dt) + { + for (var i=0; i Wp5) + x = Wp5; + var i0 = x | 0; + var i1 = i0 + 1; + if (y < 0.5) + y = 0.5; + else if (y > Hp5) + y = Hp5; + var j0 = y | 0; + var j1 = j0 + 1; + var s1 = x - i0; + var s0 = 1 - s1; + var t1 = y - j0; + var t0 = 1 - t1; + var row1 = j0 * rowSize; + var row2 = j1 * rowSize; + d[pos] = s0 * (t0 * d0[i0 + row1] + t1 * d0[i0 + row2]) + s1 * (t0 * d0[i1 + row1] + t1 * d0[i1 + row2]); + } + } + set_bnd(b, d); + } + + function project(u, v, p, div) + { + var h = -0.5 / Math.sqrt(width * height); + for (var j = 1 ; j <= height; j++ ) { + var row = j * rowSize; + var previousRow = (j - 1) * rowSize; + var prevValue = row - 1; + var currentRow = row; + var nextValue = row + 1; + var nextRow = (j + 1) * rowSize; + for (var i = 1; i <= width; i++ ) { + div[++currentRow] = h * (u[++nextValue] - u[++prevValue] + v[++nextRow] - v[++previousRow]); + p[currentRow] = 0; + } + } + set_bnd(0, div); + set_bnd(0, p); + + lin_solve(0, p, div, 1, 4 ); + var wScale = 0.5 * width; + var hScale = 0.5 * height; + for (var j = 1; j<= height; j++ ) { + var prevPos = j * rowSize - 1; + var currentPos = j * rowSize; + var nextPos = j * rowSize + 1; + var prevRow = (j - 1) * rowSize; + var currentRow = j * rowSize; + var nextRow = (j + 1) * rowSize; + + for (var i = 1; i<= width; i++) { + u[++currentPos] -= wScale * (p[++nextPos] - p[++prevPos]); + v[currentPos] -= hScale * (p[++nextRow] - p[++prevRow]); + } + } + set_bnd(1, u); + set_bnd(2, v); + } + + function dens_step(x, x0, u, v, dt) + { + addFields(x, x0, dt); + diffuse(0, x0, x, dt ); + advect(0, x, x0, u, v, dt ); + } + + function vel_step(u, v, u0, v0, dt) + { + addFields(u, u0, dt ); + addFields(v, v0, dt ); + var temp = u0; u0 = u; u = temp; + var temp = v0; v0 = v; v = temp; + diffuse2(u,u0,v,v0, dt); + project(u, v, u0, v0); + var temp = u0; u0 = u; u = temp; + var temp = v0; v0 = v; v = temp; + advect(1, u, u0, u0, v0, dt); + advect(2, v, v0, u0, v0, dt); + project(u, v, u0, v0 ); + } + var uiCallback = function(d,u,v) {}; + + function Field(dens, u, v) { + // Just exposing the fields here rather than using accessors is a measurable win during display (maybe 5%) + // but makes the code ugly. + this.setDensity = function(x, y, d) { + dens[(x + 1) + (y + 1) * rowSize] = d; + } + this.getDensity = function(x, y) { + return dens[(x + 1) + (y + 1) * rowSize]; + } + this.setVelocity = function(x, y, xv, yv) { + u[(x + 1) + (y + 1) * rowSize] = xv; + v[(x + 1) + (y + 1) * rowSize] = yv; + } + this.getXVelocity = function(x, y) { + return u[(x + 1) + (y + 1) * rowSize]; + } + this.getYVelocity = function(x, y) { + return v[(x + 1) + (y + 1) * rowSize]; + } + this.width = function() { return width; } + this.height = function() { return height; } + } + function queryUI(d, u, v) + { + for (var i = 0; i < size; i++) + u[i] = v[i] = d[i] = 0.0; + uiCallback(new Field(d, u, v)); + } + + this.update = function () { + queryUI(dens_prev, u_prev, v_prev); + vel_step(u, v, u_prev, v_prev, dt); + dens_step(dens, dens_prev, u, v, dt); + displayFunc(new Field(dens, u, v)); + } + this.setDisplayFunction = function(func) { + displayFunc = func; + } + + this.iterations = function() { return iterations; } + this.setIterations = function(iters) { + if (iters > 0 && iters <= 100) + iterations = iters; + } + this.setUICallback = function(callback) { + uiCallback = callback; + } + var iterations = 10; + var visc = 0.5; + var dt = 0.1; + var dens; + var dens_prev; + var u; + var u_prev; + var v; + var v_prev; + var width; + var height; + var rowSize; + var size; + var displayFunc; + function reset() + { + rowSize = width + 2; + size = (width+2)*(height+2); + dens = new Array(size); + dens_prev = new Array(size); + u = new Array(size); + u_prev = new Array(size); + v = new Array(size); + v_prev = new Array(size); + for (var i = 0; i < size; i++) + dens_prev[i] = u_prev[i] = v_prev[i] = dens[i] = u[i] = v[i] = 0; + } + this.reset = reset; + this.setResolution = function (hRes, wRes) + { + var res = wRes * hRes; + if (res > 0 && res < 1000000 && (wRes != width || hRes != height)) { + width = wRes; + height = hRes; + reset(); + return true; + } + return false; + } + this.setResolution(64, 64); +} diff --git a/deps/v8/benchmarks/run.html b/deps/v8/benchmarks/run.html index 36d2ad511b..8786d1fb0c 100644 --- a/deps/v8/benchmarks/run.html +++ b/deps/v8/benchmarks/run.html @@ -14,6 +14,7 @@ +