Commit Graph

8507 Commits

Author SHA1 Message Date
verwaest@chromium.org
d33cda9338 Micro-optimizing the json parser
Review URL: https://chromiumcodereview.appspot.com/11237002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12779 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 15:37:28 +00:00
verwaest@chromium.org
4f40326fae Fast path for searching through simple transitions
Review URL: https://chromiumcodereview.appspot.com/11189089

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 15:03:27 +00:00
yangguo@chromium.org
06f7d1c92c Improve ClampDoubleToUint8 on ia32/x64.
It's measured faster when:
a) clamp never happens;
b) clamp random happens ([-128,384], pseudo random).

Review URL: https://chromiumcodereview.appspot.com/11190049
Patch from Zheng Liu <zheng.z.liu@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 13:20:22 +00:00
verwaest@chromium.org
c9e86f4b69 Remove scratch register requirement from LoadInstanceDescriptors on arm and mips.
Review URL: https://chromiumcodereview.appspot.com/11193022

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 12:39:59 +00:00
yangguo@chromium.org
8148f972e8 Stress GC less by allocating exponentially growing string chunks in JSON.stringify.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 12:39:43 +00:00
yangguo@chromium.org
f910052543 Always invoke the default Array.sort functions from builtin functions, part 2.
R=vegorov@chromium.org
BUG=v8:2372

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12774 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 12:30:18 +00:00
danno@chromium.org
063609280e Add a faster API for creating v8::Integer objects
In WebKit, we have a small integer cache because calling v8::Integer::New is
slow. This patch adds a faster API for creating integers that requires the
caller to supply the v8::Isolate, saving us the work of looking up the isolate
in thread-local storage.

BUG=

Review URL: https://codereview.chromium.org/11212004
Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12773 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 11:15:04 +00:00
verwaest@chromium.org
a0c9856bce Get the target field index when transitioning.
Review URL: https://chromiumcodereview.appspot.com/11194080

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 10:48:18 +00:00
danno@chromium.org
ace5bf3f94 Fix ARM dissambler test problems with movw/movt.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11198061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 10:44:56 +00:00
yangguo@chromium.org
5fa8f2f485 Pass pending exception to the message listener.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 08:45:24 +00:00
verwaest@chromium.org
fa53250dd2 Fixed json regression
BUG=v8:2374

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-19 08:23:45 +00:00
verwaest@chromium.org
7bc94a92c5 Fixed error introduced in r12761.
BUG=2373

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 18:43:19 +00:00
verwaest@chromium.org
7ce3a4021d Static cast char* diff to int.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 15:57:45 +00:00
verwaest@chromium.org
d04a1fff1f Keep track of the first non-ascii word/char to avoid redoing the work.
Review URL: https://chromiumcodereview.appspot.com/11194053

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 15:08:11 +00:00
verwaest@chromium.org
852de2e1ab Adding a fast path for parsing index keys.
Reduces overhead on http://code.google.com/p/chromium/issues/detail?id=156379 from 360ms down to 255ms.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 14:44:40 +00:00
yangguo@chromium.org
7a653c1675 Reimplement a simpler version of JSON.stringify.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 14:42:26 +00:00
danno@chromium.org
4431e0c54e Put more constants in movw/movt instructions
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11185052

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 14:37:04 +00:00
yangguo@chromium.org
a7f3edb818 Make sure the fast case of ScanJsonString bails out to the slow case correctly.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 13:15:05 +00:00
danno@chromium.org
43e248d2e5 Use movw/movt instead of constant pool on ARMv7.
Some ARM architectures load 32-bit immediate constants more efficiently using movw/movt pairs rather than constant pool loads. This patch allows the assembler to generate one or the other load form at runtime depending on what is faster.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11037023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:21:42 +00:00
danno@chromium.org
9d43ff71b8 Avoid unnecessary code target changes during code compaction.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11198032

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 12:01:36 +00:00
verwaest@chromium.org
a38af4256c Fix typo in fast path for scanning json strings.
Review URL: https://chromiumcodereview.appspot.com/11191055

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12753 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 11:47:06 +00:00
fschneider@chromium.org
971e834a8d Always invoke the default Array.sort functions from builtin functions.
TEST=mjsunit/regress/regress-builtin-array-op.js
BUG=v8:2372
Review URL: https://chromiumcodereview.appspot.com/10559005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12752 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 11:18:08 +00:00
svenpanne@chromium.org
9dc2c5b83d Add an API for enumerating persistent handles
This API lets the embedder enumerate handles that have class ids. WebKit will
use this feature during garbage collection to compute object groups for DOM
nodes. Previously, we kept a list of DOM nodes on the WebKit side, but that
list is redundant with the global handles list in V8.

Review URL: https://codereview.chromium.org/11190011
Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12750 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-18 06:52:37 +00:00
danno@chromium.org
966b08440c MIPS: Fix compilation under clang.
Clang is a little more picky than gcc on unused variable
warnings, which become errors with -Werror. Clean up
these cases for mips.

BUG=
TEST=

Review URL: https://codereview.chromium.org/11175005
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12748 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 14:20:43 +00:00
verwaest@chromium.org
b61933ba10 Eagerly follow transitions to existing maps while json parsing.
Review URL: https://chromiumcodereview.appspot.com/11184006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12747 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 14:09:42 +00:00
verwaest@chromium.org
72424b3987 Move DescriptorArray into the map.
Review URL: https://chromiumcodereview.appspot.com/11188031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 13:04:49 +00:00
jkummerow@chromium.org
62223bd2c0 Revert recent CPU profiler changes because they broke --prof.
This reverts r12649 and r12650.

BUG=v8:2364

Review URL: https://codereview.chromium.org/11193020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12745 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-17 12:24:31 +00:00
svenpanne@chromium.org
bcb383e055 Improved printing of HLoadElements instruction.
TBR=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11177004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 11:41:07 +00:00
danno@chromium.org
4a2a4b8647 MIPS: Fix ARM bug introduced in r12604 that caused crashes on ARM on crypto-md5 from SunSpider.
Port r12623 (22002351)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12742 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:45:17 +00:00
danno@chromium.org
1fe673a60d MIPS: Fix issue 2346 (order of operations in keyed store on arrays) and turn get-own-property-descriptor.js test into a regression test.
Port r12604 (ae837167)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:29:58 +00:00
mstarzinger@chromium.org
479b4d61a6 MIPS: Make the speed of incremental marking depend also on the rate at which we are hitting expensive write barrier operations, not just on the rate of allocation.
Port r12618 (c621b025)

BUG=
TEST=

Review URL: https://codereview.chromium.org/10977070
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12740 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:24:13 +00:00
ulan@chromium.org
9f2e52ac12 Fix MIPS build broken by r12735 'Allow unaligned accesses for ARMv7'.
R=mstarzinger@chromium.org,palfia@homejinni.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12739 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:23:15 +00:00
mstarzinger@chromium.org
e2da94b804 MIPS: Fix compilation failure on ARM in r12685.
Port r12686 (bdda5c81)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11143029
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12738 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-16 08:16:36 +00:00
ulan@chromium.org
a86e897924 Simulate and disasm NOP on ARM
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11116011
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12737 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 15:42:09 +00:00
mstarzinger@chromium.org
02490829dd Fix bug in deletion of indexed properties
The delete operator always return true in case of indexed property. It
should return false if an indexed property can't be deleted (eg.
DontDelete attribute is set or a string object is the holder).

Contributed by Peter Varga <pvarga@inf.u-szeged.hu>

BUG=none
TEST=mjsunit/delete-non-configurable

Review URL: https://codereview.chromium.org/11094021
Patch from Peter Varga <pvarga@inf.u-szeged.hu>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12736 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 15:23:22 +00:00
ulan@chromium.org
86eedc26b5 Allow unaligned accesses for ARMv7.
R=mstarzinger@chromium.org,jfb@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12735 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 15:19:36 +00:00
mstarzinger@chromium.org
d9e3d35c07 Switch code flushing to use different JSFunction field.
This is another preparation for incremental code flushing. Instead of
linking candidates using the code entry field, we use the next pointer
that is also used to link optimized functions together. Since we only
support flushing of unoptimized code, this field can be shared.

R=ulan@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11141023

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 14:43:57 +00:00
svenpanne@chromium.org
57116621eb Fixed VERIFY_HEAP without DEBUG.
Review URL: https://codereview.chromium.org/11155007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12731 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 12:36:58 +00:00
svenpanne@chromium.org
1fef757b4e Prepare push to trunk. Now working on version 3.14.5.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11137016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12728 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 11:49:59 +00:00
yurys@chromium.org
eee93ec99b Allow evals for debugger even if they are prohibited in the debugee context.
BUG=154733
Review URL: https://codereview.chromium.org/11111015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12726 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 10:15:25 +00:00
mstarzinger@chromium.org
3d0d211764 Ensure code flushing is disabled in incremental marking.
This fixes some test failures since r12714 which shared the code for
code flushing between full and incremental marking and is only a quick
fix until we can enable incremental code flushing.

R=jkummerow@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11137014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 09:25:30 +00:00
verwaest@chromium.org
7c28995e5d Invalidate the enum cache when converting a transition across which the descriptors are shared.
Review URL: https://chromiumcodereview.appspot.com/11145017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 08:38:51 +00:00
svenpanne@chromium.org
5a0176222b Consistently make the bounds check for AccessArgumentsAt explicit.
This has the advantage that AccessArgumentsAt itself can't deopt anymore and the
bounds check is visible for the elimination phase. Furthermore, things are
simply more consistent now, a good thing in itself. :-)

Review URL: https://codereview.chromium.org/11106012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12721 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 07:25:20 +00:00
svenpanne@chromium.org
6cf48ce3d7 Fixed heap verification guards.
TBR=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11147016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12719 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-15 06:34:22 +00:00
danno@chromium.org
bf83c5fe32 Use immediate add when possible in space allocator
Save one instruction in allocating new space by using an immediate add if
possible to calculate the new top of heap.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11091068
Patch from Anthony Berent <aberent@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 14:06:03 +00:00
ulan@chromium.org
c969afe137 Reland r12342: Flush monomorphic ICs on context disposal instead of context exit.
The crashes that caused r12342 to be reverted are fixed in r12563.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12715 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 13:49:12 +00:00
mstarzinger@chromium.org
bf85da7441 Move code flushing support into shared visitor.
This is a first step towards incremental code flushing. The code
flushing support is now shared between full and incremental marking.
The code flusher itself is not yet activated in incremental mode and
will require some additional adaptations.

R=ulan@chromium.org
BUG=v8:1609

Review URL: https://codereview.chromium.org/11028016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12714 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 12:41:29 +00:00
mvstanton@chromium.org
b3c0ed8245 Enable --verify-heap in release mode
R=mstarzinger@chromium.org
BUG=v8:2120

Review URL: https://codereview.chromium.org/11118018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12713 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:41:14 +00:00
svenpanne@chromium.org
1f3bdabd80 Ensure that we do not accidentally emit debug code.
The call sites are more concise, the naming is better and at least one
case of superfluous code in release mode was removed.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11108011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 11:09:14 +00:00
danno@chromium.org
0457a3be0a DoNumberTagD performance improvement
Allocate heap entry untagged and tag at end to avoid having to subtract off
the tag offset before storing the value.

BUG=

Review URL: https://codereview.chromium.org/11028115
Patch from Anthony Berent <aberent@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12711 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 10:58:25 +00:00
ulan@chromium.org
ede725d2f7 Fix vstr.cc S, [mem] to emit vstr instead of vldr.
BUG=emits wrong instruction
R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/11118015
Patch from JF Bastien <jfb@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12710 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 09:27:12 +00:00
verwaest@chromium.org
9ecabf526c Make EnumCacheBridge immutable.
Review URL: https://chromiumcodereview.appspot.com/11048051

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12709 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 08:16:49 +00:00
svenpanne@chromium.org
48d92f6167 MIPS: Consistently use named getters for Lithium operands on ARM.
Port r12527 (24ed881a)

BUG=
TEST=

Review URL: https://codereview.chromium.org/11109003
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-12 07:05:00 +00:00
jkummerow@chromium.org
c756e14b0b Prepare push to trunk. Now working on version 3.14.4.
R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/11094073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12705 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 15:35:24 +00:00
verwaest@chromium.org
b75705f07b Don't clear EnumLength but rather copy the enum cache. Added regression test for crashes from chromecrash.
Review URL: https://chromiumcodereview.appspot.com/11103036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12704 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 15:33:34 +00:00
jkummerow@chromium.org
942e7424e9 Use native context to retrieve ErrorMessageForCodeGenerationFromStrings
BUG=155076

Review URL: https://codereview.chromium.org/11093073

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12703 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 14:14:24 +00:00
svenpanne@chromium.org
86bcbcdc0b HChange is only deletable under certain circumstances.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11092075

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12702 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 14:14:03 +00:00
verwaest@chromium.org
ad6a21c0d0 Remove descriptors pointer.
Secondary changes:
- don't transfer ownership back on CNLT
- turned debugging checks back into ASSERT

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12699 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 12:01:19 +00:00
rossberg@chromium.org
00132da734 Bump variable limit further to 2^17.
R=jkummerow@chromium.org
BUG=151625

Review URL: https://codereview.chromium.org/11099063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12698 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 11:40:10 +00:00
svenpanne@chromium.org
f03fd70d9e Added a simple dead code removal phase.
We iteratively remove all dead Hydrogen instruction until we reach a fixed point. We consider an instruction dead if it is unused, has no observable side effects and is deletable. The last part of the condition is currently not very nice: We basically have to whitelist "safe" instructions, because we are missing more detailed dependencies and/or more detailed tracking of side effects.

We disable dead code elimination for now in our test runners, because we have tons of poorly written tests which wouldn't test anymore what they are supposed to test with this phase enabled. To get test coverage for dead code elimination itself, we should enable it on a few build bots. This is not really a perfect state, but the best we can do for now.

This patch includes a few const-correctness fixes, most of them were necessary for this CL.

Review URL: https://codereview.chromium.org/11088027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-11 10:52:58 +00:00
verwaest@chromium.org
bfb2db2329 Prepare push to trunk. Now working on version 3.14.3.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12692 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 17:05:00 +00:00
verwaest@chromium.org
e5620d5a58 Also use binary search to search through valid entries.
Review URL: https://chromiumcodereview.appspot.com/11028056

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12690 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 14:48:07 +00:00
verwaest@chromium.org
c2a9d49393 Transition ownership back if the descriptors were shared via elements transitions.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12689 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 13:13:35 +00:00
verwaest@chromium.org
dde1cdfb8e Fix transition conversion from CONSTANT_FUNCTION to FIELD.
Review URL: https://chromiumcodereview.appspot.com/11094044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 12:31:50 +00:00
verwaest@chromium.org
55e924c595 Fix CNLT regression.
This happens when a map A with no descriptors in fast_holey_elements
mode first gets some properties, making it share descriptor arrays with
a map B to which it transitions. Then map A transitions elements kind to
dictionary_elements in map C. C stores the empty_descriptor_array in its
own transition array. When adding a property to C, C transitions to D
and shares the descriptors. If D dies, a CNLT clears the transition
array of C, making the descriptor array of A (and thus also of B) shine
through. If a property is now added to an object in state C, it'll inherit
all the properties of A (and B). If those properties had high field indices,
we do not have a large enough backing store for the single newly added
property, and we'll write out of bounds.

BUG=chromium:151749

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12687 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 12:29:44 +00:00
mstarzinger@chromium.org
8b299a5b0e Fix compilation failure on ARM in r12685.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11103004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12686 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-10 11:58:22 +00:00
mstarzinger@chromium.org
270316e953 Improve page flag checking sequence on ARM.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/11090021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12682 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 15:12:39 +00:00
svenpanne@chromium.org
f81b06dde5 Make sure that the context argument of HAdd is never NULL.
Although this doesn't hurt currently, it hurts any future compiler
pass relying on the invariant that no operand is NULL.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/11088026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 13:53:24 +00:00
rossberg@chromium.org
012ae4761c Clarify that date parsing follows Safari.
R=ulan@chromium.org
BUG=145198

Review URL: https://codereview.chromium.org/11085006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12680 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 08:34:39 +00:00
mstarzinger@chromium.org
4887285da4 Make GDBJIT interface compile again.
R=ulan@chromium.org
BUG=v8:1804

Review URL: https://codereview.chromium.org/11022007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12679 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-09 08:24:58 +00:00
svenpanne@chromium.org
5d11c5ee69 Fixed Accessors::FunctionGetPrototype's proto chain traversal.
Actually it didn't traverse that far... ;-) Did some cleanup on the way.

R=rossberg@chromium.org
BUG=chrome:143967
TEST=regress/regress-143967.js

Review URL: https://codereview.chromium.org/11087004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12677 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-08 12:58:46 +00:00
danno@chromium.org
0a41d2731c ARM: Fast path for integer inputs to EmitVFPTruncate
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11049025
Patch from Martyn Capewell <m.m.capewell@googlemail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12676 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-08 12:50:15 +00:00
rossberg@chromium.org
0c2fd0daa7 Use dot_for_symbol.
R=svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11087002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-08 11:39:08 +00:00
rossberg@chromium.org
329cf12363 Make sure that names of temporaries do not clash with real variables.
R=mstarzinger@chromium.org
BUG=v8:2322

Review URL: https://codereview.chromium.org/11035054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12668 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-05 12:47:34 +00:00
rossberg@chromium.org
b07f38a46b Reject local module declarations.
R=mstarzinger@chromium.org
BUG=150628

Review URL: https://codereview.chromium.org/11033025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12665 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-05 09:14:08 +00:00
rossberg@chromium.org
3f7b5c338a Reject uses of lexical for-loop variable on the RHS.
R=mstarzinger@chromium.org
BUG=v8:2322

Review URL: https://codereview.chromium.org/11031045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12664 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-05 09:07:53 +00:00
verwaest@chromium.org
6e1bafc808 Revert "Allow partial scanning of large arrays in order to avoid"
This reverts commit r12619.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-04 11:09:17 +00:00
danno@chromium.org
a92a9c8a2c MIPS: Changed "marked" nops to use sll(zero_reg, at, type).
We use marking bits in nops (in the 'sa' field) for debug markers, and for some IC stuff. A normal NOP in mips is sll(zero_reg, zero_reg, 0), where the 0 is a 5 bit immediate field in 'sa'.

See enum NopMarkerTypes at around line 654 of assembler-mips.h

The problem is that these markers use encodings that are reserved for the 'ssnop' and 'ehb' instructions. These are instructions used for hazard barriers.

It does not break anything, but it will slow things down a little bit as some pipeline stages are cleared, etc.

This commit changes the "marked" NOPs to sll(zero_reg, at, type) instructions, which is also a NOP operation on MIPS.

BUG=
TEST=

Review URL: https://codereview.chromium.org/10990110
Patch from Akos Palfi <palfia@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12657 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-04 09:46:50 +00:00
ulan@chromium.org
a80f7f42dd Make sure all labels are bound and linked in ARM DoModI.
BUG=v8:2354

TBR=danno@chromium.org,subratokde@codeaurora.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12656 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 16:48:45 +00:00
mstarzinger@chromium.org
739c9f6f01 Fix slot recording of code target patches.
This makes sure that we only record relocation slots for code target
patches that happen in marked objects. Unmarked ones might be visited
again, whereas marked ones are alive and will not be visited again.

R=ulan@chromium.org
BUG=chromium:152615,chromium:144230

Review URL: https://codereview.chromium.org/11040021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12655 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 15:46:55 +00:00
jkummerow@chromium.org
e0c7d8301f Revert "Adding a high-resolution timer to platform win32."
This reverts r12651.

Review URL: https://codereview.chromium.org/11033014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12652 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 11:07:26 +00:00
jkummerow@chromium.org
bdc466422b Adding a high-resolution timer to platform win32.
BUG=None

Review URL: https://codereview.chromium.org/10867057
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12651 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 10:59:44 +00:00
jkummerow@chromium.org
ecc7f4baad Replacing circular queue by single buffer in CPU Profiler.
BUG=None

Review URL: https://codereview.chromium.org/10871039
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12650 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 10:51:00 +00:00
jkummerow@chromium.org
dfb4218a04 Moving cpu profiling into its own thread.
BUG=None

Review URL: https://codereview.chromium.org/10857035
Patch from Sergey Rogulenko <rogulenko@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12649 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 09:58:11 +00:00
verwaest@chromium.org
885837d981 MIPS: Fix mistake in r12549 (1597d7d9).
This commit fixes several test failures introduced by r12549 (1597d7d9):
- mjsunit/regress/regress-760-1
- mjsunit/strict-mode
- mjsunit/string-add

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12647 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-02 07:54:41 +00:00
danno@chromium.org
08747c3a16 Support for SDIV and MLS ARM instructions, and implement DoModI using them.
Also added support for the runtime detection to check if hardware supports SDIV/UDIV
Other new opportunities to exploit SDIV/UDIV will be done in separate issues.

Review URL: https://chromiumcodereview.appspot.com/10977051
Patch from Subrato K De <subratokde@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12646 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 21:27:33 +00:00
verwaest@chromium.org
efe955587e Allow optimistically hoisting elements transitions over accesses.
Review URL: https://chromiumcodereview.appspot.com/10972011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12642 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 16:22:43 +00:00
jkummerow@chromium.org
db91fd3acf Prepare push to trunk. Now working on version 3.14.2.
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/11031002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12641 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 16:19:43 +00:00
mstarzinger@chromium.org
5b64362706 Revert r12625 due to sandbox incompatibility.
Original message: Implement committed physical memory stats for Linux.
This had to be reverted because it crashes when compiled into Chromium
due to the sandbox not allowing the mincore call.

R=verwaest@chromium.org
BUG=v8:2191

Review URL: https://codereview.chromium.org/11023010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12640 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 12:11:06 +00:00
verwaest@chromium.org
15ebb22b6f Off-by-one error in zapping objects after right trimming.
Review URL: https://chromiumcodereview.appspot.com/11013012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12637 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-01 09:48:07 +00:00
verwaest@chromium.org
6fd0e69156 Restore the descriptor array before returning allocation failure.
BUG=chromium:151750

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12629 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-28 10:15:58 +00:00
verwaest@chromium.org
f623eefddb Only use OwnDescriptors to decide whether to go slow or not.
Review URL: https://chromiumcodereview.appspot.com/10996044

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12626 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-27 13:55:50 +00:00
mstarzinger@chromium.org
974a2268bb Implement committed physical memory stats for Linux.
The patch introduces CommittedPhysicalMemory function to the Heap class
that reports committed *physical* memory acquired from the OS.
It is important because some OSes may postpone actual commitment on e.g.
first access to the previously committed region.
So reporting just plain committed size led to various weird artifacts
like DevTools showing V8 allocated memory higher than the whole process
private size.

BUG=v8:2191

Review URL: https://codereview.chromium.org/10961042
Patch from Alexei Filippov <alph@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12625 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-27 13:27:50 +00:00
erik.corry@gmail.com
fbcc4a408e Add the VFP-ness to the minor number of the keyed store elements
IC so that the version from the snapshot is not used if we have
a more capable CPU at runtime.
Review URL: https://chromiumcodereview.appspot.com/10984065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12624 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-27 11:31:26 +00:00
erik.corry@gmail.com
dc57f54548 Fix ARM bug introduced in r12604 that caused crashes on ARM
on crypto-md5 from SunSpider.  Bug=152402
Review URL: https://chromiumcodereview.appspot.com/10991045

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12623 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-27 07:45:49 +00:00
yangguo@chromium.org
29b6518874 Fix probing in JSON.parse.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12622 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 14:59:10 +00:00
ulan@chromium.org
944f933332 Fix Clang warning about tautological compare.
BUG=151927

R=hans@chromium.org

Patch from Hans Wennborg <hans@chromium.org>.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 14:42:08 +00:00
erik.corry@gmail.com
aba09dcf2e Allow partial scanning of large arrays in order to avoid
mark stack overflow.  This is a reland of r12609 -
https://chromiumcodereview.appspot.com/10959011 - but
this time VisitPointers has been fixed (it used to assume
that the first slot was on the first page of a large object).
Review URL: https://chromiumcodereview.appspot.com/10996018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12619 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 12:17:24 +00:00
erik.corry@gmail.com
e8ffc2bebd Make the speed of incremental marking depend also on the rate
at which we are hitting expensive write barrier operations,
not just on the rate of allocation.
Review URL: https://chromiumcodereview.appspot.com/10974003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12618 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 11:35:42 +00:00
mmassi@chromium.org
8fbfad63cd Avoid wrong imul deopt on ia32 and x64 (fixes v8 bug 2339).
BUG=v8:2339

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 09:57:30 +00:00
mmassi@chromium.org
e7fc0207ab Lowered kMaxVirtualRegisters (fixes v8 2139 and chrome 123822 and 128252).
BUG=128252

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12613 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 09:35:41 +00:00
erik.corry@gmail.com
42e5dc2cc0 Make Kraken fasta.
Review URL: https://chromiumcodereview.appspot.com/10978040

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12611 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 09:01:13 +00:00
erik.corry@gmail.com
5547815daf Revert 12609 (Allow partial scanning of large arrays)
due to crashes in unbox-double-arrays.js test.
Review URL: https://chromiumcodereview.appspot.com/10996017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12610 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 08:55:19 +00:00
erik.corry@gmail.com
a54e007a95 Allow partial scanning of large arrays in order to avoid
mark stack overflow.
Review URL: https://chromiumcodereview.appspot.com/10959011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-26 08:33:15 +00:00
yangguo@chromium.org
0f37cb0b79 Fix off-by-one error introduced in r12598.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12606 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-25 16:59:27 +00:00
danno@chromium.org
c467b2659f ARM: Small optimisation of VFP immediate creation
Save an instruction in VFP immediate creation by passing a scratch register.

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12605 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-25 14:32:07 +00:00
erik.corry@gmail.com
72e9f1bea1 x64 and ARM: Fix issue 2346 (order of operations in keyed store
on arrays) and turn get-own-property-descriptor.js test into
a regression test.
Review URL: https://chromiumcodereview.appspot.com/10985017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-25 13:35:42 +00:00
danno@chromium.org
b108180cd1 Fix 2346: Generic KeyedStoreIC doesn't change length and element_kind atomically
R=erik.corry@gmail.com
BUG=v8:2346

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12603 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-25 09:55:44 +00:00
rossberg@chromium.org
20b1c426cf Bump number of allowed variables per scope to 65535, to address GWT.
R=jkummerow@chromium.org
BUG=151625

Review URL: https://codereview.chromium.org/10965063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-24 16:22:17 +00:00
yangguo@chromium.org
2473aa31b3 Fix failures caused by r12598.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12599 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-24 15:03:09 +00:00
yangguo@chromium.org
681eda652d Fast path for symbol lookup in JSON.parse.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12598 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-24 14:23:46 +00:00
mstarzinger@chromium.org
1f13fca165 Improve --trace-gc-verbose to show sum of all spaces.
R=ulan@chromium.org

Review URL: https://codereview.chromium.org/10974006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12597 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-24 13:03:11 +00:00
yurys@chromium.org
26721b7dc0 This issue is for landing patch by vsevik: http://codereview.chromium.org/10966011/
SourceURL comments for scripts having a name. 

sourceURL comment is now preferred script name for all scripts except 
for those with non zero start position (e.g. inline scripts in HTML). 


BUG=v8:2342
Review URL: https://codereview.chromium.org/10959038

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12576 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-21 08:09:34 +00:00
verwaest@chromium.org
083ee63a83 Fix CNLT for enum indices.
Review URL: https://chromiumcodereview.appspot.com/10958015

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12569 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-20 15:18:00 +00:00
verwaest@chromium.org
ea31f868e8 Deopt on storing undefined into double elements.
Review URL: https://chromiumcodereview.appspot.com/10963010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-20 13:41:00 +00:00
ulan@chromium.org
260c7b255d Prepare push to trunk. Now working on version 3.14.1.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12565 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-20 12:09:06 +00:00
mstarzinger@chromium.org
84935fb23a Fix missing slot recodring during clearing of CallICs.
This fixes a rare corner case that was caused by missing recording of
relocation slots when the uninitialized CallIC stub happenes to land on
an evacuation candidate and the IC is cleared via the shared function.

R=ulan@chromium.org
BUG=chromium:144230
TEST=cctest/test-heap/Regression144230

Review URL: https://codereview.chromium.org/10963005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12563 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-20 10:45:38 +00:00
jkummerow@chromium.org
a8e502fe60 Fix LBoundsCheck on x64 to handle (stack slot + constant) correctly
BUG=150729

Review URL: https://codereview.chromium.org/10959009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12562 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-20 09:56:24 +00:00
verwaest@chromium.org
6f649aaece MIPS: Sharing of descriptor arrays.
Port r12492 (479be376)

Original commit message:
This CL adds multiple things:
Transition arrays do not directly point at their descriptor array anymore, but rather do so via an indirect pointer (a JSGlobalPropertyCell).

An ownership bit is added to maps indicating whether it owns its own descriptor array or not.

Maps owning a descriptor array can pass on ownership if a transition from that map is generated; but only if the descriptor array stays exactly the same; or if a descriptor is added.

Maps that don't have ownership get ownership back if their direct child to which ownership was passed is cleared in ClearNonLiveTransitions.

To detect which descriptors in an array are valid, each map knows its own NumberOfOwnDescriptors. Since the descriptors are sorted in order of addition, if we search and find a descriptor with index bigger than this number, it is not valid for the given map.

We currently still build up an enumeration cache (although this may disappear). The enumeration cache is always built for the entire descriptor array, even if not all descriptors are owned by the map. Once a descriptor array has an enumeration cache for a given map; this invariant will always be true, even if the descriptor array was extended. The extended array will inherit the enumeration cache from the smaller descriptor array. If a map with more descriptors needs an enumeration cache, it's EnumLength will still be set to invalid, so it will have to recompute the enumeration cache. This new cache will also be valid for smaller maps since they have their own enumlength; and use this to loop over the cache. If the EnumLength is still invalid, but there is already a cache present that is big enough; we just initialize the EnumLength field for the map.

When we apply ClearNonLiveTransitions and descriptor ownership is passed back to a parent map, the descriptor array is trimmed in-place and resorted. At the same time, the enumeration cache is trimmed in-place.

Only transition arrays contain descriptor arrays. If we transition to a map and pass ownership of the descriptor array along, the child map will not store the descriptor array it owns. Rather its parent will keep the pointer. So for every leaf-map, we find the descriptor array by following the back pointer, reading out the transition array, and fetching the descriptor array from the JSGlobalPropertyCell. If a map has a transition array, we fetch it from there. If a map has undefined as its back-pointer and has no transition array; it is considered to have an empty descriptor array.

When we modify properties, we cannot share the descriptor array. To accommodate this, the child map will get its own transition array; even if there are not necessarily any transitions leaving from the child map. This is necessary since it's the only way to store its own descriptor array.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12549 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 14:29:27 +00:00
mmassi@chromium.org
9dc822ca13 Fixed minus zero test (fixes v8:2133).
BUG=v8:2133

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12548 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 12:48:49 +00:00
mstarzinger@chromium.org
c012afb6d4 Fix setting array length to zero for slow elements.
R=verwaest@chromium.org
BUG=chromium:146910
TEST=mjsunit/regress/regress-crbug-146910

Review URL: https://codereview.chromium.org/10937026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 11:52:33 +00:00
verwaest@chromium.org
ab94a69d3d Remove whitespace
Review URL: https://chromiumcodereview.appspot.com/10949018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12546 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 11:09:07 +00:00
verwaest@chromium.org
947663aaa3 Use NumberOfOwnDescriptors/EnumLength for counting properties on fast objects.
Also split CNLT into small functions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12545 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 10:06:02 +00:00
verwaest@chromium.org
8b57f2694b Reduce space usage of simple transitions and descriptors holders.
Review URL: https://chromiumcodereview.appspot.com/10915260

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12544 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 09:54:10 +00:00
mstarzinger@chromium.org
f0dcaf9a19 Fix lost arguments dropping in HLeaveInlined.
This fixes HleaveInlined to correctly drop pushed arguments on all code
paths and addresses a corner case where the arguments stack height
mismatched at an OSR entry point.

R=jkummerow@chromium.org
BUG=chromium:150545
TEST=mjsunit/regress/regress-crbug-150545

Review URL: https://codereview.chromium.org/10938016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12543 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 08:13:46 +00:00
verwaest@chromium.org
1b9c319da2 Clear EnumIndices as well on CNLT.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12542 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-19 08:08:02 +00:00
verwaest@chromium.org
bf48856a7d MIPS: Do not go to slow mode and back to fast in initializer blocks.
Port r12534 (4acfb92e)

BUG=
TEST=

Committed: https://code.google.com/p/v8/source/detail?r=12539

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 13:52:18 +00:00
verwaest@chromium.org
4edc2dbbc0 Revert due to invalid description / CL combination.
Revert "MIPS: Do not go to slow mode and back to fast in initializer blocks."

This reverts commit 9b05931ec130e831f7496aed6f7ae32e8f2da934.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12540 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 13:51:01 +00:00
verwaest@chromium.org
725818c32f MIPS: Do not go to slow mode and back to fast in initializer blocks.
Port r12534 (4acfb92e)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12539 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 13:40:24 +00:00
verwaest@chromium.org
5bf15c5d6c Preallocate space in descriptor arrays.
Review URL: https://chromiumcodereview.appspot.com/10916336

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12538 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 13:25:12 +00:00
mstarzinger@chromium.org
4d485a438d Fix printing of HCallKnownGlobal.
R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/10941009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12537 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 11:06:05 +00:00
yangguo@chromium.org
cf85bfd725 Improve the assembly code for power function with integer exponential on x64
The change removes one unused multiply and reschedules
the shift, multiply and jump instructions to reduce
stall. Experiment shows it improve about 20% performance
on x64 for exponetials from about 100 to 2000.

Review URL: https://chromiumcodereview.appspot.com/10939013
Patch from Xi Qian <xi.qian@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12535 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-18 08:04:31 +00:00
verwaest@chromium.org
36dd23aa1b Do not go to slow mode and back to fast in initializer blocks.
Review URL: https://chromiumcodereview.appspot.com/10905308

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12534 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 17:18:27 +00:00
mstarzinger@chromium.org
86fd161fdc Fix casting error for receiver of interceptors.
This fixes a casting error that occured when the receiver of a missed
or uninitialized CallIC is a Smi and there is an interceptor installed
on the prototype chain.

R=yangguo@chromium.org
BUG=chromium:149912
TEST=cctest/test-api/Regress149912

Review URL: https://codereview.chromium.org/10914317

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 14:39:10 +00:00
erik.corry@gmail.com
bafcfe5427 Fix misplaced assert in heap.cc.
Bug=2336
Review URL: https://chromiumcodereview.appspot.com/10911334

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12528 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 11:38:24 +00:00
svenpanne@chromium.org
6f5d872410 Consistently use named getters for Lithium operands on ARM.
Removed a dead Lithium instruction on the way.

Review URL: https://codereview.chromium.org/10907234

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12527 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 10:54:26 +00:00
mstarzinger@chromium.org
3018b875b1 Integrate map marking into static marking visitor.
This refactors the specialized marking of map contents to be done by the
static marking visitor shared between full and incremental marking. This
also fixes an issue where some maps weren't accounted for in the object
stats tracker. But more importantly, it simplifies the code base.

R=verwaest@chromium.org

Review URL: https://codereview.chromium.org/10919294

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12526 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 10:04:39 +00:00
ulan@chromium.org
4bd4fb1aa4 Throw a more descriptive exception when blocking 'eval' via CSP.
BUG=140191

R=svenpanne@chromium.org,mkwst@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12525 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 09:58:22 +00:00
yangguo@chromium.org
70e09a7e22 Fix build on OpenBSD/i386.
BUG=v8:1445

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 07:56:15 +00:00
yangguo@chromium.org
9d94f92d56 Improve the assembly code for power function with integer exponential.
The change removes one unused multiply and reschedules
the shift, multiply and jump instructions to reduce
stall. Experiment shows it improve about 20% performance
on x86 for exponetials from about 100 to 2000.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12521 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-17 07:45:54 +00:00
danno@chromium.org
48d327d0b4 Let the embedder store arbitrary Values via Context::SetData
In WebKit, we would like to store a void* to a data structure that contains
lots of exciting per-context data. The current API restricts us to storing only
Strings, which is less useful.

I've also cleaned up the implementation of GetData to be less convoluted.

Review URL: https://codereview.chromium.org/10907189
Patch from Adam Barth <abarth@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 16:13:23 +00:00
verwaest@chromium.org
204d22a583 Moving the WhitenessWitness back to DescriptorArray.
TransitionArrays never allocate while being created.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12519 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 15:10:31 +00:00
yangguo@chromium.org
cb72bf5735 Fix debugger's eval when close to stack overflow.
R=verwaest@chromium.org
BUG=v8:2318

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:40:32 +00:00
verwaest@chromium.org
fb506e0864 Only count the descriptor array if it's owned by the map.
Review URL: https://chromiumcodereview.appspot.com/10918245

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12517 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:37:41 +00:00
yangguo@chromium.org
a3b006058a Add checks to live edit.
BUG=v8:2297

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:31:11 +00:00
erik.corry@gmail.com
07ac7a4032 Fix test failures on nosnap builder.
Review URL: https://chromiumcodereview.appspot.com/10915277

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:19:42 +00:00
verwaest@chromium.org
ad4746c8a3 CNLT with descriptors but no valid enum fields has to clear the EnumCache.
Review URL: https://chromiumcodereview.appspot.com/10928204

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12512 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 13:15:43 +00:00
erik.corry@gmail.com
a36695e853 Microoptimization to regexps.
Review URL: https://chromiumcodereview.appspot.com/10917260

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12511 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 12:01:12 +00:00
svenpanne@chromium.org
58c8d208f5 Consistently use named getters for Lithium operands on ia32.
With this CL we clearly distinguish two different views on Lithium
instructions: For register allocation, the actual instruction/operand
is irrelevant, so it has only an iterator/indexed view on the
instruction operands. All other places, most importantly code
generation, use named getters for the operands now, making it easy to
see where each one is used.

Review URL: https://codereview.chromium.org/10919261

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12510 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:55:49 +00:00
erik.corry@gmail.com
8924052787 Fix compile errors on Win64.
Review URL: https://chromiumcodereview.appspot.com/10913273

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12509 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:48:31 +00:00