Commit Graph

8507 Commits

Author SHA1 Message Date
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
verwaest@chromium.org
1c7aa4d172 Set LastAdded to kNoneAdded in RawCopy.
This ensures it is properly initialized if no descriptors are later set.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12202 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 13:48:34 +00:00
jkummerow@chromium.org
80c35c6522 Always set the callee's context when calling a function from optimized code.
This is necessary even for recursive calls because we're sharing optimized code among closures, which could call each other and have distinct contexts.

BUG=138887
TEST=mjsunit/regress/regress-crbug-138887

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 12:49:08 +00:00
yangguo@chromium.org
4d1d1eb53e Fix building with GCC 3.x
R=yangguo@chromium.org
BUG=v8:2016, v8:2017
TEST=

Review URL: https://chromiumcodereview.appspot.com/10823034
Patch from James Pike <g00gle@chilon.net>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 09:18:09 +00:00
svenpanne@chromium.org
0f800eef8e Cleaned up Hydrogen function signatures related to property access.
This is a refactoring-only CL and the first one in a series for enabling
inlining of accessors. The naming and argument order has been unified a bit, and
some tests have been pushed to the caller in order to get a simpler
signature. Note that the latter temporarily introduces some code redundancy, but
this will be cleaned up in one of the next CLs.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 08:55:22 +00:00
yangguo@chromium.org
d37695e30e Fix cctests when VFP is disabled.
R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 08:42:42 +00:00
verwaest@chromium.org
175440898e Limited the size of transition arrays so they never end up in the large object space.
Also renamed SizeOf on DescriptorArray to LengthOf for consistency.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12196 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-26 08:27:20 +00:00
mstarzinger@chromium.org
6d907fb531 Improve API calls that return empty handles.
R=jkummerow@chromium.org
BUG=v8:2245

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12195 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 16:33:32 +00:00
yangguo@chromium.org
59f212e7eb Relax requirement from VFP3 to VFP2 where possible.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12194 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 15:26:16 +00:00
mstarzinger@chromium.org
abede994d9 Refactor incremental marking to use static visitor.
This is a refactoring only change that switches incremental marking to
use a static object visitor. It also shares the common code between the
non-incremental and the incremental marker. Sharing that would require
semantical changes will be done later.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12193 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 15:23:07 +00:00
danno@chromium.org
c1b91ad60d Prepare push to trunk. Now working on version 3.12.17.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12190 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 14:58:20 +00:00
danno@chromium.org
5c07b5837b MIPS: Optimize Smi keys for KeyedLoads
Port r12156 (e2874cdf)

Original commit message:
Allows KeyeLoad/KeyedStore operations where the key is a Smi to fold the untagging of the key into the element offset calculation.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12189 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 14:38:32 +00:00
danno@chromium.org
8161285786 MIPS: Implements a new API to set a function entry hook for profiling.
Port r12107 (59ee5c88)

Original commit message:
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

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

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

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12188 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 14:36:38 +00:00
yangguo@chromium.org
d525ddbed1 Fix static initializer check.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 14:27:14 +00:00
yangguo@chromium.org
2c9c94bd32 Classify small functions platform-dependently.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12186 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 13:51:29 +00:00
verwaest@chromium.org
52a7149efb In-place trimming of descriptor array when appending callbacks.
Review URL: https://chromiumcodereview.appspot.com/10830005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12184 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-25 11:12:29 +00:00
yangguo@chromium.org
821ddeccd8 MIPS: Optimize functions on a second thread.
Port r12148 (a553c67d)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12182 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-24 14:13:02 +00:00
yangguo@chromium.org
0cd21b4345 Prepare push to trunk. Now working on version 3.12.16.
R=jkummerow@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12179 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-24 07:55:08 +00:00
mstarzinger@chromium.org
806fb8be96 Fix bootstrapping without snapshot and low GC interval.
R=yangguo@chromium.org
BUG=v8:2249
TEST=mjsunit/regress/regress-2249 (snapshot=off)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 16:18:25 +00:00
danno@chromium.org
f793c77058 Reactivate packed array optimizations by default
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12176 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 15:01:25 +00:00
verwaest@chromium.org
fe67f8a9ad Replace symbol containing "prototype" with heap->prototype_symbol.
Review URL: https://chromiumcodereview.appspot.com/10817008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 14:55:12 +00:00
yangguo@chromium.org
6b489d9753 Improve String::WriteAscii and add PRESERVE_ASCII_NULL option.
The PRESERVE_ASCII_NULL option prevents WriteAscii from converting
\0 to white space.

R=verwaest@chromium.org
BUG=v8:2252
TEST=test-api/StringWrite

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12174 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 14:22:46 +00:00
danno@chromium.org
3667f92cbb Add dependency to HLoadKeyed* instructions to prevent invalid hoisting
BUG=chromium:137768
TEST=test/mjsunit/regress/regress-137768.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 13:59:24 +00:00
yangguo@chromium.org
0c23596d7d Interpret negative hexadecimal literals as NaN.
R=rossberg@chromium.org
BUG=v8:2240
TEST=str-to-num.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12169 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 10:33:41 +00:00
yangguo@chromium.org
50bf19a975 Fix corner case when transforming dictionary to fast elements.
R=verwaest@chromium.org
BUG=v8:2249
TEST=regress-2249.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12167 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 08:41:53 +00:00
yangguo@chromium.org
a1f0c5b16e Add assertions to limit register count for VSTM and VLDM.
R=svenpanne@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-23 08:38:53 +00:00
danno@chromium.org
0fb5189a32 Refine object stats for FixedArrays.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 14:06:24 +00:00
danno@chromium.org
8c89cc4cab Optimize Smi keys for KeyedLoads
Allows KeyeLoad/KeyedStore operations where the key is a Smi to fold the untagging of the key into the element offset calculation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12156 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 11:00:33 +00:00
svenpanne@chromium.org
59cd98cf07 Cleaned up AST nodes a bit.
* Made AST IDs constant. Making this explicit helps understanding the code.

* Removed a few dead functions.

* Be honest by making node_type() pure virtual.

All these changes have been checked to be performance-neutral.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12153 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 09:39:27 +00:00
sanjoy@chromium.org
1d7c4d9189 Track how much time the compiler thread spends doing useful work.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12152 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 08:56:20 +00:00
verwaest@chromium.org
26afeb6ea5 Don't record elements transition slots since it will contain a map.
Additionally removed unused code.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12150 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 07:24:50 +00:00
svenpanne@chromium.org
b9b206e2f1 Removed dead variable to make GCC 4.6 happy again.
TBR=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-20 07:12:06 +00:00
sanjoy@chromium.org
693c7643d2 Optimize functions on a second thread.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12148 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 18:58:23 +00:00
verwaest@chromium.org
5b0d3a09eb Remove LastAdded from the EnumCacheBridge.
Review URL: https://chromiumcodereview.appspot.com/10806030

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 14:59:30 +00:00
verwaest@chromium.org
52bfb2a18e Moved lastadded from DescriptorArray to Map. Renamed kLastAdded to kEnumCache.
Review URL: https://chromiumcodereview.appspot.com/10802034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 14:45:19 +00:00
verwaest@chromium.org
8b70a7bc54 Move all Copy* methods from descriptor array into the Copy* versions on the map.
Another step towards moving LastAdded from the DescriptorArray to the Map.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12145 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 14:05:27 +00:00
svenpanne@chromium.org
e81b194fcf Simplify TryInline's signature.
We don't actually need the arguments of the call, just their count. This change
is needed because in an accessor call there is no explicit argument list.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 10:46:03 +00:00
verwaest@chromium.org
b489d66649 Append to descriptors over map.
Review URL: https://chromiumcodereview.appspot.com/10800033

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 10:01:52 +00:00
svenpanne@chromium.org
e469cc44b8 Fix compilation for ARMv5TEJ
BUG=
TEST=Compiling for ARMv5TEJ

Review URL: https://chromiumcodereview.appspot.com/10784013
Patch from Remi Duraffort <remi.duraffort@st.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 09:49:12 +00:00
sanjoy@chromium.org
57a4229d4e Add missing operator delete.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 08:43:00 +00:00
sanjoy@chromium.org
dc3995a936 Fix Windows build spam.
BUG=v8:2242
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 08:32:30 +00:00
svenpanne@chromium.org
001cc2edac Don't use alloca.
It leads to compability hell, and the amount of memory we need is bounded,
anyway. Added a few more assertions on the way.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12137 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-19 07:32:58 +00:00
verwaest@chromium.org
f99dda8dab Let DescriptorArray::Append insert at proper position, avoiding need for resorting.
Using insertion-sort won't have too much of an overhead for the short arrays for bootstrapping (which are probably snapshot anyway).
CopyAppendCallbackDescriptors was extending and sorting the array in a loop. By using an append that inserts at the right position we do not need to resort in each iteration.

Additionally remove Sort and rename SortUnchecked to Sort. The IsSortedNoDuplicates check is moved into InitializeDescriptor.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 15:38:58 +00:00
yangguo@chromium.org
39a16ac071 Push rdi instead of rsi when probing for CPU features.
TBR=svenpanne@chromium.org
BUG=v8:2238
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12135 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 15:05:04 +00:00
sanjoy@chromium.org
71618ee6aa The deferred handes list belongs to the Isolate and not to the
HandleScopeImplementer (since it isn't something specific to a
particular thread executing on an Isolate). This patch ensures correct
traversal of the handles when when multiple compilations are queued
up.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12134 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 14:15:02 +00:00
verwaest@chromium.org
cd98b0c839 Removed CopyAppendForeignDescriptor.
Use descriptor array preallocation + appending instead.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12133 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 14:00:58 +00:00
yangguo@chromium.org
25d4eeaf98 MIPS: Fix transcendental cache on ARM in optimized code.
Port r12086 (84066033)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12132 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 13:50:19 +00:00
yangguo@chromium.org
d340db9135 Insert missing write barrier in sliced string allocation.
BUG=v8:2237
TEST=test-heap/Regress2237

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12127 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 13:39:53 +00:00
yangguo@chromium.org
1726fcf010 Restore rsi on x64 when probing for CPU features.
BUG=v8:2238
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12126 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 13:02:27 +00:00
yangguo@chromium.org
ca2b0e366b Expose counters in javascript.
R=rossberg
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12124 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 12:27:29 +00:00
sanjoy@chromium.org
610b705e80 HConstant::PrintDataTo() uses wrong format string
Review URL: https://chromiumcodereview.appspot.com/10783031
Patch from Zheng Liu <zheng.z.liu@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12121 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 11:40:39 +00:00
mstarzinger@chromium.org
6d552f09d1 Add --trace-parse flag to parser.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12120 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 11:22:46 +00:00
verwaest@chromium.org
b149f9a302 Prepare push to trunk. Now working on version 3.12.15.
R=danno@chromium.org
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12117 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 11:21:12 +00:00
svenpanne@chromium.org
a344ee21a7 Deactivate optimization of packed arrays.
It breaks the San Angeles WebGL demo.

BUG=http://code.google.com/p/chromium/issues/detail?id=137768
TEST=https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/google/san-angeles/index.html

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12116 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 10:41:03 +00:00
verwaest@chromium.org
90c7cb1397 When following an accessor transition for an already existing accessor, don't load the last added descriptor but the same descriptor as we already found previously.
BUG=137689
TEST=test/mjsunit/regress/regress-crbug-137689.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-18 09:20:57 +00:00
sanjoy@chromium.org
645f5265d9 Make CompilationInfo::~CompilationInfo() virtual so that CompilationInfoWithZone destructs correctly.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 16:53:34 +00:00
sanjoy@chromium.org
bbef3a0975 Fix Win64 build by adding a static_cast.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 16:51:19 +00:00
sanjoy@chromium.org
3ec32fd311 Introduce an OptimizingCompiler class, responsible for maintaining the state needed to run Crankshaft.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 16:24:40 +00:00
verwaest@chromium.org
6696496553 Prepare push to trunk. Now working on version 3.12.14.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 16:13:24 +00:00
danno@chromium.org
43d0ed048d Implements a new API to set a function entry hook for profiling.
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 15:18:15 +00:00
danno@chromium.org
56cff630af Fix Win64 build
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 14:04:41 +00:00
verwaest@chromium.org
d8c7a03a3a Grouping all map creation code.
- Now tunnel all descriptor changes through methods on the map
- Renamed CopyDropTransitions to regular Copy since we always "drop transitions" on copy anyway.
- Merged and moved elements transition map creation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 13:50:19 +00:00
danno@chromium.org
1ab272ab36 Track counts/sizes of CODE sub types with --track-gc-object-stats
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12104 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 11:58:49 +00:00
mstarzinger@chromium.org
6744e6e9a6 Remove obsolete ParserApi::PartialPreParse method.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12103 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 11:31:05 +00:00
verwaest@chromium.org
af623613a8 Always fix up the enumeration indices when turning to fast mode.
Review URL: https://chromiumcodereview.appspot.com/10782026

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-17 10:27:18 +00:00
verwaest@chromium.org
7cb94437cb Remove LookupTransitionOrDescriptor altogether.
Review URL: https://chromiumcodereview.appspot.com/10778011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 15:26:10 +00:00
mstarzinger@chromium.org
77ccfe895c Add histogram for total heap fragmentation, don't report fragmentation for new space, and report fragmentation, not usage
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 15:17:00 +00:00
verwaest@chromium.org
3b5a6ef2e7 Removing LookupTransition from LookupRealNamedProperty and related utility functions.
Callsites now have to manually lookup transitions if required. This
avoids unnecessary overhead of looking up transitions when we don't need
them. This also allows us to use IsFound() in many places where
IsProperty() was required previously.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 14:47:28 +00:00
verwaest@chromium.org
11e5c9e281 Removed transitions from the accessor pair descriptors.
AccessorPair related transitions are now also stored as single map links, simplifying the code that handles transitions. AccessorPairs can now be shared between descriptor arrays, since they can only be mutated after another transition anyway; during which the pair is copied before writing.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12097 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 14:02:50 +00:00
mstarzinger@chromium.org
bb9f4470c6 Fix missing tagging of stack value in finally block.
R=yangguo@chromium.org
BUG=chromium:137496
TEST=cctest/test-api/Regress137496

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 13:38:17 +00:00
sanjoy@chromium.org
9f04c321d7 Fix off-by-one-pointer error in an ASSERT inside DeferredHandles::Iterate.
This will crash v8 in debug mode if the compilation prologue allocates
an exact multiple of kHandleBlockSize handles.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 13:00:57 +00:00
svenpanne@chromium.org
8547d08ab6 Fix compilation for ARM/uClibc
BUG=
TEST=Compile for ARM using uClibc

Review URL: https://chromiumcodereview.appspot.com/10784012
Patch from Remi Duraffort <remi.duraffort@st.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 12:34:34 +00:00
svenpanne@chromium.org
b24f8912bc Maintain the invariant that all HGraphBuilder::VisitFoo methods return void.
Additionally, this enables the use of a CHECK_ALIVE macro instead of
copy-n-paste code at one place.

This CL is part of a series of several yak-shaving CLs to prepare the inlining
of JavaScript accessors.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12093 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 12:22:46 +00:00
jkummerow@chromium.org
fac814149c Prepare push to trunk. Now working on version 3.12.13.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12090 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 11:24:55 +00:00
mstarzinger@chromium.org
f71de19a4b Fix ICs for slow objects with native accessor.
This prevents creation of LoadICs or StoreICs for native callbacks on
objects in dictionary mode. Those ICs fail if the accessor is installed
on the receiver itself and also lead to bogus type feedback.

R=danno@chromium.org
BUG=chromium:137002
TEST=test/test-api/Regress137002[a,b]

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 09:53:32 +00:00
svenpanne@chromium.org
f17ce0cc6a Make it clear that HInstruction's position is a write-once variable.
Review URL: https://chromiumcodereview.appspot.com/10782010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 09:49:00 +00:00
yangguo@chromium.org
022ba0588a Fix transcendental cache on ARM in optimized code.
R=jkummerow@chromium.org
BUG=v8:2234
TEST=regress-2234.js

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 09:44:59 +00:00
mstarzinger@chromium.org
7337068605 Fix Win64 build breakage in r12082.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-16 09:39:52 +00:00
danno@chromium.org
b1530257ab Revert 12083: Implements a new API to set a function entry hook for profiling.
TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 16:33:27 +00:00
danno@chromium.org
5c8c4bec46 Implements a new API to set a function entry hook for profiling.
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 16:18:37 +00:00
danno@chromium.org
aae81e125b Add counters that automatically track object sizes and counts.
Review URL: https://chromiumcodereview.appspot.com/10702168

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 12:22:09 +00:00
mstarzinger@chromium.org
add296dd43 Factor out a Histogram class from HistogramTimer, and use it to measure external fragmentation
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 12:12:09 +00:00
sanjoy@chromium.org
acc4edead2 MIPS: Defer creating Handles for HConstants to the code generation phase.
Port r12048 (b4b20305)

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12080 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 12:05:29 +00:00
svenpanne@chromium.org
65e7a14973 Handle setters on the prototype chain efficiently by default.
Note that changes on the prototype chain should already be handled by
StubCompiler::CheckPrototypes, if not, it is a bug there and not in
LookupForWrite. Furthermore, neither test262 nor WebKit layout tests hint at a
compability issue, so it should be safe to remove a redundant check.

The good point about this CL: It improves Box2D's performance by 22%.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 09:37:03 +00:00
rossberg@chromium.org
ec042177d7 Incorporate constness into inferred interfaces
(in preparation for handling imports).

R=svenpanne@chromium.org
BUG=v8:1569
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12078 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 09:29:43 +00:00
peter.rybin@gmail.com
58c4e6ceb4 Fix Mac build warning (very rightful)
Review URL: https://chromiumcodereview.appspot.com/10702201

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 09:23:46 +00:00
verwaest@chromium.org
d51b6826dc MIPS: Ensure that all descriptors have a valid enumeration index, and replace NextEnumIndex with LastAdded.
Port r12042 (ce65764e)

Original commit message:
The LastAdded points to the descriptor that was last added to the array. From the descriptor we can deduce the NextEnumerationIndex. This allows us to quickly find the property that we are transitioning to, which is necessary for transition-intensive code, eg JSON parsing.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 09:14:43 +00:00
verwaest@chromium.org
e875306037 MIPS: Swap bitfield3 and backpointer.
Port r12034 (f17b84c0)

Original commit message:
Bitfield3 now has its own field, while the backpointer shares the field with the descriptor array; which will become the transition array.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 09:13:10 +00:00
peter.rybin@gmail.com
ed371d4881 Don't miss error message in 'restart frame' debug action
Review URL: https://chromiumcodereview.appspot.com/10693095

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 09:02:03 +00:00
yangguo@chromium.org
45d86e4846 MIPS: Fixed mistake in condition for Nan fixups from snapshot.
The commit r11871 caused quiet NaN related errors to
appear on Loongson and Sigma platforms when snapshot
is used. This commit fixes those issues.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 07:22:11 +00:00
svenpanne@chromium.org
43e87a65e1 Added Crankshaft support for setters.
Refactored ComputeLoadStoreField a bit on the way to clarify a bit what it
actually does.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-13 07:14:28 +00:00
verwaest@chromium.org
70a618307a Renamed ConvertDescriptorToFieldAndMapTransition to ConvertTransitionToMapTransition, and let it replace the transition in-place rather than copy the transition array.
Review URL: https://chromiumcodereview.appspot.com/10694155

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 16:36:10 +00:00
danno@chromium.org
30569cba9b Revert 12069: Implements a new API to set a function entry hook for profiling
Reverted due to waterfall failures

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:59:50 +00:00
danno@chromium.org
d6edbdd436 Implements a new API to set a function entry hook for profiling.
Exposes a new API; V8::SetFunctionEntryHook.
If a non-NULL function entry hook is set, the code generator(s) will invoke on the entry hook at the very start of each generated function.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:42:39 +00:00
sanjoy@chromium.org
2b0f88cc67 Install guards for new invariants required for parallel compilation.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:40:05 +00:00
sanjoy@chromium.org
31027880b0 Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded explicit constructor attributes.
BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:29:14 +00:00
verwaest@chromium.org
812bc1db26 Couple the enumeration index of a property to the size of the descriptor array where it first appeared.
Review URL: https://chromiumcodereview.appspot.com/10692185

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12066 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:14:54 +00:00
verwaest@chromium.org
1068916b9c When we find an accessor pair as TRANSITION, we are sure it doesn't contain an accessor yet.
Review URL: https://chromiumcodereview.appspot.com/10704185

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12065 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:10:55 +00:00
sanjoy@chromium.org
c1ee1b457f Break Crankshaft into phases.
Crankshaft now runs by calling CreateGraph on the HGraphBuilder, then
calling Optimize and Codegen on the HGraph.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:10:34 +00:00
verwaest@chromium.org
1132b27e25 Always return failure when we didn't manage to add transitions.
Review URL: https://chromiumcodereview.appspot.com/10704183

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 15:01:39 +00:00
verwaest@chromium.org
0a41b8c2ed Splitting DescriptorArray::CopyInsert into CopyInsert, CopyAdd and CopyReplace.
Review URL: https://chromiumcodereview.appspot.com/10743003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-07-12 13:34:02 +00:00