Commit Graph

745 Commits

Author SHA1 Message Date
jgruber
22606f0c29 Enable component builds for fuzzers
V8 is collecting a growing amount of fuzzers, all of which take substantial
space on the bots and in chromium build archives. This CL improves that
situation by allowing component (shared library) builds for almost all fuzzers.

The parser fuzzer is handled as an exception since it would require exporting a
large number of additional functions.

A component build results in about a 50-100x improvement in file size for each
fuzzer (~50M-100M to around 1.1M).

BUG=chromium:648864
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng;master.tryserver.chromium.android:android_clang_dbg_recipe

Review-Url: https://codereview.chromium.org/2360983002
Cr-Commit-Position: refs/heads/master@{#39709}
2016-09-26 07:40:44 +00:00
littledan
13b8a1238b Move async/await JS support code out of experimental natives
The file formerly known as src/js/harmony-async-await.js does not
expose anything directly to JavaScript code; it just makes a few
functions available on the native context for the parser desugaring
to expand into. Experimental natives have various issues with
larger amounts of code, so this patch moves the JS builtins to
support async functions out of experimental natives and into the
core snapshot. The change would be done eventually anyway, but this
patch does it before removing the flag to support shipping the
feature while avoiding the pitfalls of experimental natives.

Drive by cleanup: remove more unused functions from the whitelist for experimental natives.

BUG=v8:5427,v8:4483

Review-Url: https://codereview.chromium.org/2365123002
Cr-Commit-Position: refs/heads/master@{#39706}
2016-09-24 15:15:20 +00:00
hablich
a717fb7c01 Revert of Pool implementation for zone segments (patchset #9 id:420001 of https://codereview.chromium.org/2335343007/ )
Reason for revert:
Blocks Roll https://codereview.chromium.org/2366733002/

Original issue's description:
> Pool implementation for zone segments
>
> BUG=v8:5409
>
> Committed: https://crrev.com/37c688a24578e787d3d8941093563ed049c3497e
> Cr-Commit-Position: refs/heads/master@{#39631}

TBR=jkummerow@chromium.org,jochen@chromium.org,verwaest@chromium.org,heimbuef@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2365843002
Cr-Commit-Position: refs/heads/master@{#39652}
2016-09-23 06:03:55 +00:00
hablich
b88a848faf Revert of Replaced different means of zone pooling/reusing by one zone segment pool (patchset #3 id:120001 of https://codereview.chromium.org/2348303002/ )
Reason for revert:
Blocks Roll https://codereview.chromium.org/2366733002/

Original issue's description:
> Replaced different means of zone pooling/reusing by one zone segment pool
>
> BUG=v8:5409
>
> Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f
> Cr-Commit-Position: refs/heads/master@{#39633}

TBR=mstarzinger@chromium.org,verwaest@chromium.org,heimbuef@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2360403003
Cr-Commit-Position: refs/heads/master@{#39651}
2016-09-23 06:02:46 +00:00
rmcilroy
e5ac75c635 [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.
This CL optimizes the code in BytecodeArrayBuilder and
BytecodeArrayWriter by making the following main changes:

 - Move operand scale calculation out of BytecodeArrayWriter to the
BytecodeNode constructor, where the decision on which operands are
scalable can generally be statically decided by the compiler.
 - Move the maximum register calculation out of BytecodeArrayWriter
and into BytecodeRegisterOptimizer (which is the only place outside
BytecodeGenerator which updates which registers are used). This
avoids the BytecodeArrayWriter needing to know the operand types
of a node as it writes it.
 - Modify EmitBytecodes to use individual push_backs rather than
building a buffer and calling insert, since this turns out to be faster.
 - Initialize BytecodeArrayWriter's bytecode vector by reserving 512
bytes,
 - Make common functions in Bytecodes constexpr so that they
can be statically calculated by the compiler.
 - Move common functions and constructors in Bytecodes and
BytecodeNode to the header so that they can be inlined.
 - Change large static switch statements in Bytecodes to const array
lookups, and move to the header to allow inlining.

I also took the opportunity to remove a number of unused helper
functions, and rework some others for consistency.

This reduces the percentage of time spent in making BytecodeArrays
 in  CodeLoad from ~15% to ~11% according to perf. The
CoadLoad score increase by around 2%.

BUG=v8:4280

Committed: https://crrev.com/b11a8b4d41bf09d6b3d6cf214fe3fb61faf01a64
Review-Url: https://codereview.chromium.org/2351763002
Cr-Original-Commit-Position: refs/heads/master@{#39599}
Cr-Commit-Position: refs/heads/master@{#39637}
2016-09-22 16:34:31 +00:00
heimbuef
a124feb076 Replaced different means of zone pooling/reusing by one zone segment pool
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2348303002
Cr-Commit-Position: refs/heads/master@{#39633}
2016-09-22 15:35:13 +00:00
heimbuef
37c688a245 Pool implementation for zone segments
BUG=v8:5409

Review-Url: https://codereview.chromium.org/2335343007
Cr-Commit-Position: refs/heads/master@{#39631}
2016-09-22 14:33:49 +00:00
hablich
5d693348f0 Revert of [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter. (patchset #6 id:200001 of https://codereview.chromium.org/2351763002/ )
Reason for revert:
Prime suspect for roll blocker: https://codereview.chromium.org/2362503002/

Original issue's description:
> [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.
>
> This CL optimizes the code in BytecodeArrayBuilder and
> BytecodeArrayWriter by making the following main changes:
>
>  - Move operand scale calculation out of BytecodeArrayWriter to the
> BytecodeNode constructor, where the decision on which operands are
> scalable can generally be statically decided by the compiler.
>  - Move the maximum register calculation out of BytecodeArrayWriter
> and into BytecodeRegisterOptimizer (which is the only place outside
> BytecodeGenerator which updates which registers are used). This
> avoids the BytecodeArrayWriter needing to know the operand types
> of a node as it writes it.
>  - Modify EmitBytecodes to use individual push_backs rather than
> building a buffer and calling insert, since this turns out to be faster.
>  - Initialize BytecodeArrayWriter's bytecode vector by reserving 512
> bytes,
>  - Make common functions in Bytecodes constexpr so that they
> can be statically calculated by the compiler.
>  - Move common functions and constructors in Bytecodes and
> BytecodeNode to the header so that they can be inlined.
>  - Change large static switch statements in Bytecodes to const array
> lookups, and move to the header to allow inlining.
>
> I also took the opportunity to remove a number of unused helper
> functions, and rework some others for consistency.
>
> This reduces the percentage of time spent in making BytecodeArrays
>  in  CodeLoad from ~15% to ~11% according to perf. The
> CoadLoad score increase by around 2%.
>
> BUG=v8:4280
>
> Committed: https://crrev.com/b11a8b4d41bf09d6b3d6cf214fe3fb61faf01a64
> Cr-Commit-Position: refs/heads/master@{#39599}

TBR=mythria@chromium.org,leszeks@chromium.org,rmcilroy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280

Review-Url: https://codereview.chromium.org/2360193003
Cr-Commit-Position: refs/heads/master@{#39612}
2016-09-22 05:54:01 +00:00
rmcilroy
b11a8b4d41 [Interpreter] Optimize BytecodeArrayBuilder and BytecodeArrayWriter.
This CL optimizes the code in BytecodeArrayBuilder and
BytecodeArrayWriter by making the following main changes:

 - Move operand scale calculation out of BytecodeArrayWriter to the
BytecodeNode constructor, where the decision on which operands are
scalable can generally be statically decided by the compiler.
 - Move the maximum register calculation out of BytecodeArrayWriter
and into BytecodeRegisterOptimizer (which is the only place outside
BytecodeGenerator which updates which registers are used). This
avoids the BytecodeArrayWriter needing to know the operand types
of a node as it writes it.
 - Modify EmitBytecodes to use individual push_backs rather than
building a buffer and calling insert, since this turns out to be faster.
 - Initialize BytecodeArrayWriter's bytecode vector by reserving 512
bytes,
 - Make common functions in Bytecodes constexpr so that they
can be statically calculated by the compiler.
 - Move common functions and constructors in Bytecodes and
BytecodeNode to the header so that they can be inlined.
 - Change large static switch statements in Bytecodes to const array
lookups, and move to the header to allow inlining.

I also took the opportunity to remove a number of unused helper
functions, and rework some others for consistency.

This reduces the percentage of time spent in making BytecodeArrays
 in  CodeLoad from ~15% to ~11% according to perf. The
CoadLoad score increase by around 2%.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2351763002
Cr-Commit-Position: refs/heads/master@{#39599}
2016-09-21 15:03:03 +00:00
caitp
5784773feb [builtins] move String.prototype[@@iterator] to C++ builtin
BUG=v8:5388
R=bmeurer@chromium.org, adamk@chromium.org
TBR=hpayer@chromium.org

Review-Url: https://codereview.chromium.org/2348493003
Cr-Commit-Position: refs/heads/master@{#39598}
2016-09-21 14:18:00 +00:00
machenbach
a8951a96ab [gn] Add gn support to gcmole
This also adds sources missing for PPC and x87, fixes a few
missing files in gyp due to wrong quotation and a few that
were simply not included.

The gn files are now authoritative, but the gcmole gyp and
gn source lists are enforced to match exactly.

This additional enforcement helped finding the bugs above
and will be removed when we deprecate the gyp files.

BUG=614645
NOTRY=true

Review-Url: https://codereview.chromium.org/2352103002
Cr-Commit-Position: refs/heads/master@{#39592}
2016-09-21 11:45:24 +00:00
heimbuef
7a4f8e4d83 Moved zones and zone related stuff in its own directory.
This is some initial cleanup to keep /src clean. The
AccountingAllocator is actually exclusively used by zones and this
common subfolder makes that more clear.

BUG=v8:5409

Review-Url: https://codereview.chromium.org/2344143003
Cr-Commit-Position: refs/heads/master@{#39558}
2016-09-20 16:08:07 +00:00
mvstanton
b88d132f4c [TypeFeedbackVector] special ic slots for interpreter compare/binary ops.
Full code uses patching ICs for this feedback, and the interpreter uses
the type feedback vector. It's a good idea to code the vector slots
appropriately as ICs so that the runtime profiler can better gauge if
the function is ready for tiering up from Ignition to TurboFan.

As is, the feedback is stored in "general" slots which can't be
characterized by the runtime profiler into feedback states.

This CL addresses that problem. Note that it's also important to
carefully exclude these slots from the profiler's consideration when
determining if you want to optimize from Full code.

BUG=

Review-Url: https://codereview.chromium.org/2342853002
Cr-Commit-Position: refs/heads/master@{#39555}
2016-09-20 13:54:51 +00:00
jgruber
4f5695229e [d8] Fix the shared-library build
This commit ensures that the d8 shared library build uses the same logic as
the standard static build by exporting relevant functions and classes.

BUG=chromium:646337

Committed: https://crrev.com/2c10ca8086a4d595ecf9aa843d2031b068470d65
Review-Url: https://codereview.chromium.org/2342563002
Cr-Original-Commit-Position: refs/heads/master@{#39503}
Cr-Commit-Position: refs/heads/master@{#39547}
2016-09-20 12:06:54 +00:00
leszeks
696dd65b80 [base] Template hashmap on key and value
Adds template parameters for the TemplateHashMapImpl for the key and
value type, to allow them to be something other than pointers. To keep
the impact of this patch low, uses of TemplateHashMapImpl set these
types to void* to emulate the previous behaviour.

This is part of a wider set of changes discussed in:
https://groups.google.com/forum/#!topic/v8-dev/QLsC0XPYLeM

Review-Url: https://codereview.chromium.org/2343123002
Cr-Commit-Position: refs/heads/master@{#39530}
2016-09-20 08:40:33 +00:00
machenbach
298ee9cde1 Revert of [d8] Fix the shared-library build (patchset #12 id:20002 of https://codereview.chromium.org/2342563002/ )
Reason for revert:
Unblocking roll

Original issue's description:
> [d8] Fix the shared-library build
>
> This commit ensures that the d8 shared library build uses the same logic as
> the standard static build by exporting relevant functions and classes.
>
> BUG=chromium:646337
>
> Committed: https://crrev.com/2c10ca8086a4d595ecf9aa843d2031b068470d65
> Cr-Commit-Position: refs/heads/master@{#39503}

TBR=jochen@chromium.org,vogelheim@chromium.org,bmeurer@chromium.org,titzer@chromium.org,jgruber@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:646337

Review-Url: https://codereview.chromium.org/2356703003
Cr-Commit-Position: refs/heads/master@{#39526}
2016-09-20 07:13:27 +00:00
jgruber
2c10ca8086 [d8] Fix the shared-library build
This commit ensures that the d8 shared library build uses the same logic as
the standard static build by exporting relevant functions and classes.

BUG=chromium:646337

Review-Url: https://codereview.chromium.org/2342563002
Cr-Commit-Position: refs/heads/master@{#39503}
2016-09-19 12:47:22 +00:00
jochen
d7ef0b8c97 Fix BUILD.gn files and add presubmit step
Remove files that were removed from the build files but never deleted.

R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2346103002
Cr-Commit-Position: refs/heads/master@{#39499}
2016-09-19 10:59:41 +00:00
jochen
0e938d4ac0 Add files missing from gn and fix verify script
R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2342663004
Cr-Commit-Position: refs/heads/master@{#39447}
2016-09-15 13:15:16 +00:00
littledan
915ca181cc Remove --intl-extra flag
This flag has been flipped off since 52, so it is due for removal.

R=adamk@chromium.org,caitp@igalia.com
BUG=v8:3785
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

Review-Url: https://codereview.chromium.org/2268633002
Cr-Commit-Position: refs/heads/master@{#39435}
2016-09-15 02:55:33 +00:00
machenbach
3999fb0788 [gn] Fix no-inline config for V8
This restores the original gyp behavior. Blocks:
https://codereview.chromium.org/2334003005

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2344493002
Cr-Commit-Position: refs/heads/master@{#39414}
2016-09-14 11:18:50 +00:00
ahaas
3ff201906e [wasm] Write fuzzers for single wasm sections.
This CL adds fuzzers for the wasm module sections 'types', 'names',
'globals', 'imports', 'function signatures', 'memory', and 'data', one
fuzzer per section. No fuzzers are added for the other sections because
either there already exists a fuzzer (e.g. wasm-code), or there exist
inter-section dependencies.

To avoid introducing a bunch executables which would make compilation
with make slow, I introduce a single executable
'v8_simple_wasm_section_fuzzer' which calls the fuzzers mentioned above.
This executable is run by the trybots and ensures that the fuzzers
actually compile. For debugging I introduce commandline parameters which
allow to execute the specific fuzzers from 'v8_simple_wasm_section_fuzzer'.

R=titzer@chromium.org, jochen@chromium.org, mstarzinger@chromium.org

Review-Url: https://codereview.chromium.org/2336603002
Cr-Commit-Position: refs/heads/master@{#39413}
2016-09-14 11:17:53 +00:00
ahaas
cc7926d672 [wasm] Move the wasm-module-runner from test/cctest to test/common
The wasm-module-runner is used both in cctests and in fuzzers. As
discussed offline, it is weird to include cctest header files in
fuzzers, so I introduce a new test/common directory which contains the
common files.

R=titzer@chromium.org, jochen@chromium.org

Review-Url: https://codereview.chromium.org/2335193002
Cr-Commit-Position: refs/heads/master@{#39411}
2016-09-14 10:31:53 +00:00
machenbach
a482ab5c82 [gn] Add gn configs for mips to match old behavior
BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2322163003
Cr-Commit-Position: refs/heads/master@{#39369}
2016-09-13 07:33:11 +00:00
ahaas
1521fe9c3c [wasm] Call the wasm interpreter from the wasm-code-fuzzer.
With this CL the wasm-code-fuzzer first decodes and interprets the test
case generated by the fuzzer. It then compiles the test case, but only
executes the compiled instance if the interpretation of the test case
was successful. If the compiled instance is executed, then the result of
the execution is compared with the result of the interpretation.

Additionally this CL refactors the CompileAndRunWasmModule function in
wasm-module.cc to resuse code in the call to the interpreter.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2321443002
Cr-Commit-Position: refs/heads/master@{#39351}
2016-09-12 12:26:46 +00:00
weiliang.lin
e151c66013 [x64] supplement SSE insturctions for SIMD.js
Both legacy and AVX versions

BUG=

Review-Url: https://codereview.chromium.org/2328843003
Cr-Commit-Position: refs/heads/master@{#39327}
2016-09-12 06:25:00 +00:00
ofrobots
20d427a1e2 Revert of Use -fno-delete-null-pointer-checks with gcc builds (patchset #2 id:20001 of https://codereview.chromium.org/2310513002/ )
Reason for revert:
Fails on MIPS: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/3653

Original issue's description:
> Use -fno-delete-null-pointer-checks with gcc builds
>
> R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org
> BUG=v8:3782
>
> Committed: https://crrev.com/dbefc8ee2e9ee6e41b83f3d09c788c34bc923b43
> Cr-Commit-Position: refs/heads/master@{#39286}

TBR=jochen@chromium.org,bmeurer@chromium.org,machenbach@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3782

Review-Url: https://codereview.chromium.org/2328563002
Cr-Commit-Position: refs/heads/master@{#39287}
2016-09-08 15:56:24 +00:00
ofrobots
dbefc8ee2e Use -fno-delete-null-pointer-checks with gcc builds
R=bmeurer@chromium.org, jochen@chromium.org, machenbach@chromium.org
BUG=v8:3782

Review-Url: https://codereview.chromium.org/2310513002
Cr-Commit-Position: refs/heads/master@{#39286}
2016-09-08 15:49:58 +00:00
dgozman
81b7e77ff0 [inspector] Build inspector under v8_enable_inspector build flag.
- inspector becomes a dependency of v8_base;
- generated public protocol files are placed to gen/v8/include/inspector/<Domain.h>;
- added v8_enable_inspector_override to be used in embedders (gn only);
- combined public headers into v8-inspector.h and v8-inspector-protocol.h.

BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2292053003
Cr-Commit-Position: refs/heads/master@{#39226}
2016-09-06 23:26:35 +00:00
jshin
a3db819c9e Add support for DateTimeFormat.formatToParts
Spec discussion:  https://github.com/tc39/ecma402/issues/30

It's in stage 4 and Firefox has already implemented it.

For now, it's added to HARMONY_IN_PROGRESS bucket behind
'--datetime-format-to-parts' flag.

BUG=v8:5244
TEST=intl/date-format/date-format-to-parts.js
TEST=test262/intl402/DateTimeFormat/prototype/formatToParts/*

Review-Url: https://codereview.chromium.org/2273953003
Cr-Commit-Position: refs/heads/master@{#39225}
2016-09-06 22:57:11 +00:00
mlippautz
1ea41a466c KeyedLookupCache and DescriptorLookupCache -> lookup-cache{-inl.h,.cc,.h}
R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2316503004
Cr-Commit-Position: refs/heads/master@{#39212}
2016-09-06 14:57:56 +00:00
mlippautz
7f53dac6d9 KeyLookupCache,DescriptorLookupCache: heap.h -> lookup.h
R=ulan@chromium.org

Review-Url: https://codereview.chromium.org/2311003002
Cr-Commit-Position: refs/heads/master@{#39185}
2016-09-05 17:29:09 +00:00
mvstanton
c30cc0722e [turbofan] put src/types.[h/cc] into src/compiler/types.[h/cc]
BUG=

Review-Url: https://codereview.chromium.org/2309823002
Cr-Commit-Position: refs/heads/master@{#39181}
2016-09-05 15:58:45 +00:00
jgruber
433c9ee77e Revert of [regexp] Port RegExpConstructor (patchset #2 id:20001 of https://codereview.chromium.org/2302773002/ )
Reason for revert:
Performance regressions: crbug.com/644087
Clusterfuzz: crbug.com/644074

We'll reland all regexp changes at once when the port is complete and at least performance-neutral, since the partial port requires slow workarounds.

Original issue's description:
> [regexp] Port RegExpConstructor
>
> BUG=v8:5339
>
> Committed: https://crrev.com/0aa80be16b8d876999066545c2922e1291e09610
> Cr-Commit-Position: refs/heads/master@{#39074}

TBR=bmeurer@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5339

Review-Url: https://codereview.chromium.org/2312743002
Cr-Commit-Position: refs/heads/master@{#39177}
2016-09-05 14:29:15 +00:00
adamk
6dd2bc20b4 Remove unnessary includes of parser.h
This makes for slightly faster rebuilds when touching parser-base.h
(which changes frequently!). Also takes care of an old TODO,
moving CompileTimeValue into its own file under ast/, where it
properly belongs.

BUG=v8:5294

Review-Url: https://codereview.chromium.org/2305883002
Cr-Commit-Position: refs/heads/master@{#39141}
2016-09-02 17:48:46 +00:00
mvstanton
17e9e2f4c8 Forking the type system between Crankshaft & Turbofan.
Our Type class has a semantic and representational dimension.
Much code in src/ast, Crankshaft and Turbofan is based on it.
Going forward in Turbofan we'd like to remove representational information
entirely. To that end, new type AstType has been created to preserve
existing behavior for the benefit of Crankshaft and the AST.

BUG=

Review-Url: https://codereview.chromium.org/2302283002
Cr-Commit-Position: refs/heads/master@{#39135}
2016-09-02 13:04:39 +00:00
slan
efecae18b8 [ARMv8] ARMv8 builds are capable of ARMv7 instructions.
Correct a small bug which throws a compile-time assertion for ARMv8
builds since this change:
  https://codereview.chromium.org/2223433002

This does not add full support for ARMv8 instructions; it simply sets
the CAN_USE_ARMV7_INSTRUCTIONS define on ARMv8 builds.

BUG=

Review-Url: https://codereview.chromium.org/2293253004
Cr-Commit-Position: refs/heads/master@{#39087}
2016-09-01 13:31:44 +00:00
jgruber
0aa80be16b [regexp] Port RegExpConstructor
BUG=v8:5339

Review-Url: https://codereview.chromium.org/2302773002
Cr-Commit-Position: refs/heads/master@{#39074}
2016-09-01 10:39:36 +00:00
marja
0645135446 Separate CompilationInfo into its own file.
This way, many files which only need CompilationInfo but not compiler.h
and its dependencies can include just compilation-info.h.

BUG=

Review-Url: https://codereview.chromium.org/2284313003
Cr-Commit-Position: refs/heads/master@{#39038}
2016-08-31 08:49:59 +00:00
ahaas
cb259fbd39 [wasm] Create a new fuzzer for wasm code.
The new fuzzer constructs a dummy module header and uses the fuzzer
data only as function code.

R=titzer@chromium.org, jochen@chromium.org

Review-Url: https://codereview.chromium.org/2280623002
Cr-Commit-Position: refs/heads/master@{#38983}
2016-08-29 13:56:00 +00:00
bmeurer
f5a37d13bc [turbofan] Remove the unused asm.js types from TypeCache.
For asm.js we now have a dedicated AsmTyper, that uses it's own type
system (which is tailored towards asm.js), and so we don't need the
special asm.js types anymore in the TypeCache. This also moves the
TypeCache into the src/compiler directory, because it doesn't make
sense to use outside anyways.

TBR=ahaas@chromium.org
R=jarin@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2289573002
Cr-Commit-Position: refs/heads/master@{#38964}
2016-08-29 06:13:00 +00:00
verwaest
f046cb9543 Revert of Always deserialize scope infos for parsing (patchset #3 id:40001 of https://codereview.chromium.org/2280933002/ )
Reason for revert:
Significantly tanks parsing. We probably should just keep on doing what we're doing: partially deserialize while resolving variables. If we do scope-info backed resolution after regular resolution based on remaining free variables, we can probably reduce the time-frame of that part. We soon after anyway need to sync with the main thread.

Original issue's description:
> Always deserialize scope infos for parsing
>
> When looking up variables in the ScopeInfo, we did a linear scan of the
> ScopeInfo. Since that's unacceptably slow, a context slot cache was added
> that would speed up repeated lookups of the same variable.
>
> Instead, just always fully convert the ScopeInfo into scopes, so they can
> lookup variables without scanning the ScopeInfo.
>
> This also allows for removing the now unused ContextSlotCache.
>
> R=adamk@chromium.org,verwaest@chromium.org,marja@chromium.org
> BUG=v8:5315
>
> Committed: https://crrev.com/81f824cad18e4dc873a8838943217eb9c9f0c1f0
> Cr-Commit-Position: refs/heads/master@{#38953}

TBR=adamk@chromium.org,marja@chromium.org,jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5315

Review-Url: https://codereview.chromium.org/2287783003
Cr-Commit-Position: refs/heads/master@{#38958}
2016-08-27 07:09:03 +00:00
jochen
81f824cad1 Always deserialize scope infos for parsing
When looking up variables in the ScopeInfo, we did a linear scan of the
ScopeInfo. Since that's unacceptably slow, a context slot cache was added
that would speed up repeated lookups of the same variable.

Instead, just always fully convert the ScopeInfo into scopes, so they can
lookup variables without scanning the ScopeInfo.

This also allows for removing the now unused ContextSlotCache.

R=adamk@chromium.org,verwaest@chromium.org,marja@chromium.org
BUG=v8:5315

Review-Url: https://codereview.chromium.org/2280933002
Cr-Commit-Position: refs/heads/master@{#38953}
2016-08-26 17:39:51 +00:00
bmeurer
f154c75a39 [turbofan] Separate typed optimizations from JSTypedLowering.
Introduce a new TypedOptimization reducer that contains the type
based optimization reduction steps, which are not (directly)
related to lowering JavaScript operators based on types (which is
what JSTypedLowering is supposed to do).

This also addresses a chicken-and-egg problem that we see in the
Octane/Mandreel benchmark where type based constant folding isn't
applied to the numeric comparison operators introduced by the
JSTypedLowering itself, and thus gives up to 10% speedup for the
benchmark.

BUG=v8:5267

Review-Url: https://codereview.chromium.org/2280673003
Cr-Commit-Position: refs/heads/master@{#38928}
2016-08-26 07:58:30 +00:00
vogelheim
5b9b44d1f6 Separate DuplicateFinder from Scanner.
DuplicateFinder isn't actually used by the Scanner, except for one
convenience function which we should probably remove, also.

BUG=

Review-Url: https://codereview.chromium.org/2281443002
Cr-Commit-Position: refs/heads/master@{#38904}
2016-08-25 11:58:17 +00:00
jochen
442336409f Remove scopeinfo.h
It's an empty header.

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2278513002
Cr-Commit-Position: refs/heads/master@{#38867}
2016-08-24 14:28:25 +00:00
littledan
b2a257f9ff Remove --promise-extra flag
This flag was shipped on in 52, so it's due for removal. The patch includes
removing the deprecated and unused-in-Blink API Promise::Chain, and many
test updates.

R=adamk@chromium.org
BUG=v8:4633

Review-Url: https://codereview.chromium.org/2267033002
Cr-Commit-Position: refs/heads/master@{#38804}
2016-08-22 21:35:06 +00:00
jochen
24cb21e327 [gn] add missing suppressions for linker warnings on windows
When doing a component build, some test binaries link against the object
files directly, bypassing the components. This results, however, and
rightly so, in linker warnings. In gyp, we just suppressed them. During
the transition to gn, this was dropped for two binaries.

Here I add the suppressions back in.

Long term, we should either change the tests to go through the public
API, or export the required symbols.

BUG=chromium:633688
R=jkummerow@chromium.org

Review-Url: https://codereview.chromium.org/2261123003
Cr-Commit-Position: refs/heads/master@{#38793}
2016-08-22 16:50:34 +00:00
marja
f9d6076115 Cleanup: Move ParseInfo to a separate file.
This makes us able to get rid of dependencies to parser.h from places
which only need the ParseInfo, and also gets rid of the curious Parser
<-> Compiler circular dependency.

Also IWYUd where necessary.

BUG=

Review-Url: https://codereview.chromium.org/2268513002
Cr-Commit-Position: refs/heads/master@{#38777}
2016-08-22 11:33:58 +00:00
rmcilroy
49c14f63ef Replace DumpBacktrace with Chromium's StackTrace implementation.
Adds support for dumping the stack on Windows. Also enables in-process
stack dumping in d8 to dump the stack on exceptions and signals.

This CL changes the format of stack dumps from:
 1: V8_Fatal
 2: 0x1ac6ba5
 3: v8::internal::interpreter::BytecodeGenerator::Visit(v8::internal::AstNode*)
 4: v8::internal::interpreter::BytecodeGenerator::VisitForAccumulatorValue(v8::internal::Expression*)
 ...

To:
  ./out/x64.debug/d8(v8::base::debug::StackTrace::StackTrace()+0x1e) [0x1c6ee5e]
  ./out/x64.debug/d8() [0x1c6ede5]
  /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7fa01193e330]
  ./out/x64.debug/d8(v8::base::OS::Abort()+0x12) [0x1c6cea2]
  ./out/x64.debug/d8() [0x1c67538]
  ./out/x64.debug/d8() [0x1ac80b5]
  ./out/x64.debug/d8(v8::internal::interpreter::BytecodeGenerator
::Visit(v8::internal::AstNode*)+0x3cb) [0x1ac323b]
  ./out/x64.debug/d8(v8::internal::interpreter::BytecodeGenerator
::VisitForAccumulatorValue(v8::internal::Expression*)+0x40) [0x1ac2570]

Review-Url: https://codereview.chromium.org/2248393002
Cr-Commit-Position: refs/heads/master@{#38717}
2016-08-18 14:25:52 +00:00