platform/upstream/v8.git
12 years agoMinor cleanup and optimisation of element methods.
rossberg@chromium.org [Mon, 12 Nov 2012 11:08:34 +0000 (11:08 +0000)]
Minor cleanup and optimisation of element methods.

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMake formatting error message side-effect-free.
yangguo@chromium.org [Mon, 12 Nov 2012 10:33:20 +0000 (10:33 +0000)]
Make formatting error message side-effect-free.

BUG=v8:2398

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix length check in JSON.stringify.
yangguo@chromium.org [Mon, 12 Nov 2012 10:20:07 +0000 (10:20 +0000)]
Fix length check in JSON.stringify.

R=verwaest@chromium.org
BUG=160010

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRefactoring incremental marking
hpayer@chromium.org [Mon, 12 Nov 2012 10:12:35 +0000 (10:12 +0000)]
Refactoring incremental marking

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement Object.getNotifier() and remove Object.notify()
rossberg@chromium.org [Fri, 9 Nov 2012 16:14:42 +0000 (16:14 +0000)]
Implement Object.getNotifier() and remove Object.notify()

Updated all tests to use getNotifier or actual object mutation instead of notify, and added tests for new behavior of getNotifier.

Review URL: https://codereview.chromium.org/11369154
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRefactoring: Make emit_debug_code flag handling architecture-independent.
svenpanne@chromium.org [Fri, 9 Nov 2012 13:43:48 +0000 (13:43 +0000)]
Refactoring: Make emit_debug_code flag handling architecture-independent.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRefactoring: Make predictable code flag handling architecture-independent.
svenpanne@chromium.org [Fri, 9 Nov 2012 13:10:10 +0000 (13:10 +0000)]
Refactoring: Make predictable code flag handling architecture-independent.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDisable code aging due to bugs.
danno@chromium.org [Fri, 9 Nov 2012 13:04:51 +0000 (13:04 +0000)]
Disable code aging due to bugs.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12919 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMinimal implementation and tests of observable array methods
rossberg@chromium.org [Fri, 9 Nov 2012 12:28:22 +0000 (12:28 +0000)]
Minimal implementation and tests of observable array methods

Bail out of any special-casing in array methods.
Further optimization is possible, but can be left for later.

Review URL: https://codereview.chromium.org/11369151
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12917 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoKeep the number of descriptors below DescriptorArray::kMaxNumberOfDescriptors even...
svenpanne@chromium.org [Fri, 9 Nov 2012 11:30:05 +0000 (11:30 +0000)]
Keep the number of descriptors below DescriptorArray::kMaxNumberOfDescriptors even for accessors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12916 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd more test coverage for setting Array.length
rossberg@chromium.org [Fri, 9 Nov 2012 11:00:13 +0000 (11:00 +0000)]
Add more test coverage for setting Array.length

Covers truncation of holey arrays and defineProperty('length').

Review URL: https://codereview.chromium.org/11369150
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12915 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoObject.observe: notify when element addition causes array growth
rossberg@chromium.org [Fri, 9 Nov 2012 10:57:54 +0000 (10:57 +0000)]
Object.observe: notify when element addition causes array growth

Review URL: https://codereview.chromium.org/11369135
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12914 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix InternalObjectHashTable to properly update table ref in observationState
rossberg@chromium.org [Fri, 9 Nov 2012 10:51:35 +0000 (10:51 +0000)]
Fix InternalObjectHashTable to properly update table ref in observationState

The previous fix wasn't broad enough: it only fixed the reference for a single Context.

Review URL: https://codereview.chromium.org/11361172
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12913 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSome improvements in register usage in lithium compilation of LoadKeyed/StoreKeyed...
mvstanton@chromium.org [Fri, 9 Nov 2012 10:21:07 +0000 (10:21 +0000)]
Some improvements in register usage in lithium compilation of LoadKeyed/StoreKeyed operations.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRollback of r12868, r12849 on bleeding_edge.
svenpanne@chromium.org [Fri, 9 Nov 2012 10:07:54 +0000 (10:07 +0000)]
Rollback of r12868, r12849 on bleeding_edge.

Fixed visibility attribute for GetPointerFromInternalField

Heavy cleanup of the external pointer API.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agogit shoult ignore gtags and htags (GNU Global) output.
mvstanton@chromium.org [Fri, 9 Nov 2012 09:37:58 +0000 (09:37 +0000)]
git shoult ignore gtags and htags (GNU Global) output.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12910 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoES6: Add support for Set and Map clear method
mstarzinger@chromium.org [Fri, 9 Nov 2012 09:01:29 +0000 (09:01 +0000)]
ES6: Add support for Set and Map clear method

http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts, section
15.14.5.3 and 15.14.5.2

BUG=v8:2400

Review URL: https://codereview.chromium.org/11409002
Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12909 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoTurn message property of the error object into a data property.
yangguo@chromium.org [Fri, 9 Nov 2012 08:22:02 +0000 (08:22 +0000)]
Turn message property of the error object into a data property.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12908 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFixed assertion.
svenpanne@chromium.org [Fri, 9 Nov 2012 07:26:05 +0000 (07:26 +0000)]
Fixed assertion.

The name in question is not necessarily a symbol, so we have to use Equals instead of ==.

BUG=http://www.playescapegoat.com/

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12907 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoActive code aging by default.
danno@chromium.org [Thu, 8 Nov 2012 17:31:45 +0000 (17:31 +0000)]
Active code aging by default.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12906 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoHandle Object.observe notifications for setting Array.length
rossberg@chromium.org [Thu, 8 Nov 2012 16:12:12 +0000 (16:12 +0000)]
Handle Object.observe notifications for setting Array.length

Also handles notification of deleted properties when an array
is truncated by setting length.

Review URL: https://codereview.chromium.org/11338048
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement MarkIndependent(Isolate*) and MarkPartiallyDependent(Isolate*)
mstarzinger@chromium.org [Thu, 8 Nov 2012 15:01:26 +0000 (15:01 +0000)]
Implement MarkIndependent(Isolate*) and MarkPartiallyDependent(Isolate*)

BUG=
TEST=cctest/test-api/IndependentWeakHandle

Review URL: https://codereview.chromium.org/11369131
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12904 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReshuffle an if() condition to not depend on an uninitialized value.
mstarzinger@chromium.org [Thu, 8 Nov 2012 14:40:55 +0000 (14:40 +0000)]
Reshuffle an if() condition to not depend on an uninitialized value.

Node::class_id_ contains garbage for newly allocated (FREE) nodes. This patch
changes the code to first test the node state_, then (for non-FREE nodes),
class_id_, and not the other way around.

This does not affect the branch taken (i.e. the current code is correct),
but makes Valgrind and MSan happy.

Review URL: https://codereview.chromium.org/11362158
Patch from Evgeniy Stepanov <eugenis@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDelivery logic for Object.observe
rossberg@chromium.org [Thu, 8 Nov 2012 13:44:59 +0000 (13:44 +0000)]
Delivery logic for Object.observe

This CL has two parts: the first is the logic itself, whereby each observer callback is assigned
a "priority" number the first time it's passed as an observer to Object.observe(), and that
priority is used to determine the order of delivery.

The second part invokes the above logic as part of the API, when the JS stack winds down to
zero.

Added several tests via the API, as the delivery logic isn't testable from a JS test
(it runs after such a test would exit).

Review URL: https://codereview.chromium.org/11266011
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12902 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoObject.observe: Fixed missing case for turning off ICs.
rossberg@chromium.org [Thu, 8 Nov 2012 13:15:54 +0000 (13:15 +0000)]
Object.observe: Fixed missing case for turning off ICs.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12901 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoObject.observe: generate change records for indexed properties.
rossberg@chromium.org [Thu, 8 Nov 2012 12:58:08 +0000 (12:58 +0000)]
Object.observe: generate change records for indexed properties.

Details:
- Extend ElementAccessors with GetAttributes method.
- Add HasLocalElement, Get[Local]ElementAttribute methods to JSReceiver/JSObject.
- Otherwise, mirror implementation for named properties.

Cannot correctly handle the cases yet where an accessor is redefined or deleted.

Also fixed handling of object info table.

(Based on CL https://codereview.chromium.org/11362115/)

R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix intptr_t/int32_t casting problem on Win64.
danno@chromium.org [Thu, 8 Nov 2012 12:53:15 +0000 (12:53 +0000)]
Fix intptr_t/int32_t casting problem on Win64.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd code again to allow reclaiming old unexecuted functions.
danno@chromium.org [Thu, 8 Nov 2012 12:18:11 +0000 (12:18 +0000)]
Add code again to allow reclaiming old unexecuted functions.

When code objects in the heap for FUNCTIONs and OPTIMIZED_FUNCTIONs are marked by the GC, their prologue is patched with a call to a stub that removes the patch. This allows the collector to quickly identify code objects that haven't been executed since the last full collection (they are the ones that sill contain the patch). The functionality is currently disabled, but can be activated by specifying the "--age-code".

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12898 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRename kAsciiStringTag to kOneByteStringTag
yangguo@chromium.org [Thu, 8 Nov 2012 12:14:29 +0000 (12:14 +0000)]
Rename kAsciiStringTag to kOneByteStringTag

This is just a rename. After commit, I'll begin with the semantic changes.
Until those are complete, kOneByteStringTag will have the same meaning as
kAsciiStringTag.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11293168
Patch from Dan Carney <dcarney@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix slack tracking when instance prototype changes.
mstarzinger@chromium.org [Thu, 8 Nov 2012 11:56:44 +0000 (11:56 +0000)]
Fix slack tracking when instance prototype changes.

This fixes a corner case when the instance prototype of a function is
changed while inobject slack tracking is still in progress. This caused
the intial map to be unrelated for functions with the same shared info
and hence the shared construct stub is no longer generic enough to work
for all those functions.

R=danno@chromium.org
BUG=chromium:157019
TEST=mjsunit/regress/regress-crbug-157019

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12896 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUse movw/movt on ARM to load constant roots
danno@chromium.org [Thu, 8 Nov 2012 10:32:39 +0000 (10:32 +0000)]
Use movw/movt on ARM to load constant roots
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11307012
Patch from Jay Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12895 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix disabling of code flusher while marking.
mstarzinger@chromium.org [Thu, 8 Nov 2012 10:26:50 +0000 (10:26 +0000)]
Fix disabling of code flusher while marking.

This fixes a corner case when the code flusher is disabled while
incremental marking is running. The list of candidates needs to be
evicted to prevent list fragments without a head floating around.

R=ulan@chromium.org
BUG=chromium:159140

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12894 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMake test case in r12891 non-threaded.
mstarzinger@chromium.org [Thu, 8 Nov 2012 09:45:47 +0000 (09:45 +0000)]
Make test case in r12891 non-threaded.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12893 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRevert r12889 due to Webkit test failures.
mstarzinger@chromium.org [Thu, 8 Nov 2012 09:19:23 +0000 (09:19 +0000)]
Revert r12889 due to Webkit test failures.

Pass the SIGPROF signal on to previously registered signal handler.

Regressions: Unexpected crashes (2)
  inspector/profiler/cpu-profiler-profiling-without-inspector.html
  inspector/profiler/cpu-profiler-profiling.html

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12892 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd a test case for object grouping in a scavenger GC
mstarzinger@chromium.org [Thu, 8 Nov 2012 09:10:53 +0000 (09:10 +0000)]
Add a test case for object grouping in a scavenger GC

BUG=v8:2077
TEST=cctest/test-api/ApiObjectGroupsCycleForScavenger

Review URL: https://codereview.chromium.org/11312123
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12891 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMove vldr in DoLoadKeyedFastDoubleElement before the hole check
danno@chromium.org [Wed, 7 Nov 2012 21:38:46 +0000 (21:38 +0000)]
Move vldr in DoLoadKeyedFastDoubleElement before the hole check
This reschedules instructions to better absorb VFP load latency.
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11363086
Patch from Rajeev Krithivasan <rkrithiv@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12890 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPass the SIGPROF signal on to previously registered signal handler.
danno@chromium.org [Wed, 7 Nov 2012 17:23:02 +0000 (17:23 +0000)]
Pass the SIGPROF signal on to previously registered signal handler.

This enables the google-perftools SIGPROF signal handler to continue to work properly.

BUG=none

Review URL: https://codereview.chromium.org/11195045
Patch from William Chan <willchan@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12889 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoObject.observe: include oldValue in change records,
rossberg@chromium.org [Wed, 7 Nov 2012 14:14:50 +0000 (14:14 +0000)]
Object.observe: include oldValue in change records,
plus more accurate distinction of different change types.

Required handlifying more code.

Also fixed a handlification bug in JSProxy::GetElementAttributeWithHandler.

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12888 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSimplify some of the startup code for SubStringStub::Generate.
ulan@chromium.org [Wed, 7 Nov 2012 13:22:03 +0000 (13:22 +0000)]
Simplify some of the startup code for SubStringStub::Generate.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12887 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSupport shared library build of Android for v8.
ulan@chromium.org [Wed, 7 Nov 2012 12:22:48 +0000 (12:22 +0000)]
Support shared library build of Android for v8.

v8 depends on the system log library. If we built it as a separate so,
log needs to be included in the link step.

BUG=chromium:158821

Review URL: https://chromiumcodereview.appspot.com/11369081
Patch from Yaron Friedman <yfriedman@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove check for recursion depth for JSON.stringify.
yangguo@chromium.org [Wed, 7 Nov 2012 12:12:52 +0000 (12:12 +0000)]
Remove check for recursion depth for JSON.stringify.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix another casting problem in Win64
danno@chromium.org [Wed, 7 Nov 2012 10:31:45 +0000 (10:31 +0000)]
Fix another casting problem in Win64

TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12881 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix size_t/int casting problem on Win64 build
danno@chromium.org [Wed, 7 Nov 2012 09:59:50 +0000 (09:59 +0000)]
Fix size_t/int casting problem on Win64 build

TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12880 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoDecouple allocation and creation of deopt tables
danno@chromium.org [Wed, 7 Nov 2012 08:49:17 +0000 (08:49 +0000)]
Decouple allocation and creation of deopt tables

This makes it possible to calculate the future address of a deopt entry before it is possible to generate the deopt table.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12877 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Consolidated all the key store/load classes in the Hydrogen and Lithium space...
mvstanton@chromium.org [Wed, 7 Nov 2012 08:37:58 +0000 (08:37 +0000)]
MIPS: Consolidated all the key store/load classes in the Hydrogen and Lithium space into just two: HLoadKeyed/HLoadKeyedGeneric and HStoreKeyed/HStoreKeyedGeneric LLoadKeyed/LLoadKeyedGeneric and LStoreKeyed/LStoreKeyedGeneric

Port r12839 (b8b7faa3)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoES6: Adding support for size to Set and Map
mstarzinger@chromium.org [Tue, 6 Nov 2012 18:14:45 +0000 (18:14 +0000)]
ES6: Adding support for size to Set and Map

Section 15.14.5.10 and 15.16.5.7 in the October 26, 2012 ES6 draft,
http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts

This adds a getter for "size" to Set.prototype and Map.prototype which reflects
the number of elements in the Set and Map respectively.

BUG=v8:2395

Review URL: https://codereview.chromium.org/11360089
Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12875 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAllow collection of DOM objects in minor GC cycles.
mstarzinger@chromium.org [Tue, 6 Nov 2012 17:32:15 +0000 (17:32 +0000)]
Allow collection of DOM objects in minor GC cycles.

A design document: https://docs.google.com/a/google.com/document/d/16DeHrzkm3cO9XCPT1aK3Y5qgUxXB3RFmueqQWYmN2rI/edit

Performance & memory results: https://docs.google.com/a/google.com/document/d/1h0-EsHu7T0sSMuZm5eE0r1e8sCAzY3weLvsDUpOSngE/edit

The WebKit side patch: https://bugs.webkit.org/show_bug.cgi?id=98725

At present no one is using the V8 APIs this patch is going to add. After this patch is landed, the WebKit side patch will use it.

BUG=

Review URL: https://codereview.chromium.org/11085015
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12874 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoStore Object.observe state per-isolate rather than per-context
mstarzinger@chromium.org [Tue, 6 Nov 2012 16:47:15 +0000 (16:47 +0000)]
Store Object.observe state per-isolate rather than per-context

This requires adding a new JSObject to the strong root list and populating it from
object-observe.js. The main other change is that we now directly use ObjectHashTable
from JS rather than using WeakMap, since using the latter would end up leaking whichever
Context initialized that observation state.

Added a test via the API showing that different contexts all end up working on the same state.

Review URL: https://codereview.chromium.org/11274014
Patch from Adam Klein <adamk@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFixed visibility attribute for GetPointerFromInternalField
svenpanne@chromium.org [Tue, 6 Nov 2012 13:07:06 +0000 (13:07 +0000)]
Fixed visibility attribute for GetPointerFromInternalField

TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12868 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoObject.observe: generate change records for named properties.
rossberg@chromium.org [Tue, 6 Nov 2012 12:32:36 +0000 (12:32 +0000)]
Object.observe: generate change records for named properties.

In more detail:
- Set observation bit for observed objects (and make NormalizedMapCache respect it).
- Mutation of observed objects is always delegated from ICs to runtime.
- Introduce JS runtime function for notifying generated changes.
- Invoke this function in the appropriate places (including some local refactoring).
- Inclusion of oldValue field is not yet implemented, nor element properties.

Also, shortened flag to --harmony-observation.

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12867 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoObject.observe: implement map bit and functions to access it.
rossberg@chromium.org [Tue, 6 Nov 2012 12:30:22 +0000 (12:30 +0000)]
Object.observe: implement map bit and functions to access it.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12866 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.15.2.
verwaest@chromium.org [Tue, 6 Nov 2012 12:10:54 +0000 (12:10 +0000)]
Prepare push to trunk.  Now working on version 3.15.2.

R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12863 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPut incremental code flushing behind a flag.
mstarzinger@chromium.org [Tue, 6 Nov 2012 11:54:05 +0000 (11:54 +0000)]
Put incremental code flushing behind a flag.

This is used to disable incremental code flushing by default for now
until we can stabilize it and make it ready for production.

R=verwaest@chromium.org
BUG=chromium:159140

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12862 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix stack overflow for mac build.
yangguo@chromium.org [Mon, 5 Nov 2012 18:39:59 +0000 (18:39 +0000)]
Fix stack overflow for mac build.

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemoved duplicate line.
verwaest@chromium.org [Mon, 5 Nov 2012 15:37:04 +0000 (15:37 +0000)]
Removed duplicate line.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12860 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoReduce stack frame size in JSON.stringify.
yangguo@chromium.org [Mon, 5 Nov 2012 15:01:51 +0000 (15:01 +0000)]
Reduce stack frame size in JSON.stringify.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12859 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove superfluous setting of bitfield3.
verwaest@chromium.org [Mon, 5 Nov 2012 14:43:11 +0000 (14:43 +0000)]
Remove superfluous setting of bitfield3.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemoved useless Canonicalize implementations subsumed by dead code elimination.
svenpanne@chromium.org [Mon, 5 Nov 2012 14:38:00 +0000 (14:38 +0000)]
Removed useless Canonicalize implementations subsumed by dead code elimination.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12857 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoNano-refactoring: Simplify initialization
svenpanne@chromium.org [Mon, 5 Nov 2012 14:37:28 +0000 (14:37 +0000)]
Nano-refactoring: Simplify initialization

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12856 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd rotate-right instruction to hydrogen and use it instead of bitwise operations
ulan@chromium.org [Mon, 5 Nov 2012 13:28:10 +0000 (13:28 +0000)]
Add rotate-right instruction to hydrogen and use it instead of bitwise operations
of the form ((x >>> i) | (x << (32 - i))).

This CL is based on https://chromiumcodereview.appspot.com/10984057/
by Jay Conrod <dconrod@codeaurora.org>.

R=danno@chromium.org,mstarzinger@chromium.org,dconrod@codeaurora.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement IsIndependent(Isolate*)
mstarzinger@chromium.org [Mon, 5 Nov 2012 13:20:45 +0000 (13:20 +0000)]
Implement IsIndependent(Isolate*)

BUG=
TEST=cctest/test-api/IndependentWeakHandle

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

Review URL: https://codereview.chromium.org/11368053
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoAdd fast path for FastProperty objects in JSON.stringify.
yangguo@chromium.org [Mon, 5 Nov 2012 12:59:35 +0000 (12:59 +0000)]
Add fast path for FastProperty objects in JSON.stringify.

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImplement IsIndependent(Isolate*)
mstarzinger@chromium.org [Mon, 5 Nov 2012 12:35:51 +0000 (12:35 +0000)]
Implement IsIndependent(Isolate*)

BUG=
TEST=cctest/test-api/IndependentWeakHandle

Review URL: https://codereview.chromium.org/11368053
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix JSON.stringify wrt harmony proxies.
yangguo@chromium.org [Mon, 5 Nov 2012 10:53:56 +0000 (10:53 +0000)]
Fix JSON.stringify wrt harmony proxies.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImprove handle allocation in JSON.parse.
yangguo@chromium.org [Mon, 5 Nov 2012 10:50:36 +0000 (10:50 +0000)]
Improve handle allocation in JSON.parse.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoHeavy cleanup of the external pointer API.
svenpanne@chromium.org [Mon, 5 Nov 2012 10:25:32 +0000 (10:25 +0000)]
Heavy cleanup of the external pointer API.

Added highly efficient Object::SetAlignedPointerInInternalField and
Object::GetAlignedPointerFromInternalField functions for 2-byte-aligned
pointers. Their non-aligned counterparts Object::GetPointerFromInternalField and
Object::SetPointerInInternalField are now deprecated utility functions.

External is now a true Value again, with New/Value/Cast using a JSObject with an
internal field containing a Foreign. External::Wrap, and External::Unwrap are now
deprecated utility functions.

Added Context::GetEmbedderData and Context::SetEmbedderData. Deprecated
Context::GetData and Context::SetData, these are now only wrappers to access
internal field 0.

Added highly efficient Context::SetAlignedPointerInEmbedderData and
Context::GetAlignedPointerFromEmbedderData functions for 2-byte-aligned
pointers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSimplified HCheckMaps handling a bit.
svenpanne@chromium.org [Mon, 5 Nov 2012 10:06:24 +0000 (10:06 +0000)]
Simplified HCheckMaps handling a bit.

This is a refactoring-only CL which simplifies the way we emit combinations of
Smi+map checks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoImprove handling of property loads on the proto chain.
svenpanne@chromium.org [Mon, 5 Nov 2012 08:53:54 +0000 (08:53 +0000)]
Improve handling of property loads on the proto chain.

Previously Crankshaft emitted a generic load for these, now we emit a load of a
named field, guarded by a proto chain check.

LCheckPrototypeMaps now returns the holder, which is for free, because it
already had to check its map as the last step, anyway. This is in sync with what
StubCompiler::CheckPrototype does.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoHandle edge cases in basic JSON.stringify.
yangguo@chromium.org [Fri, 2 Nov 2012 14:46:57 +0000 (14:46 +0000)]
Handle edge cases in basic JSON.stringify.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCorrectly visit all external strings.
yangguo@chromium.org [Fri, 2 Nov 2012 12:45:00 +0000 (12:45 +0000)]
Correctly visit all external strings.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoEnsure reducing the length of an array doesn't make it go holey.
verwaest@chromium.org [Fri, 2 Nov 2012 10:24:56 +0000 (10:24 +0000)]
Ensure reducing the length of an array doesn't make it go holey.

Also only transition and/or change anything to the backing store if we are
actually going to delete anything.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoConsolidated all the key store/load classes in the Hydrogen and Lithium
mvstanton@chromium.org [Fri, 2 Nov 2012 09:18:53 +0000 (09:18 +0000)]
Consolidated all the key store/load classes in the Hydrogen and Lithium
space into just two:
HLoadKeyed/HLoadKeyedGeneric and HStoreKeyed/HStoreKeyedGeneric
LLoadKeyed/LLoadKeyedGeneric and LStoreKeyed/LStoreKeyedGeneric
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix tick processor to correctly handle the 'parallel-compiler' tick.
yangguo@chromium.org [Wed, 31 Oct 2012 11:43:13 +0000 (11:43 +0000)]
Fix tick processor to correctly handle the 'parallel-compiler' tick.
BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com/11347043
Patch from Rajeev Krithivasan <rkrithiv@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoPrepare push to trunk. Now working on version 3.15.1.
danno@chromium.org [Wed, 31 Oct 2012 09:58:22 +0000 (09:58 +0000)]
Prepare push to trunk.  Now working on version 3.15.1.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix handling arrays with holes in JSON.stringify.
yangguo@chromium.org [Tue, 30 Oct 2012 15:29:34 +0000 (15:29 +0000)]
Fix handling arrays with holes in JSON.stringify.

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: fix mips_arch_variant bug in GYP build.
jkummerow@chromium.org [Tue, 30 Oct 2012 10:54:44 +0000 (10:54 +0000)]
MIPS: fix mips_arch_variant bug in GYP build.

There is a small bug that causes to build mips32r2
version of v8 as mips32 (r1). This affects only
the compiled code.

In the default case of building for mips32r2,
the compiler flags are the following:

-EL -mhard-float -mips32r2 -Wa,-mips32r2 -mips32 -Wa,-mips32

Since the "last flag wins" the object files are
compiled as mips32. In a funny twist, the
code sourcery lite compilers do not have multi-lib support,
and there is a bug that if you tell it to link mips32,
it will silently link the object files with
mips32r2 libraries, and then the resulting binary is mips32r2.

This commit fixes the mips32r1/mips32r2 build.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoLoosen aligned code target requirement on ARM
danno@chromium.org [Mon, 29 Oct 2012 16:27:54 +0000 (16:27 +0000)]
Loosen aligned code target requirement on ARM

Fixes crashes when V8 is built as Thumb code.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoMIPS: Cleanup handling of shifts: SHR can deoptimize only when its a shift by 0,...
danno@chromium.org [Mon, 29 Oct 2012 15:10:21 +0000 (15:10 +0000)]
MIPS: Cleanup handling of shifts: SHR can deoptimize only when its a shift by 0, all other shift never deoptimize.

Port r12373 (9fdde2ad)

Original commit message:
Fix DoDeferredNumberTagU to keep the value in xmm1 instead of xmm0 on x64.

xmm0 is not saved across runtime call on x64 because MacroAssembler::EnterExitFrameEpilogue preserves only allocatable XMM registers unlike on ia32 where it preserves all registers.

Cleanup handling of shifts: SHR can deoptimize only when its a shift by 0, all other shift never deoptimize.

Fix type inference for i-to-t change instruction. On X64 this ensures that write-barrier is generated correctly.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoTreat leading zeros in JSON.parse correctly.
yangguo@chromium.org [Mon, 29 Oct 2012 12:01:29 +0000 (12:01 +0000)]
Treat leading zeros in JSON.parse correctly.

R=verwaest@chromium.org
BUG=158185

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix performance regression introduced by r12812.
ulan@chromium.org [Mon, 29 Oct 2012 11:45:57 +0000 (11:45 +0000)]
Fix performance regression introduced by r12812.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRemove redundant jump to deoptimization (the jump already exists in DoCheckMapCommon)
danno@chromium.org [Mon, 29 Oct 2012 11:45:40 +0000 (11:45 +0000)]
Remove redundant jump to deoptimization (the jump already exists in DoCheckMapCommon)
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11265044
Patch from Rajeev Krithivasan <rkrithiv@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix ugly typo in GenerateNewNonStrictFast.
mstarzinger@chromium.org [Fri, 26 Oct 2012 10:55:25 +0000 (10:55 +0000)]
Fix ugly typo in GenerateNewNonStrictFast.

R=svenpanne@chromium.org
BUG=chromium:157520
TEST=mjsunit/regress/regress-crbug-157520

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix code flusher to process weak function links.
mstarzinger@chromium.org [Fri, 26 Oct 2012 09:44:34 +0000 (09:44 +0000)]
Fix code flusher to process weak function links.

This fixes a corner case where weak function links of the code flushing
candidates list were destroyed by scavenges that happened during
incremental marking. Now those weak function links are updated while
scavenging happens.

R=ulan@chromium.org
TEST=cctest/test-heap/TestCodeFlushingIncrementalScavenge

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRelax test expectations for json-recursive.js
yangguo@chromium.org [Fri, 26 Oct 2012 07:52:18 +0000 (07:52 +0000)]
Relax test expectations for json-recursive.js

R=mvstanton@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoUpdate ReceiverObjectNeedsWriteBarrier to include HFastLiteral
mstarzinger@chromium.org [Thu, 25 Oct 2012 15:45:24 +0000 (15:45 +0000)]
Update ReceiverObjectNeedsWriteBarrier to include HFastLiteral
This will prevent unnecessary write barriers for literals.
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/11143005
Patch from Derek J Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSet kChangesNewSpacePromotion for HStringAdd
mstarzinger@chromium.org [Thu, 25 Oct 2012 15:23:39 +0000 (15:23 +0000)]
Set kChangesNewSpacePromotion for HStringAdd
TEST=none
BUG=none

Review URL: https://codereview.chromium.org/11143006
Patch from Derek J Conrod <dconrod@codeaurora.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoSet up Proxy methods the proper way.
rossberg@chromium.org [Thu, 25 Oct 2012 15:13:44 +0000 (15:13 +0000)]
Set up Proxy methods the proper way.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoInitial JS stub implementation of Object.observe. Adds support for .object/.unobserve...
rossberg@chromium.org [Thu, 25 Oct 2012 14:56:44 +0000 (14:56 +0000)]
Initial JS stub implementation of Object.observe. Adds support for .object/.unobserve/.notify/.deliverChangeRecords. No delivery mechanism is implemented for end-of-microtask.

Review URL: https://codereview.chromium.org/11225058
Patch from Rafael Weinstein <rafaelw@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoInitial JS stub implementation of Object.observe. Adds support for .object/.unobserve...
rossberg@chromium.org [Thu, 25 Oct 2012 14:53:26 +0000 (14:53 +0000)]
Initial JS stub implementation of Object.observe. Adds support for .object/.unobserve/.notify/.deliverChangeRecords. No delivery mechanism is implemented for end-of-microtask.

Review URL: https://codereview.chromium.org/11225058
Patch from Rafael Weinstein <rafaelw@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix test failures in r12813.
mstarzinger@chromium.org [Thu, 25 Oct 2012 13:54:10 +0000 (13:54 +0000)]
Fix test failures in r12813.

R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoRelax test expectations to appease mac build.
yangguo@chromium.org [Thu, 25 Oct 2012 12:39:41 +0000 (12:39 +0000)]
Relax test expectations to appease mac build.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCatch stack overflow in JSON.parse.
yangguo@chromium.org [Thu, 25 Oct 2012 12:36:40 +0000 (12:36 +0000)]
Catch stack overflow in JSON.parse.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoExpose gc(true) to JavaScript, which triggers a scavenger GC.
mstarzinger@chromium.org [Thu, 25 Oct 2012 12:23:03 +0000 (12:23 +0000)]
Expose gc(true) to JavaScript, which triggers a scavenger GC.

With the --expose_gc option, gc() is exposed to JavaScript. Currently gc() triggers a full GC.

To enable JavaScript to test the behavior of a scavenger GC, this patch exposes gc(true). If the first argument is true, gc(...) triggers a scavenger GC. Otherwise, gc(...) triggers a full GC.

BUG=
Test=Manually confirmed that gc() and gc(false) trigger a full GC and that gc(true) triggers a scavenger GC.

Review URL: https://codereview.chromium.org/11232065
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoCorrectly check for stack limit in JSON.stringify.
yangguo@chromium.org [Thu, 25 Oct 2012 12:18:24 +0000 (12:18 +0000)]
Correctly check for stack limit in JSON.stringify.

Changes include:
 - inline functions in a way as not to waste stack space.
 - reset StackReserveSize to the value prior to r12808.
 - check stack overflow dynamically.

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoGet rid of obsolete unchecked accessors.
mstarzinger@chromium.org [Thu, 25 Oct 2012 11:52:37 +0000 (11:52 +0000)]
Get rid of obsolete unchecked accessors.

R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix memory leak in RegExpStack.
ulan@chromium.org [Thu, 25 Oct 2012 11:10:13 +0000 (11:10 +0000)]
Fix memory leak in RegExpStack.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFast-forward to version 3.15.0
danno@chromium.org [Thu, 25 Oct 2012 10:53:35 +0000 (10:53 +0000)]
Fast-forward to version 3.15.0

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix typo in V8::MarkIndependent()
mstarzinger@chromium.org [Thu, 25 Oct 2012 10:07:26 +0000 (10:07 +0000)]
Fix typo in V8::MarkIndependent()

BUG=

Review URL: https://codereview.chromium.org/11238064
Patch from Kentaro Hara <haraken@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix memory leak in DeoptimizerData.
ulan@chromium.org [Thu, 25 Oct 2012 09:35:55 +0000 (09:35 +0000)]
Fix memory leak in DeoptimizerData.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

12 years agoFix stack overflow in JSON.stringify.
yangguo@chromium.org [Wed, 24 Oct 2012 15:49:59 +0000 (15:49 +0000)]
Fix stack overflow in JSON.stringify.

R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00