Commit Graph

34170 Commits

Author SHA1 Message Date
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
klaasb
5deb0bc157 [interpreter] Inline FastCloneShallowArrayStub into bytecode handler
The CreateArrayLiteral bytecode handler now directly inlines the FastCloneShallowArrayStub.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2341743003
Cr-Commit-Position: refs/heads/master@{#39562}
2016-09-20 18:04:50 +00:00
ziyang
3b4cc88e9c PPC/s390: [Interpreter] Adds stackcheck in InterpreterPushArgsAndCall/Construct builtins.
Port 7f3d15aad4

    Original commit message:
    In ignition, arguments to function calls and function constructors are
    pushed onto the stack before calling the function. It is required to check
    that stack does not overflow when pushing the arguments.

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

Review-Url: https://codereview.chromium.org/2356583003
Cr-Commit-Position: refs/heads/master@{#39561}
2016-09-20 17:52:57 +00:00
bmeurer
c819a1e228 [TypeFeedbackVector] Properly ignore binary/compare op slots for FCG.
Fix a typo in TypeFeedbackVector::ComputeCounts, where we would not
skip the interpreter binary/compare op IC slots for fullcodegen, and
thus mess up the heuristics for tearing up.

TBR=mvstanton@chromium.org

Review-Url: https://codereview.chromium.org/2353513006
Cr-Commit-Position: refs/heads/master@{#39560}
2016-09-20 17:49:34 +00:00
neis
445e766fb8 Remove unused string from ast-value-factory.
R=adamk@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2351643006
Cr-Commit-Position: refs/heads/master@{#39559}
2016-09-20 17:47:45 +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
hpayer
e05e735a8a [heap] Make slot set state and operations atomic.
Here we only change the type of the slot set fields to atomic values and use CAS to change the state. There is no change in behavior or semantics of the slot set.

BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2353553003
Cr-Commit-Position: refs/heads/master@{#39557}
2016-09-20 14:58:54 +00:00
ahaas
57d8193764 [wasm] Fix EnsureSpace in the ZoneBuffer of the wasm encoder.
BUG=chromium:647329
R=titzer@chromium.org
TEST=unittest EncoderTest.Regression_647329

Review-Url: https://codereview.chromium.org/2355803002
Cr-Commit-Position: refs/heads/master@{#39556}
2016-09-20 14:04:13 +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
vogelheim
05a00a93b1 Simplify Scanner bookmarking.
- Eliminates *all* copies in the process.
- Moves (nearly) all functionality into Scanner::BookmarkScope.
- Significant code reduction.

[Needs to be rebased once crrev.com/2347883002 lands. All changes in *parser* are from that CL.]

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

Review-Url: https://codereview.chromium.org/2341323002
Cr-Commit-Position: refs/heads/master@{#39554}
2016-09-20 13:48:04 +00:00
mstarzinger
b88df1c9e4 [turbofan] Ship generators if --turbo-from-bytecode set.
This makes sure generator functions are marked as optimizable for all
configurations where the BytecodeGraphBuilder is used. Note that as
usual AstNumbering is just a heuristic and the underlying compiler can
still bailout from optimization when the compilation pipeline chooses
another compiler that does not support generator functions.

R=bmeurer@chromium.org,hablich@chromium.org

Review-Url: https://codereview.chromium.org/2353793003
Cr-Commit-Position: refs/heads/master@{#39553}
2016-09-20 13:44:09 +00:00
ivica.bogosavljevic
10b023c1ba MIPS: Fix long branches being emitted mistakenly in floating-point branches
Due to a typo, long branches were emitted instead of short branches, and the
code would stop working at all in the situation when long branches must be
emitted. This patche fixes this issue.

TEST=mjsunit/wasm/embenchen/lua_binarytrees
BUG=

Review-Url: https://codereview.chromium.org/2351143002
Cr-Commit-Position: refs/heads/master@{#39552}
2016-09-20 13:01:06 +00:00
mstarzinger
4dab7b5a1d [turbofan] Fix loop assignment analysis on ForInStatements.
The implicit assignment to the induction variable in a ForInStatement
has been ignored by the AST loop assignment analysis. This was hidden
for cases where the parser introduced a ".for" temporary, but triggers
when the variable is declared outside the loop.

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

Review-Url: https://codereview.chromium.org/2356733002
Cr-Commit-Position: refs/heads/master@{#39551}
2016-09-20 12:37:33 +00:00
klaasb
e2455873e6 Port FastCloneShallowArrayStub to Turbofan
Refactors CodeStubAssembler::AllocateJSArray to share code.

BUG=chromium:608675

Review-Url: https://codereview.chromium.org/2304573004
Cr-Commit-Position: refs/heads/master@{#39550}
2016-09-20 12:36:28 +00:00
ishell
05eb56798e [ic] Reorder parameters of StoreIC_Miss and KeyedStoreIC_Miss runtime functions.
This will allow to simplify the miss part of store IC handlers when we decide
to pass value/slot/vector on the stack.

BUG=v8:5407

Review-Url: https://codereview.chromium.org/2351643005
Cr-Commit-Position: refs/heads/master@{#39549}
2016-09-20 12:26:19 +00:00
jochen
0f0912dd23 Change the CompilerDispatcherJob to take a SharedFunctionInfo
This means we can no longer take the closure's context to parse, but
need to rely on the outer scope info.

Since it's not possible to get that, however, for lazy functions, we
introduce a new field to SharedFunctionInfo that stores the outer scope
info whenever available.

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

Review-Url: https://codereview.chromium.org/2358503002
Cr-Commit-Position: refs/heads/master@{#39548}
2016-09-20 12:08:42 +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
jochen
7d9a037524 Only create ScopeInfos for scopes that really need one
R=verwaest@chromium.org,marja@chromium.org

Review-Url: https://codereview.chromium.org/2351823005
Cr-Commit-Position: refs/heads/master@{#39546}
2016-09-20 11:47:24 +00:00
leszeks
bedde181fd [base] Decrease probing in hashmap
Removes some unnecessary probing in TemplateHashMapImpl, in
particular probing a second time in LookupOrInsert after the
first probe came up with an empty value.

Review-Url: https://codereview.chromium.org/2349163002
Cr-Commit-Position: refs/heads/master@{#39545}
2016-09-20 11:30:51 +00:00
ulan
72456950c1 [heap] Properly handle --noconcurrent-sweeping flag in page unmapper.
BUG=

Review-Url: https://codereview.chromium.org/2347073003
Cr-Commit-Position: refs/heads/master@{#39544}
2016-09-20 11:17:22 +00:00
ishell
4286f2c0bd [crankshaft] Remove HStoreKeyedGeneric and use HCallWithDescriptor instead to call KeyedStoreIC.
... because the latter automatically respects the desired calling convention.

BUG=v8:5407

Review-Url: https://codereview.chromium.org/2350423002
Cr-Commit-Position: refs/heads/master@{#39543}
2016-09-20 11:12:01 +00:00
rmcilroy
b2615904c2 Remove unecessary arm/arm64 OWNERS files.
BUG=

Review-Url: https://codereview.chromium.org/2357563002
Cr-Commit-Position: refs/heads/master@{#39542}
2016-09-20 11:10:59 +00:00
rmcilroy
4243a7f085 [Interpreter] Remove extra CHECKS added for crbug.com/642111.
BUG=chromium:642111

Review-Url: https://codereview.chromium.org/2358523003
Cr-Commit-Position: refs/heads/master@{#39541}
2016-09-20 11:09:14 +00:00
bmeurer
29dd7fc5ed [turbofan] Lower ConsString creation in JSTypedLowering.
Extract String feedback on Add operation and utilize to lower ConsString
creation in JSTypedLowering when we know that a String addition will
definitely result in the creation of a ConsString.

Note that Crankshaft has to guard the potential length overflow of the
resulting string with an eager deoptimization exit, while we can safely
throw an exception in that case.

Also note that the bytecode pipeline does not currently provide the
String feedback for the addition, which has to be added.

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

Review-Url: https://codereview.chromium.org/2354853002
Cr-Commit-Position: refs/heads/master@{#39540}
2016-09-20 11:00:39 +00:00
bmeurer
0e03973047 [turbofan] Introduce PretenureFlagOf helper function.
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2357573002
Cr-Commit-Position: refs/heads/master@{#39539}
2016-09-20 10:58:40 +00:00
leszeks
b42ecda533 [base] Move hashmap allocator to a field
Moves the hashmap's allocator from being a parameter in the various
hashmap functions, to being a field in the hashmap itself. This

1. Protects against incorrectly passed allocators, and
2. Cleans up the API so that e.g. callers don't have to store their
   allocator

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/2345233003
Cr-Commit-Position: refs/heads/master@{#39538}
2016-09-20 10:46:07 +00:00
leszeks
044a62be6c [interpreter] Add fast path for dynamic global lookups
Adds a fast path for loading DYNAMIC_GLOBAL variables, which are lookup
variables that can be globally loaded, without calling the runtime, as long as
there was no context extension by a sloppy eval along their context chain.

BUG=v8:5263

Review-Url: https://codereview.chromium.org/2347143002
Cr-Commit-Position: refs/heads/master@{#39537}
2016-09-20 10:31:52 +00:00
verwaest
cab644f3f2 Internalize the ast-value-factory before tracing in trace-parse. Otherwise the string-handle isn't available yet
BUG=

Review-Url: https://codereview.chromium.org/2348373004
Cr-Commit-Position: refs/heads/master@{#39536}
2016-09-20 10:30:50 +00:00
ishell
3b5fcea883 [crankshaft] Remove HStoreNamedGeneric and use HCallWithDescriptor instead to call StoreIC.
... because the latter automatically respects the desired calling convention.

BUG=v8:5407

Review-Url: https://codereview.chromium.org/2358533002
Cr-Commit-Position: refs/heads/master@{#39535}
2016-09-20 10:00:11 +00:00
bmeurer
825f506fab [turbofan] Propagate tenuring decisions to child object allocations.
When an allocation for a parent object is pretenured, also propagate
that to all allocations for objects that are (potentially) stored into
the parent object.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2348293003
Cr-Commit-Position: refs/heads/master@{#39534}
2016-09-20 09:58:32 +00:00
vogelheim
b36c60cce8 Remove legacy API on Utf16CharacterStream.
BUG=v8:4947

Review-Url: https://codereview.chromium.org/2347883002
Cr-Commit-Position: refs/heads/master@{#39533}
2016-09-20 09:44:00 +00:00
marja
df9d8c01f2 Add a missing test for ensuring that context shapes stay the same when recompiling.
This would've caught the "preparser tracking only unresolved variables
but no declarations is not enough" bug.

BUG=

Review-Url: https://codereview.chromium.org/2350683002
Cr-Commit-Position: refs/heads/master@{#39532}
2016-09-20 09:35:40 +00:00
rmcilroy
a06df1f21c [Parser] Don't internalize on-the-fly.
Avoid internalizing on-the-fly now that scope analysis and natives syntax
runtime calls no longer require internalized AST values. This should be
more efficient by avoiding extra branches on every AST value creation.

BUG=v8:5215, chromium:634953

Review-Url: https://codereview.chromium.org/2328593002
Cr-Commit-Position: refs/heads/master@{#39531}
2016-09-20 09:33:01 +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
jyan
eb57f22e2b Fix BigE for Rework scanner-character-streams.
R=vogelheim@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2354683003
Cr-Commit-Position: refs/heads/master@{#39529}
2016-09-20 08:26:06 +00:00