Commit Graph

729 Commits

Author SHA1 Message Date
verwaest@chromium.org
341d405301 Reland and fix "Add support for keyed-call on arrays of fast elements"
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-15 10:52:05 +00:00
rafaelw@chromium.org
bdf78a7ad3 Reland [Object.observe] Don't force normalization of elements for observed objects
Original Issue: https://codereview.chromium.org/29353003/

Note that this version of the patch includes logic for bailing out of compiled ArrayPush/ArrayPop calls if the array is observed (see stub-cache-*)

R=danno@chromium.org
BUG=v8:2946
LOG=N

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 21:47:39 +00:00
verwaest@chromium.org
93f2ed48d9 Handle all object types (minus smi) in load/store ICs
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 16:25:31 +00:00
machenbach@chromium.org
eef8694a7e [Sheriff] Revert "Add support for keyed-call on arrays of fast elements"
This reverts commit r17746 for breaking layout tests.

TBR=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17751 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 15:00:13 +00:00
verwaest@chromium.org
607a175cbc Add support for keyed-call on arrays of fast elements
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17746 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 13:46:18 +00:00
mvstanton@chromium.org
3cf157b43b Inline zero argument array constructor.
patch from issue 54583003 (dependent code).

Zero arguments - very easy

1 argument - three special cases:
  a) If length is a constant in valid array length range,
     no need to check it at runtime.
  b) respect DoNotInline feedback on the AllocationSite for
     cases that the argument is not a smi or is an integer
     with a length that should create a dictionary.
  c) if kind feedback is non-holey, and length is non-constant,
     we'd have to generate a lot of code to be correct.
     Don't inline this case.

N arguments - one special case:
  a) If a deopt ever occurs because an input argument isn't
     compatible with the elements kind, then set the
     DoNotInline flag.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17741 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-14 12:05:09 +00:00
rossberg@chromium.org
cec8383cff Provide private symbols through internal APIs
Adds a notion of private symbols, mainly intended for internal use, especially, self-hosting of built-in types that would otherwise require new C++ classes.

On the JS side (i.e., in built-ins), private properties can be created and accessed through a set of macros:

  NEW_PRIVATE(print_name)
  HAS_PRIVATE(obj, sym)
  GET_PRIVATE(obj, sym)
  SET_PRIVATE(obj, sym, val)
  DELETE_PRIVATE(obj, sym)

In the V8 API, they are accessible via a new class Private, and respective HasPrivate/Get/Private/SetPrivate/DeletePrivate methods on calss Object.

These APIs are designed and restricted such that their implementation can later be replaced by whatever ES7+ will officially provide.

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17683 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-13 10:34:06 +00:00
yangguo@chromium.org
e83fd01ce6 Reland "Implement Math.sin, cos and tan using table lookup and spline interpolation."
This relands r17594 with necessary fixes.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-12 14:43:18 +00:00
rafaelw@chromium.org
4bc568b77a Revert "Reland [Object.observe] Don't force normalization of elements for observed objects"
TBR=danno
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17608 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 19:33:05 +00:00
rafaelw@chromium.org
ca8f947664 Reland [Object.observe] Don't force normalization of elements for observed objects
Original Issue: https://codereview.chromium.org/29353003/

TBR=danno
BUG=v8:2946

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17607 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 19:12:43 +00:00
rafaelw@chromium.org
c824bfb44a Revert "[Object.observe] Don't force normalization of elements for observed objects"
Broke ARM build

TBR=danno
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17602 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 15:36:22 +00:00
rafaelw@chromium.org
d462dca64a [Object.observe] Don't force normalization of elements for observed objects
BUG=v8:2946
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17601 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 14:55:13 +00:00
yangguo@chromium.org
9f104a1a3e Revert "Implement Math.sin, cos and tan using table lookup and spline interpolation."
This reverts commit r17594.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17596 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 13:44:27 +00:00
yangguo@chromium.org
063b7c4ebb Implement Math.sin, cos and tan using table lookup and spline interpolation.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17594 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-08 13:10:39 +00:00
rafaelw@chromium.org
ada13dfc3f Remove calls to JSObject::SetLocalPropertyIgnoreAttributesTrampoline within objects.cc
This includes handlifing:
-SetHiddenPropertiesHashTable
-ObjectHashSet::Add/Remove
-ObjectHashTable::Put

And splitting the following methods which previously took "allow creation" enum arguments to into side-effect-free getters and GetOrCreate*-handlfied getters.

-GetHash (now GetHash & handlified GetOrCreateHash)
-GetIdentityHash (now GetIdentityHash & handlified GetOrCreateIdentityHash)
-GetHiddenPropertiesHashTable (now GetHiddenPropertiesHashTable & handlified GetOrCreateaHiddenPropertiesHashTable)

BUG=v8:2877
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17477 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-05 11:47:11 +00:00
svenpanne@chromium.org
dc8c314084 Make snapshots reproducible.
To keep the structure of the serializer more or less untouched, we use
some ingenious Corry-approved(TM) 3-step technology (a.k.a. "hack"):

   * Create copies of code objects.
   * Wipe out all absolute addresses in these copies.
   * Write out the cleaned copies instead of the originals.

In conjunction with --random-seed, our snapshots are reproducible now.

BUG=v8:2885
R=bmeurer@chromium.org, erik.corry@gmail.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17473 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-05 10:14:48 +00:00
svenpanne@chromium.org
82b8e23bc1 Introduce raw accessors for type_feedback_info.
This pure refactoring is needed for another upcoming CL.

Note that the actual names are still a bit confusing, because this is
still a kind of swiss-army-knife-field. :-/

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17472 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-11-05 10:05:03 +00:00
jkummerow@chromium.org
ec50a6f33c Work around two ASSERTs that we're hitting now that DEBUG is #defined again
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17418 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-28 17:54:43 +00:00
mvstanton@chromium.org
a85c825bb9 The Elements pointer in a JSObject can have a filler map instead of a
valid fixed array, iff a gc occurred while allocating a fixed array as
part of array construction. Heap verification needs protection against
examining the elements object in this case.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17397 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-25 12:26:47 +00:00
danno@chromium.org
7339d45a9f Define DEBUG for v8_optimized_debug=2
Thereby ensuring there is only a minimal performance regression vs. NDEBUG (now it's only about 10% slower rather than ~2x).

R=jkummerow@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17392 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-25 11:10:28 +00:00
ulan@chromium.org
83c63cf555 Out-of-line constant pool on Arm: Stage 2 - Introduce ConstantPoolArray object.
Second stage of implementing an out-of-line constant pool on Arm.  This CL
Introduces the ConstantPoolArray object which will be used as the backing
store of out-of-line constant pools.  Nothing uses this object yet.

BUG=
R=ulan@chromium.org

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

Patch from Ross McIlroy <rmcilroy@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-14 13:35:06 +00:00
ulan@chromium.org
52c421956a Make objects embedded in optimized code weak.
This introduces a global weak hash table that maps objects embedded in
optimized code to dependent code lists. Using this table we can deoptimize
optimized code whenever a weak object embedded in the code dies.

BUG=v8:2073
R=hpayer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-04 07:25:24 +00:00
mstarzinger@chromium.org
3ee9b84609 Remove deprecated JSObject::GetLocalPropertyType method.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-02 08:27:33 +00:00
verwaest@chromium.org
14422a698f Cleanup in IC patching.
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-01 09:44:35 +00:00
verwaest@chromium.org
63b584474f Reduce code duplication in IC updating.
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-10-01 09:30:07 +00:00
verwaest@chromium.org
0f715540a2 Tag handlers as HANDLER rather than STUB.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17012 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-30 13:53:21 +00:00
verwaest@chromium.org
344e1d9003 Internalize names before using them in slow-mode objects.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-25 15:11:48 +00:00
mvstanton@chromium.org
f26bcd9fef Add field nested_sites to AllocationSite. This field is used to maintain
allocation site information for nested array and object literals.
It's not used productively in this CL, merely maintained in a minimal
way. (that comes next :)).

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16912 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-24 10:30:41 +00:00
mstarzinger@chromium.org
8cbb4dcb49 Handlify JSObject::MigrateInstance and friends.
This relands the original change from r16899 together with a bugfix for
two unhandlified values which became stale.

R=verwaest@chromium.org
TEST=mjsunit/debug-evaluate-locals-optimized (in GC stress mode)

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16905 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 19:56:36 +00:00
mstarzinger@chromium.org
40decafa84 Revert "Handlify JSObject::MigrateInstance and friends."
This is reverted due to mozilla/ecma/Date/15.9.5.9 failing on Windows.

TBR=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16900 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 16:53:59 +00:00
mstarzinger@chromium.org
1279103806 Handlify JSObject::MigrateInstance and friends.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16899 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 15:02:25 +00:00
mstarzinger@chromium.org
4d64bf9737 Handlify JSObject::AllocateStorageForMap method.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16883 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-23 11:57:34 +00:00
mvstanton@chromium.org
137b43c9a3 Added a DependentCode field to AllocationSite. It's not currently used,
this initial CL is just to get the object layout correct.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-19 14:13:34 +00:00
mstarzinger@chromium.org
4c85efb597 Handlify JSReceiver::HasProperty and friends.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 11:34:20 +00:00
mstarzinger@chromium.org
16a22a96c3 Handlify JSReceiver::SetProperty and friends.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-17 11:01:43 +00:00
yangguo@chromium.org
151e514930 Simplify installing concurrently recompiled code.
Instead of overwriting the code entry of the function, we trigger
an interrupt to install the code on the main thread.

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-12 11:30:56 +00:00
dcarney@chromium.org
cc2257b92a move HEAP to /test
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16631 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-11 07:14:41 +00:00
mstarzinger@chromium.org
1a26455d22 Handlify JSObject::EnsureCanContainHeapObjectElements method.
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16595 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 14:29:47 +00:00
dcarney@chromium.org
c20f87a654 add uncached Function::New
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16586 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:52:52 +00:00
dcarney@chromium.org
5b0a281604 revert 16584 for breaking build
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16585 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:16:24 +00:00
dcarney@chromium.org
ddc5d437bb add uncached Function::New
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16584 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-09 07:08:34 +00:00
loislo@chromium.org
bbd26abedb Functions may not be optimized and we would like to know in cpu profiler what was the reason.
Current v8 implementation may disable optimization for a particular function or block it with help of dont_optimize flag.
The patch propagates the reason of that to the SharedFunctionInfo where cpu profiler can get it.

SharedFunctionInfo is a heap object so I extracted 8 bits from OptsCount for handling bailout reason code.

BUG=none
TEST=test-profile-generator/BailoutReason
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16555 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 13:20:51 +00:00
dcarney@chromium.org
d208d048ac remove most Isolate::Current asserts
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-05 11:27:22 +00:00
titzer@chromium.org
35490d82a9 Add OptimizedCodeList and DeoptimizedCodeList to native contexts. Both lists are weak. This makes it possible to find optimized code that is not referred to by any function, but still needs to be deoptimized. It obsoletes the weak deoptimizing code list in the deoptimizer data and generally simplifies the process of deoptimizing code.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16530 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-04 13:53:24 +00:00
dcarney@chromium.org
615c34869c Push SetAccessor to Template
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16515 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-04 07:45:36 +00:00
dcarney@chromium.org
3e76d8b870 remove Isolate::Current from most files starting with 'o' through 'r'
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16513 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-04 07:05:11 +00:00
dcarney@chromium.org
bb01557abf remove Isolate::Current from most files starting with 's' through 'v'
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16507 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-03 11:54:08 +00:00
titzer@chromium.org
7bd61f8ca4 Remove OptimizedCodeEntry *sigh*.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16465 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-09-02 10:35:34 +00:00
titzer@chromium.org
22b70b0508 Add OptimizedCodeEntry as a new heap object type. An optimized code entry represents an association between the native context, a function, optimized code, and the literals. Such associations are needed by the deoptimizer and optimized code cache to efficiently find related optimized code and functions for a given context or shared function info.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 16:48:40 +00:00
mstarzinger@chromium.org
3fb53cf83a Remove obsolete Oddball setters in FixedArray.
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16404 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-28 14:26:22 +00:00