Commit Graph

38711 Commits

Author SHA1 Message Date
Michael Starzinger
ab4c91904d [asm.js] Widen test coverage to message tests.
R=machenbach@chromium.org
BUG=v8:6127

Change-Id: Ie828f6e0dc6fe9f9f9351aa1afaf7b9dbf536e26
Reviewed-on: https://chromium-review.googlesource.com/461181
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44219}
2017-03-29 08:42:32 +00:00
bmeurer
9df5674bd5 [turbofan] Avoid going through ArgumentsAdaptorTrampoline for CSA/C++ builtins.
When we call from TurboFan to a CSA or C++ builtin, we can avoid the
ArgumentsAdaptorFrame in case of a parameter arity mismatch by just
filling up missing arguments with undefined or removing additional
arguments on the call site already. This is safe for CSA/C++ builtins,
since those that care about variable arguments are marked with the
kDontAdaptArgumentsSentinel.

R=danno@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2684963002
Cr-Commit-Position: refs/heads/master@{#44218}
2017-03-29 07:41:17 +00:00
machenbach
f11719ce79 Revert of [inspector] console get all information from inspector when needed (patchset #4 id:60001 of https://codereview.chromium.org/2784713002/ )
Reason for revert:
Breaks layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14569

Original issue's description:
> [inspector] console get all information from inspector when needed
>
> With this CL we don't need to store reference to InspectedContext inside of JavaScript console object and able to get all required information from callback data.
> It allows us to implement console methods without taking in account how and where we create and store these methods:
> - later we can move console object implementation to builtins..
> - ..and install command line API methods smarter.
>
> BUG=chromium:588893
> R=dgozman@chromium.org
>
> Review-Url: https://codereview.chromium.org/2784713002
> Cr-Commit-Position: refs/heads/master@{#44212}
> Committed: 908cd38123

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

Review-Url: https://codereview.chromium.org/2784603003
Cr-Commit-Position: refs/heads/master@{#44217}
2017-03-29 07:37:37 +00:00
Mythri
1608919603 [Interpreter] Inline fast paths in compare bytecode handlers.
Compare bytecode handlers does several checks to collect feedback and
repeats these checks when actually performing the operation. This cl
changes it perform the actual comparison for smi / number along with 
collecting feedback. 

BUG=v8:4280

Change-Id: If0954b68dd232461e08e94a90ccc17604c235b27
Reviewed-on: https://chromium-review.googlesource.com/458420
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44216}
2017-03-29 07:23:58 +00:00
jgruber
e2858f2adc [regexp] Properly handle failed RegExp compilations
Compilation can fail e.g. on stack overflow. This ensures that we exit
early from StringReplaceGlobalRegExpWithString in that case.

BUG=v8:5437,chromium:705934

Review-Url: https://codereview.chromium.org/2778953004
Cr-Commit-Position: refs/heads/master@{#44215}
2017-03-29 07:18:10 +00:00
gsathya
4c78e4bbad [api] Remove duplicate forward declaration
Review-Url: https://codereview.chromium.org/2784653003
Cr-Commit-Position: refs/heads/master@{#44214}
2017-03-29 06:51:02 +00:00
v8-autoroll
b496a8b3de Update V8 DEPS.
Rolling v8/build: 947f28d..133db8f

Rolling v8/third_party/catapult: e044353..0c870c7

Rolling v8/tools/clang: 9fbab72..e9e483c

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

Change-Id: Id56c81495145890f5436c904907cb1a75b968d8c
Reviewed-on: https://chromium-review.googlesource.com/461459
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44213}
2017-03-29 03:24:07 +00:00
kozyatinskiy
908cd38123 [inspector] console get all information from inspector when needed
With this CL we don't need to store reference to InspectedContext inside of JavaScript console object and able to get all required information from callback data.
It allows us to implement console methods without taking in account how and where we create and store these methods:
- later we can move console object implementation to builtins..
- ..and install command line API methods smarter.

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

Review-Url: https://codereview.chromium.org/2784713002
Cr-Commit-Position: refs/heads/master@{#44212}
2017-03-29 01:25:51 +00:00
kschimpf
4e3f4b2d12 Separate module byte size counter for asm.js/wasm.
Currently, V8 uses the same size counter to measure module sizes for both asm.js
and WASM. This CL separates the counter into two separate counters, and then
uses the appropriate counter when decoding.

BUG=chromium:704922
R=mtrofin@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2777203005
Cr-Commit-Position: refs/heads/master@{#44211}
2017-03-28 22:09:13 +00:00
kschimpf
90c12512d9 Separate module max memory pages counter for asm.js/WASM.
Currently, V* uses the same size counter to measure the maximum number
of memory pages allocated by a module for both asm.js and WASM. This
CL separates the counter into two separate counters, and then uses the
appropriate counter when measuring.

BUG=chromium:704922
R=mtrofin@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2783713002
Cr-Commit-Position: refs/heads/master@{#44210}
2017-03-28 21:22:16 +00:00
kozyatinskiy
b6bbf6821b [inspector] added test for StepOut at return postion from async function
Should be fixed.

BUG=v8:6161
R=dgozman@chromium.org

Review-Url: https://codereview.chromium.org/2779143002
Cr-Commit-Position: refs/heads/master@{#44209}
2017-03-28 21:14:19 +00:00
littledan
76e3fe97d6 [heap] Two minor fixes in EstimatedSize
A couple bugs had led code in one Context to be able to lead to
estimated memory usage in another Context, even in cases that should be
easy to detect.

- Ensure that the pointer to the next context is nulled out while
  recursing over the portion of the heap. It seems like there was
  previously some code to do this partway, but the nulling part
  was left out.
- Skip including maps in the understanding of the Context estimated
  size, as the maps are shared between Contexts and may be reachable
  from other Contexts

Review-Url: https://codereview.chromium.org/2780773002
Cr-Commit-Position: refs/heads/master@{#44208}
2017-03-28 20:41:11 +00:00
kschimpf
759db9fcc8 Separate decoding module peak memory bytes for asm/wasm.
Currently, V8 uses the same counter to measue module decoding peak memory bytes
for both asm.js and WASM. This CL separates the counter into two separate
counters, and then uses the appropriate counter when decoding a module.

BUG=chromium:704922
R=bbudge@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org

Review-Url: https://codereview.chromium.org/2778973003
Cr-Commit-Position: refs/heads/master@{#44207}
2017-03-28 20:00:10 +00:00
kozyatinskiy
c95ef4af70 [inspector] nullifyObjectPrototype -> InjectedScriptHost.nullifyPrototype
Current implementation is unsafe if __proto__ getter is defined on Object.prototype.

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

Review-Url: https://codereview.chromium.org/2770263003
Cr-Commit-Position: refs/heads/master@{#44206}
2017-03-28 19:09:43 +00:00
kschimpf
d7d201d412 Separate function byte size counter for asm.js/wasm.
Currently, V8 uses the same size counter to measure function byte sizes for both
asm.js and WASM. This CL separates the counter into two separate counters, and
then uses the appropriate counter when decoding.

BUG=chromium:704922
R=bbudge@google.com,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2780783003
Cr-Commit-Position: refs/heads/master@{#44205}
2017-03-28 18:18:37 +00:00
kschimpf
1d4821280b Separate module min memory pages counter for asm.js/WASM.
Currently, V8 uses the same size counter to measure the minimum number of memory pages allocated by a module for both asm.js and WASM. This CL separates the counter into two separate counters, and then uses the appropriate counter when measuring.

BUG=chromium:704922
R=mtrofin@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2781453004
Cr-Commit-Position: refs/heads/master@{#44204}
2017-03-28 18:14:12 +00:00
bradnelson
a84da1c3b7 [wasm][asm.js] Fix and enable several asm.js tests with the new parser.
Fix a few items broken during review of scanner + parser:
* Make the scanner retain stale newline state on a rewind (as otherwise it must be able to correctly rewind that too, though it doesn't need it). (Probably should revisit).
* Change StashCode in the builder skip to the zero case, as it crashes for some reason (added TODO).

Also fix:
* Drop test based on constant expression evaluation in main parser
* Support constant defined based on existing constant.
* Type constants as signed.
* Added a check that all used functions are defined eventually.
* Zone allocate strings for simplicity (TODOs to refactor better).

BUG=v8:6090
BUG=v8:4203
R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2771183002
Cr-Original-Commit-Position: refs/heads/master@{#44200}
Committed: be0dbdd679
Review-Url: https://codereview.chromium.org/2771183002
Cr-Commit-Position: refs/heads/master@{#44203}
2017-03-28 17:43:09 +00:00
Jakob Kummerow
2b86bb7461 [promises] Fix missing write barrier in NewPromiseCapability
Change-Id: I0efbb837026908173739946353334ae7ebf62379
Reviewed-on: https://chromium-review.googlesource.com/461880
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44202}
2017-03-28 17:08:34 +00:00
bradnelson
f8973f1caa Revert of [wasm][asm.js] Fix and enable several asm.js tests with the new parser. (patchset #10 id:180001 of https://codereview.chromium.org/2771183002/ )
Reason for revert:
Fails on gc-stress.

Original issue's description:
> [wasm][asm.js] Fix and enable several asm.js tests with the new parser.
>
> Fix a few items broken during review of scanner + parser:
> * Make the scanner retain stale newline state on a rewind (as otherwise it must be able to correctly rewind that too, though it doesn't need it). (Probably should revisit).
> * Change StashCode in the builder skip to the zero case, as it crashes for some reason (added TODO).
>
> Also fix:
> * Drop test based on constant expression evaluation in main parser
> * Support constant defined based on existing constant.
> * Type constants as signed.
> * Added a check that all used functions are defined eventually.
> * Zone allocate strings for simplicity (TODOs to refactor better).
>
> BUG=v8:6090
> BUG=v8:4203
> R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org
>
> Review-Url: https://codereview.chromium.org/2771183002
> Cr-Commit-Position: refs/heads/master@{#44200}
> Committed: be0dbdd679

TBR=clemensh@chromium.org,bradnelson@google.com,marja@chromium.org,mstarzinger@chromium.org,vogelheim@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:6090

Review-Url: https://codereview.chromium.org/2782613002
Cr-Commit-Position: refs/heads/master@{#44201}
2017-03-28 17:04:10 +00:00
bradnelson
be0dbdd679 [wasm][asm.js] Fix and enable several asm.js tests with the new parser.
Fix a few items broken during review of scanner + parser:
* Make the scanner retain stale newline state on a rewind (as otherwise it must be able to correctly rewind that too, though it doesn't need it). (Probably should revisit).
* Change StashCode in the builder skip to the zero case, as it crashes for some reason (added TODO).

Also fix:
* Drop test based on constant expression evaluation in main parser
* Support constant defined based on existing constant.
* Type constants as signed.
* Added a check that all used functions are defined eventually.
* Zone allocate strings for simplicity (TODOs to refactor better).

BUG=v8:6090
BUG=v8:4203
R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2771183002
Cr-Commit-Position: refs/heads/master@{#44200}
2017-03-28 15:53:19 +00:00
Peter Marshall
80b26b4f91 [comments] Add a comment explaining JSArrayBuffer::is_external.
Change-Id: I048b7d5229686cf64bed6ec31d118ae1928028a5
Reviewed-on: https://chromium-review.googlesource.com/461939
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44199}
2017-03-28 15:44:21 +00:00
Michael Starzinger
a5fe3a0ac6 [turbofan] Extend early lowering to store operations.
This extends the existing insertion of soft deopts during early lowering
from loads to stores (both named and keyed). It now covers all property
access operations. Next we will handle monomorphic type feedback when
applicable.

R=bmeurer@chromium.org

Change-Id: I6138744682cdbdbdb7274851aa81fb075229c309
Reviewed-on: https://chromium-review.googlesource.com/459482
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44198}
2017-03-28 14:29:54 +00:00
kschimpf
7d4cb94303 Separate function decoding counter into asm and wasm counters.
Currently, V8 uses the same counter to collect decoding time for both asm.js and
WASM. This separates the function decoding counter into two separate counters,
and then uses the appropriate counter when decoding a module.

BUG=chromium:704922
R=bbudge@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2772363002
Cr-Commit-Position: refs/heads/master@{#44197}
2017-03-28 14:27:42 +00:00
Ross McIlroy
e3c484dc8d [Compiler] Don't use DeferredHandleScope for parser if not compiling concurrently.
Don't put internalized parser handles in a DeferredHandleScope if we aren't
going to compile concurrently since this has a performance cost.

BUG=chromium:686658

Change-Id: Id89d197b863569346895583e6df79134e79a5d4b
Reviewed-on: https://chromium-review.googlesource.com/461879
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44196}
2017-03-28 14:16:55 +00:00
Igor Sheludko
db377d0220 [builtins] Added TFH macro for IC handlers/dispatchers and simplified TFS macro.
BUG=v8:6116

Change-Id: I1487165550e938200ce49a022222892752feccae
Reviewed-on: https://chromium-review.googlesource.com/461819
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44195}
2017-03-28 13:51:53 +00:00
jgruber
19f626f076 [regexp] Handle unmatched groups in callable replacers
BUG=v8:5437

Review-Url: https://codereview.chromium.org/2776263003
Cr-Commit-Position: refs/heads/master@{#44194}
2017-03-28 13:29:22 +00:00
v8-autoroll
dca166b02b Update V8 DEPS.
Rolling v8/build: 5dd7ff3..947f28d

Rolling v8/third_party/catapult: d979a85..e044353

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

Change-Id: I902b94f5b225847b4bf1ac5a3bea807f4a62e37a
Reviewed-on: https://chromium-review.googlesource.com/461959
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44193}
2017-03-28 13:29:06 +00:00
Camillo Bruni
984c3717f1 [tools] Improve grokdump
- support register expression for addresses, e.g.: $r15-1
- show whether addresses are in the minidump with "*"
- show decoded Smis with dd
- dd without arguments continues printing the next words

Change-Id: I1a6a4f9f470c25eee7da1381014252e723ef5f7c
Reviewed-on: https://chromium-review.googlesource.com/461900
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44192}
2017-03-28 13:21:47 +00:00
Toon Verwaest
fcdc737fa5 [runtime] Don't regenerate enumeration indices in slow-to-fast
BUG=

Change-Id: Ibadaef9ee4cb16afa01b782afc07a32bd39ad8aa
Reviewed-on: https://chromium-review.googlesource.com/461140
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44191}
2017-03-28 12:53:02 +00:00
jbroman
1b0bd5fde2 Add jbroman to WATCHLISTS for src/value-serializer.*.
NOTRY=true

Review-Url: https://codereview.chromium.org/2782463002
Cr-Commit-Position: refs/heads/master@{#44190}
2017-03-28 12:51:29 +00:00
Daniel Vogelheim
ae1e87596d [parser] Introduce 'contextual keyword tokens'.
Introduce 'contextual keyword' tokens, which are parsed as identifiers but
in some contexts are treated by the parser like proper keywords. These are
usually keywords introduced by recent ECMAScript versions, which for reasons
of backwards compatibility are still permissible as regular identifiers in
most contexts.

Current usage is to check for Token::IDENTIFIER and then do a string
compare. With this change the initial scan will scan them as usual, but
will then record the token as IDENTIFIER plus a secondary token with the
'contextual' value.

BUG=v8:6902

Change-Id: I6ae390382998cf756a23720bd481cb9c0eb78a72
Reviewed-on: https://chromium-review.googlesource.com/459479
Commit-Queue: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44189}
2017-03-28 12:43:23 +00:00
Toon Verwaest
1826f09c58 [grokdump] Update grokdump to decode new map layouts, and dump-heap-constants to 512kb pages
BUG=

Change-Id: I5e60705764b8ea20b171981cdd44d57a928fa34d
Reviewed-on: https://chromium-review.googlesource.com/461178
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44188}
2017-03-28 12:07:01 +00:00
Michael Starzinger
d7d7996f2a [turbofan] Extend early lowering to keyed loads.
This extends the existing insertion of soft deopts during early lowering
from named loads to keyed loads as well (i.e. from just {JSLoadName} to
{JSLoadProperty}). Stores will be handled in a follow-up change.

R=bmeurer@chromium.org

Change-Id: I6ad7d0a3561f9160e15e13c64ec5255b4f45e614
Reviewed-on: https://chromium-review.googlesource.com/459421
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44187}
2017-03-28 11:48:45 +00:00
Igor Sheludko
6777eecf4a [builtins] Remove ASH builtin macro in favor of ASM macro.
BUG=v8:6116

Change-Id: I8e2587926f9e11f022624778fd5168799d20d2df
Reviewed-on: https://chromium-review.googlesource.com/461158
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44186}
2017-03-28 11:33:05 +00:00
Clemens Hammacher
3cfacadec1 [wasm] [interpreter] Fix ToWebAssemblyValue conversion
We were not implementing the specified ToWebAssemblyValue coercion at
all. This caused a failure on arm architectures.

R=ahaas@chromium.org
BUG=v8:5822
TEST=mjsunit/wasm/interpreter

Change-Id: Ic77cfd13007d45308bafa285d517f3820a3b1c80
Reviewed-on: https://chromium-review.googlesource.com/461859
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44185}
2017-03-28 10:22:13 +00:00
martyn.capewell
630c33c6f4 [arm64] Use acquire/release memory accesses for atomics
Implement ASSEMBLE_ATOMIC_LOAD/STORE_INTEGER using acquire/release instructions,
to match the existing ASSEMBLE_ATOMIC_EXCHANGE_INTEGER macro.

BUG=v8:6097

Review-Url: https://codereview.chromium.org/2760963002
Cr-Commit-Position: refs/heads/master@{#44184}
2017-03-28 10:06:58 +00:00
bmeurer
88a7061a53 [turbofan] Add support for extending properties backing store.
TurboFan didn't support transitioning stores that also need to grow the
properties backing store so far. This CL adds support for re-allocating
the properties backing store in-place, so these stores can participate
properly in various optimizations like escape analysis and allocation
folding.

R=ishell@chromium.org
BUG=v8:5267

Review-Url: https://codereview.chromium.org/2778133003
Cr-Commit-Position: refs/heads/master@{#44183}
2017-03-28 09:24:33 +00:00
jgruber
9403edfa83 [regexp] Named capture support for string replacements
This implements support for named captures in
RegExp.prototype[@@replace] for when the replaceValue is not callable.

Named captures can be referenced from replacement strings by using the
"$<name>" syntax. A couple of examples:

let re = /(?<fst>.)(?<snd>.)/u;
"abcd".replace(re, "$<snd>$<fst>")  // "bacd"
"abcd".replace(re, "$2$1")     // "bacd" (numbered refs work as always)
"abcd".replace(re, "$<snd")    // SyntaxError (unterminated named ref)
"abcd".replace(re, "$<42$1>")  // "cd" (invalid name)
"abcd".replace(re, "$<thd>")   // "cd" (non-existent name)
"abcd".replace(/(?<fst>.)|(?<snd>.)/u, "$<snd>")  // "cd" (non-matched capture)

Support is currently behind the --harmony-regexp-named-captures flag.

BUG=v8:5437

Review-Url: https://codereview.chromium.org/2775303002
Cr-Original-Commit-Position: refs/heads/master@{#44171}
Committed: 17f13863b6
Review-Url: https://codereview.chromium.org/2775303002
Cr-Commit-Position: refs/heads/master@{#44182}
2017-03-28 09:09:42 +00:00
Andreas Haas
b95b6362dd [arm] Do not check the constant pool in a PredictableSizeScope.
In a recent CL (https://codereview.chromium.org/2738683003) I changed
the generation of call instructions on arm to emit a constant pool if
necessary. However it can happen now that a call is generated within a
PredictableSizeScope, which causes a crash if a constant pool is
actually emitted, which naturally changes the size of the generated
code. With this CL I add a flag to the generation of a call where we
can state explicitly that for particular calls, i.e. those calls within
a PredictableSizeScope, we do not want to emit a constant pool.

BUG=chromium:704528

Change-Id: I7740d5440d007a2a5457c524aa8eec1b74944d57
Reviewed-on: https://chromium-review.googlesource.com/459602
Reviewed-by: Jacob Bramley <jacob.bramley@arm.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44181}
2017-03-28 09:07:15 +00:00
jgruber
34ffdd6238 Revert of [regexp] Named capture support for string replacements (patchset #5 id:80001 of https://codereview.chromium.org/2775303002/ )
Reason for revert:
Invalid DCHECKs for non-matched groups.

Original issue's description:
> [regexp] Named capture support for string replacements
>
> This implements support for named captures in
> RegExp.prototype[@@replace] for when the replaceValue is not callable.
>
> Named captures can be referenced from replacement strings by using the
> "$<name>" syntax. A couple of examples:
>
> let re = /(?<fst>.)(?<snd>.)/u;
> "abcd".replace(re, "$<snd>$<fst>")  // "bacd"
> "abcd".replace(re, "$2$1")     // "bacd" (numbered refs work as always)
> "abcd".replace(re, "$<snd")    // SyntaxError (unterminated named ref)
> "abcd".replace(re, "$<42$1>")  // "cd" (invalid name)
> "abcd".replace(re, "$<thd>")   // "cd" (non-existent name)
> "abcd".replace(/(?<fst>.)|(?<snd>.)/u, "$<snd>")  // "cd" (non-matched capture)
>
> Support is currently behind the --harmony-regexp-named-captures flag.
>
> BUG=v8:5437
>
> Review-Url: https://codereview.chromium.org/2775303002
> Cr-Commit-Position: refs/heads/master@{#44171}
> Committed: 17f13863b6

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

Review-Url: https://codereview.chromium.org/2776293003
Cr-Commit-Position: refs/heads/master@{#44180}
2017-03-28 09:02:14 +00:00
Andreas Haas
53af0d1ad3 [wasm] Alignment information of wasm programs cannot be trusted
This CL removes code which is based on the assumption that if
WebAssembly code says that memory accesses are aligned, that they are
really aligned. On arm, memory accesses crashed when this assumption
was violated.

Most likely this CL will cause a performance regression on arm. At the
moment we plan to fix this regression eventually by using arm NEON
instructions in V8.

R=titzer@chromium.org

Change-Id: Ibb60fa1ef0173c13af813a3cb7eb26bfa2a847c2
Reviewed-on: https://chromium-review.googlesource.com/451297
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44179}
2017-03-28 08:28:25 +00:00
Wiktor Garbacz
ddcdbf6fef Completely remove isolate from parse_info
A step towards removing isolate from ParseInfo.
Removing isolate from ParseInfo will make it easier to create and
execute parse tasks on background threads.

BUG=v8:6093

Change-Id: Ic189610a943251b6b0cbd316afbf422c0da7a4cd
Reviewed-on: https://chromium-review.googlesource.com/458007
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44178}
2017-03-28 08:24:05 +00:00
Marja Hölttä
bc39a5148a [parser] Fix crash when lazy arrow func params contain destructuring assignments.
As far as I can see, we have had this bug as long as destructuring assignments
have been there (i.e., this is not regression).

The problem was that Parser::DoParseFunction parsed the arrow function parameters
but didn't rewrite the destructuring assignments in them.

BUG=chromium:704811

Change-Id: I0b1424e7d5103eda6efd51b403fe81a4ee235e01
Reviewed-on: https://chromium-review.googlesource.com/459618
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44177}
2017-03-28 08:22:46 +00:00
Wiktor Garbacz
80752a29b6 Make isolate explicit param of parsing:: functions
A step towards removing isolate from ParseInfo.
Removing isolate from ParseInfo will make it easier to create and
execute parse tasks on background threads.

BUG=v8:6093

Change-Id: I0a3546618d01b9232014da94cf8d0f72427a0d1d
Reviewed-on: https://chromium-review.googlesource.com/458006
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44176}
2017-03-28 08:20:56 +00:00
Clemens Hammacher
3c7e3a4353 [wasm] [interpreter] Fix notifying debug listeners
We were notifying the debug event listeners after every 1000 steps.
This CL fixes this to only notify them if we actually paused because of
a hit breakpoint.

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

Change-Id: I00e36b89307c7e761ceb24ccdb3157056cfb8178
Reviewed-on: https://chromium-review.googlesource.com/459480
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44175}
2017-03-28 08:17:13 +00:00
Michael Starzinger
6c4c6c84e7 [runtime] Remove obsolete Runtime::ElementsKindToType.
This removes the static helper which is by now only used by a single
runtime function. In general the {Runtime} class no longer acts as a
grab-bag for various helper functions.

R=petermarshall@chromium.org

Change-Id: I9c2141bbd88db27ae1f95fe004bcc8a7c5506208
Reviewed-on: https://chromium-review.googlesource.com/459597
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44174}
2017-03-28 08:16:06 +00:00
Wiktor Garbacz
048f89c80d Do NOT get isolate from ParseInfo in compiler.cc
A step towards removing isolate from ParseInfo.
Removing isolate from ParseInfo will make it easier to create and
execute parse tasks on background threads.

BUG=v8:6093

Change-Id: Ief4eb3c9873026a93338d5556985f31c9abe17e6
Reviewed-on: https://chromium-review.googlesource.com/458005
Commit-Queue: Wiktor Garbacz <wiktorg@google.com>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Daniel Clifford <danno@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Daniel Vogelheim <vogelheim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44173}
2017-03-28 08:12:48 +00:00
Eric Holk
64948a8948 [wasm] Un-skip previously flaky tests
BUG= v8:6132
NOTRY=true

Change-Id: I47beef4f90b37c259252b86a856f5bc075979084
Reviewed-on: https://chromium-review.googlesource.com/461299
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44172}
2017-03-28 08:07:57 +00:00
jgruber
17f13863b6 [regexp] Named capture support for string replacements
This implements support for named captures in
RegExp.prototype[@@replace] for when the replaceValue is not callable.

Named captures can be referenced from replacement strings by using the
"$<name>" syntax. A couple of examples:

let re = /(?<fst>.)(?<snd>.)/u;
"abcd".replace(re, "$<snd>$<fst>")  // "bacd"
"abcd".replace(re, "$2$1")     // "bacd" (numbered refs work as always)
"abcd".replace(re, "$<snd")    // SyntaxError (unterminated named ref)
"abcd".replace(re, "$<42$1>")  // "cd" (invalid name)
"abcd".replace(re, "$<thd>")   // "cd" (non-existent name)
"abcd".replace(/(?<fst>.)|(?<snd>.)/u, "$<snd>")  // "cd" (non-matched capture)

Support is currently behind the --harmony-regexp-named-captures flag.

BUG=v8:5437

Review-Url: https://codereview.chromium.org/2775303002
Cr-Commit-Position: refs/heads/master@{#44171}
2017-03-28 08:02:03 +00:00
Michael Starzinger
54a1942a84 [asm.js] Widen test coverage to cctest and friends.
R=machenbach@chromium.org
BUG=v8:6127

Change-Id: I19092232bc0de728ec37fa9188998ec9dbd94bed
Reviewed-on: https://chromium-review.googlesource.com/459498
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44170}
2017-03-28 08:00:40 +00:00