Commit Graph

11021 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
d6fd3a0767 Enable zapping of disposed global handles in release mode.
R=hpayer@chromium.org
BUG=chromium:176056

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 18:24:37 +00:00
mstarzinger@chromium.org
2aabf6257d Add workaround for redefinition of __proto__ property.
This is a temporary workaround when the __proto__ property is being
redefined (e.g. by Object.freeze()) to not loose the foreign callback.
Once the __proto__ property is a real JavaScript accessor this hack is
no longer necessary. This change also makes __proto__ configurable.

R=rossberg@chromium.org
BUG=v8:2565
TEST=mjsunit/regress/regress-2565

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 17:53:40 +00:00
rossberg@chromium.org
867b23246a Also fix cast warnings on Win64
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 16:12:26 +00:00
mstarzinger@chromium.org
0ca02ee48d Make sure builtin functions don't rely on __proto__.
This makes sure that none of the builtin functions rely on the __proto__
accessor which can now be monkey-patched by applications. Instead use a
separate %SetPrototype() intrinsic or object literals to do the job.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 16:05:12 +00:00
hpayer@chromium.org
1630954005 Fix assert in PagedSpace::SizeOfObject for concurrent sweeping.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 15:47:59 +00:00
rossberg@chromium.org
c5de322c51 Fix one more cast warning on Win32
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 15:25:33 +00:00
rossberg@chromium.org
2ac5884b57 Fix cast warnings on Win32
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 15:15:37 +00:00
rossberg@chromium.org
5c93b18eb2 ES6 symbols: Allow symbols as property names
Since symbols and strings share a common representation, most of this change is about consistently replacing 'String' with 'Name' in all places where property names are expected. In particular, no new logic at all is necessary for maps, property dictionaries, or transitions. :) The only places where an actual case distinction is needed have to do with generated type checks, and with conversions of names to strings (especially in logger and profiler).

Left in some TODOs wrt to the API: interceptors and native getters don't accept symbols as property names yet, because that would require extending the external v8.h.

(Baseline CL: https://codereview.chromium.org/12296026/)

R=verwaest@chromium.org,mstarzinger@chromium.org
BUG=v8:2158

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 15:00:57 +00:00
hpayer@chromium.org
74a25d8e17 Wait for sweeper threads and finalize sweeping only if parallel/concurrent sweeping was in progress.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:56:20 +00:00
palfia@homejinni.com
4292356bc7 MIPS: Renamed "symbols" to "internalized strings" throughout the code base, in preparation of the introduction of ES6 'symbols' (aka private/unique names).
Port r13781 (59f39a06)

Original commit message:
The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:45:39 +00:00
yangguo@chromium.org
42a9a8681f Prepare push to trunk. Now working on version 3.17.8.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:44:23 +00:00
palfia@homejinni.com
ce854aa0c5 MIPS: Minor cleanup of CompareIC state
Port r13775 (1fd19d83)

Original commit message:
Allow transitioning from KNOWN_OBJECT to KNONW_OBJECT or OBJECT.
Also, rename HEAP_NUMBER IC states to NUMBER, since they handle Smis, too.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:41:39 +00:00
palfia@homejinni.com
d351a7eba2 MIPS: Currently this mostly just moves code around.
Port r13768 (4996bcd0)

Original commit message:
- Later the different parts will become individual code objects that tailcall into one another.
- The mapcheck/symbol check still needs to be separated from the overall prototype-chain check so that the ICs can reuse the handlers.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13804 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:29:40 +00:00
palfia@homejinni.com
7ec9c5e9d2 MIPS: Fix materialization of arguments objects with unknown values.
Port r13763 (6b32e7d6)

Original commit message:
This fixes the deoptimizer to materialize arguments objects of correct
length even in cases where the actual argument values are unknown and
were optimized away by Crankshaft. This can happen if only the length
property or the identity of an arguments object is used.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:26:30 +00:00
palfia@homejinni.com
1c9542ebef MIPS: Compile FastCloneShallowObjectStub using Crankshaft.
Port r13732 (686b0a45)

Original commit message:
This changes FastCloneShallowObjectStub to be compiled independent of
the target architecture. It also adds tracing to the deoptimizer for
compiled stubs and contains some minor bugfixes.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:23:30 +00:00
verwaest@chromium.org
590a3f8811 Polymorphism support for load IC.
Review URL: https://chromiumcodereview.appspot.com/12340112

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 14:03:27 +00:00
palfia@homejinni.com
d6a64ceea5 MIPS: Refactor RegExpStub to check lazily.
Port r13727 (55a760ec)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 13:15:16 +00:00
mvstanton@chromium.org
575c2c5a54 Bugfix: allow handle dereference only when we have a valid hydrogen graph or lithium chunk.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 12:34:49 +00:00
yangguo@chromium.org
e8145cabe6 Tweak register allocation for Math.round and do not use roundsd.
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13792 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-04 08:44:42 +00:00
mvstanton@chromium.org
46af26a5db A debug code assert needed to be behind the new optimize_constructed_arrays flag.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 16:59:53 +00:00
mvstanton@chromium.org
c4caf766bf Allocation Info Tracking, continued.
Addresses missing cases for array literals.
Adds support for "new Array()" call sites. This isn't complete yet, I have to run with --noinline_new.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 16:06:34 +00:00
mvstanton@chromium.org
fce0a11f05 Handle dereferencing needs to be allowed for printing during optimization phase.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13789 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 15:50:57 +00:00
yangguo@chromium.org
358311e8ec Limit EatAtLeast recursion by a budget.
BUG=178790

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13788 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 14:50:14 +00:00
rossberg@chromium.org
d7539af89a Fix cast warning on Win32
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13787 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 14:31:01 +00:00
rossberg@chromium.org
090d09d685 ES6 symbols: Implement Symbol intrinsic and basic functionality
- Add --harmony-symbols flag.
- Add Symbol constructor; allow symbols as (unreplaced) return value from constructors.
- Introduce %CreateSymbol and %_IsSymbol natives and respective instructions.
- Extend 'typeof' code generation to handle symbols.
- Extend CompareIC with a UNIQUE_NAMES state that (uniformly) handles internalized strings and symbols.
- Property lookup delegates to SymbolDelegate object for symbols, which only carries the toString method.
- Extend Object.prototype.toString to recognise symbols.

Per the current draft spec, symbols are actually pseudo objects that are frozen with a null prototype and only one property (toString). For simplicity, we do not treat them as proper objects for now, although typeof will return "object". Only property access works as if they were (frozen) objects (via the internal delegate object).

(Baseline CL: https://codereview.chromium.org/12223071/)

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13786 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 13:28:55 +00:00
hpayer@chromium.org
74b6f0f321 Fix Win64 compilation problem.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13785 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 12:46:20 +00:00
mstarzinger@chromium.org
05f1be1bb3 Unify deoptimizer for accessor and arguments frames.
This unifies the translation of artificial accessor stub and arguments
adaptor frames. The frame layout is the same on all architectures and
the computation code can be shared.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13784 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 12:23:24 +00:00
rossberg@chromium.org
764e1a0fcf ES6 symbols: Introduce Symbol class, along with abstract Name class
The new instance type 'Symbol' represents ES6 symbols (a.k.a. private/unique names). Currently, symbols are simple data objects that only carry a hash code, random-generated upon allocation.

The new type 'Name' now serves as the common super class for strings and symbols, and is supposed to represent property names. We will eventually migrate APIs from String to Name for the standard key type.

Strings and symbols share the same hash field representation, via the Name class. This way, we should be able to use the same code paths for symbols and internalized strings in most cases. Also, Symbol's instance type code is allocated adjacent to internalized string codes in the enum, allowing a simple range check for the common case.

Baseline CL: https://codereview.chromium.org/12210083/

R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13783 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-03-01 10:34:31 +00:00
yangguo@chromium.org
922efe43ed Simplify line editor choice in d8.
R=rossberg@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:40:24 +00:00
rossberg@chromium.org
55f93b5532 Renamed "symbols" to "internalized strings" throughout the code base,
in preparation of the introduction of ES6 'symbols' (aka private/unique names).

The SymbolTable became the StringTable. I also made sure to adapt all comments. The only remaining use of the term "symbol" (other than unrelated uses in the parser and such) is now 'NewSymbol' in the API and the 'V8.KeyedLoadGenericSymbol' counter, changing which might break embedders.

The one functional change in this CL is that I removed the former 'empty_string' constant, since it is redundant given the 'empty_symbol' constant that we also had (and both were used inconsistently).

R=yangguo@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 17:03:34 +00:00
hpayer@chromium.org
3b7417a506 Prepare push to trunk. Now working on version 3.17.7.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13778 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 15:53:29 +00:00
hpayer@chromium.org
a2b216c47f Turn off parallel and concurrent sweeping on system with just one processor/core.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13777 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 15:18:15 +00:00
hpayer@chromium.org
a9374e2fea Set unswept free bytes for concurent sweeper.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13776 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 15:07:28 +00:00
rossberg@chromium.org
8924d03e16 Minor cleanup of CompareIC state
Allow transitioning from KNOWN_OBJECT to KNONW_OBJECT or OBJECT.
Also, rename HEAP_NUMBER IC states to NUMBER, since they handle Smis, too.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13775 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 14:43:57 +00:00
mstarzinger@chromium.org
b22c7eaed9 Revert "Reapply optimization of DeoptimizeIf for ia32." (r13767)
This optimization turns out to have a negative effect on i5 processors
throughout the board. This needs further investigation to figure out
the underlying reason but will be rolled out for now.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13772 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 11:24:18 +00:00
yangguo@chromium.org
0e8a5fe4d8 Fix math.round with SSE4.1.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-28 10:39:34 +00:00
yangguo@chromium.org
5c264ade8e Fix wrong test in r13766 (Insert conversion to string in string.replace).
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13770 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:36:02 +00:00
verwaest@chromium.org
5a543d683a Order arguments of ComputeMonomorphicFlags to match ComputeFlags.
Review URL: https://chromiumcodereview.appspot.com/12226090

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13769 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:33:37 +00:00
verwaest@chromium.org
3ab255f55d Currently this mostly just moves code around.
- Later the different parts will become individual code objects that tailcall into one another.
- The mapcheck/symbol check still needs to be separated from the overall prototype-chain check so that the ICs can reuse the handlers.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13768 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:28:53 +00:00
mstarzinger@chromium.org
574dc38f96 Reapply optimization of DeoptimizeIf for ia32 broken in r13633.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13767 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:17:27 +00:00
yangguo@chromium.org
6e64bdfc6e Insert conversion to string in string.replace.
(missing since r13761)

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13766 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 15:12:30 +00:00
svenpanne@chromium.org
bfaf38d2fd Miscellaneous profile-driven Isolate plumbing.
While doing this, it became clear that quite a few functions should not be
static and should better live in various classes as instance methods, but I'll
leave this for a later CL.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13765 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:45:59 +00:00
yangguo@chromium.org
2a3063a7c3 Handle negative input in inlined Math.round on Intel CPUs.
R=jkummerow@chromium.org
BUG=v8:2451

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13764 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:44:57 +00:00
mstarzinger@chromium.org
ea5e9edac4 Fix materialization of arguments objects with unknown values.
This fixes the deoptimizer to materialize arguments objects of correct
length even in cases where the actual argument values are unknown and
were optimized away by Crankshaft. This can happen if only the length
property or the identity of an arguments object is used.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:37:51 +00:00
yangguo@chromium.org
7145671392 Make message listener API backwards compatible.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13762 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:35:39 +00:00
yangguo@chromium.org
4cbe7100e6 Refactor implementation for String.prototype.replace.
R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13761 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 14:14:45 +00:00
hpayer@chromium.org
fb807eeb0d Increase acceptable boot up memory size in tests for parallel sweeper threads.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13760 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 13:38:29 +00:00
svenpanne@chromium.org
c26d100b10 Avoid TLS accesses in Object::Lookup and Object::GetPrototype.
Both methods were among the top causes for TLS accesses.

BUG=v8:2487

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13759 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 13:22:29 +00:00
hpayer@chromium.org
e819dd2869 Shrinking of PagedSpace is done only by sweeper.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13758 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 12:59:52 +00:00
hpayer@chromium.org
ddeaa4a3f2 Added system thread manager class.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13757 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-02-27 12:55:55 +00:00