Commit Graph

34304 Commits

Author SHA1 Message Date
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
v8-autoroll
a041367ef5 Update V8 DEPS.
Rolling v8/base/trace_event/common to 6232c13e4edb36c84c61653fdae5a4afb5af9745

Rolling v8/build to 8438b8f51c0b125b298ad497c1bc1aa016c908ae

Rolling v8/buildtools to 57649e5e2001ba1f5e5d45f5a838c616ea0e9cb9

Rolling v8/tools/clang to c1f39cb405e8af68a20e08e9485275a42260a88f

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

Review-Url: https://codereview.chromium.org/2353363007
Cr-Commit-Position: refs/heads/master@{#39611}
2016-09-22 03:31:15 +00:00
kozyatinskiy
e882623820 [inspector] fixed all shorten-64-to-32 warnings
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/3d10918d2e1c57d72531c55a956262f5a72fceaa
Review-Url: https://codereview.chromium.org/2332163002
Cr-Original-Commit-Position: refs/heads/master@{#39426}
Cr-Commit-Position: refs/heads/master@{#39610}
2016-09-22 01:48:10 +00:00
gsathya
ba41697cbd [promises] PromiseResolveThenableJob: change then to be a JSReceiver
BUG=v8:649078

Review-Url: https://codereview.chromium.org/2362503003
Cr-Commit-Position: refs/heads/master@{#39609}
2016-09-21 23:56:20 +00:00
kozyatinskiy
a1612d2456 [inspector] change implementation file extension from cpp to cc
BUG=chromium:635948
R=dgozman@chromium.org,alph@chromium.org
TBR=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2338413003
Cr-Commit-Position: refs/heads/master@{#39608}
2016-09-21 23:55:15 +00:00
adamk
c216b7fa83 Revert of [heap] Concurrently free empty typed slot set chunks. (patchset #3 id:40001 of https://codereview.chromium.org/2352423002/ )
Reason for revert:
TSAN failures on Linux64:

https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11850

Also saw various threading-related flakiness on multiple bots.

Original issue's description:
> [heap] Concurrently free empty typed slot set chunks.
>
> BUG=chromium:648568
>
> Committed: https://crrev.com/ff8101d8e8d5e14dfa89de1252c510e6a0775539
> Cr-Commit-Position: refs/heads/master@{#39605}

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=chromium:648568

Review-Url: https://codereview.chromium.org/2358333002
Cr-Commit-Position: refs/heads/master@{#39607}
2016-09-21 23:49:43 +00:00
kozyatinskiy
c0d1afa2d8 [inspector] provide more usefull error message for non serializable value
Runtime.evaluate can return result by value. We need to provide more details why method call was failed.

BUG=chromium:645640
R=dgozman@chromium.org,alph@chromium.org

Committed: https://crrev.com/0965b9b5df532d3aa0583966ca60794b54f56943
Review-Url: https://codereview.chromium.org/2345263003
Cr-Original-Commit-Position: refs/heads/master@{#39574}
Cr-Commit-Position: refs/heads/master@{#39606}
2016-09-21 20:29:16 +00:00
hpayer
ff8101d8e8 [heap] Concurrently free empty typed slot set chunks.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2352423002
Cr-Commit-Position: refs/heads/master@{#39605}
2016-09-21 20:11:12 +00:00
neis
b2b434df41 [modules] Support exporting a local variable under multiple export names.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2353403003
Cr-Commit-Position: refs/heads/master@{#39604}
2016-09-21 18:48:33 +00:00
littledan
74bf86abf5 Disable slow async function tests in gc_stress
BUG=v8:5411

Review-Url: https://codereview.chromium.org/2354333003
Cr-Commit-Position: refs/heads/master@{#39603}
2016-09-21 18:13:02 +00:00
ahaas
99b773c28a [wasm] Break a decoder loop if there is a failure.
TEST=unittests/WasmModuleVerifyTest.Regression_648070
BUG=chromium:648070
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2356253002
Cr-Commit-Position: refs/heads/master@{#39602}
2016-09-21 16:18:19 +00:00
littledan
f322d3ad5c Remove handling in inspector for Object.observe async task events
Review-Url: https://codereview.chromium.org/2353503006
Cr-Commit-Position: refs/heads/master@{#39601}
2016-09-21 15:47:27 +00:00
ahaas
4c1d574b22 [wasm] FromJS throws a TypeError for I64 values.
This behavior is required by the WebAssembly spec.

TEST=mjsunit/wasm/ffi-error.js:I64ParamsInSignatureThrows

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2360653002
Cr-Commit-Position: refs/heads/master@{#39600}
2016-09-21 15:33:05 +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
rmcilroy
d5ddd2be8c [Test] Fix AsmJsUnOpsCheckOrigin off-stack access.
Review-Url: https://codereview.chromium.org/2353343002
Cr-Commit-Position: refs/heads/master@{#39597}
2016-09-21 14:07:45 +00:00
hpayer
6f06c36c3e [heap] Make typed slot set state and operations atomic.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2360513002
Cr-Commit-Position: refs/heads/master@{#39596}
2016-09-21 13:20:48 +00:00
ahaas
d2c975d217 [wasm] Reset the wasm_eh_prototype flag after unittests
Changing the global state can effect the outcome of later tests.

R=jpp@chromium.org

Review-Url: https://codereview.chromium.org/2359573003
Cr-Commit-Position: refs/heads/master@{#39595}
2016-09-21 13:16:33 +00:00
mstarzinger
b097c6c4f1 [turbofan] Support for ConsString by escape analysis.
This add support for ConsString objects allocated inline to the escape
analysis pass. The raw hash field in such strings needs special handling
similar to existing raw fields. This also contains materialization code
within the deoptimizer as usual.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-648737
BUG=chromium:648737

Review-Url: https://codereview.chromium.org/2357153002
Cr-Commit-Position: refs/heads/master@{#39594}
2016-09-21 12:30:00 +00:00
ishell
14a87d9639 [stubs] Remove OnStackArgsDescriptor and friends.
Each stub should have more meaningful descriptor instead.

BUG=v8:5407

Review-Url: https://codereview.chromium.org/2356163002
Cr-Commit-Position: refs/heads/master@{#39593}
2016-09-21 11:51:16 +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
jarin
1601e35a9a [turbofan] Regalloc: only pre-spill live ranges with spill operand.
Review-Url: https://codereview.chromium.org/2360523002
Cr-Commit-Position: refs/heads/master@{#39591}
2016-09-21 11:30:56 +00:00
ishell
12d4dc3222 [stubs] ApiCallbackDescriptor cleanup - make it independent on the number of JS parameters.
This cleanup is necessary to make HCallWithDescriptor support passing arguments on the stack.

BUG=v8:5407

Review-Url: https://codereview.chromium.org/2352163004
Cr-Commit-Position: refs/heads/master@{#39590}
2016-09-21 11:08:45 +00:00
cbruni
031a04c6e9 [tools] Reduce grokdump output size
Minidumps have gotten bigger stack ranges leading to long load times when using
grokdump's web interface. A major factor seems to be the output size of the
generated table. Using shorter class names and avoiding quotes for most
attributes we can get a significant size reduction.

BUG=

Review-Url: https://codereview.chromium.org/2352303002
Cr-Commit-Position: refs/heads/master@{#39589}
2016-09-21 11:07:44 +00:00
ahaas
698bbe418a [wasm] Set up Table and Memory constructors
Set up Wasm Table and Memory constructors

This only provides skeletons so far: the constructors work, but the
types are not wired up with the import/export mechanism yet; methods are
still nops.

Also, fix errors generated from Wasm to be proper Error/TypeError
instances instead of just strings.

I took over this CL from rossberg@chromium.org. The original CL is
https://codereview.chromium.org/2342623002

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

Review-Url: https://codereview.chromium.org/2350643003
Cr-Commit-Position: refs/heads/master@{#39588}
2016-09-21 10:40:32 +00:00
nikolaos
51b6a3d11b [parser] Refactor of Parse*Statement*, part 8
This patch moves the following parsing method to ParserBase:

- ParseForStatement

R=adamk@chromium.org, marja@chromium.org
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2351233002
Cr-Commit-Position: refs/heads/master@{#39587}
2016-09-21 10:39:31 +00:00
cbruni
2fd6d6093e [elements] Handlify raw parameter_map pointers for SloppyArgumentsAccessor
Handlify pointers in IncludesValueImpl and DirectCollectElementIndicesImpl.

BUG=chromium:648373

Review-Url: https://codereview.chromium.org/2354773006
Cr-Commit-Position: refs/heads/master@{#39586}
2016-09-21 10:22:53 +00:00
hpayer
c19abaddaf [heap] Always use the passed-in collector in CollectGarbage.
Do not overwrite a collector decision.

BUG=

Review-Url: https://codereview.chromium.org/2336943003
Cr-Commit-Position: refs/heads/master@{#39585}
2016-09-21 09:57:08 +00:00
balazs.kilvady
06c6591d0f MIPS: Add NaN handling to floating point operators in simulators.
Review-Url: https://codereview.chromium.org/2184843002
Cr-Commit-Position: refs/heads/master@{#39584}
2016-09-21 09:36:04 +00:00
mstarzinger
81f4342994 [turbofan] Remove bogus constant materialization from frame.
This removes an optimization from the code generator that tries to
materialize certain constants (i.e. context and closure) from the
stackframe when possible. This does not work with Harmony tail calls
which are split into several instructions. There have already been
numerous bugs in this optimization, it is too fragile in its current
form.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-crbug-648539
BUG=chromium:648539

Review-Url: https://codereview.chromium.org/2357583003
Cr-Commit-Position: refs/heads/master@{#39583}
2016-09-21 09:31:32 +00:00
marija.antic
3d97b804c9 MIPS: [turbofan] Optimize sign-extension patterns like Sar(Shl(x, a), b)).
Port of https://crrev.com/14a5c18cc35b2c55b37de3bd0ad27941cf21cb68

BUG=

Review-Url: https://codereview.chromium.org/2355743003
Cr-Commit-Position: refs/heads/master@{#39582}
2016-09-21 09:27:15 +00:00
verwaest
65bae443a2 Add function-var to variables_ so LookupRecursive doesn't need to special-case it
After parsing a function, if there's no masking declaration in the function scope, DeclareFunctionVar will also bind the function name to a variable. It will either bind it to the const/const-legacy function_ variable, or to a dynamic non-local if the function calls sloppy eval.

Even if the variable is masked or sloppy eval is called, we still declare the function-var. The client immediately sets up the variable by assigning the resulting function to it.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2274133002
Cr-Commit-Position: refs/heads/master@{#39581}
2016-09-21 09:15:29 +00:00
machenbach
15b4b21855 Revert of [inspector] provide more usefull error message for non serializable value (patchset #3 id:40001 of https://codereview.chromium.org/2345263003/ )
Reason for revert:
Breaks https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/9932

See also https://github.com/v8/v8/wiki/Blink-layout-tests

Original issue's description:
> [inspector] provide more usefull error message for non serializable value
>
> Runtime.evaluate can return result by value. We need to provide more details why method call was failed.
>
> BUG=chromium:645640
> R=dgozman@chromium.org,alph@chromium.org
>
> Committed: https://crrev.com/0965b9b5df532d3aa0583966ca60794b54f56943
> Cr-Commit-Position: refs/heads/master@{#39574}

TBR=dgozman@chromium.org,alph@chromium.org,kozyatinskiy@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:645640

Review-Url: https://codereview.chromium.org/2352263003
Cr-Commit-Position: refs/heads/master@{#39580}
2016-09-21 09:04:30 +00:00
vogelheim
a2b8b6e7db Handle Utf-8 BOM at beginning of an Utf-8 stream.
(This should enable to drop the BOM handling in the Blink bindings.)

R=marja@chromium.org
BUG=v8:4947

Review-Url: https://codereview.chromium.org/2354973002
Cr-Commit-Position: refs/heads/master@{#39579}
2016-09-21 08:40:10 +00:00
machenbach
a7455beba1 Revert of Update V8 DEPS. (patchset #1 id:1 of https://codereview.chromium.org/2360463002/ )
Reason for revert:
Breaks https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug%20builder/builds/3144

Original issue's description:
> Update V8 DEPS.
>
> Rolling v8/base/trace_event/common to 199985e01e17b5a4888f83648b7cc119779e9245
>
> Rolling v8/build to 4803815de7294778a1496c4e7f3e84ee48e243ef
>
> Rolling v8/buildtools to 57649e5e2001ba1f5e5d45f5a838c616ea0e9cb9
>
> Rolling v8/tools/clang to cca919b21f2436ba1585f7e9de2702ba64fbd8bf
>
> TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org
>
> Committed: https://crrev.com/0ed1254d8103b40d5880601bf73b6c56e4d5716d
> Cr-Commit-Position: refs/heads/master@{#39570}

TBR=hablich@chromium.org,vogelheim@chromium.org,v8-autoroll@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2351943005
Cr-Commit-Position: refs/heads/master@{#39578}
2016-09-21 08:07:25 +00:00
mstarzinger
c0c435b531 Remove some dead ZoneList typedefs.
R=marja@chromium.org

Review-Url: https://codereview.chromium.org/2359443002
Cr-Commit-Position: refs/heads/master@{#39577}
2016-09-21 07:58:44 +00:00
ivica.bogosavljevic
ade29503dd Fix compilation failure with GCC 5
BUG=

Review-Url: https://codereview.chromium.org/2353943002
Cr-Commit-Position: refs/heads/master@{#39576}
2016-09-21 07:18:46 +00:00
bmeurer
b0b97bfc0f [turbofan] Also allow TaggedSigned/Pointer memory operand.
When we added the new MachineRepresentation::kTaggedSigned and
MachineRepresentation::kTaggedPointer, we didn't extend the logic
for memory operand covering, and so for map checks and other
comparisons with fields we'd always need an additional register.
This fixes that and does reduce register pressure in some cases.

R=jarin@chromium.org
BUG=v8:5267,v8:5270

Review-Url: https://codereview.chromium.org/2354863003
Cr-Commit-Position: refs/heads/master@{#39575}
2016-09-21 07:15:20 +00:00
kozyatinskiy
0965b9b5df [inspector] provide more usefull error message for non serializable value
Runtime.evaluate can return result by value. We need to provide more details why method call was failed.

BUG=chromium:645640
R=dgozman@chromium.org,alph@chromium.org

Review-Url: https://codereview.chromium.org/2345263003
Cr-Commit-Position: refs/heads/master@{#39574}
2016-09-21 06:17:19 +00:00
bmeurer
54b55e5f2e [turbofan] Ship store-store elimination.
R=hablich@chromium.org, jarin@chromium.org

Review-Url: https://codereview.chromium.org/2355113003
Cr-Commit-Position: refs/heads/master@{#39573}
2016-09-21 05:50:35 +00:00
kozyatinskiy
59f18e53b5 [inspector] replaced V8_INSPECTOR* macros with macros from base/macros.h
BUG=chromium:635948
R=alph@chromium.org

Review-Url: https://codereview.chromium.org/2359533002
Cr-Commit-Position: refs/heads/master@{#39572}
2016-09-21 04:23:18 +00:00
gsathya
8c87ae9b88 [promises] Move PromiseResolveThenableJob to c++
- Add a new container object to store the data required for
PromiseResolveThenableJob.

- Create a new runtime function to enqueue the microtask event with
the required data.

This patches causes a 4% regression in the bluebird benchmark.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2314903004
Cr-Commit-Position: refs/heads/master@{#39571}
2016-09-21 03:49:50 +00:00
v8-autoroll
0ed1254d81 Update V8 DEPS.
Rolling v8/base/trace_event/common to 199985e01e17b5a4888f83648b7cc119779e9245

Rolling v8/build to 4803815de7294778a1496c4e7f3e84ee48e243ef

Rolling v8/buildtools to 57649e5e2001ba1f5e5d45f5a838c616ea0e9cb9

Rolling v8/tools/clang to cca919b21f2436ba1585f7e9de2702ba64fbd8bf

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

Review-Url: https://codereview.chromium.org/2360463002
Cr-Commit-Position: refs/heads/master@{#39570}
2016-09-21 03:34:34 +00:00
adamk
cf127e8144 [modules] Expand API to allow linking and use it in d8
This patch gives the ability for the embedder to ask for the
module requests of a module, and to pass a ResolveCallback
into Module::Instantiate().

In d8, I've implemented a simple module_map that's used
along with this API to allow loading, compiling, instantiating,
and evaluating a whole tree of modules.

No path resolution is yet implemented, meaning that all
import paths are relative to whatever directory d8 runs
in. And no imports are linked to the exports of the
requested module.

BUG=v8:1569

Review-Url: https://codereview.chromium.org/2351113004
Cr-Commit-Position: refs/heads/master@{#39569}
2016-09-20 23:39:41 +00:00
neis
a037f350ee [modules] Also (de-)serialize imports.
This is in preparation for basic support of import statements.

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

Review-Url: https://codereview.chromium.org/2357003002
Cr-Commit-Position: refs/heads/master@{#39568}
2016-09-20 22:58:22 +00:00
littledan
dcd61b9020 Filter out synthetic variables from with scopes
This patch ensures that variables like .new_target aren't overwritable
using with scopes. It does this by ensuring that scope analysis does
not consider with scopes (or eval scopes) for such 'synthetic variables',
similarly to how the 'this' variable was already handled.
The patch also adds a DCHECK for the dynamic parallel to this case,
replacing a previous unreachable path for a particular instance.

BUG=v8:5405

Review-Url: https://codereview.chromium.org/2353623002
Cr-Commit-Position: refs/heads/master@{#39567}
2016-09-20 22:14:54 +00:00
littledan
bd078193a0 Remove synthetic unresolved variables from async/await desugaring
This patch uses temporaries rather than unresolved variables for
.promise and .debug_is_active. For .promise, a new field is added
to the FunctionState, similarly to .generator_object. This change
fixes a bug where .promise was locally shadowable by with, affecting
program semantics.

BUG=v8:5405

Review-Url: https://codereview.chromium.org/2359513002
Cr-Commit-Position: refs/heads/master@{#39566}
2016-09-20 21:31:32 +00:00
littledan
377358516f Make Promise.all/Promise.race catch prediction conditional on DevTools
To improve performance, this patch makes Promise.all and Promise.race not
perform correct catch prediction when the debugger is not open. The case
may come up if Promise.race or Promise.all is called, then DevTools is
open, then a component Promise is rejected. In this case, the user would
falsely get an exception event even if the "pause on caught exceptions"
box is unchecked. There are tests which triggered this case; however, it
seems both unlikely and and acceptable to have an event in this case.
Many analogous events are already produced when DevTools is enabled
during the operation of a program.

BUG=v8:3093

Review-Url: https://codereview.chromium.org/2350363002
Cr-Commit-Position: refs/heads/master@{#39565}
2016-09-20 19:34:35 +00:00
littledan
1b414e283a Reland Async/await Promise dependency graph
This patch knits together Promises returned by async/await such that when
one async function awaits the result of another one, catch prediction works
across the boundaries, whether the exception comes synchronously or
asynchronously. Edges are added in three places:
- When a locally uncaught await happens, if the value passed into await
  is a Promise, from the awaited value to the Promise under construction
  in the broader async function
- From a "throwaway" Promise, which may be found on the Promise debug
  stack, to the Promise under construction in the async function that
  surrounds it
- When a Promise is resolved with another Promise (e.g., when returning a
  Promise from an async function)

In this reland, the caught tests are broken up into four parts to avoid
timeouts.

BUG=v8:5167

Review-Url: https://codereview.chromium.org/2346363004
Cr-Commit-Position: refs/heads/master@{#39564}
2016-09-20 19:04:26 +00:00
adamk
c604eae3c2 [modules] Add a requested_modules field to Module
Also simplify Factory::NewModule to take only the SharedFunctionInfo.

R=neis@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2355033002
Cr-Commit-Position: refs/heads/master@{#39563}
2016-09-20 18:50:54 +00:00