Commit Graph

35101 Commits

Author SHA1 Message Date
jgruber
b182ab8302 [regexp] Simplify GetCapture
GetCapture can reuse the bool pointer argument of GenericCaptureGetter
instead of duplicating that logic with additional checks.

The check also incorrectly checks for undefined while
GenericCaptureGetter returns the empty string on failure.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2422563002
Cr-Commit-Position: refs/heads/master@{#40309}
2016-10-14 11:48:10 +00:00
jgruber
f60a7c4f61 [regexp] Turn last match info into a simple FixedArray
Now that all accesses to the last match info are in C++ and TF code, we can
finally turn the last match info into a FixedArray. Similar to the ArrayList,
it uses its first field to store its length and grows dynamically in amortized
O(1) time.

Unlike previously, this means that the last match info pointer stored on the
context can actually change (in case the FixedArray needs to grow).

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2415103002
Cr-Commit-Position: refs/heads/master@{#40308}
2016-10-14 11:47:09 +00:00
danno
23836e9c14 Improve CodeStubAssembler assert functionality
Introduce CSA_ASSERT macro that outputs a message, file name and line number to
console before calling DebugBreak.

Review-Url: https://codereview.chromium.org/2419433008
Cr-Commit-Position: refs/heads/master@{#40307}
2016-10-14 11:28:46 +00:00
bmeurer
71cb88281c [builtins] Also port the Object.prototype.__proto__ accessors to C++.
These accessors also always call into C++ anyways, so there's no point
in having the JavaScript wrappers.

R=yangguo@chromium.org
BUG=v8:5049, chromium:655963

Committed: https://crrev.com/ede69cfabd790fe9f171b5d1f426ea0fc55e3c98
Review-Url: https://codereview.chromium.org/2417183002
Cr-Original-Commit-Position: refs/heads/master@{#40298}
Cr-Commit-Position: refs/heads/master@{#40306}
2016-10-14 11:25:02 +00:00
ulan
ddf83fb84a [heap] Reland "Cancel tasks before tearing down the heap."
BUG=chromium:654343

Review-Url: https://codereview.chromium.org/2419783004
Cr-Commit-Position: refs/heads/master@{#40305}
2016-10-14 10:07:35 +00:00
machenbach
7d2c514d84 [tools] Fix merging sancov files from multiple test attempts
This differentiates sancov files from several runs of the
same test. This situation happens when a test fails and is
rerun for flake checking.

BUG=v8:5502

Review-Url: https://codereview.chromium.org/2414093003
Cr-Commit-Position: refs/heads/master@{#40304}
2016-10-14 10:00:26 +00:00
machenbach
0b74984156 Revert of [builtins] Also port the Object.prototype.__proto__ accessors to C++. (patchset #1 id:1 of https://codereview.chromium.org/2417183002/ )
Reason for revert:
[Sheriff] Speculative revert for webkit tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10656

Was broken before, but this one test failure started with this CL:
inspector/console/console-dir.htm

All other errors stopped after another revert.

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

Original issue's description:
> [builtins] Also port the Object.prototype.__proto__ accessors to C++.
>
> These accessors also always call into C++ anyways, so there's no point
> in having the JavaScript wrappers.
>
> R=yangguo@chromium.org
> BUG=v8:5049
>
> Committed: https://crrev.com/ede69cfabd790fe9f171b5d1f426ea0fc55e3c98
> Cr-Commit-Position: refs/heads/master@{#40298}

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

Review-Url: https://codereview.chromium.org/2415173003
Cr-Commit-Position: refs/heads/master@{#40303}
2016-10-14 09:50:51 +00:00
jgruber
6f7cbc23c0 Remove RETURN_RESULT macro
'RETURN_RESULT(isolate, call, type)' is equivalent to 'return call' in
all current use cases.

BUG=

Review-Url: https://codereview.chromium.org/2415993003
Cr-Commit-Position: refs/heads/master@{#40302}
2016-10-14 09:18:54 +00:00
neis
b61baa9e32 [builtins] Remove template argument from args.target().
It's always JSFunction.

R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2422573002
Cr-Commit-Position: refs/heads/master@{#40301}
2016-10-14 09:01:42 +00:00
jochen
c592e45400 Fix generate-bytecode-expectations to work in component builds
R=machenbach@chromium.org,jgruber@chromium.org,mythria@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg,v8_mac_dbg;master.tryserver.chromium.android:android_arm64_dbg_recipe

Review-Url: https://codereview.chromium.org/2410353005
Cr-Commit-Position: refs/heads/master@{#40300}
2016-10-14 08:56:07 +00:00
machenbach
64378066b7 Revert of [inspector] Record EvaluateScript trace event upon console evaluation (patchset #2 id:20001 of https://codereview.chromium.org/2413943002/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10647

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

Original issue's description:
> [inspector] Record EvaluateScript trace event upon console evaluation
>
> It will allow timeline to show JS profile on code evaluated from console.
>
> BUG=chromium:655430
>
> Committed: https://crrev.com/6882c91ecd222f3ee2feb42ad73fbc796d5c8172
> Cr-Commit-Position: refs/heads/master@{#40289}

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

Review-Url: https://codereview.chromium.org/2416213002
Cr-Commit-Position: refs/heads/master@{#40299}
2016-10-14 08:51:50 +00:00
bmeurer
ede69cfabd [builtins] Also port the Object.prototype.__proto__ accessors to C++.
These accessors also always call into C++ anyways, so there's no point
in having the JavaScript wrappers.

R=yangguo@chromium.org
BUG=v8:5049

Review-Url: https://codereview.chromium.org/2417183002
Cr-Commit-Position: refs/heads/master@{#40298}
2016-10-14 08:36:52 +00:00
jochen
aee0a2573b parser fuzzer and parser shell should also work in component builds
R=machenbach@chromium.org,jgruber@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg,v8_mac_dbg;master.tryserver.chromium.android:android_arm64_dbg_recipe

Review-Url: https://codereview.chromium.org/2417703003
Cr-Commit-Position: refs/heads/master@{#40297}
2016-10-14 08:35:52 +00:00
verwaest
1ac958d4b2 Make sure we always temp-zone parse if we preparse toplevel
BUG=

Review-Url: https://codereview.chromium.org/2421493002
Cr-Commit-Position: refs/heads/master@{#40296}
2016-10-14 08:21:14 +00:00
jochen
ad99b196cb Introduce a CompilerDispatcherTracer and track how long jobs take
R=ulan@chromium.org,cbruni@chromium.org,rmcilroy@chromium.org
BUG=v8:5215

Review-Url: https://codereview.chromium.org/2413243002
Cr-Commit-Position: refs/heads/master@{#40295}
2016-10-14 08:12:44 +00:00
epertoso
4897c357e7 [stubs] Gets rid of the Smi(Add/Sub)WithOverflow macros.
This is done to introduce the correct bitcasts operator on the right nodes.

R=bmeurer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2415133002
Cr-Commit-Position: refs/heads/master@{#40294}
2016-10-14 08:11:37 +00:00
bmeurer
4a88d8fb1d [builtins] Migrate Object.setPrototypeOf to C++.
This calls into C++ anyways, so no need to add the JavaScript wrapper
around it.

R=yangguo@chromium.org
BUG=v8:5049

Review-Url: https://codereview.chromium.org/2421803002
Cr-Commit-Position: refs/heads/master@{#40293}
2016-10-14 08:10:18 +00:00
machenbach
cdc3459a85 Revert of [heap] Move slot filtering logic into sweeper. (patchset #4 id:60001 of https://codereview.chromium.org/2418773002/ )
Reason for revert:
[Sheriff] Speculative revert for heap corruption on all platforms, e.g.:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20debug/builds/12377
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20debug/builds/12379
https://build.chromium.org/p/client.v8/builders/V8%20Win32/builds/4819
https://build.chromium.org/p/client.v8/builders/V8%20Win32%20-%20nosnap%20-%20shared/builds/16783
https://build.chromium.org/p/client.v8/builders/V8%20Mac64%20-%20debug/builds/10007

Original issue's description:
> [heap] Move slot filtering logic into sweeper.
>
> BUG=chromium:648568
>
> Committed: https://crrev.com/18db69c38c93450c1ae957999fc48c465f111f00
> Cr-Commit-Position: refs/heads/master@{#40267}

TBR=ulan@chromium.org,mlippautz@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/2418053002
Cr-Commit-Position: refs/heads/master@{#40292}
2016-10-14 06:59:38 +00:00
v8-autoroll
73a40d4676 Update V8 DEPS.
Rolling v8/base/trace_event/common: 98499f3..06294c8

Rolling v8/build: f9e6643..ee1c1b5

Rolling v8/third_party/catapult: 5b5774b..c73d4a1

Rolling v8/tools/clang: 6551b7f..6ba3d23

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

Review-Url: https://codereview.chromium.org/2418033002
Cr-Commit-Position: refs/heads/master@{#40291}
2016-10-14 03:38:51 +00:00
kozyatinskiy
2082afcf3c [inspector] added check that context always survives inspected context
Inspected context is created in V8InspectorImpl::contextCreated method and destroyed in V8InspectorImpl::contextDestroyed.
Both methods takes valid v8::Local<v8::Context> handle to the same context, it means that context is created before InspectedContext constructor and is always destroyed after InspectedContext destructor therefore context weak callback in inspected context should be never called.
It's possible only if inspector client doesn't call contextDestroyed which is considered an error.

Therefore CHECK(false) is added into context weak callback to be sure that v8::Context always survives inspected context.

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

Review-Url: https://codereview.chromium.org/2413583002
Cr-Commit-Position: refs/heads/master@{#40290}
2016-10-14 02:00:00 +00:00
alph
6882c91ecd [inspector] Record EvaluateScript trace event upon console evaluation
It will allow timeline to show JS profile on code evaluated from console.

BUG=chromium:655430

Review-Url: https://codereview.chromium.org/2413943002
Cr-Commit-Position: refs/heads/master@{#40289}
2016-10-13 21:57:48 +00:00
kozyatinskiy
7ba222ffcb [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
Review-Url: https://codereview.chromium.org/2410933002
Cr-Original-Commit-Position: refs/heads/master@{#40190}
Cr-Commit-Position: refs/heads/master@{#40288}
2016-10-13 20:32:07 +00:00
ahaas
52cf416aa8 [wasm] Let BranchTableIterator::has_next return false if decoder->failed()
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2411793006
Cr-Commit-Position: refs/heads/master@{#40287}
2016-10-13 18:32:15 +00:00
jarin
96a448aba3 [turbofan] Native-context-spec: Use the CheckMaps for polymorphic fall-through.
Review-Url: https://codereview.chromium.org/2412393003
Cr-Commit-Position: refs/heads/master@{#40286}
2016-10-13 18:13:31 +00:00
bmeurer
a601eccbde Revert of [turbofan] Enable super constructor inlining. (patchset #1 id:1 of https://codereview.chromium.org/2409423006/ )
Reason for revert:
As adamk@ pointed out, this is not correct. Some more changes required instead

Original issue's description:
> [turbofan] Enable super constructor inlining.
>
> When we inlined a [[Construct]] call to a subclass constructor, we can
> also inline the super constructor call (either explicit or implicit),
> since we have a concrete JSFunction constant for the subclass and we
> can thus constant-fold the %_GetSuperConstructor intrinsic. We don't
> need any guards here since the prototype of subclass constructors is
> non-writable, non-configurable in ES6.
>
> BUG=v8:5517
> R=jarin@chromium.org
>
> Committed: https://crrev.com/74158b00b3f6a1fc8676dd1f7af4d96131eb5ebe
> Cr-Commit-Position: refs/heads/master@{#40261}

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

Review-Url: https://codereview.chromium.org/2413883003
Cr-Commit-Position: refs/heads/master@{#40285}
2016-10-13 18:04:56 +00:00
mlippautz
0ee8eea2f4 [heap] Consider both marking deques when triggering a GC in finalization
R=ulan@chromium.org
BUG=chromium:468240

Review-Url: https://codereview.chromium.org/2418803003
Cr-Commit-Position: refs/heads/master@{#40284}
2016-10-13 17:49:09 +00:00
titzer
88a8cc7f22 [test] Disable regress-599717 on TSAN.
R=machenbach@chromium.org
BUG=v8:5513

Review-Url: https://codereview.chromium.org/2416433005
Cr-Commit-Position: refs/heads/master@{#40283}
2016-10-13 17:32:29 +00:00
titzer
283b31f57c [wasm] Reduce usage of old Wasm.* API in JS tests.
BUG=

Review-Url: https://codereview.chromium.org/2417773004
Cr-Commit-Position: refs/heads/master@{#40282}
2016-10-13 16:55:57 +00:00
ishell
73460009a6 [ic] Support data handlers that represent loads from prototypes.
This CL also adds separate runtime call stats buckets for data handlers.

BUG=

Review-Url: https://codereview.chromium.org/2419513002
Cr-Commit-Position: refs/heads/master@{#40281}
2016-10-13 16:19:24 +00:00
rossberg
fb5b2f5241 [wasm] Implement {Compile,Runtime}Error; fix traps from start function
R=ahaas@chromium.org, titzer@chromium.org
BUG=v8:5507

Review-Url: https://codereview.chromium.org/2421453002
Cr-Commit-Position: refs/heads/master@{#40280}
2016-10-13 16:18:10 +00:00
ulan
f0c3a2523d Revert of [heap] Cancel tasks before tearing down the heap. (patchset #2 id:20001 of https://codereview.chromium.org/2413203004/ )
Reason for revert:
Timeout on gc stress bot.

Original issue's description:
> [heap] Cancel tasks before tearing down the heap.
>
> BUG=chromium:654343
>
> Committed: https://crrev.com/9365463d6f1fc11b2369fff63ca0ac825c61eae4
> Cr-Commit-Position: refs/heads/master@{#40272}

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

Review-Url: https://codereview.chromium.org/2414073002
Cr-Commit-Position: refs/heads/master@{#40279}
2016-10-13 16:16:46 +00:00
Miran.Karic
86fcace5b4 [test] Increase buffer for reading memory usage.
When the test is executed in user mode qemu for mips64, it fails because
the buffer is too small. Increasing the buffer fixes the problem.

BUG=
TEST=cctest/test-mark-compact/RegressJoinThreadsOnIsolateDeinit

Review-Url: https://codereview.chromium.org/2416573002
Cr-Commit-Position: refs/heads/master@{#40278}
2016-10-13 15:17:57 +00:00
jgruber
a10b4712c6 [regexp] Port remaining JS functions in regexp.js
This ports RegExpInitialize, IsRegExp, InternalMatch and InternalReplace to C++
/ TurboFan. InternalMatch is in TurboFan because it calls RegExpExecStub and
needs to construct a RegExpResult (which are, respectively, a PlatformStub and
a CodeStubAssembler function).

Except for LastMatchInfo (and GetSubstitution, which could be moved to string.js
anytime), regexp.js is now completely empty.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2409513003
Cr-Commit-Position: refs/heads/master@{#40277}
2016-10-13 15:03:22 +00:00
ziyang
34e0596a39 S390: Change printf format specifier for size_t in GcTracer
GCC on S390 31-bit treats size_t as 'long unsigned int', which
is incompatible with %d format specifier that expects an 'int'.
Using the appropriate macro (PRIuS) instead.

R=mlippautz@chromium.org, ulan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2412563003
Cr-Commit-Position: refs/heads/master@{#40276}
2016-10-13 14:56:11 +00:00
verwaest
3f8a85cefd Remove explicitly setting of allow_lazy_parsing in background-parsing-task.cc
This is automatically taken into account in the Parser constructor already

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2409103005
Cr-Commit-Position: refs/heads/master@{#40275}
2016-10-13 14:50:54 +00:00
mythria
6fa76d461b [Interpreter] Print information about interpreted functions when tracing ics.
With --trace-ic flag, the function names and the source positions are
not shown for interpreted functions. Interpreted functions have an extra
frame built by bytecode handlers which has to be skipped to get the
interpreted function's frame. Also the code offsets are computed differently
for interpreted functions.

BUG=v8:4280

Review-Url: https://codereview.chromium.org/2405173007
Cr-Commit-Position: refs/heads/master@{#40274}
2016-10-13 14:48:01 +00:00
rossberg
d95b754319 Implement Table#length and Table#get
R=ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2411963003
Cr-Commit-Position: refs/heads/master@{#40273}
2016-10-13 14:43:46 +00:00
ulan
9365463d6f [heap] Cancel tasks before tearing down the heap.
BUG=chromium:654343

Review-Url: https://codereview.chromium.org/2413203004
Cr-Commit-Position: refs/heads/master@{#40272}
2016-10-13 14:35:18 +00:00
ahaas
fa1f9c37d1 [wasm] Do not generate a loop stack check upon a decoder error.
A decoder error sets builder_ to null, which causes builder_->StackCheck
to segfault.

R=titzer@chromium.org

TEST=mjsunit/regress/wasm/loop-stack-check

Review-Url: https://codereview.chromium.org/2416873002
Cr-Commit-Position: refs/heads/master@{#40271}
2016-10-13 14:33:11 +00:00
mvstanton
0bf492215c OBJECT_PRINT needs to have ICState2String() defined.
R=ishell@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2410353004
Cr-Commit-Position: refs/heads/master@{#40270}
2016-10-13 14:06:33 +00:00
verwaest
9284459748 Explicitly check for lazy parser when dealing with parser cache
BUG=v8:5501

Review-Url: https://codereview.chromium.org/2417643004
Cr-Commit-Position: refs/heads/master@{#40269}
2016-10-13 14:02:08 +00:00
clemensh
e902b69d88 [wasm] Stack inspection support for asm.js frames
This CL fixes the debugger interface to provide correct (high-level)
information for asm.js frames.
It moves the computation of the source position from the FrameInspector
to the individual StackFrame implementations, such that we can easily
specualize it for certain frame types, and can potentially reuse this
in other locations.

Also, we are finalizing the setup of the wasm module earlier, before
executing the start function. This is required for correct stack traces
during the execution of the start function.

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

Review-Url: https://codereview.chromium.org/2413693003
Cr-Commit-Position: refs/heads/master@{#40268}
2016-10-13 13:55:07 +00:00
hpayer
18db69c38c [heap] Move slot filtering logic into sweeper.
BUG=chromium:648568

Review-Url: https://codereview.chromium.org/2418773002
Cr-Commit-Position: refs/heads/master@{#40267}
2016-10-13 13:43:18 +00:00
mvstanton
26307c76c3 [turbofan] Remove Float32 truncation.
R=jarin@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2407153007
Cr-Commit-Position: refs/heads/master@{#40266}
2016-10-13 13:38:27 +00:00
neis
dafe6867f3 [modules] Implement @@iterator on namespace objects.
As part of this, introduce a new JSObject for iterating over the elements of a
FixedArray.

R=adamk@chromium.org,bmeurer@chromium.org
TBR=ulan@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2407423002
Cr-Commit-Position: refs/heads/master@{#40265}
2016-10-13 13:35:06 +00:00
verwaest
6e3af1070b Directly enter the parsing mode in DoParseProgram
BUG=v8:5501

Review-Url: https://codereview.chromium.org/2413763004
Cr-Commit-Position: refs/heads/master@{#40264}
2016-10-13 13:34:09 +00:00
neis
27228d2ffd [turbofan] Remember source positions when creating graph from bytecode.
R=bmeurer@chromium.org
BUG=v8:5439

Review-Url: https://codereview.chromium.org/2407823002
Cr-Commit-Position: refs/heads/master@{#40263}
2016-10-13 13:14:13 +00:00
Ilija.Pavlovic
9cb42010aa [heap] Fix MemoryAllocator::AllocateAlignedMemory.
AllocateAlignedMemory calls ReserveAlignedMemory which increments size_
value. In some cases AllocateAlignedMemory can return NULL value. Before
returning NULL, AllocateAlignedMemory should decrease size_ value.

TEST=cctest/test-spaces/LargeObjectSpace
BUG=

Review-Url: https://codereview.chromium.org/2418733002
Cr-Commit-Position: refs/heads/master@{#40262}
2016-10-13 13:10:38 +00:00
bmeurer
74158b00b3 [turbofan] Enable super constructor inlining.
When we inlined a [[Construct]] call to a subclass constructor, we can
also inline the super constructor call (either explicit or implicit),
since we have a concrete JSFunction constant for the subclass and we
can thus constant-fold the %_GetSuperConstructor intrinsic. We don't
need any guards here since the prototype of subclass constructors is
non-writable, non-configurable in ES6.

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

Review-Url: https://codereview.chromium.org/2409423006
Cr-Commit-Position: refs/heads/master@{#40261}
2016-10-13 12:56:31 +00:00
jochen
29ddd7ff82 Fix import/export annotations for v8 targets that are always static
Instead of suppressing the linker warnings and disallowing incremental
linking, just fix the annotations..

R=machenbach@chromium.org,jgruber@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2420603002
Cr-Commit-Position: refs/heads/master@{#40260}
2016-10-13 12:44:36 +00:00