Commit Graph

9189 Commits

Author SHA1 Message Date
sanjoy@chromium.org
9e4fbb45c1 One Zone per CompilationInfo.
The CompilationInfo record now saves a Zone, and the compiler pipeline
allocates memory from the Zone in the CompilationInfo.  Before
compiling a function, we create a Zone on the stack and save a pointer
to that Zone to the CompilationInfo; which then gets picked up and
allocated from.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10534139

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-20 08:58:41 +00:00
erik.corry@gmail.com
000519013f Remove unused variable in mksnapshot.cc.
Review URL: https://chromiumcodereview.appspot.com/10559078

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-20 08:14:31 +00:00
erikcorry
f4f9e2c1e0 Quicksort: Choose pivot with recursive sort of pivot candidates on large arrays to avoid patholgical cases.
Review URL: http://codereview.chromium.org/10532193

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-20 07:52:47 +00:00
erikcorry
f96f439150 Add missing cast to make MSVC happier.
Review URL: http://codereview.chromium.org/10592003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 19:37:33 +00:00
erikcorry
458e87fd05 Snapshots: Add --extra-code flag to mksnapshot which lets you specify a file
with more JS code that is loaded into the VM before writing the snapshot.  Get
rid of the hard coded limit on the partial snapshot cache size.  This change
disables most of the serializer tests for the snapshot build of the VM: It's
getting too complicated to support both booting from a snapshot and then
creating a new snapshot from the same VM or loading more code with another
snapshot in the same VM.
Review URL: http://codereview.chromium.org/10574013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11871 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 18:38:03 +00:00
mstarzinger@chromium.org
edc231e2a9 Fix return values for Harmony map and set operations.
R=rossberg@chromium.org
BUG=chromium:132741,chromium:132742
TEST=mjsunit/harmony/collections

Review URL: https://chromiumcodereview.appspot.com/10573011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11869 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 15:23:03 +00:00
mstarzinger@chromium.org
a760b82cab Enable lazy compilation for non-trivial outer contexts.
This changes the compiler to be more aggressive about lazy compilation
of closures with non-trivial outer context. Compilation can only be
triggered with a valid outer context now. One exception is the debugger,
which can request compilation of arbitrary shared code, but it ensures
to trigger compilation only at points where no context is needed.

This relands r11782, r11783, r11790 and a minor fix.

R=ulan@chromium.org
TEST=mjsunit/debug-script-breakpoints-nested

Review URL: https://chromiumcodereview.appspot.com/10543141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 14:29:48 +00:00
jkummerow@chromium.org
a40f7b516e Add msvs_configuration_platform to common.gypi to allow x64 builds on Windows
Review URL: https://chromiumcodereview.appspot.com/10573008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11865 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 14:20:29 +00:00
jkummerow@chromium.org
b7700fb3cc Fix a bunch of implicit casts detected by the Win64 compiler
Review URL: https://chromiumcodereview.appspot.com/10536202

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 13:45:30 +00:00
rossberg@chromium.org
3e6b01df18 Fix crash bug in Hydrogen occurring with empty prototype chain.
(Thanks for diagnosing this.)

R=vegorov@chromium.org
BUG=115100
TEST=

Review URL: https://chromiumcodereview.appspot.com/10576013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 13:44:07 +00:00
verwaest@chromium.org
30b335157f Fixing ClearNonLiveTransition bug in combination with AccessorPairs.
BUG=133211
TEST=test/mjsunit/regress/regress-133211b.js

Review URL: https://chromiumcodereview.appspot.com/10575018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 13:16:39 +00:00
mstarzinger@chromium.org
4f6e72ce29 Fix check in r11850 for nosse2 and novfp3 machines.
R=ulan@chromium.org
TEST=cctest/test-compiler/OptimizedCodeSharing

Review URL: https://chromiumcodereview.appspot.com/10573007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 12:54:24 +00:00
vegorov@chromium.org
22b3bf5867 Teach grokdump to print oddball kind when ToString content is not available
R=danno@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10559063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 11:41:50 +00:00
yangguo@chromium.org
0a60da717b Correctly resolve local var shadowing a context-allocated var in debugger.
R=ulan@chromium.org
BUG=131994
TEST=regress/regress-131994.js

Review URL: https://chromiumcodereview.appspot.com/10585002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 11:25:49 +00:00
verwaest@chromium.org
8b7b7f466f Make sure we don't leak map transitions from AccessorPairs to the Javascript world.
BUG=133211
TEST=test/mjsunit/regress/regress-133211.js

Review URL: https://chromiumcodereview.appspot.com/10559062

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-19 10:58:15 +00:00
mstarzinger@chromium.org
928a1bff32 Fix handling of numbers in SameValue method.
R=vegorov@chromium.org
BUG=v8:2186
TEST=mjsunit/regress/regress-2186

Review URL: https://chromiumcodereview.appspot.com/10532198

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 14:21:29 +00:00
yangguo@chromium.org
fa48ccde25 Print correct line number for Error thrown inside eval.
R=rossberg@chromium.org
BUG=v8:1914
TEST=eval-stack-trace.js

Review URL: https://chromiumcodereview.appspot.com/10565002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 13:39:24 +00:00
mstarzinger@chromium.org
b1fe586e6b Fix optimized code caching in FastNewClosureStub.
This fixes a corner-case on ARM and MIPS where optimized code was not
shared immediately across closures when a function was used in several
global contexts at once.

R=ulan@chromium.org
TEST=cctest/test-compiler/OptimizedCodeSharing

Review URL: https://chromiumcodereview.appspot.com/10544205

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 13:26:43 +00:00
mmassi@chromium.org
f6b5dc6628 Remove default from switch.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10555026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 12:56:49 +00:00
mstarzinger@chromium.org
b2f9dc54ed MIPS: Share optimized code for closures.
Port r11817 (616dfcf0)

Original commit message:
Each SharedFunctionInfo gets an optimized code map to store
one optimized code object per context. When allocating a new
closure we consult this map and check if there is optimized code
that can be shared.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10557002
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 12:54:10 +00:00
sanjoy@chromium.org
663a6bb594 Fix MSVC warnings about missing operator delete.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10556038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 12:48:21 +00:00
verwaest@chromium.org
6568d73d97 Removing superfluous IsSmi check from DescriptorArray::IsEmpty.
DescriptorArray::IsEmpty is never called with a Smi.

Review URL: https://chromiumcodereview.appspot.com/10555024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11846 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 12:42:46 +00:00
mmassi@chromium.org
8367ca9980 Reimplemented HGraph::Postorder and HGraph::PostorderLoopBlocks iteratively to avoid stack overflows.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10543138

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11843 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 11:59:02 +00:00
verwaest@chromium.org
8aca22b1ef Implementing weak referencing elements transition maps.
Review URL: https://chromiumcodereview.appspot.com/10559032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 11:43:09 +00:00
verwaest@chromium.org
49ad5bdf5d Fixing bugs in promotion of elements transitions (r1175).
- Fixed invalid memory access when reading enum-cache from descriptor array with elements transitions but 0 real descriptors.
- Fixed infinite recursion in the intrusive map iterator when visiting elements transitions.
- Properly cached non-fastmode elements transitions.

Review URL: https://chromiumcodereview.appspot.com/10565030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 11:16:02 +00:00
danno@chromium.org
cbcf674db1 MIPS: Fix packed-element.js test on ARM with no snap
Port r11826 (5be3568a)

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10559002
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 10:51:23 +00:00
erikcorry
45c4cd26be Avoid arbitrarily deep recursion in Array.sort.
BUG=v8:2185
Review URL: http://codereview.chromium.org/10561017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 09:23:05 +00:00
jkummerow@chromium.org
635382e16e Remove unused-but-set variable from objects.cc.
This fixes compilation with newer GCCs.

R=erik.corry@gmail.com

Review URL: https://chromiumcodereview.appspot.com/10568006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-18 08:28:32 +00:00
peter.rybin@gmail.com
a2e9f7c46b Fix for Issue 915
Review URL: https://chromiumcodereview.appspot.com/10332101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11837 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-16 21:40:35 +00:00
peter.rybin@gmail.com
bdfc48a3fd Support 'restart call frame' debug command
Review URL: https://chromiumcodereview.appspot.com/10544151

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11836 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 16:52:03 +00:00
ulan@chromium.org
b072e6156b Unify promotion and allocation limit computation.
BUG=129628
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10552002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 13:48:54 +00:00
mstarzinger@chromium.org
dd21ee801b Fix external exceptions in external try-catch handlers.
This tries to propagate exceptions which are externally thrown into
external try-catch handlers before scheduling them. This also allows
embedders to nest external try-catch handlers.

R=rossberg@chromium.org
BUG=v8:2166
TEST=cctest/test-api/TryCatchNested

Review URL: https://chromiumcodereview.appspot.com/10555004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 13:34:39 +00:00
erik.corry@gmail.com
045b2fbf20 Revert part of 11727 as it sometimes tanked V8 benchmark (raytrace) performance
for reasons that are not obvious.  Now we make objects into fast-case objects
when they are made prototypes for other objects, but we do not mark objects
that are already fast case with a bit that helps keep them in fast case.
Review URL: https://chromiumcodereview.appspot.com/10556004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 11:53:09 +00:00
mstarzinger@chromium.org
3a739a1cb6 Fix list traversal of optimized functions in deoptimizer.
R=fschneider@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10546179

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 10:36:45 +00:00
danno@chromium.org
d03c2374bd Fix packed-element.js test on ARM with no snap
R=mstarzinger@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10546171

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-15 09:15:57 +00:00
yangguo@chromium.org
a075583479 Unbreak interpreted regexp.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10535164

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 17:06:16 +00:00
danno@chromium.org
dee723df12 Reset the path tracer completely, and check whether an object has source code before trying to print
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/9749008
Patch from Jochen Eisigner <jochen@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 15:33:15 +00:00
yangguo@chromium.org
c0d2fe256b Check for valid PC when stepping in the ARM sim debugger.
BUG=v8:2134
TEST=

Review URL: https://chromiumcodereview.appspot.com/10546169

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 15:04:27 +00:00
rossberg@chromium.org
8da87d2308 ES5.2 var semantics: take hidden prototypes into account.
R=mstarzinger@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10546166

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 14:37:10 +00:00
fschneider@chromium.org
bb0a2ea766 Share optimized code for closures.
Each SharedFunctionInfo gets an optimized code map to store
one optimized code object per context. When allocating a new
closure we consult this map and check if there is optimized code
that can be shared.

This patch is based on an original patch
by Anton Muhin (http://codereview.chromium.org/6793013/).

BUG=v8:2087, v8:2094
TEST=test/mjsunit/compiler/optimized-closures.js
Review URL: https://chromiumcodereview.appspot.com/10103035

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 14:06:22 +00:00
yangguo@chromium.org
675d9b8a04 Add missing string length check in regexp engine.
R=erik.corry@gmail.com
BUG=v8:2172
TEST=regress-2172.js

Review URL: https://chromiumcodereview.appspot.com/10536170

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 13:59:48 +00:00
mstarzinger@chromium.org
90c2448be6 Fix assertion for map code cache of shared maps.
R=danno@chromium.org
TEST=mjsunit/compare-known-objects-slow

Review URL: https://chromiumcodereview.appspot.com/10548046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 13:54:23 +00:00
danno@chromium.org
3515559a38 Increase old space in cctest/test-api/HugeConsStringOutOfMemory test.
This test is failing on MIPS since r11715 (a7d6f92c),
it seems that after the modifications in bootstrapper.cc,
this test runs out of old generation space on MIPS.

TEST=cctest/test-api/HugeConsStringOutOfMemory

BUG=

Review URL: https://chromiumcodereview.appspot.com/10533148
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 13:52:58 +00:00
loislo@chromium.org
1a86ed8c30 Workaround for: Chrome dev tools crashes when taking a heap snapshot of Docs offline shared worker.
BUG=132727
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10543160

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 12:21:05 +00:00
yangguo@chromium.org
fb81da2e5f ARM: Fix literal pool handling for breakpoints in debugger.
BUG=2177
TEST=none

Review URL: https://chromiumcodereview.appspot.com/10449047
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 11:16:47 +00:00
danno@chromium.org
a3b9d6f39b Fix Kraken regression due to optimistic monomorphic element transitions
R=jkummerow@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10539141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 08:57:34 +00:00
yangguo@chromium.org
bda964340b Fix lint.
R=ulan@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10546163

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 08:42:40 +00:00
yangguo@chromium.org
3a616628d8 Introduce regexp=interpreted to GYP to enable building with interpreted regexp engine.
This option existis for scons. It does not compile yet since there are some broken stuff yet to be fixed.

R=jkummerow@chromium.org
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10544138

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-14 08:01:05 +00:00
yangguo@chromium.org
9978fae61d Ensure removing processed command line arguments.
BUG="d8 --crankshaft --expose-debug-as" crashes
TEST=test-flags/FlagsRemoveIncomplete

Review URL: https://chromiumcodereview.appspot.com/10534137

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-13 15:02:05 +00:00
yangguo@chromium.org
ce6aa5c251 Remove faster ticks for debug mode.
This solves the problem that code runs very slow when the debugger is enabled.

BUG=v8:2179
TEST=

Review URL: https://chromiumcodereview.appspot.com/10544135

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-06-13 14:07:50 +00:00