Commit Graph

38711 Commits

Author SHA1 Message Date
jgruber
6dcf074bb2 [regexp] Inline StringReplaceNonGlobalRegExpWithFunction
BUG=v8:5437

Review-Url: https://codereview.chromium.org/2766423004
Cr-Commit-Position: refs/heads/master@{#44069}
2017-03-23 15:45:00 +00:00
pierre.langlois
cd78a32b62 [interpreter] Print bytecode handlers name with --trace-ignition-codegen
When using --trace-ignition-codegen, the name for each bytecode handler is
missing. The reason is that we find the name of a bytecode by looking up the
code object entry in the interpreter's dispatch table, which is not yet
populated at this point.

BUG=

Review-Url: https://codereview.chromium.org/2771503004
Cr-Commit-Position: refs/heads/master@{#44068}
2017-03-23 15:43:19 +00:00
jgruber
8c0f2315fc [regexp] Rename result.group to result.groups
This is just an update to reflect the current spec proposal.
https://tc39.github.io/proposal-regexp-named-groups/

BUG=v8:5437

Review-Url: https://codereview.chromium.org/2769143002
Cr-Commit-Position: refs/heads/master@{#44067}
2017-03-23 15:42:07 +00:00
Michael Achenbach
3cbb2a50c8 [build] Switch vtune_jit bot to gn
BUG=chromium:645890
NOTRY=true
TBR=jochen@chromium.org,vogelheim@chromium.org

Change-Id: Id0e972bf2480dd9c48e064537090a7bd97431db1
Reviewed-on: https://chromium-review.googlesource.com/458223
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44066}
2017-03-23 15:41:34 +00:00
ahaas
9f01d5c1e0 [wasm][arm] Add an additional stack check for functions with big frames.
Stack overflow checks are typically implemented as part of the TurboFan
graph of a function. This means that the stack check code is executed
after frame construction. When a frame is too big, though, there may not
be enough space on the stack anymore to throw the stack overflow
exception after frame construction. With this CL we do an additional
stack check before frame construction for functions with big frames.

As discussed offline with mstarzinger, I do this change currently only
for WebAssembly.

This CL contains only the changes for arm. I will do the other platforms
in separate CLs.

R=mstarzinger@chromium.org, v8-arm-ports@googlegroups.com

Review-Url: https://codereview.chromium.org/2763593002
Cr-Commit-Position: refs/heads/master@{#44065}
2017-03-23 15:40:52 +00:00
kozyatinskiy
03179ab375 [inspector] fixed compilation with gyp
BUG=none
TBR=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2773723002
Cr-Commit-Position: refs/heads/master@{#44064}
2017-03-23 15:39:41 +00:00
ahaas
ae8bc6ed2a [arm][turbofan] Use NEON for unaligned float64 memory accesses
When available, we use the NEON instructions vld1.8 and vst1.8 to
implement unaligned loads and stores of float64 values.

R=bmeurer@chromium.org, v8-arm-ports@googlegroups.com

Review-Url: https://codereview.chromium.org/2769723003
Cr-Commit-Position: refs/heads/master@{#44063}
2017-03-23 14:25:43 +00:00
Michael Starzinger
118f09f121 [asm.js] Widen test coverage to all of mjsunit.
R=machenbach@chromium.org
BUG=v8:6127

Change-Id: Iced2bd9e71006077aca4bd1de8dd14b6c771ec86
Reviewed-on: https://chromium-review.googlesource.com/458222
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44062}
2017-03-23 14:25:36 +00:00
bradnelson
ac5d006aad [wasm][asm.js] Fix a comment in the asm.js scanner.
BUG=v8:6090
R=marja@chromium.org

Review-Url: https://codereview.chromium.org/2769013002
Cr-Commit-Position: refs/heads/master@{#44061}
2017-03-23 12:35:16 +00:00
Toon Verwaest
c6ac334bf9 [ic] Set JSGlobalObject to the default holder for LoadGlobal
BUG=v8:5561

Change-Id: I3f8bac0083e22066ee26f4bfeae5a16f81654a91
Reviewed-on: https://chromium-review.googlesource.com/458424
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44060}
2017-03-23 11:36:44 +00:00
Clemens Hammacher
b8f8860161 [wasm] [interpreter] Implement indirect function calls
This CL adds support for indirect function calls to the interpreter. It
can indirectly call other wasm function in the same instance, which are
then executed in the interpreter, or call imported functions.

Implementing this required some refactoring:
- The wasm interpreter now unwraps import wrappers on demand, instead
  of unwrapping all of them on instantiation and storing a vector of
  handles. This also avoids the DeferredHandleScope completely, instead
  we just store two global handles in the code map.
- The interpreter gets the code table, function tables and signature
  tables directly from the attached wasm instance object. This ensures
  that the interpreter sees all updates to tables that might have been
  performed by external code.
- There is now common functionality for calling a code object. This is
  used for direct calls to imported functions and for all indirect
  calls. As these code objects can also be wasm functions which should
  be executed in the interpreter itself, I introduce a struct to hold
  the outcome of calling the code object, or a pointer to
  InterpreterCode to be called in the interpreter.

R=ahaas@chromium.org
BUG=v8:5822

Change-Id: I20fb2ea007e79e5fcff9afb4b1ca31739ebcb83f
Reviewed-on: https://chromium-review.googlesource.com/458417
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44059}
2017-03-23 10:54:58 +00:00
Toon Verwaest
98fcd3e40c [ic] Make sure global load ICs pass in the JSGlobalObject as the holder
BUG=v8:5561

Change-Id: I90f59b53dbf832571aef7fa07694abfddf53b7f6
Reviewed-on: https://chromium-review.googlesource.com/458200
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44058}
2017-03-23 10:16:18 +00:00
Wiktor Garbacz
90d28637dc Remove isolate param from DeserializeScopeChain.
It was removed so that Parser::DeserializeScopeChain does not have
 to get it from ParseInfo.
Only a small step in direction of removing isolate from ParseInfo.

BUG=v8:6093

Change-Id: Iaaf92dc6eb5ec9c4efc05ac73666fbc66e0ed8c1
Reviewed-on: https://chromium-review.googlesource.com/457999
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44057}
2017-03-23 09:28:48 +00:00
ulan
1a7a605750 Revert of [heap] Simplify clearing of normalized map caches. (patchset #1 id:1 of https://codereview.chromium.org/2745183002/ )
Reason for revert:
https://bugs.chromium.org/p/v8/issues/detail?id=6135

Original issue's description:
> [heap] Simplify clearing of normalized map caches.
>
> Currently the incremental marking visitor treats elements of normalized
> map caches weakly by coloring the caches grey without pusing to marking
> deque.
>
> The mark-compact prologue then clears all normalized map caches.
>
> We can achieve similar effect by just clearing the caches in the marking
> visitor.
>
> BUG=chromium:694255
>
> Review-Url: https://codereview.chromium.org/2745183002
> Cr-Commit-Position: refs/heads/master@{#43941}
> Committed: 3d68306c71

TBR=hpayer@chromium.org,verwaest@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:694255

Review-Url: https://codereview.chromium.org/2771703003
Cr-Commit-Position: refs/heads/master@{#44056}
2017-03-23 09:28:07 +00:00
Michael Starzinger
8aa3459f20 [asm.js] Add stress mode for the asm.js validator.
This adds a --stress-validate-asm flag intended to stress test the
validator by running against every single function, independent of
whether a "use asm" directive is present. It mainly tests negative
cases because barely any function in our test corpus will be a valid
module according to the asm.js spec.

R=bradnelson@chromium.org
BUG=v8:6127

Change-Id: Id04b0440628134d4e81c9bb4d71039f940fc9a83
Reviewed-on: https://chromium-review.googlesource.com/457039
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44055}
2017-03-23 08:54:05 +00:00
v8-autoroll
e1fbc93b8f Update V8 DEPS.
Rolling v8/build: a53333d..4a2354d

Rolling v8/third_party/catapult: 8cbbd7f..2038d74

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

Change-Id: I3363a0fa2ce1c5021029dea2a8dab2eee7cf2454
Reviewed-on: https://chromium-review.googlesource.com/458119
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44054}
2017-03-23 03:22:28 +00:00
mtrofin
78905107d3 [wasm] Skeleton WasmModuleObjectBuilder for streamed compilation
APIs and trivial implementation, to unblock Chrome side dev.

BUG=chromium:697028

Review-Url: https://codereview.chromium.org/2763413003
Cr-Commit-Position: refs/heads/master@{#44053}
2017-03-23 01:47:17 +00:00
Aleksey Kozyatinskiy
06a551ae7c Revert "[ic] General cleanup after moving more ICs to data handlers"
This reverts commit e35ec4a70f.

Reason for revert: crash on WebKit Mac10.11 (dbg).

Original change's description:
> [ic] General cleanup after moving more ICs to data handlers
> 
> BUG=v8:5561
> 
> Change-Id: Ibc64f2a42089b40a605313a5f24b1da85722fde8
> Reviewed-on: https://chromium-review.googlesource.com/457370
> Commit-Queue: Toon Verwaest <verwaest@chromium.org>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#44005}

TBR=ishell@chromium.org,verwaest@chromium.org,v8-reviews@googlegroups.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:5561

Change-Id: I2000ba48b2165e26a48f3e02259e054b40c50704
Reviewed-on: https://chromium-review.googlesource.com/457788
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44052}
2017-03-23 00:39:14 +00:00
Igor Sheludko
72ccad7d5c [interpreter] Remove unused helper generators.
BUG=v8:6116

Change-Id: I4e521d2fb3964e0d3615ef1deea6b3418fc77c50
Reviewed-on: https://chromium-review.googlesource.com/458400
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44051}
2017-03-23 00:25:34 +00:00
jwolfe
4a5d1e2535 Migrate String.prototype.to{Upper,Lower}Case functions from JS to CPP builtins.
Move ICU case conversion utility functions to a common location.

BUG=v8:5751
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_linux_noi18n_rel_ng

Review-Url: https://codereview.chromium.org/2728763006
Cr-Commit-Position: refs/heads/master@{#44050}
2017-03-22 23:06:36 +00:00
Caitlin Potter
ff1a155a22 [parser] allow patterns within left/right branches of ConditionalExpr
The AssignmentExpressions can legally contain destructuring assignments.

BUG=v8:6098
R=marja@chromium.org, adamk@chromium.org

Change-Id: I99b3a0f4c8d103edfb1dda943ec3e2ab2a5969f7
Reviewed-on: https://chromium-review.googlesource.com/455221
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44049}
2017-03-22 21:39:29 +00:00
kozyatinskiy
786c64e8eb [inspector] description for weak collections should not contain size
These JS objects don't have size property.

BUG=none
R=dgozman@chromium.org,luoe@chromium.org

Review-Url: https://codereview.chromium.org/2770583002
Cr-Commit-Position: refs/heads/master@{#44048}
2017-03-22 21:35:14 +00:00
gdeepti
9d8d4dfa7d Add pshufw instruction, fix inconsistencies with pextrw instruction.
Current implementation of the pextrw instruction is the legacy SSE2 instruction in the assembler (66 0F C5), and SSE4 implementation(66 0F 3A 15) in disasm-x64.cc, this causes incorrect instruction encodings to be printed when using --print-code flag for debug, in this case, causes over flow of bytes, and subsequent instructions to be incorrectly disassembled. Fixing to use SSE4 encodings in the assembler cosistent with pextrb, pextrd.

R=bbudge@chromium.org, mtrofin@chromium.org

Review-Url: https://codereview.chromium.org/2771513002
Cr-Commit-Position: refs/heads/master@{#44047}
2017-03-22 20:49:27 +00:00
bradnelson
8d708c6593 [wasm] Allow --turbo-stats to collect wasm compilation info.
Enable compilation stats for Wasm code.
As parallel compilation can interfere with these measurements,
also force single threaded compilation when collecting stats.

BUG=None
TEST=None
LOG=N
R=mtrofin@chromium.org

Review-Url: https://codereview.chromium.org/2769743002
Cr-Commit-Position: refs/heads/master@{#44046}
2017-03-22 19:49:53 +00:00
bbudge
2747ab31ef [WASM] Fix failing WASM SIMD tests.
- Skips test when expected value is very small or large.
- Renames methods to make more sense.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2764413003
Cr-Commit-Position: refs/heads/master@{#44045}
2017-03-22 19:18:47 +00:00
Clemens Hammacher
8255fb5e98 [wasm] Add --wasm-lazy-compilation flag
This will lazily compile all wasm modules. Just for experimenting
currently.

R=ahaas@chromium.org
BUG=v8:5991

Change-Id: I51fc3655e15f55e87d9fec86ff5dca109fb052be
Reviewed-on: https://chromium-review.googlesource.com/458008
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44044}
2017-03-22 18:51:11 +00:00
kozyatinskiy
69ad35ac6b [inspector] follow up for e27d18c943
- renamed inspector-test methods,
- tuned comment in debug.h

BUG=v8:6118
TBR=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2766283002
Cr-Commit-Position: refs/heads/master@{#44043}
2017-03-22 18:07:12 +00:00
Igor Sheludko
681e3312f0 [builtins][interpreter] Move BinaryOpAssembler to its own file.
This CL also
1) turns (Add/Subtract)WithFeedbackStub into builtins
2) makes interpreter use BinaryOpAssembler directly
3) drops unused (Multipy/Divide/Modulus)WithFeedbackStubs

BUG=v8:6116

Change-Id: I994aba6442f173535c13dfbaaafae1033de3f2ce
Reviewed-on: https://chromium-review.googlesource.com/458438
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44042}
2017-03-22 18:05:22 +00:00
rayb
04440d2869 [wasm] Fix wasm interpreter entry for 32 bit big endian systems
The order of the return values are wrong for 32 bit big endian machines.

BUG=none
R=titzer@chromium.org, clemensh@chromium.org,

Review-Url: https://codereview.chromium.org/2764583003
Cr-Commit-Position: refs/heads/master@{#44041}
2017-03-22 17:48:24 +00:00
Caitlin Potter
9377fd1a46 [async-iteration] implement parsing for AsyncGenerators
Just the front-end side of
https://chromium-review.googlesource.com/c/446961/. Adds support for
parsing AsyncGeneratorExpression, AsyncGeneratorDeclaration, and
AsyncGeneratorMethod, as well as parser tests.

BUG=v8:5855
R=neis@chromium.org, marja@chromium.org, littledan@chromium.org

Change-Id: I70e1a9681f22573f29292eacb4b9f57f9a38e2b2
Reviewed-on: https://chromium-review.googlesource.com/447117
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Caitlin Potter <caitp@igalia.com>
Cr-Commit-Position: refs/heads/master@{#44040}
2017-03-22 17:38:27 +00:00
kozyatinskiy
5f8c0a1396 [inspector] added flag for injected-script-source debugging
With flag we can debug injected-script-source in inspector-test or from DevTools frontend as regular user code. We need this when working on new features or debugging issues, it's for internal purpose only and doesn't provide any benefits for end users.

Flag: --expose-inspector-scripts

BUG=none
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2767873002
Cr-Commit-Position: refs/heads/master@{#44039}
2017-03-22 17:36:55 +00:00
Caitlin Potter
66ded52f23 [ast] rename "Yield" to "Suspend"
While the primary use-case for Suspend nodes is the Yield expression,
there are other uses as well: Await expressions, and the initial suspend
of Generators, which returns an object matching the Iterator protocol.

"Suspend" is a better representation of the spec text (closer
to the spec text for the values of [[GeneratorState]] and
[[AsyncGeneratorState]]), and can make it easier to understand the
meaning of what I had previously called Yield::is_normal() (now
Suspend::is_yield()).

Changes requested as part of https://chromium-review.googlesource.com/c/447117/

BUG=
R=neis@chromium.org, adamk@chromium.org
TBR=bmeurer@chromium.org, paul.lind@imgtec.com, joransiu@ca.ibm.com, weiliang.lin@intel.com

Change-Id: Ic6f15b04fff091c20f26526391b967287c06f6bf
Reviewed-on: https://chromium-review.googlesource.com/455583
Reviewed-by: Caitlin Potter <caitp@igalia.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44038}
2017-03-22 17:34:08 +00:00
Clemens Hammacher
a2807f2a2a [wasm] [asm.js] Store function start position also for init function
The stack check at the beginning of each function maps to the wasm byte
offset 0. For asm.js functions, this byte offset is mapped further to an
asm.js source position. For most functions, we explicitly add an entry
to this side table for offset 0. This was missing for the start
function.

R=ahaas@chromium.org
BUG=v8:4203,chromium:703568

Change-Id: I05bc4a8cfa666864bb7a0b23f75186abe0be9bee
Reviewed-on: https://chromium-review.googlesource.com/458437
Commit-Queue: Brad Nelson <bradnelson@chromium.org>
Reviewed-by: Brad Nelson <bradnelson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44037}
2017-03-22 17:02:16 +00:00
Sathya Gunasekaran
5260a4ed67 [d8] Remove unused argument
Change-Id: I7db6a8bfad31012f09cdfe4a395339309aad45b1
Reviewed-on: https://chromium-review.googlesource.com/457779
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44036}
2017-03-22 16:58:36 +00:00
jarin
798ffc9d67 [deoptimizer] Fill the single precision registers in the deoptimizer entry stub.
BUG=v8:6077

Review-Url: https://codereview.chromium.org/2765323002
Cr-Commit-Position: refs/heads/master@{#44035}
2017-03-22 16:56:03 +00:00
kozyatinskiy
760c56bddf [inspector] changed a way of preserving stepping between tasks
Indisputable profit:
- correct break location in next task (see tests),
- stepOver with async await never lands in random code (see related test and issue),
- inspector doesn't store current stepping state in debugger agent and completely trust V8 - step to new inspector-V8 design (I will finish design doc soon).
- willExecuteScript and didExecuteScript instrumentation could be removed from code base - reduce probability of future errors.
- finally - less code,
- stepping implementation in V8 makes another step to follow our stepping strategy (stepOut should do stepInto and break when exit current frame) (another one one page design doc based on @aandrey comment is coming),
- knowledge about existing of context groups is still inspector-only.

Disputable part is related to super rare scenario when in single isolate we have more then one context group id with enabled debugger agent:
- if one agent request break in own context (stepping, pause, e.t.c.) then we ignore all breaks in another agent. From one hand it looks like good: user clicks stepInto and they don't expect that execution could be paused by another instance of DevTools in unobservable from current DevTools way (second DevTools will get paused notification and run nested message loop). From another hand we shouldn't ignore breakpoints or debugger statement never. In general, I think that proposed behavior is rathe feature then issue.
- and disadvantage, on attempt to break in non-target context group id we just call StepOut until reach target context group id, step out call could deoptimize code in non related to current debugger agent context. But break could happens only in case of debugger stmt or breakpoint - sound like minor issue. Ignoring break on exception sounds like real issue but by module of rareness of this case I think we can ignore this.

Implementation details:
- when debugger agent request break for any reason it passes target context group id to V8Debugger - last agent requesting break is preferred.
- when V8Debugger gets BreakProgramRequested notification from V8, it checks current context group id against target context group id, if they match then just process break as usual otherwise makes StepOut action,
- debug.cc at the end of microtask if last_scheduled_action is StepOut, schedules StepIn and will break on first instruction in next task.

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

Review-Url: https://codereview.chromium.org/2748503002
Cr-Commit-Position: refs/heads/master@{#44034}
2017-03-22 16:20:54 +00:00
jarin
12d815b36e [profiler] Web UI: add summary of opts/deopts.
This adds optimization and deoptimization counts to the Web UI. Also, the function timeline
now shows optimization and deoptimization marks.

Review-Url: https://codereview.chromium.org/2753543006
Cr-Commit-Position: refs/heads/master@{#44033}
2017-03-22 16:02:25 +00:00
honggyu.kp
2ff2a0c65d tools: Add a script to generate arch-specific ctags
It would be better to generate ctags file for specified architecture so
this CL adds a script gen-tags.py to generate architecture specific
ctags.

  Usage:
      $ tools/dev/gen-tags.py [<arch>...]

  The example usage for 'x64' is as follows:
      $ tools/dev/gen-tags.py x64

  If no <arch> is given, it generates tags file for all arches:
      $ tools/dev/gen-tags.py

R=yangguo@chromium.org,jochen@chromium.org,jkummerow@chromium.org,clemensh@chromium.org

NOTRY=true

Review-Url: https://codereview.chromium.org/2762903002
Cr-Commit-Position: refs/heads/master@{#44032}
2017-03-22 16:01:20 +00:00
neis
634537c66a [macro-assembler] Remove a bunch of unused functions.
BUG=

Review-Url: https://codereview.chromium.org/2762973004
Cr-Commit-Position: refs/heads/master@{#44031}
2017-03-22 15:46:44 +00:00
Michael Lippautz
761514fe04 [heap] Evacuator: Factor out dependencies
BUG=chromium:651354

Change-Id: Ic4cc354160b84267a4d930734120b68c2b7ba092
Reviewed-on: https://chromium-review.googlesource.com/458351
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44030}
2017-03-22 15:42:58 +00:00
Igor Sheludko
40aed9791f [stubs] Cleanup binary op stubs.
... and introduce BinaryOpAssembler.

BUG=v8:6116

Change-Id: I86b0afedbe6ac11fda286b877fe55cda746f5347
Reviewed-on: https://chromium-review.googlesource.com/458278
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44029}
2017-03-22 14:19:49 +00:00
kozyatinskiy
e27d18c943 [debugger] tuned StepNext and StepOut at return position
Proposed behaviour:
- StepNext at return position go into next function call (no changes with current behavior, but implemented in v8::Debug instead of hack on inspector side);
- StepOut at return position go into next non-current function call.

We need this to have better stepping in cases with native functions, blackboxed functions and/or different embedder calls (e.g. event listeners).

New behavior could be illustrated with two examples (for more see stepping-with-natives-and-frameworks test):
- let's assume that we've blackboxed callAll function, this function just takes its arguments and call one after another:
var foo = () => 1;
callAll(foo, foo, () => 2);
If we break inside of first call of function foo. Then on..
..StepNext - we're able to reach second call of function foo,
..StepOut - we're able to reach () => 2 call.

- let's consider case with native function:
[1,2,3].map(x => x * 2)
If we break inside of first callback call, then with StepNext we can iterate through all calls of callback, with StepOut we go to next statement after .map call.

Implementation details:
- when we request break we schedule step-in function call for any step action at return position and for step-in at any position,
- when we request StepOut at return position - we mark current function as needed-to-be-ignored inside of PrepareStepIn(function) call,
- when we request StepOut at not return position - we set break at return position and ask debugger to just repeat last step action on next stepping-related break.

Design doc: https://docs.google.com/document/d/1ihXHOIhP_q-fJCA0e2EiXz_Zr3B08KMjaPifcaqZ60Q/edit

BUG=v8:6118,chromium:583193
R=dgozman@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2758483002
Cr-Commit-Position: refs/heads/master@{#44028}
2017-03-22 14:16:18 +00:00
Clemens Hammacher
ee64674811 [wasm] Fix test utils and tests
Add a check to appendToTable to catch illegal input, and fix a test
case triggering this check.
Also removing unused variables and fix indentation.

R=ahaas@chromium.org

Change-Id: I0eaa48ab95ef710530a3cfbe94ed4dd419618cda
Reviewed-on: https://chromium-review.googlesource.com/458436
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44027}
2017-03-22 14:04:10 +00:00
mvstanton
1fe5f0e3ad Always run our fast array builtins.
Before, we carefully turned on fast array builtins only if flag
--enable-fast-array-builtins was true (though it was implied true
if --turbo was on). Now, the set of Array.prototype.{some, forEach,
every, reduce} is good enough to always turn them on. This means
we can remove the JavaScript implementations.

The flag is renamed to --experimental-fast-array-builtins, which is
off. In the next days we'll add more non-javascript implementations
here for testing.

BUG=
R=danno@chromium.org

Review-Url: https://codereview.chromium.org/2761783002
Cr-Commit-Position: refs/heads/master@{#44026}
2017-03-22 13:37:25 +00:00
Igor Sheludko
8f033c2d0b [stubs] Cleanup ArraySingleArgumentConstructorStubs.
BUG=v8:6116

Change-Id: I9659871441f90832bc4032444fc11af86b145488
Reviewed-on: https://chromium-review.googlesource.com/458397
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44025}
2017-03-22 13:36:44 +00:00
Michael Lippautz
8f6135f1d2 [heap] Refactor marking verification
Use MarkingState to abstract over the different sets of markbits.

BUG=chromium:651354

Change-Id: I1635eb0d441be2aeed19f0ed91999f0f0f1bbffc
Reviewed-on: https://chromium-review.googlesource.com/458398
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44024}
2017-03-22 13:35:39 +00:00
mvstanton
2c84924f1b [Builtins] New Array.prototype.filter implementation observability bug.
filter creates an output array with the Array species constructor for
storing values from the input array that pass the user-supplied
predicate function. Our new array builtins are implemented such that
if we fall out of the fast path, we'll pick up where we left off
in a continuation function. It's important to pass the index of
where we left off appending to the output array, because otherwise
we will read it at the start of the continuation function.

That would be observable, and a spec violation.

BUG=

Review-Url: https://codereview.chromium.org/2771483002
Cr-Commit-Position: refs/heads/master@{#44023}
2017-03-22 13:18:26 +00:00
Igor Sheludko
e046b80a55 [stubs] Introduce TF_STUB macro.
... which is a TF_BUILTIN-like wrapper for defining code stubs.

BUG=v8:6116

Change-Id: Iad599dfc71a50c5082d9e3fba2a7b553b9912207
Reviewed-on: https://chromium-review.googlesource.com/458476
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44022}
2017-03-22 12:56:32 +00:00
Igor Sheludko
2656c221ed [builtins] Interface descriptors usage cleanup.
This is a step towards the world where only leaf CSA classes have access
to parameters (via respective interface descriptor specified in builtin
definition macro).

BUG=v8:6116

Change-Id: I35dcd9a1c9d38ea394895ab339a07988a26070a0
Reviewed-on: https://chromium-review.googlesource.com/458198
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44021}
2017-03-22 12:40:52 +00:00
Mythri
e6682554a8 [Interpreter] Introduce strict equality bytecode that does not collect feedback.
Some of the StrictEquality comparisons do not require feedback (for ex: in
try-finally, generators). This cl introduces StrictEqualityNoFeedback bytecode
to be used in such cases. With this change, we no longer have to check if the 
type feedback slot is valid in compare bytecode handlers.

This is the first step in reworking the compare bytecode handler to avoid
duplicate checks when collecting feedback and when performing the operation.

BUG=v8:4280

Change-Id: Ia650fd43c0466b8625d3ce98c39ed1073ba42a6b
Reviewed-on: https://chromium-review.googlesource.com/455778
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44020}
2017-03-22 12:31:11 +00:00