Commit Graph

9789 Commits

Author SHA1 Message Date
mstarzinger@chromium.org
b77e629f1a Implement IsIndependent(Isolate*)
BUG=
TEST=cctest/test-api/IndependentWeakHandle

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12854 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 13:20:45 +00:00
yangguo@chromium.org
e452c10702 Add fast path for FastProperty objects in JSON.stringify.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 12:59:35 +00:00
mstarzinger@chromium.org
ea00c51e24 Implement IsIndependent(Isolate*)
BUG=
TEST=cctest/test-api/IndependentWeakHandle

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12852 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 12:35:51 +00:00
yangguo@chromium.org
e26012e771 Fix JSON.stringify wrt harmony proxies.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12851 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:53:56 +00:00
yangguo@chromium.org
17fab1dfa1 Improve handle allocation in JSON.parse.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12850 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:50:36 +00:00
svenpanne@chromium.org
f3807ca17b Heavy cleanup of the external pointer API.
Added highly efficient Object::SetAlignedPointerInInternalField and
Object::GetAlignedPointerFromInternalField functions for 2-byte-aligned
pointers. Their non-aligned counterparts Object::GetPointerFromInternalField and
Object::SetPointerInInternalField are now deprecated utility functions.

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

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12849 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:25:32 +00:00
svenpanne@chromium.org
24bb0668e6 Simplified HCheckMaps handling a bit.
This is a refactoring-only CL which simplifies the way we emit combinations of
Smi+map checks.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12848 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 10:06:24 +00:00
svenpanne@chromium.org
9de1d40d28 Improve handling of property loads on the proto chain.
Previously Crankshaft emitted a generic load for these, now we emit a load of a
named field, guarded by a proto chain check.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-05 08:53:54 +00:00
yangguo@chromium.org
e8d91b424c Handle edge cases in basic JSON.stringify.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12842 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 14:46:57 +00:00
yangguo@chromium.org
64793b3f0d Correctly visit all external strings.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12841 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 12:45:00 +00:00
verwaest@chromium.org
14abf05bd5 Ensure reducing the length of an array doesn't make it go holey.
Also only transition and/or change anything to the backing store if we are
actually going to delete anything.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12840 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 10:24:56 +00:00
mvstanton@chromium.org
a85fd03caa Consolidated all the key store/load classes in the Hydrogen and Lithium
space into just two:
HLoadKeyed/HLoadKeyedGeneric and HStoreKeyed/HStoreKeyedGeneric
LLoadKeyed/LLoadKeyedGeneric and LStoreKeyed/LStoreKeyedGeneric
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12839 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-11-02 09:18:53 +00:00
yangguo@chromium.org
d2dc5ff546 Fix tick processor to correctly handle the 'parallel-compiler' tick.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12838 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-31 11:43:13 +00:00
danno@chromium.org
75cec19872 Prepare push to trunk. Now working on version 3.15.1.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12835 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-31 09:58:22 +00:00
yangguo@chromium.org
fe7ec01096 Fix handling arrays with holes in JSON.stringify.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12834 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-30 15:29:34 +00:00
jkummerow@chromium.org
8daf7e7de1 MIPS: fix mips_arch_variant bug in GYP build.
There is a small bug that causes to build mips32r2
version of v8 as mips32 (r1). This affects only
the compiled code.

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

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

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

This commit fixes the mips32r1/mips32r2 build.

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-30 10:54:44 +00:00
danno@chromium.org
5da0bbf390 Loosen aligned code target requirement on ARM
Fixes crashes when V8 is built as Thumb code.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12832 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 16:27:54 +00:00
danno@chromium.org
60267da6d9 MIPS: Cleanup handling of shifts: SHR can deoptimize only when its a shift by 0, all other shift never deoptimize.
Port r12373 (9fdde2ad)

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

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

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

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

BUG=
TEST=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12831 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 15:10:21 +00:00
yangguo@chromium.org
8ed2e560ea Treat leading zeros in JSON.parse correctly.
R=verwaest@chromium.org
BUG=158185

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12830 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 12:01:29 +00:00
ulan@chromium.org
42c7166e75 Fix performance regression introduced by r12812.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12829 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 11:45:57 +00:00
danno@chromium.org
e96d49047b Remove redundant jump to deoptimization (the jump already exists in DoCheckMapCommon)
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12828 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-29 11:45:40 +00:00
mstarzinger@chromium.org
e363cd3425 Fix ugly typo in GenerateNewNonStrictFast.
R=svenpanne@chromium.org
BUG=chromium:157520
TEST=mjsunit/regress/regress-crbug-157520

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12826 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-26 10:55:25 +00:00
mstarzinger@chromium.org
014f00fa51 Fix code flusher to process weak function links.
This fixes a corner case where weak function links of the code flushing
candidates list were destroyed by scavenges that happened during
incremental marking. Now those weak function links are updated while
scavenging happens.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12825 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-26 09:44:34 +00:00
yangguo@chromium.org
f6ed7f5e23 Relax test expectations for json-recursive.js
R=mvstanton@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-26 07:52:18 +00:00
mstarzinger@chromium.org
c0461d999c Update ReceiverObjectNeedsWriteBarrier to include HFastLiteral
This will prevent unnecessary write barriers for literals.
BUG=none
TEST=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:45:24 +00:00
mstarzinger@chromium.org
e119459af2 Set kChangesNewSpacePromotion for HStringAdd
TEST=none
BUG=none

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12822 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:23:39 +00:00
rossberg@chromium.org
aa5e1c3483 Set up Proxy methods the proper way.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12821 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 15:13:44 +00:00
rossberg@chromium.org
ae93cf665d Initial JS stub implementation of Object.observe. Adds support for .object/.unobserve/.notify/.deliverChangeRecords. No delivery mechanism is implemented for end-of-microtask.
Review URL: https://codereview.chromium.org/11225058
Patch from Rafael Weinstein <rafaelw@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12820 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 14:56:44 +00:00
rossberg@chromium.org
cd9029a502 Initial JS stub implementation of Object.observe. Adds support for .object/.unobserve/.notify/.deliverChangeRecords. No delivery mechanism is implemented for end-of-microtask.
Review URL: https://codereview.chromium.org/11225058
Patch from Rafael Weinstein <rafaelw@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12819 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 14:53:26 +00:00
mstarzinger@chromium.org
8133d85955 Fix test failures in r12813.
R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 13:54:10 +00:00
yangguo@chromium.org
e91473f057 Relax test expectations to appease mac build.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12817 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:39:41 +00:00
yangguo@chromium.org
58c82e93b3 Catch stack overflow in JSON.parse.
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12816 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:36:40 +00:00
mstarzinger@chromium.org
ebb44f0d30 Expose gc(true) to JavaScript, which triggers a scavenger GC.
With the --expose_gc option, gc() is exposed to JavaScript. Currently gc() triggers a full GC.

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

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12815 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:23:03 +00:00
yangguo@chromium.org
e40b33d39e Correctly check for stack limit in JSON.stringify.
Changes include:
 - inline functions in a way as not to waste stack space.
 - reset StackReserveSize to the value prior to r12808.
 - check stack overflow dynamically.

R=ulan@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12814 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 12:18:24 +00:00
mstarzinger@chromium.org
b55988625d Get rid of obsolete unchecked accessors.
R=yangguo@chromium.org
BUG=v8:1490

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12813 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 11:52:37 +00:00
ulan@chromium.org
889de3b780 Fix memory leak in RegExpStack.
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12812 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 11:10:13 +00:00
danno@chromium.org
0f8992395c Fast-forward to version 3.15.0
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12811 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 10:53:35 +00:00
mstarzinger@chromium.org
2baf7eb8e2 Fix typo in V8::MarkIndependent()
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 10:07:26 +00:00
ulan@chromium.org
4183f03848 Fix memory leak in DeoptimizerData.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12809 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-25 09:35:55 +00:00
yangguo@chromium.org
b2d41f8fe8 Fix stack overflow in JSON.stringify.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12808 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-24 15:49:59 +00:00
ulan@chromium.org
8f0501f509 Define CAN_USE_ARMV7_INSTRUCTIONS if armv7 gyp flag is set.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12807 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-24 12:38:24 +00:00
ulan@chromium.org
cb7645b43b Enable shared library on android
This change fixed link errors in building shared library
for android. crtbegin_so.o is added to resolve dso_handle
and exclude-libs option is removed for shared library.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-24 12:11:15 +00:00
yangguo@chromium.org
7fe6eb5c8e Add json-stringifier.h to v8.gyp.
R=jkummerow@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12805 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-24 09:56:01 +00:00
yangguo@chromium.org
295dee36bb Use correct timezone information on Solaris
`timezone` variable contains the difference, in seconds, between UTC and
local standard time (see `man 3 localtime` on Solaris).

Call to `tzset` is required to apply contents of `TZ` variable to
`timezone` variable.

BUG=v8:2064

Review URL: https://chromiumcodereview.appspot.com/10967066
Patch from Maciej Małecki <me@mmalecki.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 13:04:05 +00:00
yangguo@chromium.org
169185088e Fix Windows 64 build.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12800 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 12:00:42 +00:00
yangguo@chromium.org
657cd22463 Fix Windows build.
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12799 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 09:39:19 +00:00
yangguo@chromium.org
748f8bf7e1 Optimize inner-loop in JSON.stringify.
R=verwaest@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12798 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 09:05:56 +00:00
jkummerow@chromium.org
5677ee6565 Fix tools/run-tests.py --report when tests are specified on the command line
Review URL: https://codereview.chromium.org/11189136

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12797 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 08:59:53 +00:00
mstarzinger@chromium.org
cee59bf522 Enable incremental code flushing.
This enables code flushing even with incremental marking enabled and
fully shares the function link field in JSFunctions between candidates
for code flushing and the optimized functions list. If a candidate for
code flushing gets optimized, it will be evicted from the candidates
list.

R=ulan@chromium.org
BUG=v8:1609

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12796 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 08:25:04 +00:00
verwaest@chromium.org
362e8cb02a Pretenure JSON graph if the input string is larger than 100*1024 chars.
Review URL: https://chromiumcodereview.appspot.com/11238031

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12795 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-10-23 08:06:28 +00:00