Commit Graph

23697 Commits

Author SHA1 Message Date
caitpotter88
6d22f7a794 [parser] parse CalllExpression TemplateLiteral production
BUG=v8:4183
R=arv@chromium.org, rossberg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29055}
2015-06-16 18:08:28 +00:00
mtrofin
4e0b7b0cf5 Separated the new register allocator in its own files.
Opportunistically removed GreedyAllocator::TryReuseSpillForPhi because it is actually unsuitable for Greedy. It was copied from Linear and it relies on hints, however, the current implementation of hints assumes linear scan.

This change doesn't aim to address performance nor correctness for Greedy.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29054}
2015-06-16 17:10:31 +00:00
hpayer
443f676506 Only shrink new space when we are not in the process of obtaining pretenuring feedback.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29053}
2015-06-16 15:49:25 +00:00
hpayer
72f850458c Re-land new insertion write barrier.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29052}
2015-06-16 14:23:06 +00:00
hablich
e35ff8cd03 Updates to the license information of third party components.
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29051}
2015-06-16 12:37:50 +00:00
vogelheim
17c1cf2865 Re-Re-land: Enable external startup by default on Linux.
crrev.com/1177163002 should have fixed the issues that broke this last time.

Notes:
- The current functionality is meant to stay. If you prefer the old way,
  just set v8_use_external_startup_data=0.
- You might notice this if you call d8 via PATH. Either explicitly tell d8
  where your external snapshot/built-ins are, or change the build options
  as above.
- This follows Chromium practice, that mostly uses this feature these days.
- Other platforms to follow later.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29050}
2015-06-16 11:27:01 +00:00
chunyang.dai
ebb0f9e52e X87: enable the X87 turbofan support.
This patch includes the following changes.
     1, Enable the turbofan backend support for X87 platform. It depends on previous CL: 3fdfebd26.
     2, Enable the test cases which are disabled because turbofan for X87 was not enabled.

BUG=v8:4135
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29049}
2015-06-16 11:23:19 +00:00
kozyatinskiy
8e1c3a75b0 [V8] Fixed infinite loop in Debug::PrepareStep
frame->GetExpression always returns the same function. We should iterate through expression stack when we use Function.call.apply for finding actual target.

LOG=N
BUG=chromium:499479
R=yurys@chromium.org,yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29048}
2015-06-16 11:10:04 +00:00
yangguo
63f4c75162 Serializer: support all alignment kinds.
We use an alignment prefix for unusual alignment kinds (not kWordAligned).
This will cause new objects to be aligned in ReadObject, and back references
to be aligned to skip padding.

The motivation to change the undefined next sentinel in WeakCell is this:
When the deserializer aligns an object, it requires filler maps to already
exist to create filler objects as padding. However, deserializing the
filler map leads to deserializing NaN, which as heap number is aligned:
filler map > meta map > weak cell cache > undefined > NaN
If we use the-hole instead of undefined as sentinel, it works.

R=jochen@chromium.org,bbudge@chromium.org
BUG=v8:4178
LOG=N

Committed: https://crrev.com/2146ab75387d47eef6582bd8c2d0cfc6c42b68b6
Cr-Commit-Position: refs/heads/master@{#29044}

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

Cr-Commit-Position: refs/heads/master@{#29047}
2015-06-16 11:04:23 +00:00
mstarzinger
e2ce468165 Revert of Decompiler improvements. (patchset #2 id:20001 of https://codereview.chromium.org/1177123002/)
Reason for revert:
Code printout has become unreadable. Offsets are printed in decimal numbers everywhere else. This is inconsistent with the rest of the code-base. Some examples are tables for deoptimization data, safepoints and exception handlers. I would be fine with this change if _all_ tracing would be adapted. But there are _many_ places to touch.

Original issue's description:
> Decompiler improvements.
>
> The main motivation is simplifying profiling activities:
>
> 1) Use hex instead of decimal for offsets, just like perf does. This
> affects --print-opt-code
>
> 2) When printing block information, indicate loop information: if
> block is header, where the end is; if block is in a loop, where the
> loop starts. This affects --code-comments.
>
> Using --print-opt-code --code-comments, and cross-referencing with data
> obtained from perf, one may now find the block a hotspot belongs to
> without needing to do hex2dec/dec2hex conversions. Once found, loop info
> is available locally, on the block.
>
> BUG=
>
> Committed: https://crrev.com/32f4bd659d38eb5485eedb1d0dd236ff1bdc01d5
> Cr-Commit-Position: refs/heads/master@{#28964}

TBR=jarin@chromium.org,stichnot@chromium.org,jvoung@chromium.org,mtrofin@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29046}
2015-06-16 10:39:00 +00:00
machenbach
33ae0e6762 Revert of Serializer: support all alignment kinds. (patchset #3 id:40001 of https://codereview.chromium.org/1179873003/)
Reason for revert:
[Sheriff] Breaks arm debug compile:
http://build.chromium.org/p/client.v8/builders/V8%20Arm%20-%20debug%20builder/builds/4308

Original issue's description:
> Serializer: support all alignment kinds.
>
> We use an alignment prefix for unusual alignment kinds (not kWordAligned).
> This will cause new objects to be aligned in ReadObject, and back references
> to be aligned to skip padding.
>
> The motivation to change the undefined next sentinel in WeakCell is this:
> When the deserializer aligns an object, it requires filler maps to already
> exist to create filler objects as padding. However, deserializing the
> filler map leads to deserializing NaN, which as heap number is aligned:
> filler map > meta map > weak cell cache > undefined > NaN
> If we use the-hole instead of undefined as sentinel, it works.
>
> R=jochen@chromium.org,bbudge@chromium.org
> BUG=v8:4178
> LOG=N
>
> Committed: https://crrev.com/2146ab75387d47eef6582bd8c2d0cfc6c42b68b6
> Cr-Commit-Position: refs/heads/master@{#29044}

TBR=jochen@chromium.org,bbudge@chromium.org,yangguo@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4178

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

Cr-Commit-Position: refs/heads/master@{#29045}
2015-06-16 10:18:44 +00:00
yangguo
2146ab7538 Serializer: support all alignment kinds.
We use an alignment prefix for unusual alignment kinds (not kWordAligned).
This will cause new objects to be aligned in ReadObject, and back references
to be aligned to skip padding.

The motivation to change the undefined next sentinel in WeakCell is this:
When the deserializer aligns an object, it requires filler maps to already
exist to create filler objects as padding. However, deserializing the
filler map leads to deserializing NaN, which as heap number is aligned:
filler map > meta map > weak cell cache > undefined > NaN
If we use the-hole instead of undefined as sentinel, it works.

R=jochen@chromium.org,bbudge@chromium.org
BUG=v8:4178
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29044}
2015-06-16 09:46:12 +00:00
bmeurer
21a1975542 [turbofan] Work around negative parameter count.
BUG=chromium:500824
LOG=n
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29043}
2015-06-16 09:44:28 +00:00
sejunho
e23d8bc7e7 Fix compile warning [-Wtype-limits]
This fixes warning on android_arm build.
Previously the compiler complained about a check that can never be true.
See second check below(index is size_t type, FIRST_SPACE=0):
if (index > i::LAST_SPACE || index < i::FIRST_SPACE)
And make the code easy to understand.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29042}
2015-06-16 08:20:20 +00:00
wingo
a1a7cfd6ba All private symbols are own symbols
R=rossberg@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29041}
2015-06-16 08:13:42 +00:00
bmeurer
45439b92e7 [crankshaft] Fix wrong bailout points in for-in loop body.
R=jochen@chromium.org
BUG=chromium:500435
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#29040}
2015-06-16 08:08:42 +00:00
jochen
6cc3eb66a2 Introduce a base pointer field in FixedTypedArrayBase and teach GC about it
This is the first step towards unifying external and on-heap typed arrays.

The end-state will be that this base pointer either points to the on-heap values
or to the externally allocated array buffer.

BUG=v8:3996
R=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29039}
2015-06-16 07:37:23 +00:00
yangguo
75350f1ef0 Debugger: require debugger to be active when dealing with breaks.
This invariant will save us some head ache.
The changes to test-debug/DebugStub is due to the fact that it abuses
the ability to set break points in code that has no debug break slots.
This is now no longer possible.

R=ulan@chromium.org
BUG=v8:4132
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29038}
2015-06-16 07:11:21 +00:00
bmeurer
2c44f4f9de [deoptimizer] Use TranslationIterator for OptimizedFrame again.
Using TranslatedState and friends is too expensive compared to the low
level TranslationIterator, because some code (i.e. in Speedometer)
depends on the OptimizedFrame summary/function listing to be very fast.

BUG=chromium:499338
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29037}
2015-06-16 06:04:50 +00:00
mstarzinger
65b6cef8eb [turbofan] Remove dead code from JSGenericLowering.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29036}
2015-06-16 04:02:07 +00:00
v8-autoroll
88b0786bc8 Update V8 DEPS.
Rolling v8/build/gyp to 79de4031069f37870f04e8b6bbf42f0c7fec37aa

Rolling v8/tools/clang to 66ba82eea5b4e2309c220cc3e0f2d67ebc3fff4c

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29035}
2015-06-16 03:26:38 +00:00
paul.lind
879053a59c MIPS: Fix for Remove unsafe EmitLoadRegister usage in AddI/SubI for constant right operand.
Fix a missed addiu->Addu, and a bad default use of 'at' register in https://codereview.chromium.org/1185143002/

TEST=test/mjsunit/regress/regress-500176
BUG=chromium:500176
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29034}
2015-06-16 02:29:48 +00:00
littledan
350a70e5ef Inline code generation for %_IsTypedArray
This patch implements %_IsTypedArray in fullcodegen, Hydrogen and
Turbofan in order to implement fast type checks to enable ES6
TypedArray features and semantics efficiently.

R=adamk,titzer
LOG=Y
BUG=v8:4085

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

Cr-Commit-Position: refs/heads/master@{#29033}
2015-06-15 22:16:43 +00:00
littledan
e1efb4be11 Avoid using computed property literals in TypedArrays code
Computed property literals don't seem to work in nosnap yet,
leading to a syntax error.

R=adamk,arv

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

Cr-Commit-Position: refs/heads/master@{#29032}
2015-06-15 21:11:13 +00:00
littledan
40420f67e7 Allow TypedArrays to be initialized with iterables
In ES6, the TypedArray constructor can be called either with an
array-like object or an iterable. The code previously handled
only array-like objects. This patch switches to supporting
iterables while throwing in an optimization to make Arrays
get allocated the old way, without an extra copy.

BUG=v8:4090
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#29031}
2015-06-15 18:54:42 +00:00
dusan.milosavljevic
b7d8cb4a51 MIPS: Remove unsafe EmitLoadRegister usage in AddI/SubI for constant right operand.
TEST=test/mjsunit/regress/regress-500176
BUG=chromium:500176
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29030}
2015-06-15 17:58:43 +00:00
dslomov
a7fce18647 [destructuring] Parse binding patterns in formal parameters.
R=arv@chromium.org,wingo@igalia.com,caitpotter88@gmail.com
LOG=N
BUG=v8:811

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

Cr-Commit-Position: refs/heads/master@{#29029}
2015-06-15 17:06:47 +00:00
bmeurer
6e5b9ffe4c [turbofan] Remove the TryLowerDirectJSCall hack from generic lowering.
The TryLowerDirectJSCall method tried to lower to a direct JavaScript
function call depending on the type of the receiver, but only if the
target is a cosntant JSFunction. Since this depends on types and is not
required for correctness, it shouldn't be part of generic lowering
anyway. So this functionality was moved to typed lowering instead, and
we use proper types for the target instead.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29028}
2015-06-15 14:06:18 +00:00
ulan
3938956bdc Remove the --collect-maps flag. Maps should be always collected.
Reasons:
- It is not used.
- It complicates code in GC.

BUG=chromium:499713
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#29027}
2015-06-15 12:28:43 +00:00
rossberg
982b46aeb7 [strong] Make strong 'this' optional for experimentation
R=arv@chromium.org, conradw@chromium.org
BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29026}
2015-06-15 12:22:47 +00:00
bmeurer
d06591a2a3 [turbofan] Remove context canonicalization hack from generic lowering.
This hack doesn't help currently, since it only applies to asm.js where
we do function context specialization and there we already have a
canonicalized context (and the CodeGenerator materializes that from the
frame).

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29025}
2015-06-15 12:21:43 +00:00
balazs.kilvady
a12f119112 MIPS64: Reland 'Enable shorten-64-to-32 warning.'
Port cdc43bc5fd

Original review: https://codereview.chromium.org/1133163005/

Original commit message:
Enable clang's shorten-64-to-32 warning flag on ARM64, and fix the warnings
that arise.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29024}
2015-06-15 12:05:19 +00:00
wingo
9efb230d36 Fix -Wsign-compare errors in TF tests under GCC 4.9.2
R=jkummerow@chromium.org
LOG=N
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29023}
2015-06-15 12:03:45 +00:00
machenbach
06ac599d1e Revert of Fix clobbered register when setting this_function variable. (patchset #2 id:20001 of https://codereview.chromium.org/1185703002/)
Reason for revert:
[Sheriff] Makes mjsunit/es6/block-const-assign flaky, e.g.:
http://build.chromium.org/p/client.v8/builders/V8%20Linux/builds/4082

Original issue's description:
> Fix clobbered register when setting this_function variable.
>
> R=arv@chromium.org
> TEST=mjsunit/regress/regress-crbug-498022
> BUG=chromium:498022
> LOG=N
>
> Committed: https://crrev.com/bf2bbc8ba508ccd21edf3c08d2e4192c4764ae91
> Cr-Commit-Position: refs/heads/master@{#29020}

TBR=arv@chromium.org,rossberg@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:498022

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

Cr-Commit-Position: refs/heads/master@{#29022}
2015-06-15 11:56:25 +00:00
bmeurer
2cde7dc82e [mjsunit] regress/regress-crbug-491062 takes too long with --always-opt.
R=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29021}
2015-06-15 10:27:32 +00:00
mstarzinger
bf2bbc8ba5 Fix clobbered register when setting this_function variable.
R=arv@chromium.org
TEST=mjsunit/regress/regress-crbug-498022
BUG=chromium:498022
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29020}
2015-06-15 10:18:57 +00:00
jarin
ed977c972e Fix debug printing of inputs in the deoptimizer, pull out printing into separate methods.
Also fixed the duplicated output of context deopt.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29019}
2015-06-15 10:14:40 +00:00
bmeurer
d19410f8e7 [mjsunit] Remove unsupported flag --turbo-deoptimization from tests.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29018}
2015-06-15 09:43:11 +00:00
bmeurer
e30b351d7b [mjsunit] Remove obsolete nosse2 tests.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29017}
2015-06-15 09:32:01 +00:00
yangguo
a0342678e8 Serializer: clear string hash for code serializer.
R=jochen@chromium.org
BUG=v8:4179
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29016}
2015-06-15 08:41:27 +00:00
ulan
143a9e0431 Compute the heap growing factor based on mutator utilization and allocation throughput.
Doc: https://goo.gl/LLGvBs

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29015}
2015-06-15 08:32:59 +00:00
jochen
29715d7c07 Reland "Keep track of array buffers in new space separately"
Original review https://codereview.chromium.org/1133773002/

BUG=v8:3996
TBR=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29014}
2015-06-15 07:57:43 +00:00
machenbach
9345dfb2de Update V8 DEPS.
Rolling v8/third_party/android_tools to ed3dde6470c39b196c70f0c20374894d169754ec

Resubmission of https://codereview.chromium.org/1183753006/

TBR=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29013}
2015-06-15 07:54:08 +00:00
yangguo
50be442515 Add test for code caching API.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29012}
2015-06-15 06:37:02 +00:00
bmeurer
f588b1c550 [turbofan] Mark MachineType as uint16_t.
This fixes a few funky implicit conversions for the enum (that are
inconsistent across compilers) and also helps to save space, i.e. for
the representations_ vector in the InstructionSequence.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29011}
2015-06-15 06:27:24 +00:00
bmeurer
dc3712c873 [turbofan] Remove unused typedef VirtualRegisterSet.
TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29010}
2015-06-15 06:08:00 +00:00
jochen
a99fe1fd76 Revert of Reland "Keep track of array buffers in new space separately" (patchset #2 id:20001 of https://codereview.chromium.org/1177083003/)
Reason for revert:
Still broken

Original issue's description:
> Reland "Keep track of array buffers in new space separately"
>
> Original review https://codereview.chromium.org/1133773002/
>
> BUG=v8:3996
> TBR=hpayer@chromium.org
> LOG=n
>
> Committed: https://crrev.com/89b9a2cfb317e52186f682c91502b22932d52db3
> Cr-Commit-Position: refs/heads/master@{#28987}

TBR=hpayer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3996

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

Cr-Commit-Position: refs/heads/master@{#29009}
2015-06-14 18:23:33 +00:00
verwaest
028025f07e Also handle elements in *RealNamed* api methods
Apparently the *RealNamed* API methods only have named variants, but were always used by the embedder to find elements as well. We'd never find them though, since we wouldn't even look
there.

This CL ensures we check whether the name is actually an array index.

I guess for all named API functions we should assume they are used similar to o["name"] where name could also be a number... At least we should make it uniform between embedder and V8. This matches us up with their expectations for now...

BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29008}
2015-06-13 11:16:12 +00:00
v8-autoroll
a6bc7cd4e2 Update V8 DEPS.
Rolling v8/tools/clang to bb23ac0328fd3d051fc2f5ff027c8e0f87cc6fb5

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29007}
2015-06-13 03:25:17 +00:00
binji
9bda43a2ea Remove some unused definitions from d8.h
BUG=none
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29006}
2015-06-12 19:41:09 +00:00