Commit Graph

29612 Commits

Author SHA1 Message Date
adamk
d0cb7cf556 Stage --harmony-regexp-exec
R=littledan@chromium.org
BUG=v8:4602
LOG=y

Review URL: https://codereview.chromium.org/1838393002

Cr-Commit-Position: refs/heads/master@{#35120}
2016-03-29 21:50:25 +00:00
joransiu
5ac8e667bf S390: Fix SQEBR sim to treat operands as float32
Fix bug in simulator which incorrectly interpreted the operands
for SQEBR (Float32 sqrt) as 64-bit doubles.  Add missing
disassembler case for SQEBR as well.

R=jyan@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1837263003

Cr-Commit-Position: refs/heads/master@{#35119}
2016-03-29 21:10:21 +00:00
adamk
360586f2f9 Add fast paths for native RegExps in ES2015 subclass-aware code
This patch adds fast paths for @@replace and @@split that call into
the old, side-effect free (and faster) versions of those builtin
operations when possible (roughly, when the receiver is a RegExp
and the 'exec' method is untampered). Also add some micro-optimizations
that further improve performance.

Taken altogether, this takes us from a ~70% regression on the Octane
RegExp benchmark to a ~9% regression.

The test262.status lines for RegExps has been reorganized to make it
clearer the status of individual tests. More work will likely be
required to increase spec compliance before the --harmony-regexp-exec
flag is shipped; some of that work is happening on the spec side.

BUG=v8:4602
LOG=y

Review URL: https://codereview.chromium.org/1836123002

Cr-Commit-Position: refs/heads/master@{#35118}
2016-03-29 20:42:54 +00:00
kozyatinskiy
2bcbd1e8e2 [V8] Add FunctionMirror.prototype.contextDebugId method
This method returns contextDebugId for function. We can't use context_data from FunctionMirror.prototype.script because it can be incorrect when compilation cache is used and one script object was used for JSFunctions in different contexts.

BUG=chromium:595206
LOG=Y
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/1840713002

Cr-Commit-Position: refs/heads/master@{#35117}
2016-03-29 18:21:02 +00:00
jfb
229cc17fab wasm: hook abstract code
We'll require the abstract code (as well as the offset) when we do full backtraces.

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

Review URL: https://codereview.chromium.org/1838933002

Cr-Commit-Position: refs/heads/master@{#35116}
2016-03-29 18:08:03 +00:00
jfb
18b4470212 wasm: implemente WasmFrame::cast, fix inheritance
wasm_to_js and js_to_wasm both derive from wasm, which was confusing because is_wasm wasn't true for them and that made WasmFrame::cast awkward. Make them derive from StubFrame instead.

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

Review URL: https://codereview.chromium.org/1839843002

Cr-Commit-Position: refs/heads/master@{#35115}
2016-03-29 17:42:21 +00:00
jacob.bramley
4ee76dafc0 [arm] Correctly detect ARMv8 platforms with old kernels.
AArch64 kernels older than 3.18 presented a different cpuinfo format
than what V8 expects. Most of V8's logic still works, but it misreads
the "CPU architecture" field.

BUG=

Review URL: https://codereview.chromium.org/1841733002

Cr-Commit-Position: refs/heads/master@{#35114}
2016-03-29 17:36:54 +00:00
ulan
bc272e9f7c Represent speed in GCTracer functions as double instead of int.
This avoids redundant casts, loss of precision, and potential overflows.

BUG=chromium:597310
LOG=NO

Review URL: https://codereview.chromium.org/1841043002

Cr-Commit-Position: refs/heads/master@{#35113}
2016-03-29 17:34:41 +00:00
jyan
2e48dc018a S390: Fix prologue offset in GeneratePrologue
Updates the prologue_offset value in LCodeGen::GeneratePrologue after
generating ahi/aghi.
prologue_offset is used in FindCodeAgeSequence. Failing to update
prologue_offset will result in failing to correctly identify the code
aging sequence (young).

R=joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1843673002

Cr-Commit-Position: refs/heads/master@{#35112}
2016-03-29 17:25:32 +00:00
ulan
8d866e6e3f FreeList::FindNodeFor should not account for node size twice.
This fixes available_in_free_list counter.

BUG=

Review URL: https://codereview.chromium.org/1840083002

Cr-Commit-Position: refs/heads/master@{#35111}
2016-03-29 16:25:25 +00:00
joransiu
6aa4cc4b94 S390: Fix Div64 sequence + DLGR simulation
The CodeGenerator sequence for kS390_Div64 was incorrectly defaulting
to the 32-bit divide sequence.  That case has been fixed to use the
proper 64-bit divide (DSGR).

Fix bug in DLGR simulation where the register number was being used as
operands instead of the values in those registers.

R=jyan@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1844563002

Cr-Commit-Position: refs/heads/master@{#35110}
2016-03-29 15:07:11 +00:00
cbruni
0c8f54fdd3 [elements] move MoveElements to abstract superclass
BUG=

Review URL: https://codereview.chromium.org/1841713002

Cr-Commit-Position: refs/heads/master@{#35109}
2016-03-29 14:54:42 +00:00
hpayer
c1caa08f45 [heap] Remove outdated empty descriptor array marking code.
BUG=

Review URL: https://codereview.chromium.org/1839003003

Cr-Commit-Position: refs/heads/master@{#35108}
2016-03-29 14:54:41 +00:00
hpayer
3b1578db0c [heap] Added fine grained timers to MC_MARK_WEAK_CLOSURE.
BUG=

Review URL: https://codereview.chromium.org/1836013004

Cr-Commit-Position: refs/heads/master@{#35107}
2016-03-29 14:52:22 +00:00
joransiu
27df7757e5 S390: Fix CEBR sim to treat operands as floats
Fix bug in simulator which incorrectly interpreted the operands
for CEBR (Float32 compare) as 64-bit doubles.  Add missing
disassembler case for CEBR as well.

R=jyan@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1844473002

Cr-Commit-Position: refs/heads/master@{#35106}
2016-03-29 13:15:19 +00:00
machenbach
5085e6f24b [release] Fix auto-roller.
Uploading chromium CLs requires hooks to be run now,
what the auto-roller doesn't do.

TBR=hablich@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/1843593002

Cr-Commit-Position: refs/heads/master@{#35105}
2016-03-29 13:15:18 +00:00
ulan
c42b2c4493 Refactor the ring buffer in GCTracer.
Now instead of saving all event details in the ring buffer,
we save only the bytes and duration.

This reduces the GCTracer size from 20K to 3K and simplifies code.

BUG=chromium:597310
LOG=NO

Review URL: https://codereview.chromium.org/1830723004

Cr-Commit-Position: refs/heads/master@{#35104}
2016-03-29 12:52:05 +00:00
titzer
945a2b7a86 [wasm] Enable wasm loop analysis by default.
Loop analysis results in smaller graphs (fewer phis), thus faster
compilation time and better code.

R=ahaas@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1836223002

Cr-Commit-Position: refs/heads/master@{#35103}
2016-03-29 12:52:04 +00:00
yangguo
6ffbae7f8f [debugger] remove GeneratorMirror.prototype.context().
I can't express my disbelief when I saw it getting a raw context
object from the runtime. Luckily this is not used anywhere.

R=neis@chromium.org

Review URL: https://codereview.chromium.org/1844543002

Cr-Commit-Position: refs/heads/master@{#35102}
2016-03-29 12:48:27 +00:00
neis
7ed2d00bc3 [runtime] Don't call GetArrayKeys on proxies.
This fixes another bug in Array.prototype.sort (when the array is not a
JSArray and there is a proxy on the prototype chain).

R=cbruni@chromium.org
BUG=chromium:596866
LOG=n

Review URL: https://codereview.chromium.org/1842563004

Cr-Commit-Position: refs/heads/master@{#35101}
2016-03-29 12:36:04 +00:00
hpayer
efc4ab58e7 [heap] Fix scavenger --trace-gc-nvp glitches.
BUG=

Review URL: https://codereview.chromium.org/1839993002

Cr-Commit-Position: refs/heads/master@{#35100}
2016-03-29 12:04:15 +00:00
yangguo
4c1d670e98 [regexp, intl] Intl should not cause side effects to the RegExp object.
R=jochen@chromium.org
BUG=v8:4361
LOG=N

Review URL: https://codereview.chromium.org/1819313002

Cr-Commit-Position: refs/heads/master@{#35099}
2016-03-29 11:57:03 +00:00
ishell
7a33bd5da4 [es6] Add a flag to the Isolate that defines whether ES2015 tail call elimination is enabled or not.
Thus DevTools will be able to disable tail call elimination dynamically upon user's choice.

BUG=v8:4698
LOG=N

Review URL: https://codereview.chromium.org/1837513002

Cr-Commit-Position: refs/heads/master@{#35098}
2016-03-29 11:44:38 +00:00
mlippautz
e7cc6091f5 [crankshaft] Write fillers for folded old space allocations during verify-heap
If we don't write fillers, we crash during PagedSpace verification when we try
to iterate over dead memory (unused folded allocation slots).

BUG=v8:4871,chromium:580959
LOG=N

Review URL: https://codereview.chromium.org/1837163002

Cr-Commit-Position: refs/heads/master@{#35097}
2016-03-29 11:42:49 +00:00
titzer
c9f59780f7 [wasm] Fix arm64 frame alignment.
In JavaScript code and stubs, JSSP mirrors the CSP but may be unaligned.
    But in WASM code only CSP is used, like native code, and it must be
    aligned.
    Calls into WASM from JS need to carefully align the C stack
    pointer (csp) and restore the previous JSSP, while calls from WASM
    to JS need to compute a new JSSP and restore their CSP after the
    call.

R=ahaas@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1811283003

Cr-Commit-Position: refs/heads/master@{#35096}
2016-03-29 11:42:48 +00:00
hpayer
000d338967 Enable black allocation.
BUG=

Review URL: https://codereview.chromium.org/1836213002

Cr-Commit-Position: refs/heads/master@{#35095}
2016-03-29 11:40:41 +00:00
bmeurer
978ad03b92 [crankshaft] Address the deoptimization loops of Math.floor, Math.round and Math.ceil.
Fix and re-enable the flexible representation for Math.floor (which is used to
implement Math.ceil) and Math.round, which allows Math.floor and Math.round to
return double results instead of int32, and therefore allows values outside
the int32 range, especially -0 is now a valid result, which doesn't deopt.

Also port this feature to x64 and ia32 when the CPU supports the SSE4.1
extension.

This addresses all the known deoptimization loops related to Math.round
in the Kraken benchmark suite, and seems to also address most of the
deoptimization loops related to Math.floor in the Oort Online benchmark.

Drive-by-fix: Import the regression tests for the broken HMathFloorOfDiv
optimization that caused the initial revert of the feature (for arm64 only
back then).

BUG=chromium:476477,v8:2890,v8:4059
R=jarin@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1841513003

Cr-Commit-Position: refs/heads/master@{#35094}
2016-03-29 10:24:54 +00:00
hpayer
816b4737af Update eval_gc_time.sh with new external timers.
BUG=
NOTRY=true

Review URL: https://codereview.chromium.org/1842523004

Cr-Commit-Position: refs/heads/master@{#35093}
2016-03-29 10:17:49 +00:00
jarin
e11b5f7ab5 Linux perf support - fix debug info.
This fixes support for debug info in perf. Thanks to Stephane Eranian for
identifying the problem - debug info event has to be emitted before the
code load event. It also seems that perf does not yet support the shorthand
for repeated source files in the debug info entry ("\xff\0"), so I changed
it to always write the script name.

Review URL: https://codereview.chromium.org/1843563002

Cr-Commit-Position: refs/heads/master@{#35092}
2016-03-29 07:29:47 +00:00
jarin
82e95f597b Linux perf integration with the new support for JIT.
Difference from --perf-basic-prof:
- correctly attributes samples when code space gets reused (when unused code object dies and a new code objects is allocated at the same place).
- outputs compiled machine code for instruction-level profile.

Just like --perf-basic-prof, the file writer is not synchronized (even worse, there is a per-isolate file handle), so we will run into trouble with multiple isolates. However, this patch is still an improvement on --perf-basic-prof, and it should be fine to replace ll-prof.

The patch also introduces experimental support for debug info, but it does not seem to be picked by the perf tool.

Usage:

You need the perf tool from Linux kernel >4.5. Then run:

$ perf record -k mono d8 --perf-prof <your JS file>
$ perf inject -j -i perf.data -o perf.data.jitted
$ perf report -i perf.data.jitted

Some explanations:
The "-k mono" switch from "perf record" tells the perf tool to use the monotonic clock for perf sample timestamping. The "perf inject -j" command injects the collected code events into the perf data file, writing the output into perf.data.jitted. The perf report command then creates the report.

Review URL: https://codereview.chromium.org/1809203007

Cr-Commit-Position: refs/heads/master@{#35091}
2016-03-29 06:25:30 +00:00
bmeurer
43216574ef [turbofan] Introduce NumberFloor simplified operator.
The NumberFloor operator matches exactly the semantics of the Math.floor
builtin on Numbers. It uses hardware rounding instructions if available,
but provides a full fallback solution that is compatible with Math.floor.
The lowering is optimizable based on types if needed later, i.e. we
already optimize it for the case that the input is already an Integer
(in the EcmaScript sense, including NaN and -0), but we could add more
optimizations, like combining NumberFloor and NumberDivide in the
future, if necessary.

R=jarin@chromium.org
BUG=v8:2890,v8:4059
LOG=n

Review URL: https://codereview.chromium.org/1843533003

Cr-Commit-Position: refs/heads/master@{#35090}
2016-03-29 06:20:08 +00:00
bmeurer
7b342a2310 [date] Properly handle timezones with non-ASCII characters.
The timezone part of the Date string representation might contain
non-ASCII characters depending on the exact platform configuration,
so we cannot safely assume that the whole date string is ASCII
encoded.

CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel
R=yangguo@chromium.org
BUG=chromium:581925
LOG=n

Review URL: https://codereview.chromium.org/1838063002

Cr-Commit-Position: refs/heads/master@{#35089}
2016-03-29 05:23:40 +00:00
v8-autoroll
d22a7ed415 Update V8 DEPS.
Rolling v8/tools/clang to 51bba1037858028f42141689ed1b3b63a20f0b52

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

Review URL: https://codereview.chromium.org/1838013003

Cr-Commit-Position: refs/heads/master@{#35088}
2016-03-29 03:28:28 +00:00
jyan
b7eb0cf9f4 S390: Impl Left/Right Logical/Arith Shift Pair
Implement Left/Right Logical/Arithmetic Shift Pair operations for s390

R=joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1835973003

Cr-Commit-Position: refs/heads/master@{#35087}
2016-03-28 23:00:09 +00:00
littledan
80803aa89e Remove RegExp.prototype.source getter compat workaround
The getter RegExp.prototype.source is specified in ES2015 to throw when
called on a non-RegExp instance, such as RegExp.prototype. We had previously
put in a compatibility workaround for all RegExp getters to make them
throw on access specifically with RegExp.prototype as the receiver; however,
we only have evidence that this is needed for properties other than source.
This patch removes the compatibility workaround for get RegExp.prototype.source
and gives it semantics precisely as per the ES2015 specification.

R=adamk
BUG=chromium:581577,v8:4827
LOG=Y

Review URL: https://codereview.chromium.org/1837843002

Cr-Commit-Position: refs/heads/master@{#35086}
2016-03-28 20:43:02 +00:00
adamk
0fdf32556c String.prototype.{match,search} should do only one RegExp brand check
Previously, they would check for Symbol.match/Symbol.search, and then
do another check for Symbol.match in the RegExp constructor. This patch
avoids the second one by skipping the RegExp constructor, as the spec does.

Review URL: https://codereview.chromium.org/1840723002

Cr-Commit-Position: refs/heads/master@{#35085}
2016-03-28 18:53:39 +00:00
jyan
d65c8cbf2d S390: Fix Register conflict in CEntryStub
when needs_return_buffer == true and result_size() > 2, the 3rd return value
is placed in r4 register. But when debug code is emited, it uses r4 register
for checking exceptions, which corrupts the 3rd return value.

R=joransiu@ca.ibm.com, mbrandy@us.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1839663002

Cr-Commit-Position: refs/heads/master@{#35084}
2016-03-28 17:37:26 +00:00
bmeurer
36ead519c8 [builtins] Provide Math.floor as TurboFan builtin.
This way we avoid the second deoptimization for the Math.floor and
Math.ceil builtins when -0 is involved. We still deoptimize the inlined
Crankshaft version in various cases, that's a separate issue.

The algorithm used for implement CodeStubAssembler::Float64Floor is
vaguely based on the fast math version used in the libm of various BSDs,
but had to be reengineered to match the EcmaScript specification.

R=epertoso@chromium.org
BUG=v8:2890, v8:4059
LOG=n

Review URL: https://codereview.chromium.org/1828253002

Cr-Commit-Position: refs/heads/master@{#35083}
2016-03-28 17:31:43 +00:00
bryleun
0d24a0fcfe S390: Fixed s390 simulation check for underflow in subtraction.
Clang optimizes away CheckOverflowForIntSub at any opt
level (includes -O1, -O2, -O3) into a false statement,
resulting in incorrect values being returned. As the C++
standard considers overflows to be undefined behaviour,
this is technically correct as compilers can assume that
overflows never occur, but problematic in our case (where
overflows do occur, and a specific result is expected).

This change replaces the original check with a call to a
function that is optimized in a manner that returns correct output.

R=michael_dawson@ca.ibm.com,jyan@ca.ibm.com,mtbrandyberry@ca.ibm.com,joransiu@ca.ibm.com,danno@chromium.org,jkummerow@chromium.org,jochen@chromium.org

BUG=

Review URL: https://codereview.chromium.org/1826043002

Cr-Commit-Position: refs/heads/master@{#35082}
2016-03-28 17:13:44 +00:00
caitpotter88
f5b85cb74c [esnext] handle elements in FastObjectValuesOrEntries()
Add support for optimizing objects with elements, which do not invoke JS and
cannot change the shape of the Object.

BUG=v8:4663
LOG=N

Review URL: https://codereview.chromium.org/1767113004

Cr-Commit-Position: refs/heads/master@{#35081}
2016-03-28 15:54:23 +00:00
v8-autoroll
0af32aaf4c Update V8 DEPS.
Rolling v8/build/gyp to 28340b46df65f2c84f7793470189a0b395e1c9a4

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

Review URL: https://codereview.chromium.org/1839563002

Cr-Commit-Position: refs/heads/master@{#35080}
2016-03-27 03:21:38 +00:00
machenbach
62b9f3ce46 [Ignition] Skip failing tests on windows.
BUG=v8:4680
LOG=n
NOTRY=true
TBR=rmcilroy@chromium.org

Review URL: https://codereview.chromium.org/1836763002

Cr-Commit-Position: refs/heads/master@{#35079}
2016-03-26 12:47:52 +00:00
machenbach
da0e49db30 [test] Skip slow tests for deopt fuzzer.
TBR=ishell@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/1834083002

Cr-Commit-Position: refs/heads/master@{#35078}
2016-03-26 12:45:44 +00:00
v8-autoroll
a4b5b77a4a Update V8 DEPS.
Rolling v8/tools/clang to 43ef5b7210286664ce0ed7581c90e7797d80ea28

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

Review URL: https://codereview.chromium.org/1831303005

Cr-Commit-Position: refs/heads/master@{#35077}
2016-03-26 03:35:55 +00:00
adamk
06403470e3 Remove --harmony-regexps flag
It's been on since M49. Also moved tests from harmony -> es6,
one of which was merged with another test of the same name.

While moving stuff over to regexp.js, I also noticed that there
were unused calls to %FunctionSetName and %SetNativeFlag (those
calls are already handled by InstallGetter()).

Review URL: https://codereview.chromium.org/1838563003

Cr-Commit-Position: refs/heads/master@{#35076}
2016-03-25 23:02:11 +00:00
adamk
fafa763589 Replace IS_OBJECT with IS_RECEIVER in regexp.js
"IS_RECEIVER" used to be called "IS_SPEC_OBJECT", which might be a better
name: it's what the spec means when it says "Type(O) is Object".

R=littledan@chromium.org
BUG=v8:4602
LOG=n

Review URL: https://codereview.chromium.org/1838593002

Cr-Commit-Position: refs/heads/master@{#35075}
2016-03-25 21:54:53 +00:00
binji
88724ec4cb [Atomics] Fix atomic access index validation
BUG=v8:4737
LOG=n
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/1676613002

Cr-Commit-Position: refs/heads/master@{#35074}
2016-03-25 21:52:52 +00:00
balazs.kilvady
d4a391bb7a MIPS: Support r6 min, max floating point instructions.
Use macro instructions for min, max ops to get the same functionality on
pre-r6 and r6 targets.

BUG=
TEST=mjsunit/math-min-max, cctest/test-macro-assembler-mips64/min_max_nan, cctest/test-macro-assembler-mips/min_max_nan, cctest/test-assembler-mips64/min_max, cctest/test-assembler-mips/min_max

Review URL: https://codereview.chromium.org/1694833002

Cr-Commit-Position: refs/heads/master@{#35073}
2016-03-25 16:51:23 +00:00
balazs.kilvady
ed2b31585e MIPS64: Fix '[es6] Faster implementation of OrdinaryHasInstance.'
Port b6419fa229

Now implemented as a builtin that delegates to the InstanceOfStub. That
stub was parameterized to fallback to either Runtime_InstanceOf or to
Runtime_OrdinaryHasInstance depending on the --harmony-instanceof flag.
Once the feature stabilizes and the flag is no longer needed, we can get
rid of this parameterization again.

BUG=v8:4447
LOG=n

Review URL: https://codereview.chromium.org/1832053002

Cr-Commit-Position: refs/heads/master@{#35072}
2016-03-25 16:26:00 +00:00
Miran.Karic
21733b6b52 MIPS: Replace JR/JALR with JIC/JIALC for r6 part 2
This is another set of changes that replace JR and JALR instructions
with JIC and JIALC for mips32r6. Macroassembler Jump and Call functions
now use JIC and JIALC if branch delay slot is not used. Code patching is
adjusted to work with new changes and few minor fixes are added.

BUG=

Review URL: https://codereview.chromium.org/1807263003

Cr-Commit-Position: refs/heads/master@{#35071}
2016-03-25 12:50:48 +00:00