Commit Graph

52965 Commits

Author SHA1 Message Date
Igor Sheludko
4a44cf83b0 [cleanup][csa] Introduce Times[SystemPointer|Tagged]Size instead of TimesPointerSize
Bug: v8:8477, v8:8562
Change-Id: I54b857cdacf9360b95d64147a486a0d5fa1ffe10
Reviewed-on: https://chromium-review.googlesource.com/c/1388526
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58473}
2018-12-27 03:48:55 +00:00
v8-ci-autoroll-builder
a233a35002 Update V8 DEPS.
Rolling v8/build: b71c9cc..7f37dc1

Rolling v8/tools/clang: 2cf76f5..106695b

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

Change-Id: I661f882c0add60d4e667577a99c92b3f068b6756
Reviewed-on: https://chromium-review.googlesource.com/c/1390919
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58472}
2018-12-27 03:29:52 +00:00
Igor Sheludko
19b361e301 [cleanup][csa] Fix kPointerSize usages in CSA
Bug: v8:8477, v8:8562
Change-Id: I6ef4291ebd6c2bb6acc4b525014ec02a88d45281
Reviewed-on: https://chromium-review.googlesource.com/c/1388525
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58471}
2018-12-27 03:14:42 +00:00
Jakob Kummerow
056f927861 [ubsan] Port Object to the new design
Tbr: ahaas@chromium.org,leszeks@chromium.org,verwaest@chromium.org
Bug: v8:3770
Change-Id: Ia6530fbb70dac05e9972283781c3550d8b50e1eb
Reviewed-on: https://chromium-review.googlesource.com/c/1390116
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58470}
2018-12-26 20:54:07 +00:00
Jakob Kummerow
444741ac11 Revert "[error] extend error stack w/ function parameters"
This reverts commit 97628eeeb9.

Reason for revert: breaks compilation in Lite mode, which does not allow overriding of certain flags. See https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8926078411629093216/+/steps/build/0/steps/compile/0/stdout.

Original change's description:
> [error] extend error stack w/ function parameters
> 
> Extend FrameArray to hold weak references to parameters for functions in
> the call stack. The goal here is to provide more metadata for postmortem
> tools (such as llnode), especially in cases of rethrowing (this will be
> particularly useful when using postmortem with promises on Node.js).
> 
> Besides postmortem, these changes allow us to print a more detailed
> stack trace for errors with parameters types (or even values), which can
> be useful since JavaScript functions can receive any number of
> parameters of any type, and having a function behave differently
> according to the number of parameters received as well as their types is
> a common pattern on JS libraries and frameworks.
> 
> R=​bmeurer@google.com, yangguo@google.com
> 
> Change-Id: Idf0984d0dbac16041f11d738d4b1c095a8eecd61
> Reviewed-on: https://chromium-review.googlesource.com/c/1289489
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58468}

TBR=yangguo@chromium.org,bmeurer@google.com,bmeurer@chromium.org,mat@mmarchini.me

Change-Id: Ide0a434c1521ab2bbeca6821397ff63ba7d40fe5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1390128
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58469}
2018-12-26 19:03:45 +00:00
Matheus Marchini
97628eeeb9 [error] extend error stack w/ function parameters
Extend FrameArray to hold weak references to parameters for functions in
the call stack. The goal here is to provide more metadata for postmortem
tools (such as llnode), especially in cases of rethrowing (this will be
particularly useful when using postmortem with promises on Node.js).

Besides postmortem, these changes allow us to print a more detailed
stack trace for errors with parameters types (or even values), which can
be useful since JavaScript functions can receive any number of
parameters of any type, and having a function behave differently
according to the number of parameters received as well as their types is
a common pattern on JS libraries and frameworks.

R=bmeurer@google.com, yangguo@google.com

Change-Id: Idf0984d0dbac16041f11d738d4b1c095a8eecd61
Reviewed-on: https://chromium-review.googlesource.com/c/1289489
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58468}
2018-12-26 11:54:17 +00:00
v8-ci-autoroll-builder
2b96d8aa00 Update V8 DEPS.
Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/7c1d51b..a923c2a

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

Change-Id: Ia5e0c5e98c1d3086a5d5b461fe3e9d0b86842def
Reviewed-on: https://chromium-review.googlesource.com/c/1390915
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58467}
2018-12-26 03:47:36 +00:00
Ulan Degenbaev
d7b08b6da2 [heap] Support concurrent marking of maps
The concurrent marker can now visit maps and mark the subset of
descriptors that a map requires.

Bug: v8:8486
Change-Id: I184442ec90a8f60c73cfe16d6e9d66f4efa92a01
Reviewed-on: https://chromium-review.googlesource.com/c/1384320
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58466}
2018-12-24 11:49:49 +00:00
Ulan Degenbaev
9a0fcfd848 [heap] Fix benign data race with string length.
Factory::NewRawOneByteString initializes the string length without
atomic accessor. This leads to data race if the string is pretenured
and black allocated because the concurrent marker loads the string
length before checking the string markbits.

This patch changes the order to check the markbits first.

Bug: v8:8579
Change-Id: Ic434f7dde9baa6264fe133499d2394c0d4cc5394
Reviewed-on: https://chromium-review.googlesource.com/c/1388542
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58465}
2018-12-24 11:00:36 +00:00
Ulan Degenbaev
eb537d7485 [tests] Bump up the heap limit for the pause-on-oom test
Bug: v8:8521
Change-Id: I6e02930108ba90adf6d54aca319d2d2680964860
Reviewed-on: https://chromium-review.googlesource.com/c/1388543
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58464}
2018-12-24 10:58:35 +00:00
Aleksandar Rikalo
0f1b611277 [mips] InterpreterEntryTrampoline improvement
Logic is added to InterpreterEntryTrampoline to detect flushed functions,
and enter CompileLazy instead. Get the bytecode array from the function
object and load it. The bytecode array could have been flushed from the
shared function info, if so, call into CompileLazy.

This fixes:

   cctest/test-heap/TestBytecodeFlushing
   cctest/test-heap/TestOptimizeAfterBytecodeFlushingCandidate
   debugger/debug/lazy-deopt-then-flush-bytecode

[mips] Macro-assembler fix

Fix massive failing of tests after fa3cbf6.

Change-Id: Ic1978b5233eefc743fd7b020f65153630ffa281f
Reviewed-on: https://chromium-review.googlesource.com/c/1388528
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#58463}
2018-12-24 10:00:07 +00:00
Aleksandar Rikalo
d7493fb1ab [mips] Fix broken build after 9302db4.
Change-Id: Ic156eefa7ee2de568a368c44eca0ba80ab8828b0
Reviewed-on: https://chromium-review.googlesource.com/c/1388567
Reviewed-by: Sreten Kovacevic <skovacevic@wavecomp.com>
Commit-Queue: Sreten Kovacevic <skovacevic@wavecomp.com>
Cr-Commit-Position: refs/heads/master@{#58462}
2018-12-24 09:57:27 +00:00
Jakob Gruber
f2411cf2b9 [nojit] Disable embed tests on noembed builds
These test off-heap builtin call sequences and don't make sense in
noembed builds.

Tbr: sigurds@chromium.org
Bug: v8:7777
Change-Id: I2795257e33b6ad87958d08f0845b75a7e88988f2
Reviewed-on: https://chromium-review.googlesource.com/c/1390120
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58461}
2018-12-24 09:48:55 +00:00
Jakob Gruber
83f70c7592 Revert "Seasonal greetings"
This reverts commit 28275cd412.

Reason for revert: Ho ho.. oh :{

Original change's description:
> Seasonal greetings
> 
> Ho ho ho.
> 
> Tbr: santa@chromium.org
> No-presubmit: true
> Change-Id: Ida950937a352f32ccf8127907f623e92332f4806
> Reviewed-on: https://chromium-review.googlesource.com/c/1390119
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58459}

TBR=jgruber@chromium.org

Change-Id: I2f7d0a92d0af95e814a2d6cb04ceaf445d57023a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/1390121
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58460}
2018-12-24 09:44:15 +00:00
Jakob Gruber
28275cd412 Seasonal greetings
Ho ho ho.

Tbr: santa@chromium.org
No-presubmit: true
Change-Id: Ida950937a352f32ccf8127907f623e92332f4806
Reviewed-on: https://chromium-review.googlesource.com/c/1390119
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58459}
2018-12-24 09:33:33 +00:00
Jakob Gruber
0ae25272c6 [nojit] Fix noembed bot failures
noembed bots have started failing since https://crrev.com/c/1382461.

The reason was that inline_offheap_trampolines option was set to true
even in noembed builds, and the assembler tried to inline trampolines
to non-existent embedded builtins.

Tbr: sigurds@chromium.org
Bug: v8:7777
Change-Id: I483dd8b77269b8684e57f8da6e659a9648b1657b
Reviewed-on: https://chromium-review.googlesource.com/c/1390117
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58458}
2018-12-24 08:47:41 +00:00
v8-ci-autoroll-builder
f95e77e5e6 Update V8 DEPS.
Rolling v8/build: ce4fbca..b71c9cc

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

Change-Id: I2c256e47641ea1e5cd1b4496329ecb4f5842076e
Reviewed-on: https://chromium-review.googlesource.com/c/1390200
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58457}
2018-12-24 03:35:46 +00:00
v8-ci-autoroll-builder
ad2574d84c Update V8 DEPS.
Rolling v8/build: b360239..ce4fbca

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/d7d7892..7c1d51b

Rolling v8/tools/clang: 2e63407..2cf76f5

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

Change-Id: I7e89de601758ee51241e6266f4f8b25437026337
Reviewed-on: https://chromium-review.googlesource.com/c/1390197
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58456}
2018-12-23 03:36:39 +00:00
v8-ci-autoroll-builder
0e5cd6b87c Update V8 DEPS.
Rolling v8/build: b61a4fb..b360239

Rolling v8/buildtools: 0e1cbc4..7d88270

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/2f6c18c..d7d7892

Rolling v8/third_party/depot_tools: 58649e3..db0055d

Rolling v8/tools/clang: 4685377..2e63407

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

Change-Id: I2a4c071fb173e4eb124037d8c4699f65fc79435b
Reviewed-on: https://chromium-review.googlesource.com/c/1389775
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#58455}
2018-12-22 03:47:12 +00:00
Bill Budge
fc479d516b [api] Change Wasm ModuleCompiled notification
- Removes ModuleCompiledCallback typedef and Set function.
- Adds WasmStreaming::Client abstraction and Set function.

Bug: chromium:719172
Change-Id: I8a207b628394a7660bda73cde560da1e461248a7
Reviewed-on: https://chromium-review.googlesource.com/c/1377450
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58454}
2018-12-21 23:32:29 +00:00
Adam Klein
644b26e684 [parser] Remove dead BuildIteratorClose() method
Presumably this was obsoleted when this functionality moved to
the BytecodeGenerator.

Change-Id: I691fdaa01610ea050511825b5ad1f3ba4963421c
Reviewed-on: https://chromium-review.googlesource.com/c/1387991
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58453}
2018-12-21 20:55:57 +00:00
Adam Klein
a70e537272 [d8] Remove unnecessary calls to v8::Global::Reset() in Realm teardown
Change-Id: Id4f99539b8583cef56fd33d2e939a2d6024384f9
Reviewed-on: https://chromium-review.googlesource.com/c/1387989
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58452}
2018-12-21 20:54:51 +00:00
Sathya Gunasekaran
646051f901 [class] Remove unncessary check for private field
A computed property can never be a private field. That's a SyntaxError.

Change the check to a DCHECK.

Bug: v8:5368
Change-Id: I6701b60f3193639f3ccffacda25074d32d5de5b8
Reviewed-on: https://chromium-review.googlesource.com/c/1385267
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58451}
2018-12-21 19:56:17 +00:00
Adam Klein
f88d169e51 [cleanup] Remove redundant DONT_ENUM arguments to SimpleInstallFunction
Change-Id: I8292b10afd2494199b5db11a5e3d64912cff919b
Reviewed-on: https://chromium-review.googlesource.com/c/1387988
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58450}
2018-12-21 17:26:41 +00:00
Adam Klein
c969a81be8 [cleanup] Remove unneeded grouping of context fields
NATIVE_CONTEXT_IMPORTED_FIELDS are no longer different from other
NATIVE_CONTEXT_FIELDS, so this CL joins them together.

While doing so, removed the OBJECT_VALUE_OF slot, which is not
referenced anywhere.

Change-Id: I79c46e6e6cc92c90e90e68165cf7b0ae31e8151d
Reviewed-on: https://chromium-review.googlesource.com/c/1387631
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58449}
2018-12-21 17:19:41 +00:00
Adam Klein
43fff3d7b1 [runtime] Remove %AddNamedProperty and %AddElement
%AddNamedProperty was only used by regression tests, and is easily
replaced by Object.defineProperty (or deleted, in the case of a
cctest that was designed to test it directly).

%AddElement was unused (probably due to the death of array.js).

Bug: v8:7624
Change-Id: Icc17fd7a7419aa649275414a351f176f104040e2
Reviewed-on: https://chromium-review.googlesource.com/c/1387990
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58448}
2018-12-21 16:56:12 +00:00
Adam Klein
ceaaaf14a2 [ast] Remove dead code identified by coverage reports
Change-Id: I8283ddf96dc178f12e52d9412db1858acfe46650
Reviewed-on: https://chromium-review.googlesource.com/c/1387966
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58447}
2018-12-21 16:55:08 +00:00
Maya Lekova
9bb78e3279 Revert "[parser] Create arrow function scopes while parsing the head"
This reverts commit 3411e7c3e8.

Reason for revert: Breaks test expecations - https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/260731

Original change's description:
> [parser] Create arrow function scopes while parsing the head
> 
> This simplifies NextArrowFunctionInfo, allows us to Scope::Snapshot::Reparent
> directly rather than moving it, and allows us to skip reparenting in the simple
> parameter arrow function cases.
> 
> This CL additionally fixes arrow function name inferring.
> 
> Change-Id: Ie3e5ea778f3d7b84b2a10d4f4ff73931cfc9384a
> Reviewed-on: https://chromium-review.googlesource.com/c/1386147
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58405}

TBR=ishell@chromium.org,verwaest@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I8f31b96f844f0673364bf435fa6c809e40d62fa3
Reviewed-on: https://chromium-review.googlesource.com/c/1388541
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58446}
2018-12-21 16:09:25 +00:00
Toon Verwaest
84bad8ec6f [parser] Minor simplification to for in/of scope handling
Always pass in the target scope for the body, and check whether we're in
LexicalVariableMode instead to distinguish for(let/const from for(var.

Change-Id: Idf59423466f45eebe7c9d716f8eb6ccd92235abc
Reviewed-on: https://chromium-review.googlesource.com/c/1388534
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58445}
2018-12-21 16:04:05 +00:00
Sigurd Schneider
ee0eb614e9 [turbolizer] Improve disassembly view
This CL makes both absolute address and opcode literal (byte sequence
of the instruction) display optional, which improves readability.

Additionally, jump offsets are parsed and can now once again be clicked.

TBR=neis@chromium.org

Bug: v8:7327
Notry: true
Change-Id: I709f44540b32f6d4afabdd1e5eb27e932208e7fc
Reviewed-on: https://chromium-review.googlesource.com/c/1388540
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58444}
2018-12-21 15:30:59 +00:00
Jakob Gruber
9365d0904e [coverage] Rework continuation counter handling
This changes a few bits about how continuation counters are handled.

It introduces a new mechanism that allows removal of a continuation
range after it has been created. If coverage is enabled, we run a first
post-processing pass on the AST immediately after parsing, which
removes problematic continuation ranges in two situations:

1. nested continuation counters - only the outermost stays alive.
2. trailing continuation counters within a block-like structure are
   removed if the containing structure itself has a continuation.

R=bmeurer@chromium.org, jgruber@chromium.org, yangguo@chromium.org

Bug: v8:8381, v8:8539
Change-Id: I6bcaea5060d8c481d7bae099f6db9f993cc30ee3
Reviewed-on: https://chromium-review.googlesource.com/c/1339119
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58443}
2018-12-21 15:29:48 +00:00
George Wort
491eff86b5 [liftoff][arm] GetUnusedRegister before Acquire
Ensure that GetUnusedRegister is always called before
acquiring the scratch register in case it is needed
for spilling the value of the used register.

Bug: v8:6600, chromium:910824
Change-Id: I93ae684ad504584807dfa6227b6af14609c6bcf5
Reviewed-on: https://chromium-review.googlesource.com/c/1387498
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58442}
2018-12-21 14:57:18 +00:00
Camillo Bruni
37273c5aac [parser] More PreParsedScopeData cleanup
- Use overflow-proof HasRemainingBytes
- Add DCHECK to catch index_ OOB in RemainingBytes

Change-Id: I65c47c42438c93c9b4673f09fed4b8ef4685f257
Reviewed-on: https://chromium-review.googlesource.com/c/1388535
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58441}
2018-12-21 14:48:56 +00:00
Jakob Gruber
ccc068d5fd [nojit] Skip the on-heap trampoline for builtin calls
This CL does two things:

1. It introduces Call/JumpCodeObject as the bottleneck for all calls
   to non-heap-constant Code objects; and
2. it dispatches directly to the off-heap entry point for all embedded
   code.

Codegen at runtime remains unchanged to preserve the shorter,
branch-less calling sequence.

Bug: v8:7777
Change-Id: I15fdcb51625209904c6a56737f085a23219319b9
Reviewed-on: https://chromium-review.googlesource.com/c/1382461
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58440}
2018-12-21 14:43:16 +00:00
Ulan Degenbaev
5fc0b46622 [snapshot, heap] Move clearing of marked descriptors to deserializer
Since code serializer also serializers descriptor arrays, the clearing
has to be done in deserializer.

Bug: v8:8486
Change-Id: Ic2c5848e5add80176a6f7191c56e7af9e9a6019f
Reviewed-on: https://chromium-review.googlesource.com/c/1388532
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58439}
2018-12-21 14:41:36 +00:00
Ulan Degenbaev
6c740734c4 [heap] Add a regression test for v8:8617
This also adjusts debug printing of descriptor arrays and adds a check
to the code serializer.

Bug: v8:8617
Tbr: mlippautz@chromium.org
Change-Id: Ic04f01abf9f7ed5a310b9e51a22c04fda108f563
Reviewed-on: https://chromium-review.googlesource.com/c/1387501
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58438}
2018-12-21 14:38:36 +00:00
Sigurd Schneider
2a72b8acee Reland "[deoptimizer] Refactor GenerateDeoptimizationEntries"
This is a reland of f63a657ed9

Original change's description:
> [deoptimizer] Refactor GenerateDeoptimizationEntries
>
> This reduces preprocessor-expanded source size by 64,359 from
>
> gen         (   21 files):    71,570 to    1,613,100 (   23x)
> src         (  624 files):   367,830 to   52,964,659 (  144x)
> test        (  392 files):   490,924 to   37,360,916 (   76x)
> third_party (  432 files):   239,085 to    9,547,902 (   40x)
> total       ( 1521 files): 1,184,093 to  102,461,098 (   87x)
>
> to
>
> gen         (   21 files):    71,570 to    1,613,100 (   23x)
> src         (  624 files):   367,837 to   52,919,005 (  144x)
> test        (  392 files):   490,924 to   37,342,211 (   76x)
> third_party (  432 files):   239,085 to    9,547,902 (   40x)
> total       ( 1521 files): 1,184,100 to  102,396,739 (   86x)
>
> Bug: v8:8562
> Change-Id: Iee474e22ababa1e080b8d6359af4d0076903e59a
> Reviewed-on: https://chromium-review.googlesource.com/c/1384091
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58424}

TBR=jarin@chromium.org,ulan@chromium.org

Bug: v8:8562
Change-Id: I7a8a350414941f49c6155ff43e36e0cb0b2006e5
Reviewed-on: https://chromium-review.googlesource.com/c/1387497
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58437}
2018-12-21 14:30:17 +00:00
Maya Lekova
af6ba3b28c Revert "[parser] Simplify ParseFunctionBody"
This reverts commit 2963f1b2e3.

Reason for revert: Speculative revert, possibly causing timeout in layout test https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/WebKit%20Linux%20Trusty%20MSAN/11631

Original change's description:
> [parser] Simplify ParseFunctionBody
> 
> - Merge is_simple branches at the top
> - Remove block around inner_body parsing. Always merge fully at the end.
> - Remove conditional inner block adding to outer body. Simply add it to the
>   inner body making merge push it to the parent.
> 
> Change-Id: I1f062918a7abac354b949136463517bd0440984f
> Reviewed-on: https://chromium-review.googlesource.com/c/1386111
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58390}

TBR=ishell@chromium.org,verwaest@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I0ab903df5caaadff56625e9b46b03981c8a9b930
Reviewed-on: https://chromium-review.googlesource.com/c/1388524
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58436}
2018-12-21 13:19:51 +00:00
Clemens Hammacher
893ef74101 [Liftoff] Improve merge state initialization
Before computing the merge state, compute the list of free registers.
This list is used when we need a register for ensuring single register
use. It avoids picking a register which is in use by a not-yet-visited
merge slot, which would then have to be moved to another register or to
the stack.

On epic, this saves ~10.5% generated code size in Liftoff.

R=herhut@chromium.org

Bug: v8:8423
Change-Id: If9fac24abbfe2273bf18d9cb287c7c05a59b2118
Reviewed-on: https://chromium-review.googlesource.com/c/1387488
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58435}
2018-12-21 13:18:46 +00:00
Mike Stanton
98b47ebb33 [Test] CSuite benchmark runner
It's nice to have a quick way to get stable results on the local
machine for the classic d8 benchmarks. CSuite revitalizes an
old tool called BSuite which offers multiple averaged runs,
and a nice ascii display of results.

Sample usage:

./csuite.py octane baseline ~/src/v8/out/d8
./csuite.py octane compare ~/src/v8/out-mine/d8

                              benchmark:    score |   master |      % |
===================================================+==========+========+
                                Richards:  26201.0 |  26568.0 |   -1.4 |
                               DeltaBlue:  55744.0 |  58309.0 |   -4.4 |
                                  Crypto:  31831.0 |  31815.0 |        |
                                RayTrace:  73481.0 |  73185.0 |    0.4 |
              ............<snip>............................
                                  Octane:  36388.0 |  35741.0 |    1.8 |
---------------------------------------------------+----------+--------+


See README.md for more documentation.

Change-Id: I182490506ca07fab1240bd485bd1d7a8920db893
Reviewed-on: https://chromium-review.googlesource.com/c/1387487
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58434}
2018-12-21 13:15:57 +00:00
Jakob Gruber
84450a2239 [nojit] Define V8_JITLESS_MODE in V8 Lite builds
This defines V8_JITLESS_MODE if the v8_enable_lite_mode build-time
option is enabled. Jitless mode will thus be tested by existing lite
bots.

The build-time option for jitless mode will only be needed temporarily
and is expected to be removed again in the near future.

Bug: v8:7777
Change-Id: I556ba5069dbd0810a6d7376601d8f7d498fef8c9
Reviewed-on: https://chromium-review.googlesource.com/c/1387499
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58433}
2018-12-21 12:55:09 +00:00
Toon Verwaest
448239db9c [parser] Parse declarations in the scope that they belong in ParseForStatement
That way we can drop PatternRewriter::scope_ and just use parser_->scope()
instead.

Change-Id: I66137d3ff8e7b805afc7108fd2d55537f69f11e6
Reviewed-on: https://chromium-review.googlesource.com/c/1387500
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58432}
2018-12-21 12:36:45 +00:00
Maya Lekova
2ebbfc308d Revert "[tools] Pass large_output to avoid re-running tests that generate lots of output"
This reverts commit b3c85c9e26.

Reason for revert: Causing Check failures on Android - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Android%20Arm64%20-%20N5X/2391

Original change's description:
> [tools] Pass large_output to avoid re-running tests that generate lots of output
> 
> R=​machenbach@chromium.org
> 
> Bug: chromium:893593
> Change-Id: Ic3a3612fc557b1f35b4632cfab553b4492ec6222
> Reviewed-on: https://chromium-review.googlesource.com/c/1382734
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Sergiy Belozorov <sergiyb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58399}

TBR=machenbach@chromium.org,sergiyb@chromium.org

Change-Id: I8ac42d1b53ce5840e80071625466135999a3c42c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:893593
Reviewed-on: https://chromium-review.googlesource.com/c/1387502
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58431}
2018-12-21 12:26:16 +00:00
Clemens Hammacher
70b6439596 [wasm] Add missing V8_NOEXCEPT annotations
This silences the new presubmit check for the whole src/wasm directory.

This change uncovered that MSVC is a bit behind with noexcept annotations
on standard containers. This makes all implicit constructors and
assignment operators noexcept(false) if the class contains any standard
container.
Thus disable noexcept on MSVC for now.

R=tebbi@chromium.org
CC=marja@chromium.org

Bug: v8:8616, v8:7999
Change-Id: Ica86ac84a5b8a835dcea9b783c7987d9b850241a
Reviewed-on: https://chromium-review.googlesource.com/c/1386869
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58430}
2018-12-21 12:22:55 +00:00
Clemens Hammacher
2c2a6bb0f8 [Liftoff] Use SmallVector for storing cache state
This replaces another use of std::vector. Stack states (consisting of
locals plus operand stack) are also typically small, thus optimize for
those cases.
Using StackVector as part of CacheState requires the definition of move
constructors and copy constructors, plus a few other methods.

R=tebbi@chromium.org

Bug: v8:8423
Change-Id: I5d39c1ebc4d6d65e4849dd06c556114cd2cd36ff
Reviewed-on: https://chromium-review.googlesource.com/c/1380053
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58429}
2018-12-21 12:17:15 +00:00
Camillo Bruni
c6ffff9dea [parser] Minor cleanup PreParsedScopeDataBuilder
- Mark Serialize method as non-virtual
- Use simple scheme to mask out bytes when de-/serializing Uint32

- Improve ByteArray::ByteArrayPrint method

Drive-by-fix: 
Change-Id: I9a6779587c0a031bcf23e4f431d17026b83a808d
Reviewed-on: https://chromium-review.googlesource.com/c/1387493
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58428}
2018-12-21 12:03:28 +00:00
Toon Verwaest
6679fd2ecf [parser] Clean up Parser::DeclareVariable and use in the pattern rewriter
Change-Id: I9446a73bb47b11e2d161a4678638b7618ce52b9a
Reviewed-on: https://chromium-review.googlesource.com/c/1387490
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58427}
2018-12-21 12:02:23 +00:00
Igor Sheludko
d183d42fe7 [cleanup][x64] Final set of x64-specific kPointerSize fixes
Bug: v8:8477, v8:8562
Change-Id: I28a8244ef22035db85b520d86aa6d5578c7c7f5d
Reviewed-on: https://chromium-review.googlesource.com/c/1384309
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58426}
2018-12-21 11:52:43 +00:00
Sigurd Schneider
4b4175d7ff Revert "[deoptimizer] Refactor GenerateDeoptimizationEntries"
This reverts commit f63a657ed9.

Reason for revert: breaks compile on lite mode:

https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8926535782549686576/+/steps/build/0/steps/compile/0/stdout


Original change's description:
> [deoptimizer] Refactor GenerateDeoptimizationEntries
> 
> This reduces preprocessor-expanded source size by 64,359 from
> 
> gen         (   21 files):    71,570 to    1,613,100 (   23x)
> src         (  624 files):   367,830 to   52,964,659 (  144x)
> test        (  392 files):   490,924 to   37,360,916 (   76x)
> third_party (  432 files):   239,085 to    9,547,902 (   40x)
> total       ( 1521 files): 1,184,093 to  102,461,098 (   87x)
> 
> to
> 
> gen         (   21 files):    71,570 to    1,613,100 (   23x)
> src         (  624 files):   367,837 to   52,919,005 (  144x)
> test        (  392 files):   490,924 to   37,342,211 (   76x)
> third_party (  432 files):   239,085 to    9,547,902 (   40x)
> total       ( 1521 files): 1,184,100 to  102,396,739 (   86x)
> 
> Bug: v8:8562
> Change-Id: Iee474e22ababa1e080b8d6359af4d0076903e59a
> Reviewed-on: https://chromium-review.googlesource.com/c/1384091
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#58424}

TBR=ulan@chromium.org,jarin@chromium.org,sigurds@chromium.org

Change-Id: I06e6f95255a3cea6a428713e9e841781425dffe8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8562
Reviewed-on: https://chromium-review.googlesource.com/c/1387494
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58425}
2018-12-21 10:57:06 +00:00
Sigurd Schneider
f63a657ed9 [deoptimizer] Refactor GenerateDeoptimizationEntries
This reduces preprocessor-expanded source size by 64,359 from

gen         (   21 files):    71,570 to    1,613,100 (   23x)
src         (  624 files):   367,830 to   52,964,659 (  144x)
test        (  392 files):   490,924 to   37,360,916 (   76x)
third_party (  432 files):   239,085 to    9,547,902 (   40x)
total       ( 1521 files): 1,184,093 to  102,461,098 (   87x)

to

gen         (   21 files):    71,570 to    1,613,100 (   23x)
src         (  624 files):   367,837 to   52,919,005 (  144x)
test        (  392 files):   490,924 to   37,342,211 (   76x)
third_party (  432 files):   239,085 to    9,547,902 (   40x)
total       ( 1521 files): 1,184,100 to  102,396,739 (   86x)

Bug: v8:8562
Change-Id: Iee474e22ababa1e080b8d6359af4d0076903e59a
Reviewed-on: https://chromium-review.googlesource.com/c/1384091
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58424}
2018-12-21 10:45:03 +00:00