Commit Graph

34778 Commits

Author SHA1 Message Date
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
verwaest
41f51fe3ef Fix test-parsing/InnerAssignment to test what it intended
BUG=

Review-Url: https://codereview.chromium.org/2417833002
Cr-Commit-Position: refs/heads/master@{#40259}
2016-10-13 12:37:50 +00:00
marja
a726e85fe3 Move function length tracking from Scope to (Pre)?ParserFormalParameters.
It belongs there more logically. In addition, this is a pre-step needed
for preparsing the parameters of a preparsed function.

In addition, move the "subtract rest parameter from arity" logic from
Parser to (Pre)?ParserFormalParameters.

BUG=v8:5515

Review-Url: https://codereview.chromium.org/2414003002
Cr-Commit-Position: refs/heads/master@{#40258}
2016-10-13 12:34:54 +00:00
machenbach
b022c81f6f [test] Bump js-test strings timeout even more
NOTRY=true
TBR=adamk, caitp

Review-Url: https://codereview.chromium.org/2419433006
Cr-Commit-Position: refs/heads/master@{#40257}
2016-10-13 12:29:36 +00:00
verwaest
1bb9fb34d7 Turn AllowsLazyParsingWithoutUnresolvedVariables into a whitelist stopping at the outer parsed context.
Any context outer to what we're parsing already has proper context allocation, so we don't need to check those scopes.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2417643003
Cr-Commit-Position: refs/heads/master@{#40256}
2016-10-13 12:22:16 +00:00
ishell
c97535f57e [ic] Support non-code handlers in megamorphic stub cache.
BUG=

Review-Url: https://codereview.chromium.org/2412043003
Cr-Commit-Position: refs/heads/master@{#40255}
2016-10-13 12:02:27 +00:00
ahaas
77bda187a5 [wasm] Stop the BranchTableIterator if there is an error in the decoder.
In a fuzzer testcase I found locally the ast-decoder spent a lot of time
in the decoding of kExprBrTable after the decoder already found an
error. I did not add a test because the fuzzer test case did not
actually crash. It only run out of memory in the chromium fuzzer.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2413863003
Cr-Commit-Position: refs/heads/master@{#40254}
2016-10-13 11:59:06 +00:00
jgruber
33a4faa47d [regexp] Port RegExp.prototype[@@replace]
This moves the implementation of @@replace from regexp.js to builtins-regexp.cc
(the TurboFan fast path) and runtime-regexp.cc (slow path). The fast path
handles all cases in which the regexp itself is an unmodified JSRegExp
instance, the given 'replace' argument is not callable and does not contain any
'$' characters (i.e. we are doing a string replacement).

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2398423002
Cr-Commit-Position: refs/heads/master@{#40253}
2016-10-13 11:27:50 +00:00
marja
897d89eec5 Update src/regexp/OWNERS
BUG=

Review-Url: https://codereview.chromium.org/2412493008
Cr-Commit-Position: refs/heads/master@{#40252}
2016-10-13 11:11:34 +00:00
ahaas
e7dc517748 [wasm] Add stack checks to loops.
Stack checks in loops allows to interrupt loops.

BUG=cctest/test-run-wasm-module/TestInterruptLoop
R=titzer@chromium.org, bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2405293002
Cr-Commit-Position: refs/heads/master@{#40251}
2016-10-13 10:56:59 +00:00
ulan
5831264356 [heap] Use size_t in free list and evacuation candidate selection.
BUG=chromium:652721

Review-Url: https://codereview.chromium.org/2406363002
Cr-Commit-Position: refs/heads/master@{#40250}
2016-10-13 10:50:52 +00:00
jgruber
e89eef3029 [regexp] Fix fallback path in RegExpExec
This fixes the code-path in RegExpExec in which both the passed exec
argument and regexp.exec are not callable and regexp is a JSRegExp.

In this case, we fall back to the default RegExp.prototype.exec
implementation. The arguments for Execution::call were incorrect.

BUG=v8:5339

Review-Url: https://codereview.chromium.org/2415073002
Cr-Commit-Position: refs/heads/master@{#40249}
2016-10-13 10:43:32 +00:00
verwaest
2325ad7e62 Allow lazy parsing of eval-created functions
I don't see a reason why we can't benefit from preparsing such functions. We don't necessarily compile them, so fully parsing them when unnecessary is just additional overhead.

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2413213002
Cr-Commit-Position: refs/heads/master@{#40248}
2016-10-13 10:08:18 +00:00
verwaest
8ab5051333 Only guard the eager compile hint by whether the target literal was same-zone parsed
BUG=v8:5501,chromium:655122

Review-Url: https://codereview.chromium.org/2419663005
Cr-Commit-Position: refs/heads/master@{#40247}
2016-10-13 08:33:34 +00:00
ahaas
0e1f6d8bfc [wasm] Do not create TF nodes during verification
BUG=chromium:654377
TEST=mjsunit/regress/wasm/regression-654377
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2403013002
Cr-Commit-Position: refs/heads/master@{#40246}
2016-10-13 08:21:47 +00:00
mvstanton
1bf1c5303d [turbofan] Quit storing strings in types.
BUG=

Review-Url: https://codereview.chromium.org/2402313003
Cr-Commit-Position: refs/heads/master@{#40245}
2016-10-13 07:26:45 +00:00
zhengxing.li
232bbb1be2 X87: [stubs] Refactor the CallICStub to pass the number of arguments.
port c15c58274f (r40206)

  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.

BUG=

Review-Url: https://codereview.chromium.org/2409953005
Cr-Commit-Position: refs/heads/master@{#40244}
2016-10-13 07:10:49 +00:00
neis
d1d2addb19 [runtime] Avoid code duplication in %CreateIterResultObject.
R=jgruber@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2407153003
Cr-Commit-Position: refs/heads/master@{#40243}
2016-10-13 06:26:48 +00:00
v8-autoroll
df1494d69d Update V8 DEPS.
Rolling v8/build: dd41141..f9e6643

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

Rolling v8/tools/clang: 3d97083..6551b7f

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

Review-Url: https://codereview.chromium.org/2413533004
Cr-Commit-Position: refs/heads/master@{#40242}
2016-10-13 03:30:31 +00:00
gsathya
094e95cdd1 [promises] don't store undefined resulting from ResolvePromise
Review-Url: https://codereview.chromium.org/2419713002
Cr-Commit-Position: refs/heads/master@{#40241}
2016-10-12 23:53:52 +00:00
gsathya
4fda85aa19 [promises] rename PromiseContainer to PromiseResolveThenableJobInfo
This is a much more descriptive name.

BUG=v8:5343
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2412263002
Cr-Commit-Position: refs/heads/master@{#40240}
2016-10-12 22:19:09 +00:00
gsathya
6f94a8f1c7 [promises] Move PromiseReactionJob to c++
This patch results in a 11% improvement over 5 runs in the
bluebird benchmark.

BUG=v8:5343,v8:5046
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2406343002
Cr-Commit-Position: refs/heads/master@{#40239}
2016-10-12 20:45:57 +00:00
mtrofin
38ac7fe658 [wasm] API renames for wasm serialization/deserialization
This incorporates recent feedback:
- simpler deserialization API by dropping the std::unique_ptr.
The only purpose there was communicating to the caller that they
own the buffer, and that the deserializer won't delete it. The new
design communicates that through a naming choice.
- renamed *UncompiledBytes to *WasmWireBytes

BUG=

Review-Url: https://codereview.chromium.org/2411263004
Cr-Commit-Position: refs/heads/master@{#40238}
2016-10-12 20:11:29 +00:00
alph
f116876e91 DevTools: Do not allow v8 to use inspector.
Review-Url: https://codereview.chromium.org/2404663002
Cr-Commit-Position: refs/heads/master@{#40237}
2016-10-12 19:24:59 +00:00