Commit Graph

32691 Commits

Author SHA1 Message Date
cbruni
f4f06c5029 [keys] Trigger [[getOwnPropertyDescriptor]] trap on proxies for Object.keys
This CL fixes a long-standing bug with Object.keys where the enumerability
check was omitted if the [ownKeys] trap is not present. The only distinction the
KeyAccumulator needs is whether it collects keys for for-in (is_for_in_) or not.
ForInFilter performs a separate step to filter out non-enumerable keys later-on
while in all the other use-cases we have to filter keys.

BUG=v8:1543, v8:5250

Review-Url: https://codereview.chromium.org/2176113009
Cr-Commit-Position: refs/heads/master@{#38199}
2016-08-01 10:10:52 +00:00
yangguo
5d49286c69 [inspector] add test configuration for the parser test.
BUG=chromium:580337

R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2189023002
Cr-Commit-Position: refs/heads/master@{#38198}
2016-08-01 09:50:14 +00:00
machenbach
5ef69e93a2 [build] Port using prebuilt instrumented libraries for msan
BUG=chromium:631979
NOTRY=true

Review-Url: https://codereview.chromium.org/2189343002
Cr-Commit-Position: refs/heads/master@{#38197}
2016-08-01 09:43:12 +00:00
verwaest
e9887b6aad Allocate block scopes in block states when possible
This is another step towards lazily allocating them in the block state.
ClassLiteral should also have a lazy block-scope for the outermost scope,
but currently that doesn't work due to the parameter initializer rewriter
and minor implementation details in ignition and turbofan.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2166843003
Cr-Commit-Position: refs/heads/master@{#38196}
2016-08-01 09:05:05 +00:00
hpayer
205457b1aa [heap] Reland "Remove black pages and use black areas instead."
BUG=chromium:630969,chromium:630386

Review-Url: https://codereview.chromium.org/2186863005
Cr-Commit-Position: refs/heads/master@{#38195}
2016-08-01 09:05:04 +00:00
mstarzinger
dc505196e6 [turbofan] Remove eager frame state from shift operations.
This removes the frame state input representing the before-state from
nodes having any shift operator. Any lowering that woult insert number
conversions of the inputs has already been disabled when deoptimization
is enabled, because the frame state layout is no longer known.

R=epertoso@chromium.org
BUG=v8:5021

Review-Url: https://codereview.chromium.org/2190743003
Cr-Commit-Position: refs/heads/master@{#38194}
2016-08-01 08:33:53 +00:00
verwaest
f02018cee0 Always finalize blocks after parsing, also for do-expressions
Rather than finalizing after rewriting do-expressions, we rewrite in the
outer scope if the block scope was finalized. Rewriting do expressions
cannot introduce any new nodes that requires the block to stay around,
so finalizing before and after is equivalent. (Only a temporary is
introduced which always ends up in a ClosureScope)

BUG=v8:5209
R=rossberg@chromium.org, caitpotter88@gmail.com, adamk@chromium.org

Review-Url: https://codereview.chromium.org/2167713004
Cr-Commit-Position: refs/heads/master@{#38193}
2016-08-01 08:30:17 +00:00
bmeurer
35a195e109 [turbofan] Add support for accessor inlining.
Allow inlining of getters and setters into TurboFan optimized code.
This just adds the basic machinery required to essentially inline
the setter and getter dispatch code for the (keyed) load/store ICs.
There'll be follow up CLs to also actually inline some of the interesting
accessor functions itself, like the byteLength and friends for the
TypedArrays.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2198473002
Cr-Commit-Position: refs/heads/master@{#38192}
2016-08-01 06:59:54 +00:00
bmeurer
986b04a62a [turbofan] Fix various bailout points for AstGraphBuilder.
This introduces a bunch of new tests that test various aspects of
accessor inlining in TurboFan (without the actual inlining), and does
the appropriate fixes to the AstGraphBuilder. The actual inlining CL
will land separately (so we don't need to revert the tests and fixes
if the accessor CL has to be reverted).

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2197913002
Cr-Commit-Position: refs/heads/master@{#38191}
2016-08-01 06:18:48 +00:00
yangguo
3e3ff89d4b Reland [inspector] add inspector protocol parser test build target.
BUG=chromium:580337

Committed: https://crrev.com/b8229434c9fd3bfef81fb77d88779d0e78d06662
Review-Url: https://codereview.chromium.org/2190833004
Cr-Original-Commit-Position: refs/heads/master@{#38135}
Cr-Commit-Position: refs/heads/master@{#38190}
2016-08-01 05:42:37 +00:00
v8-autoroll
ab8236ebaa Update V8 DEPS.
Rolling v8/build to 94ae8edf4860b0dfa8ac200d36bcbf11bdd72763

Rolling v8/tools/mb to d1d562a498b7b48a283d168df902007f33ac1413

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2194113002
Cr-Commit-Position: refs/heads/master@{#38189}
2016-08-01 03:27:59 +00:00
v8-autoroll
78ebc92bba Update V8 DEPS.
Rolling v8/build to 1054b60d5e758646a073b0363f3629fa2d953de8

Rolling v8/tools/mb to 0bee3440355ce5cf573b41999b2cbc0e1bcdc415

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2195743006
Cr-Commit-Position: refs/heads/master@{#38188}
2016-07-31 03:22:17 +00:00
bmeurer
b418b2c419 [turbofan] Optimize CheckedInt32Mod with unknown power of 2 right hand side.
We have a similar optimization for unchecked integer modulus, which
already boosted some asm.js use cases. Now this optimization is almost
as effcient as Crankshafts known power of 2 right hand side optimization
for modulus, but it can still deal with any rhs (except 0), and doesn't
require the interpreter to also collect known power of two rhs feedback.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2200453002
Cr-Commit-Position: refs/heads/master@{#38187}
2016-07-30 20:11:56 +00:00
v8-autoroll
b9e7b63d43 Update V8 DEPS.
Rolling v8/build to 452f5acf78e953dc1829c334ee06d38a05e2ef18

Rolling v8/buildtools to 1b96e1a41d3d22b24ee8da769c20849e9a002ed2

Rolling v8/third_party/icu to ef5c735307d0f86c7622f69620994c9468beba99

Rolling v8/tools/mb to 6594b0cbcc2fb1da0ca90e9e5f2b01fc6e576a99

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2197593003
Cr-Commit-Position: refs/heads/master@{#38186}
2016-07-30 03:24:34 +00:00
adamk
717e245f00 [cleanup] Remove unused ExpressionClassifier args in ParserBase
R=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2175033002
Cr-Commit-Position: refs/heads/master@{#38185}
2016-07-29 23:05:51 +00:00
v8-autoroll
c266607eed Update V8 DEPS.
Rolling v8/build to 92c13104dd5f9f25e115e382d5ab8af33a8b883f

Rolling v8/third_party/instrumented_libraries to f15768d7fdf68c0748d20738184120c8ab2e6db7

Rolling v8/tools/mb to ca9b59f105c3457e5ac5ba2f5a04d435436fa5de

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2188413003
Cr-Commit-Position: refs/heads/master@{#38184}
2016-07-29 19:53:57 +00:00
jyan
77c9cb8341 [compiler] [wasm] Introduce Word32/64ReverseBytes as TF Optional Opcode
This commit fixes wasm little-endian load issue on big-endian platform
by introducing reverse byte operation immediately after a load.

R=bmeurer@chromium.org, titzer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2045943002
Cr-Commit-Position: refs/heads/master@{#38183}
2016-07-29 19:33:28 +00:00
dcheng
a79ec0e3a9 Uninline RuntimeCallStatEntries::Add to save binary size.
RuntimeCallStats::Print invokes this function many times. The uses of
STL all get inlined as a result, causing the Print() function to take up
156KB of binary size. Out-of-lining this method reduces the size to
under 18KB!

BUG=v8:5240

Review-Url: https://codereview.chromium.org/2188953003
Cr-Commit-Position: refs/heads/master@{#38182}
2016-07-29 15:30:48 +00:00
caitp
1326de9d91 [esnext] ship Object.getOwnPropertyDescriptors
Flip the --harmony_object_own_property_descriptors flag to enabled by default.

Intent-to-Ship at https://groups.google.com/forum/#!topic/v8-users/xhTKRuY0_V8

BUG=v8:4725
R=adamk@chromium.org, littledan@chromium.org

Review-Url: https://codereview.chromium.org/2191023002
Cr-Commit-Position: refs/heads/master@{#38181}
2016-07-29 14:46:23 +00:00
bjaideep
9b4f8d1951 PPC: Set CodeRange constants correctly for PPC Linux
The OS page size for PPC linux is 64KB. The page size for
paged spaces on PPC linux is set to 4MB. kCodeRangeAreaAlignment
is set to OS page size(64KB) and kMinimumCodeRangeSize is set to the
size of 3 pages (12MB). This issue was exposed with testcase
test-spaces/Regress3540 which used kMinimumCodeRangeSize.

R=jochen@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com

BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2187833002
Cr-Commit-Position: refs/heads/master@{#38180}
2016-07-29 14:27:59 +00:00
danno
24451aa2d5 [stubs] Classify and categorize remaining Hydrogen stubs
BUG=chromium:608675

Review-Url: https://codereview.chromium.org/2193163002
Cr-Commit-Position: refs/heads/master@{#38179}
2016-07-29 13:53:45 +00:00
bgeron
f1c32c82c5 [test] Make the meaning of some options clearer in --help.
NOTRY=true

Review-Url: https://codereview.chromium.org/2197593002
Cr-Commit-Position: refs/heads/master@{#38178}
2016-07-29 12:00:59 +00:00
klaasb
26c1755242 [interpreter] Put object in register for ToObject/ForInPrepare
This gets rid of the Star bytecodes that were always dispatched to from
ToObject.
ToObject now outputs to register instead of to the accumulator and
ForInPrepare gets the receiver object from an input register.

BUG=v8:4820
LOG=n

Review-Url: https://codereview.chromium.org/2189463006
Cr-Commit-Position: refs/heads/master@{#38177}
2016-07-29 11:18:06 +00:00
epertoso
79ebd37d65 [turbofan] Adds speculative opcodes for shift right.
Drive-by fix: actually match the hint in the IsSpeculativeBinopMatcher.

Review-Url: https://codereview.chromium.org/2191883002
Cr-Commit-Position: refs/heads/master@{#38176}
2016-07-29 11:04:24 +00:00
hablich
91612668fa Revert of [heap] Give marking functions for incremental marking more precise names. (patchset #3 id:40001 of https://codereview.chromium.org/2173773002/ )
Reason for revert:
Breaks Roll https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/271267/steps/browser_tests%20%28with%20patch%29%20on%20Ubuntu-12.04/logs/MaterialHistoryBrowserTest.DrawerTest

Original issue's description:
> [heap] Give marking functions for incremental marking more precise names.
>
> BUG=
>
> Committed: https://crrev.com/4ac08c97f0c26cca3c0687b7349c929a4db2df43
> Cr-Commit-Position: refs/heads/master@{#38141}

TBR=ulan@chromium.org,hpayer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review-Url: https://codereview.chromium.org/2197583002
Cr-Commit-Position: refs/heads/master@{#38175}
2016-07-29 11:04:23 +00:00
jochen
cbcc231991 Clean up compiler dispatcher job a bit
BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2197573002
Cr-Commit-Position: refs/heads/master@{#38174}
2016-07-29 10:56:58 +00:00
haraken
cf1779495d Introduce Maybe::To/ToChecked
Per discussion in https://groups.google.com/a/chromium.org/d/topic/platform-architecture-dev/vGLGCaMqhCU/discussion

BUG=

Review-Url: https://codereview.chromium.org/2194793003
Cr-Commit-Position: refs/heads/master@{#38173}
2016-07-29 10:56:57 +00:00
dcheng
593ad0f7df object-stats.cc: Annotate PrintJSONArray with V8_NOINLINE
Sometimes, the compiler will inline this function and unroll the loop.
Forcing this to never be inlined reduces the compiled size of the
function from a potential 170KB to around 39KB.

BUG=v8:5240

Review-Url: https://codereview.chromium.org/2194843002
Cr-Commit-Position: refs/heads/master@{#38172}
2016-07-29 10:25:56 +00:00
georgia.kouveli
ca4707f775 Fixing test issue in test-cpu-profiler/TickLinesOptimized.
The test was calling OptimizeFunctionOnNextCall on a function before
ever executing it - crankshaft therefore didn't have any type info and
was generating a soft deoptimization bailout. Make sure we execute the
function before calling OptimizeFunctionOnNextCall to avoid this issue.

BUG=

Review-Url: https://codereview.chromium.org/2168603003
Cr-Commit-Position: refs/heads/master@{#38171}
2016-07-29 10:22:07 +00:00
jochen
edd65cc428 Teach compiler jobs how to actually parse
BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2190333002
Cr-Commit-Position: refs/heads/master@{#38170}
2016-07-29 10:09:26 +00:00
jochen
6215644cc8 Fix typo in EscapableHandleScope::Escape
TBR=marja@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2194863002
Cr-Commit-Position: refs/heads/master@{#38169}
2016-07-29 10:05:49 +00:00
ishell
3c7bff3698 [base] Use thread safe localtime_r() instead of localtime().
BUG=chromium:631269

Review-Url: https://codereview.chromium.org/2184673002
Cr-Commit-Position: refs/heads/master@{#38168}
2016-07-29 09:51:39 +00:00
marja
8558cbe557 Quick fix: nullify Isolate in background parsing slightly later.
Parser ctor reads information from it.

BUG=632612

Review-Url: https://codereview.chromium.org/2197543002
Cr-Commit-Position: refs/heads/master@{#38167}
2016-07-29 09:41:26 +00:00
bmeurer
8201579e03 [turbofan] Introduce a dedicated CheckMaps simplified operator.
So far we always create explicit control flow for map checks during
JSNativeContextSpecialization, or in the monomorphic case we used a
CheckIf combined with a map comparison. In either case we cannot
currently effectively utilize the map check information during load
elimination to optimize (polymorphic) map checks and elements kind
transitions.

With the introduction of CheckMaps, we can now start optimizing map
checks in a more effective fashion. This CL doesn't change anything
in that direction yet, but merely changes the fundamental mechanism.

This also removes the stable map optimization from the Typer, where
it was always a bit odd, and puts it into the typed lowering and
the native context specialization instead.

R=epertoso@chromium.org
BUG=v8:4930,v8:5141

Review-Url: https://codereview.chromium.org/2196653002
Cr-Commit-Position: refs/heads/master@{#38166}
2016-07-29 09:41:25 +00:00
akos.palfi
45d6909e7b MIPS: Fix mksnapshot on big-endian.
Paritally revert standalone.gypi changes in a451bd1a68 and introduce a new separate variable for the mkpeephole.

On big-endian MIPS, qemu is used to build the snapshot,
because there's no simulator support for big-endian MIPS.

BUG=

Committed: https://crrev.com/928d2395c3fdf836cf9961cde96e6b274a6b1e20
Review-Url: https://codereview.chromium.org/2172653002
Cr-Original-Commit-Position: refs/heads/master@{#38103}
Cr-Commit-Position: refs/heads/master@{#38165}
2016-07-29 09:30:54 +00:00
mstarzinger
5c1c023b63 [runtime] Fix stack frame iteration in test methods.
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2188713002
Cr-Commit-Position: refs/heads/master@{#38164}
2016-07-29 09:27:01 +00:00
neis
7d54e9135c Update comments on context slots.
R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2197493003
Cr-Commit-Position: refs/heads/master@{#38163}
2016-07-29 09:23:32 +00:00
jochen
84b07ec24d Create a character stream and hook it up to the parse info
Also make it possible to use the background parser from a character
stream. The External{One,Two}ByteStringUtf16CharacterStreams work both
on foreground and background threads.

BUG=v8:5215
R=marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2195603002
Cr-Commit-Position: refs/heads/master@{#38162}
2016-07-29 09:20:04 +00:00
machenbach
dc78fefb15 [gn] Add missing dep and blacklist for msan
Required for https://codereview.chromium.org/2194823002/

BUG=chromium:631979
NOTRY=true

Review-Url: https://codereview.chromium.org/2189323002
Cr-Commit-Position: refs/heads/master@{#38161}
2016-07-29 09:01:24 +00:00
bmeurer
ad3cac7231 [turbofan] Run JSIntrinsicLowering together with inlining.
R=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2195623002
Cr-Commit-Position: refs/heads/master@{#38160}
2016-07-29 08:35:52 +00:00
mstarzinger
de244af9ba [interpreter] Support on-stack replacement in profiler.
This adds preliminary support for on-stack replacement from Ignition to
optimized code generated by TurboFan to the runtime profiler. Involved
heuristics (e.g. code size allowance) have been taken from existing code
without any re-evaluation in the new setting.

R=rmcilroy@chromium.org
BUG=v8:4764

Review-Url: https://codereview.chromium.org/2182183005
Cr-Commit-Position: refs/heads/master@{#38159}
2016-07-29 08:32:19 +00:00
jgruber
1c7c0521f1 Set Error.stack property writable
Previously, the stack property was set up in JS as read-only; but since
it had a JS setter, writability was ignored and writing to stack was
possible.

This is no longer the case now that stack is either an actual data
property, or is associated with C++ accessors. Explicitly set the
property as writable to preserve old behavior.

BUG=5245
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2190313002
Cr-Commit-Position: refs/heads/master@{#38158}
2016-07-29 08:15:26 +00:00
jochen
0e48f4b37d Forgot to hook up the ExternalOneByteStringUtf16CharacterStream to lazy parsing
BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2196643002
Cr-Commit-Position: refs/heads/master@{#38157}
2016-07-29 07:39:04 +00:00
machenbach
224e2656e8 Revert of Reland [inspector] add inspector protocol parser test build target. (patchset #2 id:20001 of https://codereview.chromium.org/2190833004/ )
Reason for revert:
Remaining win x64 errors:
https://codereview.chromium.org/2187753004/

Original issue's description:
> Reland [inspector] add inspector protocol parser test build target.
>
> BUG=chromium:580337
>
> Committed: https://crrev.com/b8229434c9fd3bfef81fb77d88779d0e78d06662
> Cr-Commit-Position: refs/heads/master@{#38135}

TBR=yangguo@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:580337

Review-Url: https://codereview.chromium.org/2193143002
Cr-Commit-Position: refs/heads/master@{#38156}
2016-07-29 07:05:15 +00:00
bmeurer
c987284af0 [turbofan] Fix overly aggressive keyed access lowering.
The keyed load/store lowering is too aggressive when it comes to element
vs. property access. If we cannot find a cached name on the IC we
automatically assume that it's an element access, i.e. we assume that
the key that is passed to the keyed access must be a valid array index
then. But this is not true for megamorphic keyed load/store ICs, which
do not have a cached name (because the IC saw different names), and thus
use a different mechanism to indicate that it's a non-element access.

Review-Url: https://codereview.chromium.org/2195583002
Cr-Commit-Position: refs/heads/master@{#38155}
2016-07-29 06:34:39 +00:00
jochen
a661f61123 Implement a character stream for external one byte streams
In contrast to the generic stream, this character stream works without
accessing the heap, and can be used on a background thread.

BUG=v8:5215
R=vogelheim@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2184393002
Cr-Commit-Position: refs/heads/master@{#38154}
2016-07-29 06:13:38 +00:00
v8-autoroll
726520d6df Update V8 DEPS.
Rolling v8/build to 5240573aa6f46cfee690cdf7c6d9544e1841f502

Rolling v8/tools/mb to f2acac06c11447a7155d476d61f140f18a4a8066

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2196593002
Cr-Commit-Position: refs/heads/master@{#38153}
2016-07-29 03:24:14 +00:00
zhengxing.li
9429ec9cdd X87: Revert of [heap] Reland "Remove black pages and use black areas instead." (patchset #4 id:60001 of https://codereview.chromium.org/2185613002/ ).
port 2c7efba658 (r38129)

  original commit message:
  Reason for revert:
  Still crashing.

  Original issue's description:
  > [heap] Reland "Remove black pages and use black areas instead."
  >
  > BUG=chromium:630969,chromium:630386
  > LOG=n
  >
  > Committed: https://crrev.com/9e37a07c8de0a20ef2681e26824ff4d329102603
  > Cr-Commit-Position: refs/heads/master@{#38057}

BUG=

Review-Url: https://codereview.chromium.org/2192113002
Cr-Commit-Position: refs/heads/master@{#38152}
2016-07-29 02:40:10 +00:00
bbudge
55b01ccbfc [Turbofan] Revert FP register aliasing support on Arm.
- Changes register allocation to only use even numbered registers on Arm.
- Turns on float32 testing in test-gap-resolver.cc.

This is effectively a revert of:
https://codereview.chromium.org/2086653003/

LOG=N
BUG=V8:4124, V8:5202

Review-Url: https://codereview.chromium.org/2176173003
Cr-Commit-Position: refs/heads/master@{#38151}
2016-07-29 00:50:57 +00:00
danno
c07c675e9a Add a flag to help platform ports bootstrap V8
A "--minimal" flag turns off all optimizing compilers and activates the
interpreter. The idea is that with this flag activated, only the
platform-specific stubs and a Turbofan implementation must be complete to start
d8 and run the bulk of the tests. Note that although this flag is constructed as
a runtime flag, it must be set to true when building the snapshot and therefore
creates a compile-time dependency.

BUG=chromium:608675

Review-Url: https://codereview.chromium.org/2189663002
Cr-Commit-Position: refs/heads/master@{#38150}
2016-07-28 22:15:56 +00:00