Commit Graph

10942 Commits

Author SHA1 Message Date
haitao.feng@intel.com
fb5857ceb8 Patch to enhance the source code line information for profiler.
This patch is to enhance the source code line information for profiler.

For the Hydrogen compilation, most of the source code line information
is not copied from the HInstruction the to corresponding LInstruction.

This patch defines one PositionBits field for LInstruction and copies the
sorce code position value from the HInstruction.

When Generating the native code, we use RecordPosition(..) function to
write LInstruction's position value to position recorder.

For the MIPS platform, I did not touch because I have no devices
to verify the modification on it.

R=danno@chromium.org

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16114 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-08 02:16:12 +00:00
haitao.feng@intel.com
f54aa8b6ad tweak of Math.abs in its x64 stub
R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16113 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-08 01:29:33 +00:00
plind44@gmail.com
bbbf78e78c MIPS: Refactor and improve inlined double-aligned allocations
Additionally, fix object size register clobbering in Allocate routine.

Based on 13284 (d42bf80).

BUG=
R=plind44@gmail.com

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

Patch from Dusan Milosavljevic <Dusan.Milosavljevic@rt-rk.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16112 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 21:54:03 +00:00
verwaest@chromium.org
e5afd32129 Fix Object.freeze, Object.observe wrt CountOperation and CompoundAssignment.
BUG=2774,2779
R=adamk@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 18:45:41 +00:00
verwaest@chromium.org
56ca64e98c Revert "mod does not rely on a fixed register anymore, the arguments are passed via the stack."
Due to buildbot failures.

BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16110 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 17:22:17 +00:00
yurys@chromium.org
707fdd4c6a Support idle time in CPU profiler
This change provides an API for the embedder to tell CPU profiler if it is idle or busy with some task. This way we can discriminate between idle time and some native code execution.

BUG=268947
R=alph@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 17:04:27 +00:00
olivf@chromium.org
ca4457e8ed mod does not rely on a fixed register anymore, the arguments are passed via the stack.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16108 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 16:47:24 +00:00
palfia@homejinni.com
5021e72675 MIPS: First implementation of allocation elimination in Hydrogen.
Port r16098 (328ff5f7)

Original commit message:
This change implements a simple data-flow analysis pass over captured
objects to the existing escape analysis. It tracks the state of values
in the Hydrogen graph through CapturedObject marker instructions that
are used to construct an appropriate translation for the deoptimizer to
be able to materialize these objects again.

This can be considered a combination of scalar replacement of loads and
stores on captured objects and sinking of unused allocations.

TEST=mjsunit/compiler/escape-analysis

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16107 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 16:34:20 +00:00
jkummerow@chromium.org
371ac893f9 Check for empty handle in JSON stringifier
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16106 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 16:34:13 +00:00
svenpanne@chromium.org
f3a36593be Removed wrong ASSERTs on MIPS.
R=palfia@homejinni.com

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16102 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 13:42:46 +00:00
svenpanne@chromium.org
a8e12c5a02 Handle Symbols in the LBranch instruction on x64.
This was an omission in https://code.google.com/p/v8/source/detail?r=14051.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16101 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 13:33:41 +00:00
prybin@chromium.org
29bb553b1d Fix step in positions (include various calls and exclude current pc point), add a test
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16100 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 12:27:22 +00:00
jochen@chromium.org
5a92a95676 Move i18n's number-format C++ code to runtime
BUG=v8:2745
R=dcarney@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16099 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 12:14:50 +00:00
mstarzinger@chromium.org
63defee477 First implementation of allocation elimination in Hydrogen.
This change implements a simple data-flow analysis pass over captured
objects to the existing escape analysis. It tracks the state of values
in the Hydrogen graph through CapturedObject marker instructions that
are used to construct an appropriate translation for the deoptimizer to
be able to materialize these objects again.

This can be considered a combination of scalar replacement of loads and
stores on captured objects and sinking of unused allocations.

R=titzer@chromium.org
TEST=mjsunit/compiler/escape-analysis

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16098 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 11:24:14 +00:00
yangguo@chromium.org
ef8d394f12 Re-reland "Flush parallel recompilation queues on context dispose notification"
BUG=
R=hpayer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16095 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 09:33:09 +00:00
yangguo@chromium.org
5818d831c5 Make JSON::Parse return Local<Value>
It should be able to return Smi, etc. Not only JSObject.

BUG=v8:2821
TEST=cctest/test-api/JSONParseNumber
R=yangguo@chromium.org

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

Patch from Takeshi Yoshino <tyoshino@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16092 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 09:11:39 +00:00
dslomov@chromium.org
5ad4a8458a Prepare push to trunk. Now working on version 3.20.15.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16091 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 09:05:59 +00:00
dcarney@chromium.org
cd74a09886 expose eternal handle api
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16089 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 08:26:23 +00:00
jkummerow@chromium.org
a9efd655a5 Pacify Win7 builders
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16088 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 08:25:44 +00:00
bmeurer@chromium.org
db1436ab65 Handle external reference values properly in HConstant::ImmortalImmovable().
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 07:08:50 +00:00
jochen@chromium.org
02914097b2 Move i18n extension's date-format C++ code to runtime
BUG=v8:2745
R=dcarney@chromium.org, mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16086 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 03:40:44 +00:00
palfia@homejinni.com
213fd4b678 MIPS: Fix Sunspider 1.0/crypto-aes.
* This makes sure that DoModI calculates correct result even when
  the left register is the same as the result register.
* Microoptmization: it generates smaller code when left and result
  are different registers.

TEST=benchmarks/sunspider/crypto-aes.js

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16085 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-07 00:39:49 +00:00
dslomov@chromium.org
03172d9da8 Handlify factory methods for typed array, ArrayBuffer and DataView.
These factory methods used pointers for constructor fucntions, therefore
those pointers could corrupt if allocation triggered gc.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 19:14:51 +00:00
dslomov@chromium.org
d0adaefc55 Fix Win64 build after r16079.
TBR=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16083 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 19:13:15 +00:00
ulan@chromium.org
3511f7a428 Fix Array index dehoisting.
BUG=264203
TEST=test/mjsunit/regress/regress-264203
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 16:38:39 +00:00
jkummerow@chromium.org
25ffcc3407 ARM/MIPS: Fix Constant-to-DoubleRegister moves in LGapResolver
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 14:46:50 +00:00
yangguo@chromium.org
fa2381eb75 Wrap back edge table in an iterator.
R=titzer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 14:38:30 +00:00
rossberg@chromium.org
f56ad9cab7 Turn assert into runtime assertion to make fuzzer happy
R=mstarzinger@chromium.org
BUG=265369

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16076 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 14:19:13 +00:00
yangguo@chromium.org
8fb95efdda Improve internal stringifcation for custom Error objects.
If an developer attempts to "subclass" Error by running
`MyError.prototype = new Error();`, then the internal v8::Message object
that's produced and handed off to `window.onerror` handlers is poorly
stringified as "[object Object]".

This patch adjusts the stringification process for these objects to
include not only native Error objects, but also objects that have Error
in their prototype chain, and haven't overwritten Error.toString with
some custom variant.

BUG=2822
R=mstarzinger@chromium.org, yangguo@chromium.org

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

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16075 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 13:58:21 +00:00
rossberg@chromium.org
92bd4d1f2d I found this working on
https://codereview.chromium.org/19541010/

The main problem is that if you called Object.getNotifier(obj) on an object, %SetObserved(object) would never get called on it, and thus it would be unobservable (new test added for this).

Additionally, Runtime::SetObserved was asserting obj->IsJSObject() which would fail if called on a proxy.

It just happens that our existing test always called getNotifier() before Object.observe on proxies, and thus we never previously attempted to transition the map of a proxy.

Both issues are now fixed and properly tested.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16074 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 13:49:10 +00:00
svenpanne@chromium.org
bc6fe88030 Desugar bitwise negation into XOR and kill all UnaryOp stuff.
R=mstarzinger@chromium.org, verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16073 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 13:34:51 +00:00
dslomov@chromium.org
45f4b685bf Update Array Iterator to use numeric indexes
At the last face-to-face meeting it was decided that we should use
numeric indexes for the Array Iterator values.

https://github.com/rwldrn/tc39-notes/blob/master/es6/2013-07/july-24.md#514-keys-entries-return-numbers-for-array-index-properties

BUG=v8:2818
R=dslomov@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16072 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 13:10:07 +00:00
jkummerow@chromium.org
665c45c92d Un-revert "Implement simple effect typing for variables" and "Handle switch effects"
This re-lands r15776 and r15777, reverting the revert in r15786.

R=rossberg@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16071 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 12:57:23 +00:00
bmeurer@chromium.org
548062ea52 r11951 changed the existing check for the __SOFTFP__ define in ARM platforms
to a check for __SOFTP. Most other programs look for __SOFTFP__ [1], so
look for both to increase the chances of not erroring out when using GCC 4.5.

[1] Based on http://codesearch.debian.net/search?q=__SOFTFP__ vs
    http://codesearch.debian.net/search?q=__SOFTFP[^_]

BUG=v8:2140
R=bmeurer@chromium.org

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

Patch from Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16070 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 11:08:32 +00:00
yurys@chromium.org
4e6041d595 Use standard routine to compute pointer hashs in heap profiler
BUG=None
R=alph@chromium.org, yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16069 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 08:49:05 +00:00
verwaest@chromium.org
206a35763a Fix DeferredInstanceMigration to store the result to temp rather than temp to result.
Thanks to Akos Palfi for finding the bug.

BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 08:26:31 +00:00
yurys@chromium.org
e06343431a Return start/end profiling time in microseconds instead of milliseconds
The start and end time are now measured in microseconds and the type is int64_t.
This way it seems more natural as we are going to support submilisecond sampling
rate soon. Also it fixes cctest/test-cpu-profiler/ProfileStartEndTime test
failure caused by comparison between long double and double.

TEST=cctest/test-cpu-profiler/ProfileStartEndTime
BUG=v8:2824
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 08:00:58 +00:00
danno@chromium.org
61a496f4e4 Prepare push to trunk. Now working on version 3.20.14.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16064 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 07:31:23 +00:00
dcarney@chromium.org
982fa4d381 delete eternal handle blocks correctly
TBR=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16063 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 06:34:54 +00:00
palfia@homejinni.com
8575ae5530 MIPS: Migrate instance of deprecated maps in HCheckMaps.
Port r16057 (b73ae514)

Original commit message:
Currently only direct map checks are supported. Otherwise only polymorphic cases with a generic fallback behave properly, regular polymorphic cases still need to be adapted.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16062 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 01:12:10 +00:00
haitao.feng@intel.com
fe7df8c703 Make some constants' meaning clear for X64
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16061 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-06 00:09:01 +00:00
palfia@homejinni.com
3b347f45a6 MIPS: Replace HCheckPrototypeMaps by explicit map checks of constant values.
Port r16055 (7567e57f)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16060 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 17:04:10 +00:00
verwaest@chromium.org
2622158aa0 Change environment padding value to value with smi representation.
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16059 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 16:53:28 +00:00
mstarzinger@chromium.org
e9f6a2d7b4 Use first hit when dumping heap constants.
This makes sure that the first hit is used when dumping heap constants
and hence "TheHoleValue" is not overwritten with other roots that are
initialized to the hole as well.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16058 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 16:47:45 +00:00
verwaest@chromium.org
9d9930ce99 Migrate instance of deprecated maps in HCheckMaps.
Currently only direct map checks are supported. Otherwise only polymorphic cases with a generic fallback behave properly, regular polymorphic cases still need to be adapted.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16057 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 16:42:39 +00:00
verwaest@chromium.org
04b5e7fa63 Replace HCheckPrototypeMaps by explicit map checks of constant values.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16055 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 13:45:16 +00:00
hpayer@chromium.org
983a8621e0 More cleanup regarding the maximum non-large object allocation size.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16052 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 12:52:53 +00:00
haitao.feng@intel.com
e8fe083eb0 Introduce Push and Pop register macro instructions for all platforms
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 12:43:04 +00:00
bmeurer@chromium.org
274f254236 Revert "Return start/end profiling time in microseconds instead of milliseconds"
This reverts r16049 for breaking build on windows.

TBR=svenpanne@chromium.org,machenbach@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16050 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 12:27:12 +00:00
yurys@chromium.org
d38bbe354b Return start/end profiling time in microseconds instead of milliseconds
The start and end time are now measured in microseconds and the type is int64_t. This way it seems more natural as we are going to support submilisecond sampling rate soon. Also it fixes cctest/test-cpu-profiler/ProfileStartEndTime test failure caused by comparison between long double and double.

TEST=cctest/test-cpu-profiler/ProfileStartEndTime
BUG=v8:2824
R=alph@chromium.org, bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16049 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 11:48:24 +00:00
jochen@chromium.org
cb68e2cd9b Expose JSON parser through V8 API
BUG=v8:2821
TEST=cctest/test-api/JSONParse
R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16048 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 11:14:46 +00:00
dcarney@chromium.org
207396101f introduce eternal handles
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16045 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 09:46:23 +00:00
mstarzinger@chromium.org
a50827e044 Add explicit transition flag to HStoreNamedField.
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16044 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 09:35:18 +00:00
yangguo@chromium.org
b58093c953 Add notice when parallel recompilation is disabled by tracing.
BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 09:28:22 +00:00
yangguo@chromium.org
1ed4df6b57 Disable parallel recompilation for --trace-hydrogen-stubs.
R=bmeurer@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16042 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 09:02:47 +00:00
verwaest@chromium.org
251c191824 Fix the loop-builder to tag the entire body as part of the loop.
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16041 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 08:59:55 +00:00
dcarney@chromium.org
14ed15e7e1 Make GlobalHandle::NodeBlock deletable
R=mstarzinger@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16040 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 07:34:29 +00:00
yurys@chromium.org
411d21b2b1 Add start and end profiling time to v8::CpuProfile
I'm going to change CPU profiler API and deprecate GetSelfTime, GetTotalTime and GetTotalSamplesCount on CpuProfileNode as all of those values are derived from self samples count and sampling rate. The sampling rate in turn is calculate based on the profiling duration so having start/end time and total sample count is enough for calculating smpling rate.

BUG=267595
R=alph@chromium.org, bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16039 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 07:17:08 +00:00
svenpanne@chromium.org
e544f130c5 Remove unused UNARY_MINUS builtin.
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 07:00:38 +00:00
dcarney@chromium.org
eb52c66fd0 IsNearDeath needs to include pending nodes
R=svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16037 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 06:58:48 +00:00
svenpanne@chromium.org
d5b9616991 Clean some unuse code of unary negation
R=svenpanne@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16036 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-05 06:34:26 +00:00
palfia@homejinni.com
ea38ee8782 MIPS: Avoid redundant smi check for Math.abs
Port r16021 (d79f4450)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16035 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 18:35:19 +00:00
haitao.feng@intel.com
dfda85a91a Introduce PopReturnAddressTo and PushReturnAddressFrom macro-assembler instructions for X64
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16034 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 13:42:02 +00:00
dslomov@chromium.org
5230c19d8b Add size_t length argument to v8::ArrayBuffer::Allocator::Free.
The previous implementation of Free is a deprecated overload now.

R=mstarzinger@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16033 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 13:03:06 +00:00
dslomov@chromium.org
f8b80ca66d Revert "Add size_t length argument to v8::ArrayBuffer::Allocator::Free."
This reverts r16031 for breaking shared build.

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16032 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 12:56:53 +00:00
dslomov@chromium.org
1688f3c167 Add size_t length argument to v8::ArrayBuffer::Allocator::Free.
The previous implementation of Free is a deprecated overload now.

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 12:19:22 +00:00
svenpanne@chromium.org
bf71023ba5 Replaced unary negation by multiplication with -1.
This fixes a deopt loop in the Epic Citadel demo and removes some code. Apart from that, this change is performance-neutral.

When we do something similar for BIT_NOT, the whole UnaryOp stuff can go away.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 11:56:35 +00:00
mstarzinger@chromium.org
1e296936eb Store transition on HStoreNamedField as HConstant.
This allows optimization passes that run in the parallel compiler thread
to use the map that a store transitions to for further analysis even
though the map handle cannot be dereferenced.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 11:24:55 +00:00
titzer@chromium.org
af2663afd8 Remove instructions and infrastructure related to IDEFs that is now obsolete (and was never turned on). The new bounds check elimination phase doesn't make use of these features, as they were the first parts of the previous approach which was never completed.
BUG=
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16027 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 11:17:26 +00:00
mstarzinger@chromium.org
c87abd1117 Add new Harmony methods to Array.prototype object.
Array.prototype.find
Array.prototype.findIndex

http://people.mozilla.org/~jorendorff/es6-draft.html

BUG=v8:2776,v8:2777
TEST=mjsunit/harmony/array-find,mjsunit/harmony/array-findindex
R=mstarzinger@chromium.org

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

Patch from Ioseb Dzmanashvili <ioseb.dzmanashvili@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16025 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 10:57:48 +00:00
loislo@chromium.org
d2c443b774 Extract hardcoded error strings into a single place and replace them with enum.
I'd like to propagate bailout reason to cpu profiler.
So I need to save it into heap object SharedFunctionInfo.
But:
1) all bailout reason strings spread across all the sources.
2) they are native strings and if I convert them into String then I may have a performance issue.
3) one byte is enough for 184 bailout reasons. Otherwise we need 8 bytes for the pointer.

Also I think it would be nice to have error strings collected in one place.
In that case we will get additional benefits:

It allows us to keep this set of messages under control.
It gives us a chance to internationalize them.
It slightly reduces the binary footprint.

From the other hand the developers have to add new strings into that enum.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16024 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 09:53:11 +00:00
mstarzinger@chromium.org
477b41c89b Fix Mac build after r16022.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16023 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 09:35:44 +00:00
mstarzinger@chromium.org
12c8d36331 Generate grokdump constants with 'make grokdump' now.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 09:02:02 +00:00
jkummerow@chromium.org
a47705644e Avoid redundant smi check for Math.abs
R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16021 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 08:59:02 +00:00
jkummerow@chromium.org
15c1d23fbc Use test(reg, imm) when the operand is a register on ia32
R=jkummerow@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16020 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 08:55:26 +00:00
jkummerow@chromium.org
865582e02b TSan: Move definition of AtomicOps_x86CPUFeatureStruct into v8::internal namespace
This matches other atomicops_internals_* files.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16019 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-02 08:52:59 +00:00
jochen@chromium.org
738237e877 Move helper methods from i18n extension into runtime.
BUG=v8:2475
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16015 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 19:25:27 +00:00
jochen@chromium.org
71cad9edb6 Fix incorrect #ifdef statements for I18N support.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16014 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 19:21:16 +00:00
danno@chromium.org
40dff5067c Prepare push to trunk. Now working on version 3.20.13.
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16009 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 16:57:58 +00:00
jkummerow@chromium.org
61f531cf23 Remove buggy ToNumber truncation
BUG=v8:2813
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16008 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 16:12:31 +00:00
ulan@chromium.org
4de5d18077 Fix mozilla regress-398085-01 failure on windows.
Make sure that all stack pages are mapped before accessing them.

R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16007 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 12:55:19 +00:00
dslomov@chromium.org
f62ffeef31 Calling Map etc without new should throw TypeError
Even though we do not yet allow Map, Set, WeakMap and WeakSet to be
subclassed we need to ensure that we do not allow them to be [[Call]]ed
to allow them to be subclassed in the future.

BUG=v8:2819
R=dslomov@chromium.org, mstarzinger@chromium.org

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

Patch from Erik Arvidsson <arv@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16006 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 09:18:28 +00:00
dslomov@chromium.org
4ebeda216d Speed-up 'new TypedArray(arrayLike)'.
Handle specially the cases when the argument is a typed array,
in particular of the same type as the one we create.

Allocate backing store uninitialized in cases when we can guarantee
complete initialization.

R=bmeurer@chromium.org

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:52:21 +00:00
hpayer@chromium.org
3e7e3f70a6 Pretenure heap number in high promotino mode if a store requires a mutable heap number to be allocated.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16004 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:49:27 +00:00
dslomov@chromium.org
791e1a9cb2 Revert "Speed-up 'new TypedArray(arrayLike)'."
This reverts commit r15998 for breaking NaCl build.

TBR=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16003 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:47:39 +00:00
bmeurer@chromium.org
3da5d1ad7b Get rid of HStringLength.
Use HLoadNamedField to load the string length field instead.

Depends on: https://codereview.chromium.org/21488002

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16002 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:42:47 +00:00
mstarzinger@chromium.org
2e7c5d4988 Fix printing of Harmony Set and Map instances.
R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16001 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:36:21 +00:00
hpayer@chromium.org
9e8058146e Cleaning up HAllocate space and double alignment selection.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16000 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:34:36 +00:00
bmeurer@chromium.org
9f8d162471 Fix broken HCheckInstanceType::Canonicalize().
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15999 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:27:46 +00:00
dslomov@chromium.org
d208eea478 Speed-up 'new TypedArray(arrayLike)'.
Handle specially the cases when the argument is a typed array,
in particular of the same type as the one we create.

Allocate backing store uninitialized in cases when we can guarantee
complete initialization.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15998 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:19:51 +00:00
bmeurer@chromium.org
a4c072ed47 Fix a crash when generating forward jumps to labels at very high assembly offsets
The first jump to a specific label was marked as jump to absolute
position -4. This value was stored in the assembly as a branch to a
offset (-4 - (instruction offset + 8)). The offset is only 24 bit
long on ARM. Thus instruction offsets higher than 2^23 - 12 would overflow
the offset.

Fix by denoting the first jump to a label by storing the jump
instruction location as the target. This will result in offset of -8,
which of course always fits in the branch instruction.

BUG=2736
TEST=cctest/test-assembler-arm/17
R=bmeurer@chromium.org, svenpanne@chromium.org

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

Patch from Kimmo Kinnunen <kkinnunen@nvidia.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15997 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 08:13:08 +00:00
hpayer@chromium.org
68271ddc0e Print HAllocate flags in --trace-hydrogen.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-08-01 07:56:36 +00:00
verwaest@chromium.org
e53471dbaa Remove elements transitions from the transition array.
This is preparatory work for reordering the transition tree. Since elements transitions will be at the root of the transition tree, runtime access to them is slow since we have to walk the transition tree backwards first. Hence remove the optimization that promoted them to a special field, requiring a pointer (mostly NULL) in every non-simple transition array.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15993 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 17:08:50 +00:00
danno@chromium.org
04a9f00238 Make sure that bce creates constants of right type
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15992 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 16:41:51 +00:00
danno@chromium.org
e5e0100504 Fix overzealous casting that erroneously lead to ASSERTs
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 15:40:24 +00:00
danno@chromium.org
4cdffbf4fe Improve instruction creating/adding shorthand in HGraphBuilder
Add multi-argument templates for New, NewUncasted, Add and AddUncasted that
call boilerplate HInstruction::New methods rather than the constructor directly.
This allows for automatic passing of the zone and context for instructions that
need them.

R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15990 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 14:58:39 +00:00
bmeurer@chromium.org
8c0f2eabbf Stores to external references don't need write barriers.
This also applies to stores with an external field representation.

Also cleans up the CreateAllocationSiteStub.

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

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15989 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 13:45:51 +00:00
ulan@chromium.org
7ad3db7485 Fix SHL when shift amount is zero for arm and mips.
BUG=v8:2817
R=titzer@chromium.org
TEST=octane

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15987 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 12:46:54 +00:00
dslomov@chromium.org
693301702b Reimplement TypedArray.set in Javascript.
Implement all cases for TypedArray.set in Javascript, except the case
where memmove is used. This makes it many times faster.

R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15985 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 12:10:49 +00:00
bmeurer@chromium.org
44e4c2756a Avoid the use of set_type() in instruction constructors.
R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15984 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 10:56:46 +00:00
bmeurer@chromium.org
8823e8e89f Get rid of HLinkObjectInList.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15983 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 10:47:44 +00:00
verwaest@chromium.org
3143f5f88b Remove special handling of fields in combination with elements transitions in Crankshaft.
Instead first try to keep ICs monomorphic if elements kinds generalize. If that fails, use standard polymorphic handling. The Try*PolymorphicAsMonomorphic methods will automatically produce code similar to the previous approach using CheckMapsWithTransitions.

BUG=
R=hpayer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15982 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 10:08:05 +00:00
bmeurer@chromium.org
843cf1f654 Compile fix for older GCCs.
TBR=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15981 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 10:03:59 +00:00
bmeurer@chromium.org
bacc626f57 Fix HType handling for HConstant with external references.
We cannot use set_type() with HType::None() in the HConstant
constructor, since set_type() asserts that the new type is a
subtype of the previous one, but HType::None() is not a subtype
of HType::Tagged() which is the initial type set by the HValue
constructor.

This patch adds an optional type parameter to the HValue,
HInstruction and HTemplateInstruction constructors.

R=titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 09:38:37 +00:00
titzer@chromium.org
d87296eb1f Eagerly set the types of many kinds of hydrogen instructions.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15979 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 09:29:30 +00:00
mstarzinger@chromium.org
a1c7478a38 Fix stale unhandlified value in JSObject::SetPropertyForResult.
R=danno@chromium.org
BUG=chromium:265894

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 08:51:18 +00:00
bmeurer@chromium.org
e9fcf8fc98 Revert the latest set of platform changes.
Revert "Fix NaCl build."
Revert "Revert target arch detection."
Revert "Fix typo."
Revert "Simplify implementation of Mutex."
Revert "Fix for older clang releases that lack __has_extension."
Revert "Reland initial bits of "Implement correct OS and CC detection.""

TBR=danno@chromium.org,svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15976 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:51:46 +00:00
dcarney@chromium.org
a5e87c8459 make Intl non-enumerable
R=jochen@chromium.org, svenpanne@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15974 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:17:34 +00:00
hpayer@chromium.org
2bd5405dc2 Free slots buffer entries when tearing down the heap.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15973 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:17:03 +00:00
bmeurer@chromium.org
662958c56c Fix NaCl build.
TBR=machenbach@chromium.org,svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15972 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:08:52 +00:00
bmeurer@chromium.org
ae2c2ad46d Revert target arch detection.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15971 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:04:30 +00:00
hpayer@chromium.org
b6a6fc76dc Allocation space decisions are precisely made in hydrogen.
BUG=
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15970 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 07:03:16 +00:00
bmeurer@chromium.org
dff0e84b1b Fix typo.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 06:56:02 +00:00
haitao.feng@intel.com
e0eaee29d3 Introduce StackOperandForReturnAddress operand for X64 to access return address in the stack
R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15967 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-31 00:19:32 +00:00
haitao.feng@intel.com
e4cdcc6576 Introduce the SetFp function in StackHandler
The FP setting is different for X32 than the other platforms as
kFPOnStackSize is double the kPointerSize and we have to clear the
higher 32 bits to 0.

R=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15966 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 23:59:55 +00:00
palfia@homejinni.com
bfc98bc0c8 MIPS: Fix flaky mjsunit/harmony/generators-iteration test failure.
This fixes the result allocation in EmitCreateIteratorResult,
when a GC is required. The Runtime call returns the allocated
pointer in v0 register, but the rest of the function was
expected it in a0 register. Refactored the function to use v0 for
the result in the whole function.

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15965 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 22:28:54 +00:00
bmeurer@chromium.org
64bfd42a4c Simplify implementation of Mutex.
Also moves Mutex to its own file mutex.{cc,h}.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 17:12:49 +00:00
mstarzinger@chromium.org
96fc677d25 Pipe a script's CORS status through V8 during compilation.
In order to properly sanitize exception data during a 'window.onerror'
handler, we need to know whether a script was served with proper CORS
headers at the time it was loaded into V8. This patch adds a single bool
to ScriptOrigin, and pipes that through the compiler to land on the
Script object. We can then retrieve the parameter when calling the
embedder's exception callback.

BUG=crbug.com/159566
R=mstarzinger@chromium.org

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

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 17:05:50 +00:00
mstarzinger@chromium.org
8a019050ff Reland "Compilation type and state allocate an unnecessary Smi on v8::Script" (r15940).
It turns out that this change is not related to the test failures.

TBR=danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 17:00:05 +00:00
verwaest@chromium.org
2af164f4d9 Mark maps as unstable if their instances potentially transition away.
Use this as a prerequisite for adding code dependencies.

R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15961 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 16:33:58 +00:00
mstarzinger@chromium.org
0627d433b0 Add new Harmony methods to String.prototype object.
String.prototype.repeat
String.prototype.startsWith
String.prototype.endsWith
String.prototype.contains

http://people.mozilla.org/~jorendorff/es6-draft.html

BUG=v8:2796,v8:2797,v8:2798,v8:2799
TEST=mjsunit/string-repeat,mjsunit/string-startswith,mjsunit/string-endswith,mjsunit/string-contains
R=mstarzinger@chromium.org

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

Patch from Ioseb Dzmanashvili <ioseb.dzmanashvili@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15960 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 16:33:08 +00:00
bmeurer@chromium.org
306d944e3e Fix for older clang releases that lack __has_extension.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15959 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 14:49:44 +00:00
titzer@chromium.org
0af94e4ac4 Don't generate a shift left by one if can deoptimize on ia32 and arm and mips.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15958 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 13:30:03 +00:00
danno@chromium.org
f3fff3c2f4 Revert 15940: "Compilation type and state allocate an unnecessary Smi on v8::Script."
Due to Mozilla test failures on Win32 debug

TBR=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 11:24:11 +00:00
danno@chromium.org
570138742e Prepare push to trunk. Now working on version 3.20.12.
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15954 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 11:08:56 +00:00
bmeurer@chromium.org
a59d3ba977 Reland initial bits of "Implement correct OS and CC detection."
This adds the OS and CC detection and cleans up the globals.h to
some degree. It also places all of the C++11 feature detection into
globals.h.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15953 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 10:36:58 +00:00
bmeurer@chromium.org
82e4ba6f70 Turn mark deoptimize on undefined into a proper HPhase.
This patch also removes the implicit recursion on phi operands,
using a loop and a worklist instead, to avoid potential stack
overflows.

R=dslomov@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15952 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 10:25:20 +00:00
verwaest@chromium.org
f328c2c77c HasNonSmiUse should ignore tagged uses
R=verwaest@chromium.org

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

Patch from Weiliang Lin <weiliang.lin2@gmail.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 09:06:42 +00:00
mstarzinger@chromium.org
3202e1d795 Re-revert "Flush parallel recompilation queues on context dispose notification" (r15883).
R=danno@chromium.org
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 08:35:48 +00:00
svenpanne@chromium.org
31e56df122 Prepare some ValueOf renamings.
R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15945 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 07:05:15 +00:00
yurys@chromium.org
6ba502fa4d Simplify sampling rate calculation
Sampling rate is now calculated as total number of samples divided by profiling time in ms. Before the patch the sampling rate was updated once per 100ms which doesn't have any obvious advantage over the simpler method.

Also we are going to get rid of the profile node self and total time calculation in the v8 CPU profiler and only expose profiling start/end time for CpuProfile and number of ticks on each ProfileNode and let clients do all the math should they need it.

BUG=None
R=bmeurer@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15944 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 07:01:16 +00:00
haitao.feng@intel.com
1f9dc8b1bf This patch is to support Vtune on Android platform.
The Vtune API provides the support for Android platform. So we fix the
compilation issue and it works on Android platform.

R=danno@chromium.org

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

Patch from Chunyang Dai <chunyang.dai@intel.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15942 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-30 01:01:04 +00:00
yurys@chromium.org
c301f8203c Remove unused methods from RuntimeProfiler
Also removed Logger fields that used to be used for writing compressed logs.

BUG=None
R=bmeurer@chromium.org, loislo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15941 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 19:02:16 +00:00
mstarzinger@chromium.org
9f4fc77e1e Compilation type and state allocate an unnecessary Smi on v8::Script.
This patch combines them into a single field, and adjusts the accessors
and setters to take the enum type directly, rather than converting to and
from a Smi value.

R=mstarzinger@chromium.org

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

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 17:59:02 +00:00
verwaest@chromium.org
4ab26b7ed4 Revert "Smi-support for HSar."
Reverting https://chromiumcodereview.appspot.com/21049003

R=mstarzinger@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15939 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 17:17:19 +00:00
verwaest@chromium.org
480729ff79 Smi-support for HSar.
BUG=
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15938 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 17:07:28 +00:00
bmeurer@chromium.org
b019910a38 This adds generic support for ExternalReferences in Hydrogen (and Lithium), as required for AddIncrementCounter.
R=danno@chromium.org, titzer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15936 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 13:56:51 +00:00
titzer@chromium.org
37ee4a0369 Fix IsDeletable() for HStringAdd, HStringCharCodeAt, HStringCharFromCode.
BUG=
R=mstarzinger@chromium.org, svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15934 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 12:35:43 +00:00
bmeurer@chromium.org
e3901e919d Revert new OS and CC detection and related changes since r15923.
Revert "Attempt to fix leftover test breakage on Mac."
Revert "Fix d8 build error when V8_SHARED is unset on Linux."
Revert "Fix V8_GNUC_PREREQ macro."
Revert "Fix typo."
Revert "Implement correct OS and CC detection."

TBR=svenpanne@chromium.org,danno@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 12:12:39 +00:00
danno@chromium.org
837276829e Fix HasResult method of LTemplateInstruction to properly handle LCheckSmi
LCheckSmi sometimes has a result register and sometimes not, even though its
LTemplateInstruction alwasys has room for one. Debug output use HasResult to
determine whether it was ok to de-ref result(), but HasResult doesn't check for
the case where LTemplateInstruction has a result but it's NULL.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15931 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 11:57:42 +00:00
danno@chromium.org
504f94fcbd Make it easier to get JS stack crawls from gdb
R=bmeurer@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15930 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 11:56:45 +00:00
mvstanton@chromium.org
e9cc78af7e Fix for V8 issue 2795: Check fails with deopt for mjsunit/array-store-and-grow
(https://code.google.com/p/v8/issues/detail?id=2795)

The reason is when allocating and building arrays in hydrogen we need to ensure
we do any int32-to-smi conversions BEFORE the allocation. These conversions can
at least theoretically deoptimize. If this happens before all the fields of the
newly allocated object are filled in, we will have a corrupted heap.

BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15929 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 11:50:39 +00:00
bmeurer@chromium.org
41a4831fd9 Attempt to fix leftover test breakage on Mac.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15928 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 11:38:34 +00:00
bmeurer@chromium.org
4d56810eeb Fix d8 build error when V8_SHARED is unset on Linux.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15927 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 10:23:07 +00:00
bmeurer@chromium.org
ac5e3e080c Fix V8_GNUC_PREREQ macro.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15926 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 09:56:34 +00:00
titzer@chromium.org
f403969d1f Remove Uninitialized from HType.
BUG=
R=verwaest@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15925 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 09:42:57 +00:00
bmeurer@chromium.org
45e77c2b66 Fix typo.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15924 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 09:29:00 +00:00
bmeurer@chromium.org
2e7193f897 Implement correct OS and CC detection.
R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15923 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 09:19:10 +00:00
bmeurer@chromium.org
709012021a The compiled_transitions flag was enabled for quite some time now and seems to work out quite well, so time has come to remove the obsolete code paths and remove the unused methods.
R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 09:12:16 +00:00
bmeurer@chromium.org
3126012664 Really fix break in r15919 now.
TBR=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2013-07-29 08:33:57 +00:00