Commit Graph

8507 Commits

Author SHA1 Message Date
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
svenpanne@chromium.org
924c38c063 Consistently use named getters for Lithium operands on x64
Review URL: https://codereview.chromium.org/10933087

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12508 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:46:01 +00:00
yangguo@chromium.org
8d04c8c89f Replace r12503. Explicitly check toString() for exception in d8's print().
R=jkummerow@chromium.org
BUG=v8:2317

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:43:46 +00:00
erik.corry@gmail.com
ee55b2c2d3 Switch on code compaction on incremental GCs.
Review URL: https://chromiumcodereview.appspot.com/10928203

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:38:45 +00:00
erik.corry@gmail.com
5a8d1764bc Refactoring of snapshots. This simplifies and improves
the speed of deserializing code.  The current startup
time improvement for V8 is around 6%, but code deserialization
is speeded up disproportionately, and we will soon have more
code in the snapshot.
* Removed support for deserializing into large object space.
  The regular pages are 1Mbyte now and that is plenty.  This
  is a big simplification.
* Instead of reserving space for the snapshot we actually
  allocate it now.  This removes some special casing from
  the memory management and simplifies deserialization since
  we are just bumping a pointer rather than calling the
  normal allocation routines during deserialization.
* Record in the snapshot how much we need to boot up and
  allocate it instead of just assuming that allocations in
  a new VM will always be linear.
* In the snapshot we always address an object as a negative
  offset from the current allocation point.  We used to
  sometimes address from the start of the deserialized data,
  but this is less useful now that we have good support for
  roots and repetitions in the deserialization data.
* Code objects were previously deserialized (like other
  objects) by alternating raw data (deserialized with memcpy)
  and pointers (to external references, other objects, etc.).
  Now we deserialize code objects with a single memcpy,
  followed by a series of skips and pointers that partially
  overwrite the code we memcopied out of the snapshot.
  The skips are sometimes merged into the following
  instruction in the deserialization data to reduce dispatch
  time.
* Integers in the snapshot were stored in a variable length
  format that gives a compact representation for small positive
  integers.  This is still the case, but the new encoding can
  be decoded without branches or conditional instructions,
  which is faster on a modern CPU.
Review URL: https://chromiumcodereview.appspot.com/10918067

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 11:16:56 +00:00
mstarzinger@chromium.org
77a7d9f539 Fix caching of optimized code for OSR.
This makes sure we do not share optimized code across closures that were
optimized using OSR (for a particular OSR entry AST id) even if caching
of optimized code kicks in.

R=danno@chromium.org
BUG=v8:2326
TEST=mjsunit/regress/regress-2326

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12504 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 10:41:31 +00:00
yangguo@chromium.org
4fe330c055 Not mask exception thrown by toString in String::UtfValue etc.
R=jkummerow@chromium.org
BUG=v8:2317

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12503 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 08:13:57 +00:00
danno@chromium.org
e8e675f259 Skip version 3.13.8 and fast-forward to 3.14.0
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12502 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-14 07:44:28 +00:00
verwaest@chromium.org
7a84e84143 Directly set the value in the descriptors pointer to avoid checks.
This is the only place from where we are allowed to modify the value of
the descriptors pointer.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12500 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-13 16:48:31 +00:00
verwaest@chromium.org
c037a7fe10 Clear the EnumLength fields of maps that lose their enumeration cache.
Review URL: https://chromiumcodereview.appspot.com/10905262

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12498 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-13 14:36:51 +00:00
mstarzinger@chromium.org
8db2000615 Fix API check for length of external arrays.
R=jkummerow@chromium.org
BUG=chromium:148896
TEST=cctest/test-api/ExternalArrayLimits

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12495 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-13 09:36:56 +00:00
verwaest@chromium.org
1d1adaf9d3 Ensure correct enumeration indices in the dict
BUG=chromium:148376

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12494 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-13 08:52:55 +00:00
mmassi@chromium.org
22aed1cddd Fixed bounds check removal by restricting it to int32 indexes (and reenabled both ABCR and index dehoisting).
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12493 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 17:00:25 +00:00
verwaest@chromium.org
ebd3241b05 Sharing of descriptor arrays.
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.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 16:43:57 +00:00
yangguo@chromium.org
67d0506622 Correctly initialize regexp global cache.
R=ulan@chromium.org
BUG=148378

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12491 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 15:26:43 +00:00
mstarzinger@chromium.org
a3733c64a7 Fix compilation issue in r12489.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 14:11:37 +00:00
mstarzinger@chromium.org
f37f504de5 Fix arguments object materialization during deopt.
This fixes materialization of arguments objects for strict mode functions during
deoptimization. We materialize arguments from the stack area where optimized
code pushes the arguments when entering the inlined environment. For adapted
invocations we use the arguments adaptor frame for materialization.

R=svenpanne@chromium.org
BUG=v8:2261
TEST=mjsunit/regress/regress-2261,mjsunit/compiler/inline-arguments

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12489 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 12:28:42 +00:00
yangguo@chromium.org
6a9e4048aa Introduce new API to expose external string resource regardless of encoding.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12488 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 11:29:50 +00:00
yangguo@chromium.org
7276fa39ab Shorten code path in string allocation.
This was part of r12430 (http://codereview.chromium.org/10857030/) which has been reverted.

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12487 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 11:15:20 +00:00
jkummerow@chromium.org
b6770314ab Fixed CHECK failure in LCodeGen::DoWrapReceiver when --deopt-every-n-times flag is present
BUG=148389

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-12 08:37:47 +00:00
yangguo@chromium.org
59b9a32b34 Fix edge case of extension with NULL as source string.
BUG=144649

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12485 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 14:16:56 +00:00
mmassi@chromium.org
bff3d2a8a6 Fix array index dehoisting.
BUG=141395
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12484 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 14:14:32 +00:00
erik.corry@gmail.com
1987542825 Fix invariant so that we cannot record relocation slots for
white objects when compacting.  Add flag for incremental code
compaction.
Review URL: https://chromiumcodereview.appspot.com/10907174

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 14:01:39 +00:00
mstarzinger@chromium.org
a64410d956 Prepare push to trunk. Now working on version 3.13.8.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12480 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 13:19:02 +00:00
yangguo@chromium.org
474e34e3c5 Fix TypeError message for Date builtins.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12479 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 12:43:17 +00:00
ulan@chromium.org
a9162af1af Fix delta computation in DoDeferredInstanceOfKnownGlobal() for ARM.
BUG=v8:2314

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12478 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-11 11:36:48 +00:00
peter.rybin@gmail.com
bda5ce9cd6 Introduce InternalProperty type and expose internal properties for bound functions
Committed: https://code.google.com/p/v8/source/detail?r=12346

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 23:17:04 +00:00
yangguo@chromium.org
266cca47fc Add more checks for native callback results.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12474 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 13:38:21 +00:00
mstarzinger@chromium.org
f6cd2403e3 Fix deoptimizer for shared optimized code.
The deoptimizer searched the stack for activations of the same function to
determine whether to trigger lazy deopting. Since we share optimized code we
actually need to search for activations of the same code (but potentially
different functions).

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 11:05:17 +00:00
yangguo@chromium.org
bf229e93eb Enable/disable LiveEdit using the (C++) debug API.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 09:24:17 +00:00
yangguo@chromium.org
1a0c14f12c Add checks to runtime functions.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12471 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-10 08:35:26 +00:00
svenpanne@chromium.org
7af6883098 Fixed deoptimization of inlined getters.
It is necessary to explicitly handle the internal frame lying between the caller
of the getter and the getter itself in the deoptimizer: When the getter is
inlined, leaving the internal frame restores the correct context.

BUG=http://crbug/134609
TEST=mjsunit/regress/regress-crbug-134609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12470 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-07 09:01:54 +00:00
ulan@chromium.org
6df4bcfecf Add support for running low level profiler on Android.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12469 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-06 15:01:20 +00:00
jkummerow@chromium.org
26f9e973eb Prepare push to trunk. Now working on version 3.13.7.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12464 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-06 13:45:58 +00:00
jkummerow@chromium.org
5330f5b24f Check the return value of API calls on ia32 and x64.
This implies that the return value of native getters is checked. The nice part
is that one can even see the name of the property in question in the abort
output when the check failed.

Under some circumstances even the return value of interceptors gets checked, but
I'm not 100% sure about this, because the interceptor code is basically tuned to
death.

The change seems to have very low overhead, so it might be feasible to keep this
check enabled unconditionally.

Review URL: https://chromiumcodereview.appspot.com/10918071
Patch from Sven Panne <svenpanne@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12446 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-05 16:08:13 +00:00
jkummerow@chromium.org
fe5ce826c8 Add empty-handle checks to API functions (#ifdef ENABLE_EXTRA_CHECKS)
Review URL: https://chromiumcodereview.appspot.com/10917088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12445 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-05 16:06:53 +00:00
jkummerow@chromium.org
c2fedcc344 Disable accessor inlining (due to broken deopts)
BUG=134609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12444 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-05 16:06:07 +00:00
verwaest@chromium.org
61d25b01bc Push stacktrace and die if the receiver is of unknown type.
Review URL: https://chromiumcodereview.appspot.com/10917086

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12443 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-05 12:30:49 +00:00
erik.corry@gmail.com
9ff7ec1c4a Fix binding in new Function().
Review URL: https://chromiumcodereview.appspot.com/10916114

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12442 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-05 11:45:58 +00:00
erik.corry@gmail.com
e5df02834b Fix some corner cases in skipping native methods using caller.
Review URL: https://chromiumcodereview.appspot.com/10911063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12439 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-05 08:19:49 +00:00
yangguo@chromium.org
5ac2a5d22e Revert r12430, r12432, r12433 (basic support for Latin1).
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12438 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-04 12:23:22 +00:00
verwaest@chromium.org
a8638c1570 Support register as right operand in min/max support.
R=jkummerow@chromium.org
BUG=chromium:145961
TEST=mjsunit/regress/regress-crbug-145961.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12434 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-04 09:35:43 +00:00
yangguo@chromium.org
37c1c06108 Fix more windows build warnings.
TBR=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12433 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:50:24 +00:00
yangguo@chromium.org
f653480a0c Fix windows compile errors introduced by r12430.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12432 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:40:00 +00:00
verwaest@chromium.org
4c7be4f6c6 Do not generate new enumeration indices for global objects.
Review URL: https://chromiumcodereview.appspot.com/10911058

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12431 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:15:32 +00:00
yangguo@chromium.org
74f06b1f99 Add basic support for Latin1 to the API.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12430 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:06:36 +00:00
yangguo@chromium.org
66a16bd63a Use local variable for getter function in Error.stack
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12429 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 15:05:08 +00:00
mstarzinger@chromium.org
74aa15bfa0 Fix FindSharedFunctionInfoInScript to not optimize.
This prevents a corner case in FindSharedFunctionInfoInScript that would cause
functions to be optimized because an intermittent GC would clear the flag
indicating whether breakpoints are present. Above method was also moved into the
Debug class because it is only used by the debugger.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12428 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 14:23:00 +00:00
verwaest@chromium.org
996c84fb51 If we are trimming the whole array, just return the empty fixed array.
Review URL: https://chromiumcodereview.appspot.com/10911054

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12427 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 13:27:17 +00:00
verwaest@chromium.org
3eed540a0e Optimize dictionary enum generation.
Review URL: https://chromiumcodereview.appspot.com/10916076

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12426 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 12:31:24 +00:00
verwaest@chromium.org
53dd910bba Directly use %ObjectKeys in json stringify.
BUG=2312

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12424 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 08:37:47 +00:00
svenpanne@chromium.org
b7398b33c1 MIPS: First steps towards named Litihium operands.
Port r12383 (881d7d4d)

Original commit message:
Accessing Lithium operands via position is fragile and makes it impossible to
statically find all uses of a given operand. This CL is a step towards cleaning
this up, more to come...

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12423 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-09-03 06:36:19 +00:00
verwaest@chromium.org
cc17d6dc47 Only regenerate enumeration indices if properties were deleted.
This indicated by the NextEnumerationIndex diverging from the actual
NumberOfElements.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12422 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 18:12:25 +00:00
verwaest@chromium.org
9b7a673d47 Clear descriptor pointer when normalizing properties.
Review URL: https://chromiumcodereview.appspot.com/10909029

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12421 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 17:10:44 +00:00
yangguo@chromium.org
2e652e6f91 Fix VS2005 build.
R=jkummerow@chromium.org
BUG=v8:2313

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 14:45:31 +00:00
verwaest@chromium.org
2b91f23b58 MIPS: Use a special EnumLength field to indicate number of valid enum cache values.
Port r12400 (03ae62de)

Original commit message:
This is preparatory work for sharing Enum Caches.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 09:50:27 +00:00
yangguo@chromium.org
5dd51bafef Cache results in SearchRegExpMultiple.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 09:28:01 +00:00
rossberg@chromium.org
40f44b1d4f Activate fixed ES5 readonly semantics by default.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-31 09:12:31 +00:00
verwaest@chromium.org
a4f7ebe5a0 Removed trailing whitespace.
Review URL: https://chromiumcodereview.appspot.com/10916020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12414 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-30 18:10:09 +00:00
verwaest@chromium.org
90db487390 Elements load depends on the type of the receiver.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12413 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-30 17:31:32 +00:00
svenpanne@chromium.org
c3df19e692 Fixed comment and simplified the related code a bit.
TBR=erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12411 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-30 06:45:45 +00:00
yangguo@chromium.org
5087f3ac48 Prepare push to trunk. Now working on version 3.13.6.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 15:29:41 +00:00
yangguo@chromium.org
4e2027bbc2 Revert r12379 (Add checks to external string API).
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12406 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 15:23:48 +00:00
rossberg@chromium.org
3d35ecf3b8 Slightly simplify declaration of node types.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12405 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 09:33:14 +00:00
rossberg@chromium.org
a6e45ce7b8 Introduce some predicates over variable modes.
These should be handy when we add more declaration forms for Harmony.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 09:19:53 +00:00
yangguo@chromium.org
5419ee7ba0 Release stack trace data after firing Error.stack accessor.
BUG=v8:2308

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12403 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 07:51:48 +00:00
svenpanne@chromium.org
de3c3c0198 Added IC support for native setters on the prototype chain.
Review URL: https://chromiumcodereview.appspot.com/10873057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12402 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-29 06:12:46 +00:00
jkummerow@chromium.org
f9d4856289 Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
BUG=None
TEST=Included in CL.

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

Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12401 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 14:43:28 +00:00
verwaest@chromium.org
78037d0a4e Use a special EnumLength field to indicate number of valid enum cache values.
This is preparatory work for sharing Enum Caches.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 14:20:50 +00:00
rossberg@chromium.org
ccc827a6f8 Allocate block-scoped global bindings to global context.
- The global object has a reference to the current global scope chain.
  Running a script adds to the chain if it contains global lexical declarations.
- Scripts are executed relative to a global, not a native context.
- Harmony let and const bindings are allocated to the innermost global context;
  var and function still live on the global object.
  (Lexical bindings are not reflected on the global object at all,
  but that will probably change later using accessors, as for modules.)
- Compilation of scripts now needs a (global) context (previously only eval did).
- The global scope chain represents one logical scope, so collision tests take
  the chain into account.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12398 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 11:25:08 +00:00
rossberg@chromium.org
1dbf670713 Index script compilation cache over context, too,
in preparation for global lexical scope.

R=ulan@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 10:49:23 +00:00
yangguo@chromium.org
7cbca775ee Reland regexp global optimizations.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12396 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 09:37:41 +00:00
yangguo@chromium.org
ee6ec7e24e Prepare push to trunk. Now working on version 3.13.5.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12393 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 09:03:07 +00:00
yangguo@chromium.org
d3dca2adb0 Disable array bounds checks elimination.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 07:39:45 +00:00
svenpanne@chromium.org
f6f4798189 Print reason for disabling optimization. Kill --trace-bailout flag.
The reason for disabling optimization of a given function is carried around in
CompilationInfo. The new mechanism is general enough that --trace-opt now
subsumes everything --trace-bailout could print, so we nuked the latter flag.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-28 07:18:06 +00:00
verwaest@chromium.org
a713f82aa6 Revert "Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers."
This reverts commit r12389.

TBR=jkummerow@chromium.org, CC=siggi@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12390 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 19:47:02 +00:00
jkummerow@chromium.org
0a6493b5a8 Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as profilers.
BUG=None
TEST=Included in CL.

Review URL: https://chromiumcodereview.appspot.com/10795074
Patch from Sigurður Ásgeirsson <siggi@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 18:03:38 +00:00
ulan@chromium.org
7b1d13affc Revert r12342 "Flush monomorphic ICs on context disposal instead of context exit." because of canary channel crashes.
BUG=144230
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12388 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 16:08:27 +00:00
ulan@chromium.org
b588b0949f Disallow updates to ic_with_type_info_count with negative values.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12386 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 15:17:14 +00:00
verwaest@chromium.org
efb53e1499 Make order of addition the primary order of descriptor arrays.
The order by name is maintained as secondary order by using unused bits in the property details.

This is preliminary work towards sharing descriptors arrays.

The change allows us
- to get rid of the LastAdded bits in the map, binding it to the number of valid descriptors for the given map
- to avoid resorting by enumeration index to create the cache
- (maybe in the future, depending on performance) to get rid of the enumeration cache altogether.

Although generally the number_of_descriptors equals the NumberOfOwnDescriptors in the current version, this is preliminary work towards sharing    descriptors, where maps may have more descriptors than are valid for the map.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12385 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 13:47:34 +00:00
rossberg@chromium.org
cd585f26ab Introduce global contexts to represent lexical global scope(s).
They are yet unused; actual allocation of global lexical bindings in these contexts is implemented in a separate follow-up CL.

R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12384 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 09:40:26 +00:00
svenpanne@chromium.org
27c9ef9f79 First steps towards named Litihium operands.
Accessing Lithium operands via position is fragile and makes it impossible to
statically find all uses of a given operand. This CL is a step towards cleaning
this up, more to come...

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12383 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 09:39:05 +00:00
svenpanne@chromium.org
a30eab48cf Unbreak MIPS build.
TBR=vegorov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 09:05:07 +00:00
yurys@chromium.org
f2c0e06e64 Remove unused method and add line breaks after each serialized edge
Review URL: https://chromiumcodereview.appspot.com/10874063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12381 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 08:49:00 +00:00
ulan@chromium.org
2aad64d902 MIPS: Fix rounding in Uint8ClampedArray setter.
Port r12364 (31e40def)

Original commit message:
According to Web IDL spec, we should round to
the nearest integer, choosing the even integer
if it lies halfway between two.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-27 07:29:36 +00:00
yangguo@chromium.org
89cd0677dc Add check to external string resource.
Extensions are a source of external strings where we don't perform check yet.

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12379 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-24 13:01:52 +00:00
verwaest@chromium.org
5b2282c691 MIPS: Check that index and length are Smi in bounds check.
Port r12362 (cd39337c)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12376 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-24 09:06:23 +00:00
danno@chromium.org
3544e2e875 Disable speculative LICM when it may lead to unnecessary deopts
BUG=v8:2250
R=vegorov@chromium.org
TEST=tests/mjsunit/regress/regress-2250.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12375 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-23 21:08:58 +00:00
vegorov@chromium.org
106a83252d 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.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12373 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-23 16:14:01 +00:00
erikcorry
c6094f5237 Fix semaphore on MacOS. This is a commit of https://chromiumcodereview.appspot.com/10867009/ for Fedor Indutny
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12371 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-23 11:15:06 +00:00
erik.corry@gmail.com
44c3b03a29 Make the performance of the VM more predictable by not letting the hash seed
affect the order in which the local variables are processed in the compiler.
Review URL: https://chromiumcodereview.appspot.com/10870033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12370 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-23 08:15:38 +00:00
vegorov@chromium.org
96f55352fc When processing collected uint32 instructions skip those with non-Integer32 representation.
R=danno@chromium.org
BUG=test262 S15.4.4.8_A2_T3.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12369 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-22 19:00:02 +00:00
vegorov@chromium.org
8ae899584f Fix order of conversions in ObjectToInt32 and ObjectToUint32 helpers.
TBR=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12368 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-22 15:58:16 +00:00
vegorov@chromium.org
f476d4d431 Allow uint32 value on optimized frames if they are consumed by safe operations.
Safe operations are those that either do not observe unsignedness or have special support for uint32 values:

- all binary bitwise operations: they perform ToInt32 on inputs;
- >> and << shifts: they perform ToInt32 on left hand side and ToUint32 on right hand side;
- >>> shift: it performs ToUint32 on both inputs;
- stores to integer external arrays (not pixel, float or double ones): these stores are "bitwise";
- HChange: special support added for conversions of uint32 values to double and tagged values;
- HSimulate: special support added for deoptimization with uint32 values in registers and stack slots;
- HPhi: phis that have only safe uses and only uint32 operands are uint32 themselves.

BUG=v8:2097
TEST=test/mjsunit/compiler/uint32.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-22 15:44:17 +00:00
verwaest@chromium.org
fcaab50e05 While finding the valueOf descriptor, only look at the key entries.
Review URL: https://chromiumcodereview.appspot.com/10870012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12366 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-22 15:08:48 +00:00
ulan@chromium.org
05e407b083 Fix Windows build after r12364.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12365 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-22 14:45:25 +00:00
ulan@chromium.org
efc26f9b2b Fix rounding in Uint8ClampedArray setter.
According to Web IDL spec, we should round to
the nearest integer, choosing the even integer
if it lies halfway between two.

R=yangguo@chromium.org,kbr@chromium.org
BUG=v8:2294

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12364 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-22 14:27:11 +00:00
verwaest@chromium.org
5df5eea066 Check that index and length are Smi in bounds check.
BUG=chromium:142218
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12362 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 16:46:25 +00:00
vegorov@chromium.org
1a6cd523c8 Introduce DISABLE_ASAN macro to disable AddressSanitizer instrumentation for given functions.
Disable AddressSanitizer instrumentation for StackTracer::Trace.

R=danno@chromium.org
BUG=chromium:134722

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12361 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 14:21:53 +00:00
danno@chromium.org
3209f3bf87 MIPS: Fix write barrier for StoreKeyedFastElements on ARM.
Port r12238 (300f3dac)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12358 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 11:33:49 +00:00
yangguo@chromium.org
cfa79bc0d7 Prepare push to trunk. Now working on version 3.13.4.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12352 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 10:45:44 +00:00
yangguo@chromium.org
2b2f28cd2a Revert r12346 (Introduce InternalProperty type and expose internal properties for bound functions)
Original CL: https://chromiumcodereview.appspot.com/10834376

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 09:48:26 +00:00
yangguo@chromium.org
01d8e3d4f5 Revert r12258, r12300 and r12302 (global regexp).
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12350 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 09:46:23 +00:00
ulan@chromium.org
2f2fc538ac Fix mjsunit/debug-script.js failure that occurs when running with the --isolates flag.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12347 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-21 07:06:21 +00:00
peter.rybin@gmail.com
cfc4c37768 Introduce InternalProperty type and expose internal properties for bound functions
Review URL: https://chromiumcodereview.appspot.com/10834376

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12346 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 21:49:19 +00:00
verwaest@chromium.org
1fcddc4456 While allocating code objects, perform the incremental marking step before NULLing the new object. Otherwise the code cache cannot iterate the code space anymore, which is required to clear ICs.
Review URL: https://chromiumcodereview.appspot.com/10834408

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 14:44:26 +00:00
svenpanne@chromium.org
f7ed521fce Handle native callbacks without getters.
TEST=cctest/test-api/SetterOnly,cctest/test-api/NoAccessors

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 14:32:32 +00:00
ulan@chromium.org
bac8e56f8d Fix test failures introduced by r12342.
Add missing context disposed notifications in test-api.
Move send-idle-notification flag to d8 options so that it is available in d8
when v8 is build as a shared libarary.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12343 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 13:19:52 +00:00
ulan@chromium.org
27fb8c2cf6 Flush monomorphic ICs on context disposal instead of context exit.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 12:09:03 +00:00
rossberg@chromium.org
55e6227817 Rename JSGlobalProxy::context to native_context,
for clarity and consistency with GlobalObject::native_context.

R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12341 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 11:35:50 +00:00
verwaest@chromium.org
95fa9485dc Prepare push to trunk. Now working on version 3.13.3.
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12340 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 09:17:58 +00:00
yangguo@chromium.org
4f1be3aeac Fix typo in Add|RemoveGCPrologueCallback
BUG=

Review URL: https://chromiumcodereview.appspot.com/10836234
Patch from Yang Gu <yang.gu@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12339 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-20 07:32:30 +00:00
yangguo@chromium.org
3a1c290b2c Add input check to %DebugSetScriptSource.
R=verwaest@chromium.org
BUG=v8:2296

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12338 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 15:21:15 +00:00
rossberg@chromium.org
984d0b0925 Rename Context::global to Context::global_object,
in preparation for global lexical scope.

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 12:59:00 +00:00
svenpanne@chromium.org
b10d5d7f08 Deoptimization support for accessors.
Highlights of this CL:

 * Introduced a new opcode in the deoptimizer for a setter stub frame.

 * Added a global setter stub for returning after deoptimizing a setter.

 * We do not need special deopt support for getters, although the getter stub creates an internal frame. The normal machinery works just right for this case, although we generate a stack that can never occur during normal fullcode execution. If this hurts us one day, we can parameterize and reuse the setter deopt machinery.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12328 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 10:43:32 +00:00
rossberg@chromium.org
42552808ab Rename "global context" to "native context",
in anticipation of the upcoming lexical global scope.

Mostly automatised as:

for FILE in `egrep -ril "global[ _]?context" src test/cctest`
do
  echo $FILE
  sed "s/Global context/Native context/g" <$FILE >$FILE.0
  sed "s/global context/native context/g" <$FILE.0 >$FILE.1
  sed "s/global_context/native_context/g" <$FILE.1 >$FILE.2
  sed "s/GLOBAL_CONTEXT/NATIVE_CONTEXT/g" <$FILE.2 >$FILE.3
  sed "s/GlobalContext/NativeContext/g" <$FILE.3 >$FILE
  rm $FILE.[0-9]
done

R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-17 09:03:08 +00:00
verwaest@chromium.org
1011ae225f Prepare push to trunk. Now working on version 3.13.2.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12322 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 15:39:37 +00:00
verwaest@chromium.org
61d11f99c4 Show map -> transition array -> descriptor array to the heap profiler.
BUG=chromium:142625

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12321 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 14:25:55 +00:00
mstarzinger@chromium.org
5a3ec8532b Force eager compilation of some function literals.
In case a function literal is followed by parenthesis, we consider this
a hint that it will be called immediately. If we happen to have parsed
that function literal eagerly, we can also compile it eagerly.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12320 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 11:54:48 +00:00
verwaest@chromium.org
aaf403e92c MIPS: Swapped transition array and descriptor array.
Port r12298 (7b39ef67)

Original commit message:
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 11:42:02 +00:00
svenpanne@chromium.org
018670f2e4 Change the maximum optimization count into a commandline flag.
This is needed for some unit tests, which otherwise do not test what people
think they do. ;-)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 11:40:03 +00:00
svenpanne@chromium.org
f5f8ebd4ed Fix accessor lookup in crankshaft.
Seeing monomorphic type feedback plus an AccessorPair does not necessarily imply
that the corresponding getter/setter is really there, so we have to check for
this explictly.

TEST=mjsunit/object-define-property

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12317 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 10:35:39 +00:00
yangguo@chromium.org
8607093fab MIPS: Check for function in %_CallFunction.
Port r12299 (f6372257)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12316 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 09:46:04 +00:00
mstarzinger@chromium.org
27f5bf3f2b MIPS: Fix improved LoadICs for dictionaries with callbacks.
Port r12311 (f698ddd7)

Original commit message:
This fixes the positive lookup performed by these LoadICs, to use the
holder instead of the receiver to perfrom the lookup on. It also extends
this improvement to KeyedLoadICs. And it fixes a bug introduced for the
JavaScript getter case of a LoadIC.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12314 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-16 09:10:10 +00:00
erik.corry@gmail.com
ee3a66b273 Fix bug in compare IC. BUG=2291
Review URL: https://chromiumcodereview.appspot.com/10830334

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12313 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-15 15:08:42 +00:00
mstarzinger@chromium.org
15589fe22a Fix improved LoadICs for dictionaries with callbacks.
This fixes the positive lookup performed by these LoadICs, to use the
holder instead of the receiver to perfrom the lookup on. It also extends
this improvement to KeyedLoadICs. And it fixes a bug introduced for the
JavaScript getter case of a LoadIC.

R=erik.corry@gmail.com
BUG=chromium:142088
TEST=cctest/test-api/Regress142088,cctest/test-api/Regress137002b

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12311 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 13:17:47 +00:00
yangguo@chromium.org
071f7fdfc1 Do checks when receiving external string resources through the API.
This is to find incorrect API usage.

R=ulan@chromium.org
BUG=140050

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12308 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 12:16:38 +00:00
yangguo@chromium.org
28c892938e Ensure capacity when adding parts in String.replace.
R=ulan@chromium.org
BUG=v8:2289
TEST=regress-2289.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12307 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 11:33:12 +00:00
yangguo@chromium.org
d3733ce1e3 Prevent segfault on undefined inline runtime call.
R=mstarzinger@chromium.org
BUG=v8:2286

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12306 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 10:06:34 +00:00
erik.corry@gmail.com
c3ef910b86 Disable array index dehoisting due to stability issues.
Review URL: https://chromiumcodereview.appspot.com/10834303

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12305 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-14 09:22:34 +00:00
yangguo@chromium.org
3605fcbe63 Fix indexing bug in regexp, part 2.
The previous fix initialized the start index incorrectly.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12302 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 15:53:40 +00:00
mstarzinger@chromium.org
e77f24f44e Remove prototype of global builtins object.
R=yangguo@chromium.org
BUG=v8:2284
TEST=mjsunit/regress/regress-2284

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12301 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 15:34:49 +00:00
yangguo@chromium.org
960b1af12f Fix wrong indexing in global regexp.
R=ulan@chromium.org
BUG=142087

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12300 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 15:26:46 +00:00
yangguo@chromium.org
f30099dacf Check for function in %_CallFunction.
R=mstarzinger@chromium.org
BUG=v8:2285

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12299 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 12:11:26 +00:00
verwaest@chromium.org
d53de0590a Swapped transition array and descriptor array.
Now a map points to a transition array which contains the descriptor array. The descriptor array is now immutable. The next step is to share the descriptor array with all back-pointed maps as long as there is a single line of extension. Maps that require a descriptor array but don't need transitions will still need a pseudo-empty transition array to contain the descriptor array.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12298 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-13 08:43:16 +00:00
mstarzinger@chromium.org
a055a4e193 Prepare push to trunk. Now working on version 3.13.1.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12294 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 14:41:52 +00:00
mstarzinger@chromium.org
8c51d61b7a Fix compile failure on Win64 introduced in r12291.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12293 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 14:21:46 +00:00
erik.corry@gmail.com
9b3068bedd Fix intermittent failure in ReleaseOverReservedPages on x64.
BUG=v8:2216
Review URL: https://chromiumcodereview.appspot.com/10828253

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12292 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 13:45:22 +00:00
mstarzinger@chromium.org
8fdd8cefc4 Add histograms for total allocated/live heap size, as well as allocated size and percentage of total for map and cell
BUG=none
TEST=none
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12291 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 13:09:31 +00:00
erik.corry@gmail.com
3646df7d6d MIPS: Improve load IC so it can call a native accessor even if the holder is in dictionary mode. Add a flag to all maps to indicate whether they are used for dictionary (normalized) objects or fast mode objects. This is a commit of https://chromiumcodereview.appspot.com/10826213/ for palfia. This is a port of r12264, https://chromiumcodereview.appspot.com/10831153
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12290 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:28:12 +00:00
erik.corry@gmail.com
8d30a964d8 Revert inadvertent commit of testing change to flag-definitions.h
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12288 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:26:21 +00:00
erik.corry@gmail.com
a9f5f3d6f5 Fix the full compiler on ARM to always generate the same code
regardless of the detected CPU.  This is a requirement for the
debugger and the deoptimizer, which both expect that code from
the snapshot (compiled without VFP and ARM7) should have the
same layout as code compiled later.

This is another change to make snapshots more robust with
arbitrary code.
Review URL: https://chromiumcodereview.appspot.com/10824235

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12287 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 12:24:06 +00:00
svenpanne@chromium.org
f9aea9fcef Inline simple setter calls.
Currently only simple setter calls are handled (i.e. no calls in count
operations or compound assignments), and deoptimization in the setter is not
handled at all. Because of the latter, we temporarily hide this feature behind
the --inline-accessors flag, just like inlining getters.

We now use an enum everywhere we depend on the handling of a return value,
passing around several boolean would be more confusing.

Made VisitReturnStatement and the final parts of TryInline more similar, so
matching them visually is a bit easier now.

Simplified the signature of AddLeaveInlined, the target of the HGoto can simply
be retrieved from the function state.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-10 09:05:42 +00:00
mstarzinger@chromium.org
6cfc3f4c18 Remove obsolete SLOT_ADDR macro usages.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 12:25:03 +00:00
svenpanne@chromium.org
22e3c0ae04 Use the correct oracle in TestContext::BuildBranch.
When inlining is being done, it is crucial to use the correct type feedback
oracle with a given type feedback ID. To ensure this, TestContext now carries an
oracle which is associated with the context's condition, and these are both used
together in TestContext::BuildBranch.

Note that in VisitReturnStatement and TryInline we are currently lucky that the
oracles don't go out of sync in an observable way, but this will change when we
inline setters. Therefore, there is no separate test case...

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 11:44:56 +00:00
yangguo@chromium.org
fe63070186 MIPS: Improve constant element index access code generation
Port r12232 (588ccf83)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12283 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 08:41:56 +00:00
yangguo@chromium.org
93fe6abc6c MIPS: Refactor Math.min/max to be a single HInstruction.
Port r12265 (7501dd73)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-09 08:28:52 +00:00
ulan@chromium.org
92fd1eb347 Fix Win64 compile error caused by r12272.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12276 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 09:46:45 +00:00
yangguo@chromium.org
5d35b1851b Fix parseInt's octal parsing behavior (ECMA-262 Annex E 15.1.2.2).
R=svenpanne@chromium.org
BUG=v8:1645
TEST=test262, parse-int-float.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12273 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 07:44:17 +00:00
ulan@chromium.org
a270eeef2d Add heap space sizes and external memory counter to V8 statistics extension.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12272 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-08 07:37:07 +00:00
erik.corry@gmail.com
ac4b44297b Add checks for interceptors to negative lookup code in Crankshaft.
BUG=140473
Review URL: https://chromiumcodereview.appspot.com/10837141

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12271 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:48:19 +00:00
mstarzinger@chromium.org
fa2287fa96 Force eager compilation of parenthesized functions.
This makes the compiler use eager compilation for function literals that
are parenthesized. We consider this to be a hint that the function will
be called immediatly and hence try to avoid parsing it twice. The parser
already respects this heuristic.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:47:36 +00:00
ulan@chromium.org
fb7345cdfd Add flag to trace the amount of external memory.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12269 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:17:35 +00:00
svenpanne@chromium.org
5deec59302 Unify handling of bailout IDs for property loads.
Renamed Property::ReturnId to Property::LoadId, which describes its use more
accurately. Compound assignments and CountOperations now consistently use
Property::LoadId() instead of their own CompoundLoadId/CountId.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12268 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 14:06:25 +00:00
ulan@chromium.org
b4fd9de1f0 Adjust GC tracing: add a flag to ignore scavenger traces and print total GC time in verbose mode.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-07 08:19:11 +00:00
jkummerow@chromium.org
23a270c6e7 Refactor Math.min/max to be a single HInstruction.
That allows us to dynamically compute representations and insert appropriate HChange instructions.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:28:27 +00:00
erik.corry@gmail.com
92f30d1df5 Improve load IC so it can call a native accessor even if the holder is
in dictionary mode.  Add a flag to all maps to indicate whether they are
used for dictionary (normalized) objects or fast mode objects.
Review URL: https://chromiumcodereview.appspot.com/10831153

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12264 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:25:19 +00:00
svenpanne@chromium.org
b5da7279b1 Introduced TypeFeedbackId and BailoutId types.
This is a refactoring-only CL which improves the typing of IDs associated with
AST nodes. The interesting parts are in utils.h and ast.h, the rest of the CL
basically follows mechanically.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 14:13:09 +00:00
ulan@chromium.org
b49b32599b Make AdjustAmountOfExternalAllocatedMemory() more robust.
Do not crash if called from a thread without V8 isolate, reset the external
memory counters in case of overflow, bump the external allocation limit.

This will allow us to track typed array allocation and deallocation in WebKit.

BUG=v8:2022,122097,42342
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 13:49:13 +00:00
mstarzinger@chromium.org
235d8b4f94 Fix integer division truncation error.
Review URL: https://chromiumcodereview.appspot.com/10831148
Patch from Nico Weber <thakis@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 13:23:52 +00:00
mstarzinger@chromium.org
81a43b5607 Make incremental marking clear ICs.
This extends the existing clearing of ICs during GC to incremental
marking in order to prevent cross-context retention that would last
until the next non-incremental GC.

R=erik.corry@gmail.com
TEST=cctest/test-heap/IncrementalMarkingClears[Mono,Poly]morhpicIC

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12259 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 10:35:48 +00:00
yangguo@chromium.org
e0954ca592 Take advantage of batched results when matching global regexp.
BUG=
TEST=regexp-global.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 09:06:27 +00:00
yangguo@chromium.org
4e82c3fb1a Allow SetHiddenValue to accept empty value.
R=mstarzinger@chromium.org
BUG=v8:2274

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-06 07:55:05 +00:00
yangguo@chromium.org
0a0b4f4f2f Fix crash bug when calling getV8Statistics().
BUG=v8:2270

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12255 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-03 14:03:30 +00:00
svenpanne@chromium.org
83fc4205f6 Fixed compound/count operations with getter-only accessor properties.
The underlying problem is that for compound/count operations we use the *load*
type feedback for storing, too. For normal properties this doesn't matter, but
for accessor properties we should better use the *store* type feedback, which
would be available, too. This consistent feedback usage could be guaranteed if
we removed the heavy copy-n-paste in the crankshaft code generation for
compound/count operations and assignments/property loads.

To be on the safe side, we postpone this refactoring and do a quick and easily
mergeable fix.

BUG=140083
TEST=mjsunit/regress/regress-crbug-140083.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-03 09:45:08 +00:00
svenpanne@chromium.org
930aaf4267 android: refine custom ucontext_t definitions.
This is a forward-compatible change to avoid type/naming
conflicts when the Android platform/NDK will update its
<signal.h> header to properly define 'struct sigcontext',
'mcontext_t' and 'ucontext_t'.

In particular:

  - Do not define 'struct sigcontext.h' to avoid
    conflicts with the C library definition (which
    is different, see below).

  - Only provide custom ucontext_t declarations if
    the Android <signal.h> doesn't provide it. This can
    be tested with a macro check (__BIONIC_HAVE_UCONTEXT_T)

+ Use 'gettid()' on Android since it is available (at all
  API levels).

See http://code.google.com/p/android/issues/detail?id=34784

Review URL: https://chromiumcodereview.appspot.com/10829122
Patch from David Turner <digit@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-02 10:03:21 +00:00
mstarzinger@chromium.org
ec11473354 When specifying a new create histogram callback, reset all histograms so they recreate themselves on next use.
We only do this for histograms, and not for counters, as counters might be used directly from generated code

BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12248 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 12:51:24 +00:00
erik.corry@gmail.com
5c6db6d081 Fix the 137002 fix (Don't generate ICs for accessors on slow
case objects).  We should be testing the holder for dictionary
mode, not the receiver.
Review URL: https://chromiumcodereview.appspot.com/10827113

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12247 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 12:35:33 +00:00
mstarzinger@chromium.org
d4e6aa33fc Refactor marking to share embedded pointer visitor.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12246 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:29:48 +00:00
mstarzinger@chromium.org
7dd2e9777c Make incremental marking clear type feedback cells.
This extends the existing clearing of type feedback cells during GC to
incremental marking in order to prevent cross-context retention that
would last until the next non-incremental GC.

R=erik.corry@gmail.com
TEST=cctest/test-heap/IncrementalMarkingClearsTypeFeedbackCells

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12245 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:24:14 +00:00
jkummerow@chromium.org
2b786204ee Prepare push to trunk. Now working on version 3.13.0.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 11:10:32 +00:00
verwaest@chromium.org
bc86ec4d5f Don't leak inobject space when transforming to fast properties without descriptors.
Review URL: https://chromiumcodereview.appspot.com/10828112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12241 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 10:50:26 +00:00
mstarzinger@chromium.org
3bb994c4e4 Make test-serialize resilient against --gc-interval.
R=erik.corry@gmail.com
TEST=cctest/test-serialize (--gc-interval=100)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-08-01 09:43:05 +00:00
erik.corry@gmail.com
1d0f872ef9 Fix full code generator to not use --debug-code if it is in
mksnapshot or a VM that is booted from a snapshot.  --debug-code
can still have an effect on stub and optimized code and it still
works on the full code generator when running without snapshots.

The deoptimizer generates full-code-generator code and relies on it having
the same layout as last time.  This means that the code the full code
generator makes for the snapshot should be the same as the code it makes
later.  This change makes the full code generator create more consistent
code between mksnapshot time and run time.

This is a bug fix and a step towards making the snapshot code more robust.
Review URL: https://chromiumcodereview.appspot.com/10834085

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 14:59:32 +00:00
danno@chromium.org
cd95464dbc Fix write barrier for StoreKeyedFastElements on ARM
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12238 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 14:31:19 +00:00
verwaest@chromium.org
ec2b5ab57c Use architecture-specific alignment for hashing in Descriptor lookup cache.
Review URL: https://chromiumcodereview.appspot.com/10825099

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12236 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 12:33:28 +00:00
mstarzinger@chromium.org
bf0322a861 Fix build for disassembler=on and objectprint=off.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 09:53:39 +00:00
danno@chromium.org
d884792dea Fix bogus AbortIfNotZeroExtended on x64 for bounds checks
R=mmassi@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12234 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 09:47:43 +00:00
erik.corry@gmail.com
8d96a0190c Fix deserializer to understand direct pointers from code to cell payloads.
The deoptimizer generates full-code-generator code and relies on it having
the same layout as last time.  This means that the code the full code
generator makes for the snapshot should be the same as the code it makes
later.  This change makes the full code generator create more consistent
code between mksnapshot time and run time.

This is a bug fix and a step towards making the snapshot code more robust.
Review URL: https://chromiumcodereview.appspot.com/10824084

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12233 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 09:25:23 +00:00
danno@chromium.org
9641c25573 Improve constant element index access code generation
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-31 08:44:51 +00:00
yangguo@chromium.org
514fc74a47 Limit initial size of hidden properties and store identity hashes inline.
BUG=v8:2211
TEST=test-heap/Regress2211

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12230 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 13:09:09 +00:00
mstarzinger@chromium.org
249f29f22b Make AlwaysAllocateScope imply DisallowAllocationFailure.
R=erik.corry@gmail.com
TEST=cctest/test-api,cctest/test-heap (--gc-interval=100)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12229 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 13:07:29 +00:00
yangguo@chromium.org
bfd51f29dc R=yangguo@chromium.org,svenpanne@chromium.org
x64 BinaryOpStub::GenerateSmiCode use wrong registers in one code path.

e.g. d8 --trace_ic
var dd = new Float64Array(2);
dd[1] = 1;
(function fn() {
  for (var i = 0; i < 1000; i++)
  dd[0] = 2 / dd[1];
})();
It keeps falling into runtime call and patching.

No regression test, because I don't how to test it.

Review URL: https://chromiumcodereview.appspot.com/10834064
Patch from Zheng Liu <shdwthr@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12226 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 13:04:10 +00:00
ulan@chromium.org
16f9ce7c2f Prepare push to trunk. Now working on version 3.12.19.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 13:00:52 +00:00
mstarzinger@chromium.org
76fe67b092 Implement verification of context separation.
This adds the --verify-global-context-separation flag which can be used
to verify that no code object embeds pointers to more than one global
context after a full GC. It uses an object visitor that just performs
shallow traversal of the object graph spanned by one code object, and
breaks at points where application objects are encountered. So it will
not trip on cross-context leaks introduced by the application itself.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12224 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 10:47:04 +00:00
svenpanne@chromium.org
cb4840c0e5 Inline simple getter calls.
Currently only simple getter calls are handled (i.e. no calls in count
operations or compound assignments), and deoptimization in the getter is not
handled at all. Because of the latter, we temporarily hide this feature behind a
new flag --inline-accessors, which is false by default.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12223 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 10:42:21 +00:00
mstarzinger@chromium.org
fdb22ea2ed Implement TracePathToObjectFrom helper for debugging.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12222 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 10:32:54 +00:00
yangguo@chromium.org
d078747ac0 Actually fix build.
R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12221 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 09:55:26 +00:00
yangguo@chromium.org
e622892fac Fix build.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 09:36:03 +00:00
yangguo@chromium.org
21871da998 Force signed zero double.
R=svenpanne@chromium.org
BUG=v8:2239
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12219 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 09:28:20 +00:00
yangguo@chromium.org
0acc9e13af Make sure double to int conversion is correct.
R=svenpanne@chromium.org
BUG=v8:2260
TEST=test-utils/Utils1

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-30 08:34:26 +00:00
verwaest@chromium.org
a448d42428 Removed recording of Target Slot in transition arrays since they only contain maps.
Review URL: https://chromiumcodereview.appspot.com/10802048

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12215 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 17:03:12 +00:00
mstarzinger@chromium.org
cf6d80e154 Fix minor handle unsafety in exception throwing code.
R=yangguo@chromium.org
TEST=mjsunit/harmony/proxies (--gc-interval=100)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12214 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 15:33:06 +00:00
svenpanne@chromium.org
7fd21aa7a1 Move some Pop/Drop calls directly to the places where they are needed.
This is a refactoring-only CL and the fourth one in a series for enabling
inlining of accessors. Later when we try to inline accessor calls, their
arguments must still be on the expression stack, so we must not remove them too
early.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12213 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 12:35:44 +00:00
mstarzinger@chromium.org
bff5cc9e94 Print type feedback info together with code objects.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12212 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 12:06:26 +00:00
yangguo@chromium.org
b58cfd485e Avoid GC when printing shared function info.
R=mstarzinger@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12210 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 09:54:56 +00:00
svenpanne@chromium.org
0923caccee Move BuildCallGetter/BuildCallSetter up in the call chain.
This is a refactoring-only CL and the third one in a series for enabling
inlining of accessors. The goal of this CL is to move the builders for accessors
to the places where we might be able to inline them later, i.e. the VisitFoo and
HandleBar member functions of HGraphBuilder.

Extracted duplicate code into LookupAccessorPair.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12209 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 09:43:06 +00:00
verwaest@chromium.org
ce23fe9721 Prepare push to trunk. Now working on version 3.12.18.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12206 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 07:57:43 +00:00
svenpanne@chromium.org
eddf5edb62 Cleaned up BuildLoadNamed/BuildStoreNamed.
This is a refactoring-only CL and the second one in a series for enabling
inlining of accessors. It makes BuildLoadNamed and BuildStoreNamed a bit more
uniform and makes it clear that they both handle monomorphic accesses only.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12205 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-27 06:27:47 +00:00
verwaest@chromium.org
bcc175ad43 Extending map verification to also verify LastAdded/DescriptorArray consistency.
Removed ASSERT now subsumed by extended map verification.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 14:55:22 +00:00
mmassi@chromium.org
3eb1df6580 Re-enable array index dehoisting.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12203 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 14:21:40 +00:00