Commit Graph

7290 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
190d8d671d Cleanup and enable GrowAndShrinkNewSpace test case.
R=svenpanne@chromium.org
BUG=v8:1707
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7995004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 14:50:20 +00:00
ricow@chromium.org
c23f9867e7 Don't take heap snapshot when doing Heap::RecordStats from OOM cases.
Filled issue 1718 to track this.
Review URL: http://codereview.chromium.org/7995003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 14:43:23 +00:00
rossberg@chromium.org
d938560d59 Implement identity hashes for proxies.
R=mstarzinger@chromium.org
BUG=v8:1543,v8:1565
TEST=

Review URL: http://codereview.chromium.org/7754015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:54:53 +00:00
fschneider@chromium.org
fd71ed8d36 Temporarily mark a test as timing out until the problem is found.
Review URL: http://codereview.chromium.org/7989003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:19:19 +00:00
mstarzinger@chromium.org
873e4980db Fix transferal of marking bits on array trimming.
R=vegorov@chromium.org
BUG=v8:1708
TEST=mjsunit/regress/regress-1708

Review URL: http://codereview.chromium.org/7979038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9394 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 13:03:22 +00:00
fschneider@chromium.org
c6a3422c04 Give each function prototype a fresh copy of the object function map.
This avoid unwanted sharing between different function prototypes and in
general should help inlining because constant function properties on one
prototype don't affect other prototypes anymore.

BUG=v8:1716
Review URL: http://codereview.chromium.org/7994001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 12:57:54 +00:00
danno@chromium.org
f48c9f6557 Basic support for tracking smi-only arrays on ia32.
Activated by the flag --smi-only-arrays

Currently not crankshaft support, using flag on non-ia32 platforms will lead to write barrier misses and crashes.

BUG=none
TEST=elements_kind.js

Review URL: http://codereview.chromium.org/7901016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 11:30:04 +00:00
rossberg@chromium.org
e04d0b23a8 Make integer indexed properties ("elements") work for proxies.
Rehome some Object/JSReceiver/JSObject methods.

R=ricow@chromium.org,kmillikin@chromium.org
BUG=v8:1543
TEST=

Review URL: http://codereview.chromium.org/7795055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 10:45:37 +00:00
fschneider@chromium.org
35cb252a86 Attempt to fix GCMole warning.
Review URL: http://codereview.chromium.org/7980064

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9372 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 09:15:43 +00:00
yangguo@chromium.org
b7cac76bae Fixed string.split: always convert non-regexp separator to string.
BUG=v8:1711
TEST=mjsunit/regress/regress-1711.js

Review URL: http://codereview.chromium.org/7976046

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-22 08:18:58 +00:00
rossberg@chromium.org
fdade92c20 Reorganize object type enum, such that proxies are no longer in the middle
of the range of proper JS objects.

Unfortunately, callable types no longer form a range now. However, there
are only two anyway. We put them at either end of the range of JS object
types so that certain compares can be combined.

R=erik.corry@gmail.com,kmillikin@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7737036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:46:54 +00:00
fschneider@chromium.org
ad5ed43c13 Fix broken Windows build.
Review URL: http://codereview.chromium.org/7983033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 14:42:50 +00:00
sgjesse@chromium.org
9183444850 Turn on d8 interactive debugging before running files passed on the command line
If the file test.js contains:

  function f() { debugger; }
  f()

Then running

  $ d8 --debugger test.js

will now hit the breakpoint in f which it would not before.

R=yangguo@chromium.org

BUG=
TEST=

Review URL: http://codereview.chromium.org//7981023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:42:25 +00:00
fschneider@chromium.org
fdaadb78d6 Landing for miket@chromium.org: Add an optional source length field to the Extension constructor.
Original code review: http://codereview.chromium.org/7889046/
Review URL: http://codereview.chromium.org/7978028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 13:28:09 +00:00
rossberg@chromium.org
6c8472bd3a Fix and test use of property descriptor objects.
R=kmillikin@chromium.org
BUG=v8:1543
TEST=

Review URL: http://codereview.chromium.org/7828080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 12:45:51 +00:00
keuchel@chromium.org
41eb990afe Fix pre-parsing function declarations.
The preparser has been out of sync with the parser. As a reminder, we have the
following grammer for harmony mode

 Block ::
   { SourceElement* }
 SourceElement ::
   Statement
   FunctionDeclaration
   LetDeclaration

instead of

 Block ::
   { Statement* }
 SourceElement ::
   Statement
   FunctionDeclaration

The extension to allow FunctionDeclarations in statement positions in
non-strict code is still active.

Review URL: http://codereview.chromium.org/7983006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9363 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 12:27:07 +00:00
vegorov@chromium.org
63b6874ef3 SemiSpace::AssertValidRange should use NewSpacePage::FromLimit for start.
Otherwise we get the wrong page when start == limit.

R=lrn@chromium.org

Review URL: http://codereview.chromium.org/7979019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:42:48 +00:00
yangguo@chromium.org
731a70ce13 API: Added Debug::DisableAgent to match existing Debug::EnableAgent
BUG=v8:1573
TEST=cctest test-debug/TestDebuggerAgent

Review URL: http://codereview.chromium.org/7978025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:34:05 +00:00
vegorov@chromium.org
5b8a6c1e54 Make heap iterable in PrepareForBreakPoints.
When aborting incremental marking with compaction discard all slots collected on evacuation candidates.

R=ricow@chromium.org
BUG=v8:1700
TEST=inspector/debugger/debugger-step-in.html

Review URL: http://codereview.chromium.org/7977004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9360 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 11:20:05 +00:00
rossberg@chromium.org
647ad8f500 Fix GC hazard.
R=jkummerow@chromium.org
BUG=v8:1698
TEST=

Review URL: http://codereview.chromium.org/7977021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 09:58:40 +00:00
kmillikin@chromium.org
dcc542f2d1 Fix build.
Last minute cleanup lost a '*'.

TBR=ricow@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7977020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 09:04:44 +00:00
kmillikin@chromium.org
99eab94443 Reapply "Clean up Context::Lookup and its uses."
The threading test failures seem to be due to a GC-unsafe place, that
mixed handles and raw pointers, in the runtime code for context
lookup.

R=fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7890002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9356 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 08:51:44 +00:00
svenpanne@chromium.org
4e3565cf7f Fixed alignment problem when generating code for builtins.
This is not perfect, but it should fix the problem at hand. We should really clean up the memory handling responsibilities for the (macro)assemblers.

BUG=v8:1706
Review URL: http://codereview.chromium.org/7978023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 07:59:28 +00:00
erik.corry@gmail.com
14087f430d Disable some tests while we hunt for the reasons behind them.
Review URL: http://codereview.chromium.org/7978022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-21 07:25:33 +00:00
mstarzinger@chromium.org
3fabe323f2 Add kHeaderSize constant to SeqString.
This prevents potential misuse of SeqString::kHeaderSize as in the
case of live byte counting in incremental marking stub. All stubs
picked up the undefined size constant SeqString::kHeaderSize, thus
the computed size of all strings was off by two pointers slots.

R=lrn@chromium.org
BUG=v8:1672
TEST=mjsunit/object-seal.js,...

Review URL: http://codereview.chromium.org/7971009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9349 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 16:33:03 +00:00
mstarzinger@chromium.org
bffbcefffb Fix new space shrinking to compute correct capacity.
R=vegorov@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7983001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9348 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 15:35:36 +00:00
svenpanne@chromium.org
9702f38cc3 Fixed an assertion in PagedSpace::Verify.
The formerly unused variable was found by GCC 4.6.1, BTW...
Review URL: http://codereview.chromium.org/7979005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 14:46:33 +00:00
mstarzinger@chromium.org
86832d5924 Fix new space shrinking to reset from-space.
R=lrn@chromium.org
BUG=v8:1702
TEST=cctest/test-heap/GrowAndShrinkNewSpace

Review URL: http://codereview.chromium.org/7976003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:37:40 +00:00
vegorov@chromium.org
50a94139fc GcSafeCastToCode should not use Code::contains it is not evacuation safe.
R=erik.corry@gmail.com

Review URL: http://codereview.chromium.org/7980004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:36:52 +00:00
erik.corry@gmail.com
c8fe713986 Put back the asserts in RememberedSetHelper, but correct this time.
Fix some incorrect comments.
Review URL: http://codereview.chromium.org/7977005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 13:32:27 +00:00
vegorov@chromium.org
867bb733af Remove incorrect debug-code assertion.
We should not use slot address to find out the page. This does not work for large pages.

Also this assertion is not always true (violated during incremental marking).

R=erik.corry@gmail.com
TEST=mozilla/js1_5/extensions/regress-371636

Review URL: http://codereview.chromium.org/7981001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 11:30:18 +00:00
lrn@chromium.org
610281f4ee Fix calculation of live-bytes in pages.
The "live bytes" count is *really* a "marked black" count - i.e., the count of bytes *known* to be live.

Fix aggravating bug on X64 where assembler code used a value that was off
by a factor of 2^31.

Ensure that sweeping clears live-bytes. Added other missing increments.

Added print statements to trace live-byte modifications, under a flag.

Still a few cases of undercounting left.

(New issue to merge from GC branch to bleeding_edge)

Review URL: http://codereview.chromium.org/7970009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 11:20:00 +00:00
fschneider@chromium.org
76c869434d Fix a bug with uninitialized const variables in the optimizing compiler.
We have to check for uninitialized uses before phi-elimination. Otherwise we
may miss such a use and result in using the hole value instead. This
causes a NULL-dereference or assertion failure.

BUG=96989
TEST=mjsunit/compiler/regress-96989.js
Review URL: http://codereview.chromium.org/7974009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9337 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:26:01 +00:00
erik.corry@gmail.com
2f1f203bff Fix pc to code cache so it can cope with a pointer to the start of the code
object.  Rename it to be the inner pointer to code cache.
Review URL: http://codereview.chromium.org/7969013

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9336 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:08:39 +00:00
yangguo@chromium.org
fdffe67205 Initialize pre-allocated fields of JSObject with undefined.
BUG=94873

Review URL: http://codereview.chromium.org/7929001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 10:06:23 +00:00
svenpanne@chromium.org
29618c079a Make newer GCCs happier: Removed unused variables.
Review URL: http://codereview.chromium.org/7969014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9334 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 09:44:23 +00:00
svenpanne@chromium.org
d4bb00230b Make newer GCCs happier: Fixed NULL vs. 0 confusion.
Review URL: http://codereview.chromium.org/7970008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9333 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 09:43:58 +00:00
erik.corry@gmail.com
00eaa669ad Speed up finding code objects from addresses in asserts. With
the new large pages it takes too long to iterate from the start
of the page to find a code object.
Review URL: http://codereview.chromium.org/7974007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 08:32:48 +00:00
kmillikin@chromium.org
22ef98dc66 Fix a deoptimization bug.
We reset the count of outgoing arguments, used for the index in the
frame's outgoing arguments, for each level of inlining.  This could
result in the arguments overlapping, rather than stacking on top of
each other.

R=whesse@chromium.org,fschneider@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7932022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 07:14:30 +00:00
fschneider@chromium.org
403a022272 Skip crashing Harmony proxies unit test until underlying issue is fixed.
BUG=v8:1698
Review URL: http://codereview.chromium.org/7974006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9330 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-20 07:00:59 +00:00
erik.corry@gmail.com
d8b8825474 ARM: Pregenerate some stubs that we call from other stubs.
BUG=1696
Review URL: http://codereview.chromium.org/7956002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9329 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:50:06 +00:00
vegorov@chromium.org
ac36cb4504 Merge experimental/gc branch to the bleeding_edge.
Review URL: http://codereview.chromium.org/7945009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 18:36:47 +00:00
fschneider@chromium.org
b77a69f22c Only do a full verify after computing dominators.
We don't modify the graph in later phases. This speeds up debug tests
by a lot.
Review URL: http://codereview.chromium.org/7942001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 15:09:30 +00:00
svenpanne@chromium.org
cf63503cad Unify the handling of comparinsons against null and undefined.
Although this patch is not small, most parts of it are rather mechanical:

 * First of all, the concept of a 'nil-like' value is introduced, which can be
   null or undefined. They are treated symmetrically regarding comparisons, so
   it makes sense to handle them in a uniform manner. It is a mystery why
   JavaScript defines two of those beasts, when even *one* is a design wart...

 * Extended and renamed a few things which now handle undefined in addition to
   null.

 * Made the parts of the full code generator and the hydrogen generation which
   deal with comparisons a bit more similar regarding their handling of special
   cases.

 * Refactored the syntactical detection of special cases for comparisons,
   hopefully making them a bit more readable and less copy-n-paste-oriented.
   Things like this should really be a one-liner in any sane programming
   language... :-P

 * Cut down the length of the argument lists of a few functions to something
   less insane, making them more easily understandable locally. This involves
   minor code duplication, but this was a good tradeoff and can be remedied
   later if necessary.

 * Replaced some boolean arguments with more readable enums.

 * Fixed a TODO: Values which are definitely a Smi or unboxed can never be equal
   to null or undefined.
Review URL: http://codereview.chromium.org/7918012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9323 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 14:50:33 +00:00
yangguo@chromium.org
94d7477011 MIPS: port Make function proxies work as constructors.
ported r9310 (72a5468)

BUG=
TEST=

Review URL: http://codereview.chromium.org/7931002
Patch from Paul Lind <plind44@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 09:55:07 +00:00
erik.corry@gmail.com
b84214a5be Fix a harmless assert and a genuine bug in the GC-safety of stub
generation on ARM without VFP3.
Review URL: http://codereview.chromium.org/7937004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-19 07:38:48 +00:00
whesse@chromium.org
acb0f103c1 Fix presubmit - remove stray whitespace on empty lines.
BUG=
TEST=

Review URL: http://codereview.chromium.org/7931023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-18 21:16:08 +00:00
erikcorry
41cafb7b95 MIPS: Fixed a bug in CallStubCompiler::CompileArrayPushCall.
An ARM PreIndex store was badly ported.

Landing http://codereview.chromium.org/7934003/ for Paul Lind.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-18 15:16:46 +00:00
erikcorry
433db37747 MIPS: port Implement function proxies (except for their use as constructors).
port r9258 (c8709a9)

Note on mips implementation: Arm reg r4 (call type) normally maps to mips
reg t0. We had already used t0 as a temp in Generate_FunctionCall() and
Generate_FunctionApply(), so I replaced that existing t0 usage with t3, and
now use t0 only for call type.

Original commit message:
Introduce new %Apply native.
Extend Execution::Call to optionally handle receiver rewriting (needed for %Apply).
Fix Function.prototype.bind for functions that have .apply modified.

Landing http://codereview.chromium.org/7891033/ for Paul Lind.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-18 15:11:33 +00:00
erikcorry
4c64b160d2 MIPS: Fix assertion-fail on cacheflush from generated code.
Fix a mips-specific CallCFunction assertion, when checking for valid
frames on the stack. We fake it with AllowExternalCallThatCantCauseGC().

Landing http://codereview.chromium.org/7932010/ for Paul Lind.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9315 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-18 15:05:44 +00:00