Commit Graph

34721 Commits

Author SHA1 Message Date
jgruber
760328f229 [regexp] Extract code to regexp-utils.{h,cc}
This CL is in preparation for the upcoming port of
RegExp.prototype.replace, which will need use these methods in
runtime-regexp.cc. Moving them in advance makes that diff less noisy.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2398413002
Cr-Commit-Position: refs/heads/master@{#40229}
2016-10-12 15:15:44 +00:00
bjaideep
c6f8955e46 PPC/s390: [stubs] Refactor the CallICStub to pass the number of arguments.
Port c15c58274f

Original commit message:

    This is the next step to unify the Call/Construct feedback collection
    and prepare it to be able to collect SharedFunctionInfo feedback. This
    also reduces the CallICStub overhead quite a bit since we only need one
    stub per mode (and tail call mode), not also one per call arity.

R=bmeurer@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/2415583002
Cr-Commit-Position: refs/heads/master@{#40228}
2016-10-12 14:38:45 +00:00
verwaest
d3d64736f7 Mark ParseInfo as eval in the constructors
BUG=v8:5501

Review-Url: https://codereview.chromium.org/2413673002
Cr-Commit-Position: refs/heads/master@{#40227}
2016-10-12 14:29:03 +00:00
kozyatinskiy
fa814c6119 [inspector] removed inspector_protocol_parser_test
Unittests for protocol parser are located in core/inspector in blink and separate test runner for inspector tests was added.

BUG=chromium:635948
R=dgozman@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2376173002
Cr-Commit-Position: refs/heads/master@{#40226}
2016-10-12 14:13:58 +00:00
kozyatinskiy
2c37e4a0f1 [inspector] expose js_protocol.json file location in BUILD file
This location is used at least in Chromium.

BUG=chromium:635948
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2405303002
Cr-Commit-Position: refs/heads/master@{#40225}
2016-10-12 14:11:21 +00:00
titzer
34459d50a6 [wasm] Rename WasmModuleInstance to WasmInstance.
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2415533003
Cr-Commit-Position: refs/heads/master@{#40224}
2016-10-12 13:57:25 +00:00
ishell
42884efd19 [crankshaft] Remove HLoadKeyedGeneric and use HCallWithDescriptor to call KeyedLoadIC.
... because the latter automatically respects the desired calling convention.

BUG=v8:5408

Review-Url: https://codereview.chromium.org/2391043005
Cr-Commit-Position: refs/heads/master@{#40223}
2016-10-12 13:48:38 +00:00
ishell
ca680a68ee [crankshaft] Exclude context parameter from HCallWithDescriptor arguments.
Thus the parameter indices defined in respective CallInterfaceDescriptor can
be used for querying parameters.

BUG=

Review-Url: https://codereview.chromium.org/2389133007
Cr-Commit-Position: refs/heads/master@{#40222}
2016-10-12 13:30:23 +00:00
hpayer
4c3a172539 [heap] Reland concurrent slot filtering in sweeper threads.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2403423007
Cr-Commit-Position: refs/heads/master@{#40221}
2016-10-12 13:07:43 +00:00
ishell
9b5a1cf5d8 [stubs] Remove unused StoreGlobalViaContextStub.
Review-Url: https://codereview.chromium.org/2412613004
Cr-Commit-Position: refs/heads/master@{#40220}
2016-10-12 13:06:10 +00:00
ishell
50efae9b7e [stubs] Rename StoreIC[Trampoline]TFStub to StoreIC[Trampoline]Stub.
Review-Url: https://codereview.chromium.org/2411793004
Cr-Commit-Position: refs/heads/master@{#40219}
2016-10-12 12:59:06 +00:00
hpayer
13488842de [heap] Fix forwarding pointer race between sweeper threads and pointer updating threads.
The race can happen if:
1) Fixed array A is right before object B in new space
2) A slot in object C located in old space points to object B (old to new remembered set entry is created)
3) Object C becomes unreachable which held the only reference to object B which also becomes unreachable
4) Fixed array A gets right trimmed
5) The sweeper will sweep the last word of object A and object B. It will write the free space map into the last word of object A and a size field in the first word of object B.
6) Pointer updating may observe the size field now because the recored slot points to the start of object B and will confuse it with a forwarding pointer.

Note a similar race may happen with left trimming. Array A points to its backing store, the backing store gets left trimmed by 1 element, and array A dies.
BUG=

Review-Url: https://codereview.chromium.org/2416563002
Cr-Commit-Position: refs/heads/master@{#40218}
2016-10-12 12:54:45 +00:00
verwaest
c5df7fe2f3 Restore kDeclaration as a condition for temp-zone parsing
This should restore the codeload regression when FLAG_lazy_inner_functions is turned off

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2412483005
Cr-Commit-Position: refs/heads/master@{#40217}
2016-10-12 12:53:36 +00:00
ishell
3285b96506 [stubs] Drop StoreICStub and StoreICTrampolineStub (the non-TurboFan implementations of StoreIC dispatchers).
Because of the planned improvements of IC system it does not make sense to
keep the old platform version of the stub around.

Review-Url: https://codereview.chromium.org/2413653003
Cr-Commit-Position: refs/heads/master@{#40216}
2016-10-12 12:52:36 +00:00
verwaest
8f66bb641e Mark ParseInfo as top-level in the constructors
If we're parsing a script or based on a SharedFunctionInfo marked as toplevel, we can implicitly set it. Only manually set in the background parsing task where we manually set up ParseInfo.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2405263003
Cr-Commit-Position: refs/heads/master@{#40215}
2016-10-12 12:51:21 +00:00
verwaest
35fc3d58a1 Don't count nested function scopes towards MaxNestedContextChainlength
This is allocating registers in the function for all inner contexts that can be active in that function, so that nested blocks always have O(1) access to all outer contexts. However, currently it's always walking into nested functions, overallocating the number of registers, causing additional register pressure.

BUG=v8:5484

Review-Url: https://codereview.chromium.org/2408303003
Cr-Commit-Position: refs/heads/master@{#40214}
2016-10-12 12:15:03 +00:00
hpayer
10ffd2b111 [heap] Old-to-new pointer updates need atomic accessors.
This CL also introduces a NoBarrierAtomicValue with NoBarrier accessors.

BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2408233004
Cr-Commit-Position: refs/heads/master@{#40213}
2016-10-12 12:05:02 +00:00
ishell
d9fab441ca [stubs] Rename LoadIC[Trampoline]TFStub to LoadIC[Trampoline]Stub.
Review-Url: https://codereview.chromium.org/2412493006
Cr-Commit-Position: refs/heads/master@{#40212}
2016-10-12 12:01:08 +00:00
ishell
9a99cc4732 [stubs] Drop LoadICStub and LoadICTrampolineStub (the non-TurboFan implementations of LoadIC dispatchers).
Because of the planned improvements of IC system it does not make sense to
keep the old platform version of the stub around.

Review-Url: https://codereview.chromium.org/2418513002
Cr-Commit-Position: refs/heads/master@{#40211}
2016-10-12 11:57:01 +00:00
bmeurer
c6779297a1 [runtime] Rename FieldTypeGroup to FieldOwnerGroup.
We want to extend the use of this code dependency, so the name does no
longer reflect the purpose.

R=ishell@chromium.org

Review-Url: https://codereview.chromium.org/2410293003
Cr-Commit-Position: refs/heads/master@{#40210}
2016-10-12 11:11:19 +00:00
epertoso
87cc641e8c [stubs] Renames WordIsSmi to TaggedIsSmi, introducing an appropriate bitcast of the parameter.
WordIsSmi, by itself, is not that descriptive, as it just ands a word with the heap object tag. With this change, the MachineGraphVerifier can check that the input to TaggedIsSmi actually has a tagged representation.

This CL also introduces a few bitcast operators in the Smi* macros in the CodeStubAssembler.

R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2407303002
Cr-Commit-Position: refs/heads/master@{#40209}
2016-10-12 10:01:01 +00:00
machenbach
a18ff08b83 [build] Disable incremental linking for cctest and unittests
BUG=v8:5412

Review-Url: https://codereview.chromium.org/2409133002
Cr-Commit-Position: refs/heads/master@{#40208}
2016-10-12 10:00:04 +00:00
georgia.kouveli
bba8024db7 [turbofan] Remove minus zero check for rhs of CheckedInt32Sub.
The only way to get a minus zero result from subtraction is
(-0) - (+0) = -0, hence checking for minus zero on the RHS is
redundant. This is causing some unnecessary deoptimisations
in Box2D from Octane on 32-bit platforms.

BUG=

Review-Url: https://codereview.chromium.org/2410883003
Cr-Commit-Position: refs/heads/master@{#40207}
2016-10-12 09:53:29 +00:00
bmeurer
c15c58274f [stubs] Refactor the CallICStub to pass the number of arguments.
This is the next step to unify the Call/Construct feedback collection
and prepare it to be able to collect SharedFunctionInfo feedback. This
also reduces the CallICStub overhead quite a bit since we only need one
stub per mode (and tail call mode), not also one per call arity.

R=mvstanton@chromium.org
BUG=v8:2206
NOTRY=true

Review-Url: https://codereview.chromium.org/2412453005
Cr-Commit-Position: refs/heads/master@{#40206}
2016-10-12 09:26:14 +00:00
clemensh
5d9fa102a7 [wasm] Provide better stack traces for asm.js code
For the asm.js to WASM pipeline, the current stack traces only show
low-level WASM information.
This CL maps this back to asm.js source positions.
It does so by attaching the asm.js source Script to the compiled WASM
module, and emitting a delta-encoded table which maps from WASM byte
offsets to positions within that Script. As asm.js code does not throw
exceptions, we only store a mapping for call instructions.

The new AsmJsWasmStackFrame implementation inherits from
WasmStackFrame, but contains the logic to provide the source script and
the position inside of it.
What is still missing is the JSFunction object returned by
CallSite.getFunction(). We currently return null.

R=jgruber@chromium.org, titzer@chromium.org
BUG=v8:4203

Review-Url: https://codereview.chromium.org/2404253002
Cr-Commit-Position: refs/heads/master@{#40205}
2016-10-12 09:17:28 +00:00
clemensh
e7a0089149 [wasm] Fix decoder for null data
If passing <nullptr, 0> to the decoder and trying to decode something,
it correctly detects the error and sets an error message, but still
returns true on ok(), and returns a valid result.
I triggered this error by passing a null Vector, returned by FindSection(), to
the decoder.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2410913002
Cr-Commit-Position: refs/heads/master@{#40204}
2016-10-12 09:11:52 +00:00
machenbach
3d41efced8 Revert of [CQ] Remove experimental bot temporarily. (patchset #1 id:1 of https://codereview.chromium.org/2411283002/ )
Reason for revert:
Root cause fixed.

Original issue's description:
> [CQ] Remove experimental bot temporarily.
>
> BUG=chromium:655033,v8:5502
> NOTRY=true
> NOPRESUBMIT=true
> TBR=tandrii@chromium.org
>
> Committed: https://crrev.com/f994fcb10ed9ebc09a3544221db8d2fc121c6e98
> Cr-Commit-Position: refs/heads/master@{#40193}

TBR=tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:655033,v8:5502

Review-Url: https://codereview.chromium.org/2412073002
Cr-Commit-Position: refs/heads/master@{#40203}
2016-10-12 09:08:13 +00:00
ishell
9a0109d72e [crankshaft] Range analysis should not rely on overflowed ranges.
BUG=chromium:645438

Review-Url: https://codereview.chromium.org/2412853002
Cr-Commit-Position: refs/heads/master@{#40202}
2016-10-12 09:06:32 +00:00
bmeurer
edfe391ef5 [turbofan] Fix effect chain for polymorphic array access.
We accidently dropped the effect on the floor that we have for the
polymorphic map check in case of array elements access.

BUG=chromium:655004
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2411273002
Cr-Commit-Position: refs/heads/master@{#40201}
2016-10-12 08:31:55 +00:00
machenbach
36ebaf21c6 Revert of [inspector] fix timestamp formatting with non C locales (patchset #7 id:120001 of https://codereview.chromium.org/2410933002/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10548

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

Original issue's description:
> [inspector] fix timestamp formatting with non C locales
>
> If current locale has "," as decimal separator then message for consoleAPICalled will be corrupted.
>
> BUG=chromium:653424
> R=dgozman@chromium.org
>
> Committed: https://crrev.com/dde5ef75cbac1eb7e2dae59b246e4a0d0ba6a0f4
> Cr-Commit-Position: refs/heads/master@{#40190}

TBR=dgozman@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:653424

Review-Url: https://codereview.chromium.org/2419453002
Cr-Commit-Position: refs/heads/master@{#40200}
2016-10-12 08:18:36 +00:00
zhengxing.li
5c9d0ac9c1 X87: [fullcodegen] Don't count CallIC calls as patching ICs.
port 001926cdec (r40163)

  original commit message:
  In fullcodegen we used to count CallICs as patching ICs, and thus the
  heuristics are currently off by the number of calls in a code object.

BUG=

Review-Url: https://codereview.chromium.org/2406373004
Cr-Commit-Position: refs/heads/master@{#40199}
2016-10-12 07:39:31 +00:00
jgruber
32b2d7c814 [i18n] Avoid name conflicts caused by minifier
Our minifier (tools/jsmin.py) shortens variable names it comes across.
It generally tries to avoid name conflicts caused by renamed variables,
but cannot handle lambda function syntax.

This is what happens here. Both lambda function parameters 'x' and 'y'
are not recognized as identifiers by the minifier and it thus potentially
causes naming conflicts.

BUG=v8:5505

Review-Url: https://codereview.chromium.org/2412533002
Cr-Commit-Position: refs/heads/master@{#40198}
2016-10-12 07:37:04 +00:00
zhengxing.li
a8e4faf4ee X87: [stubs] Simplify the ArrayConstructorStub.
port 9192db2037 (r40162)

  original commit message:
  Remove the special side channel from the CallICStub to the
  ArrayConstructorStub and make the CallICStub always use the
  general entry point.

BUG=

Review-Url: https://codereview.chromium.org/2410083004
Cr-Commit-Position: refs/heads/master@{#40197}
2016-10-12 07:36:12 +00:00
v8-autoroll
237110665b Update V8 DEPS.
Rolling v8/build: 83eadac..dd41141

Rolling v8/third_party/catapult: f1eba76..daccdeb

Rolling v8/tools/clang: 36879c7..3d97083

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

Review-Url: https://codereview.chromium.org/2414603002
Cr-Commit-Position: refs/heads/master@{#40196}
2016-10-12 07:35:01 +00:00
adamk
1eaf2927ba Change TF regression test to not trigger tons of allocation
Instead of allocating an ArrayBuffer in the test, use a different example
from the original bug.

R=bmeurer@chromium.org
BUG=chromium:644631, v8:5504

Review-Url: https://codereview.chromium.org/2408403002
Cr-Commit-Position: refs/heads/master@{#40195}
2016-10-12 07:33:29 +00:00
machenbach
3195f19e87 [inspector] Add swarming support to inspector tests
BUG=chromium:635948

Review-Url: https://codereview.chromium.org/2393863002
Cr-Commit-Position: refs/heads/master@{#40194}
2016-10-12 07:32:06 +00:00
machenbach
f994fcb10e [CQ] Remove experimental bot temporarily.
BUG=chromium:655033,v8:5502
NOTRY=true
NOPRESUBMIT=true
TBR=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2411283002
Cr-Commit-Position: refs/heads/master@{#40193}
2016-10-12 07:09:52 +00:00
bmeurer
a4f37da86f [turbofan] Respect ConsString invariant.
For ConsString, the left hand side must be either sequential or external
if the right hand side is empty.

R=jarin@chromium.org
BUG=chromium:654723
NOTRY=true

Review-Url: https://codereview.chromium.org/2410893003
Cr-Commit-Position: refs/heads/master@{#40192}
2016-10-12 07:00:52 +00:00
machenbach
af19028864 [build] Use static libraries on x87 bot.
The bot currently doesn't work with shared libraries. This
temporarily works around the problem to get the bot green.

BUG=v8:5412
NOTRY=true
TBR=jochen, zhengxing.li, jgruber

Review-Url: https://codereview.chromium.org/2405243002
Cr-Commit-Position: refs/heads/master@{#40191}
2016-10-12 06:49:51 +00:00
kozyatinskiy
dde5ef75cb [inspector] fix timestamp formatting with non C locales
If current locale has "," as decimal separator then message for consoleAPICalled will be corrupted.

BUG=chromium:653424
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2410933002
Cr-Commit-Position: refs/heads/master@{#40190}
2016-10-11 23:22:07 +00:00
adamk
d4c4618174 Remove --harmony-for-in flag which is always false
The ES spec has been updated to include this legacy syntax in Annex B:
https://tc39.github.io/ecma262/#sec-initializers-in-forin-statement-heads

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

Review-Url: https://codereview.chromium.org/2407863003
Cr-Commit-Position: refs/heads/master@{#40189}
2016-10-11 23:20:58 +00:00
adamk
b6954db942 Remove unused field from TemplateInfo
R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2410333002
Cr-Commit-Position: refs/heads/master@{#40188}
2016-10-11 20:18:35 +00:00
adamk
6de9439f81 Use arraysize() instead of hardcoded kSize constants in api-natives.cc
R=gsathya@chromium.org

Review-Url: https://codereview.chromium.org/2407313003
Cr-Commit-Position: refs/heads/master@{#40187}
2016-10-11 20:17:38 +00:00
adamk
9d2051fc28 [modules] Store Module metadata in per-Context EmbedderData
This is a re-land of https://codereview.chromium.org/2393303002/ with
an additional call to DisposeModuleEmbedderData() added to fix lsan failures.

Unifies the approaches used for storing the specifier -> module mapping
and the module -> directory mapping, using std::unordered_maps for both
and storing them per-Context.

This requires adding a method to the v8::Module API to get a hash code
for a Module, but allows slimming down the API in return: gone are
SetEmbedderData/GetEmbedderData, along with the fourth argument
to ResolveModuleCallback.

Besides a simpler API, this allows d8 to get closer to the HTML loader,
which requires each Realm to have a persistent module map (though this
capability is not yet exercised by any tests).

BUG=v8:1569
TBR=neis@chromium.org,jochen@chromium.org

Review-Url: https://codereview.chromium.org/2405313002
Cr-Commit-Position: refs/heads/master@{#40186}
2016-10-11 19:22:25 +00:00
neis
f95abf2b3c [modules] Create own section in runtime.h.
Forgot to do that in 4ff5c2a72f.

TBR=adamk@chromium.org
BUG=v8:1569
NOTRY=true

Review-Url: https://codereview.chromium.org/2411013002
Cr-Commit-Position: refs/heads/master@{#40185}
2016-10-11 18:52:58 +00:00
neis
4ff5c2a72f [modules] Move runtime functions into new file (runtime-module.cc).
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2404243002
Cr-Commit-Position: refs/heads/master@{#40184}
2016-10-11 17:32:38 +00:00
bjaideep
82b10341c8 PPC/s390: [stubs] Simplify the ArrayConstructorStub.
Port 9192db2037

Original commit message:

    Remove the special side channel from the CallICStub to the
    ArrayConstructorStub and make the CallICStub always use the
    general entry point.

R=bmeurer@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/2410183002
Cr-Commit-Position: refs/heads/master@{#40183}
2016-10-11 16:49:33 +00:00
bjaideep
73683ef8f7 PPC/s390: [fullcodegen] Don't count CallIC calls as patching ICs.
Port 001926cdec

Original commit message:

    In fullcodegen we used to count CallICs as patching ICs, and thus the
    heuristics are currently off by the number of calls in a code object.

R=bmeurer@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/2410203002
Cr-Commit-Position: refs/heads/master@{#40182}
2016-10-11 16:46:59 +00:00
neis
a78afeb6cd [modules] Add internal printer method for JSModuleNamespace.
R=adamk@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2410003002
Cr-Commit-Position: refs/heads/master@{#40181}
2016-10-11 16:29:12 +00:00
neis
8d18f42fae [modules] Simplify installation of @@toStringTag on namespace objects.
Install it as DataConstantDescriptor, not AccessorConstantDescriptor.

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

Review-Url: https://codereview.chromium.org/2410823002
Cr-Commit-Position: refs/heads/master@{#40180}
2016-10-11 16:26:32 +00:00