Commit Graph

42447 Commits

Author SHA1 Message Date
Marja Hölttä
566e972395 [parser] Skipping inner funcs: Fix bailout.
When the bailout triggered, we assumed we're generating data (i.e., we're inside
a non-arrow function). This is not true; it's possible that we're already inside
an arrow function and not generating data anyway.

BUG=v8:5516,chromium:761980

Change-Id: Iad9c8dde283031630953ef9a46c1e68bc0cee048
Reviewed-on: https://chromium-review.googlesource.com/655081
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47905}
2017-09-07 21:18:12 +00:00
Adam Klein
59798cc800 [parser] Inline ParseStatemantAsUnlabelled into its only useful caller
Tracking labels for most of these statements made no difference: only
try-statements require the special treatment of being wrapped in a
block. The previous code existed to support strong mode, which is
long gone.

This also results in a tiny regression of the error message for
a labelled `continue` statement targeting itself, but I'm not
convinced that anyone would ever intend to label a continue
statement (and Chakra and SpiderMonkey give similarly inaccurate
error messages for this case).

This is effectively a revert of d8bccfe974.

Bug: v8:6092
Change-Id: I25b62e10f6a20597e9686f08df76ba9724249618
Reviewed-on: https://chromium-review.googlesource.com/653380
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47904}
2017-09-07 21:01:46 +00:00
Junliang Yan
a6e84a38cc s390: fix emit_code_target in assembler
R=bjaideep@ca.ibm.com, joransiu@ca.ibm.com

Bug: 
Change-Id: I83d3c7c2a318eb6c1c4025603b01e894f196bac6
Reviewed-on: https://chromium-review.googlesource.com/655131
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Reviewed-by: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47903}
2017-09-07 21:00:42 +00:00
Adam Klein
6fd19f7ee5 [bigint] Move desugaring of unary ops from Parser to BytecodeGenerator
This is in preparation for BigInt, since for BigInt operands the desugared
operations will no longer be equivalent.

Future CLs can move the handling of these operations further down the
pipeline; this is merely a start to get the Parser out of this business.

Bug: v8:6791
Change-Id: I9df89e03d3ca2bf627c75fc5efb10463c3ed8cf9
Reviewed-on: https://chromium-review.googlesource.com/653433
Commit-Queue: Adam Klein <adamk@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47902}
2017-09-07 20:59:37 +00:00
Alexander Timokhin
9c0471b37b Add V8_ENABLE_CHECKS define to public config
We should add this define to external_config because it is used in
public include v8.h (e.g.: https://cs.chromium.org/chromium/src/v8/include/v8.h?l=272&rcl=5cd6565d5ad06a8cb5a1d9d502d15a54e4fa5bbe)

Change-Id: I795a3de448029e34033cf8f83094bdea3590bbb9
Reviewed-on: https://chromium-review.googlesource.com/654876
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47901}
2017-09-07 20:58:31 +00:00
Sathya Gunasekaran
35fad6397b Revert "[snapshot] Temporarily enable --lazy-deserialization"
This reverts commit da6aab4319.

Reason for revert: breaks ARM
https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/4376

Original change's description:
> [snapshot] Temporarily enable --lazy-deserialization
> 
> Flip the flag for one day to determine impact and flush out bugs.
> Please add crashes and regressions to https://crbug.com/v8/6796.
> 
> Bug: v8:6624,v8:6796
> Change-Id: I8b0581c40d956e01f94e9098ff935fdd5af36156
> Reviewed-on: https://chromium-review.googlesource.com/651408
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Michael Hablich <hablich@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47893}

TBR=yangguo@chromium.org,hablich@chromium.org,jgruber@chromium.org

Change-Id: I65efccb4696777a3dae30984991e29d023236b12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6624, v8:6796
Reviewed-on: https://chromium-review.googlesource.com/655897
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47900}
2017-09-07 19:15:38 +00:00
Deepti Gandluri
2152297ca0 Revert "[debug] Add test for promise finally"
This reverts commit a2ed05144c.

Reason for revert: Breaks ARM debug -
https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm%20-%20debug/builds/4377

Original change's description:
> [debug] Add test for promise finally
> 
> As of v8:6536, we no longer have to mark builtins explicitly.
> 
> Also remove test whitelist for promise finally
> builtins.
> 
> Bug: v8:6088, v8:5967
> Change-Id: I7f98dfe7708678653e944ac76ba9938205490b16
> Reviewed-on: https://chromium-review.googlesource.com/654067
> Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47896}

TBR=gsathya@chromium.org,jgruber@chromium.org

Change-Id: I2c064671a7650c3c97840e20dfdad4d6343ed0a4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6088, v8:5967
Reviewed-on: https://chromium-review.googlesource.com/655737
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47899}
2017-09-07 18:14:24 +00:00
Sathya Gunasekaran
af4ff8c71f [ESNext] Update Promise.prototype.finally to match latest spec
The spec calls out to Promise.prototype.then and also passes around
the constructor of the receiver to Promise.prototype.finally.

Adds a new constructor slot to PromiseFinallyContext enum and this is
used to create a new promise in the thenFinally/catchFinally callbacks.

Created a new PromiseResolve TFS builtin refactored from
the existing PromiseResolve builtin. PromiseResolveWrapper
calls out to this TFS Builtin and is now exposed as Promise.resolve.
The thenFinally and catchFinally callbacks also call out to the
PromiseResolve TFS builtin.

Spec -- https://tc39.github.io/proposal-promise-finally/

Bug: v8:5967
Change-Id: I2ce89f14d3b149619d11e424b6e37062e466c4d5
Reviewed-on: https://chromium-review.googlesource.com/652026
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47898}
2017-09-07 17:56:21 +00:00
Benedikt Meurer
52cdf06b63 [turbofan] Address TODO now that Object constructor is a proper builtin.
Bug: v8:6772
Tbr: jarin@chromium.org
Change-Id: I48b21fbdec42d4b1c10800913f7fa222a5509a8d
Reviewed-on: https://chromium-review.googlesource.com/654873
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47897}
2017-09-07 17:42:39 +00:00
Sathya Gunasekaran
a2ed05144c [debug] Add test for promise finally
As of v8:6536, we no longer have to mark builtins explicitly.

Also remove test whitelist for promise finally
builtins.

Bug: v8:6088, v8:5967
Change-Id: I7f98dfe7708678653e944ac76ba9938205490b16
Reviewed-on: https://chromium-review.googlesource.com/654067
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47896}
2017-09-07 16:48:11 +00:00
Alexey Kozyatinskiy
d63594b684 [inspector] added url to Debugger.CallFrame
Runtime.CallFrame has url already. It allows to show stack traces on pause
without tacking all parsed scripts.

R=alph@chromium.org,pfeldman@chromium.org

Bug: chromium:762982
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ic4f096ade1cb6c9de42fec77280dcc3007c6a5cf
Reviewed-on: https://chromium-review.googlesource.com/648068
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47895}
2017-09-07 16:39:31 +00:00
Mostyn Bramley-Moore
e98edd16fd [jumbo] avoid fixed-dtoa.cc conflicts with base/macros.h's RoundUp
Bug: chromium:746958
Change-Id: I18593669e8a8bb622b575258441d4933ad98ec3e
Reviewed-on: https://chromium-review.googlesource.com/654871
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#47894}
2017-09-07 16:31:11 +00:00
Jakob Gruber
da6aab4319 [snapshot] Temporarily enable --lazy-deserialization
Flip the flag for one day to determine impact and flush out bugs.
Please add crashes and regressions to https://crbug.com/v8/6796.

Bug: v8:6624,v8:6796
Change-Id: I8b0581c40d956e01f94e9098ff935fdd5af36156
Reviewed-on: https://chromium-review.googlesource.com/651408
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47893}
2017-09-07 16:22:41 +00:00
Michael Starzinger
bf070eec68 [turbofan] Remove some overzealous object-inl.h includes.
R=marja@chromium.org

Change-Id: I7e1b471c425a28d77100ce3cda34511393b31365
Reviewed-on: https://chromium-review.googlesource.com/654901
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47892}
2017-09-07 15:46:10 +00:00
jgruber
52b2aa6d0f [builtins] Mark ObjectConstructor eager
TBR=yangguo@chromium.org,verwaest@chromium.org

Bug: v8:6624,v8:6787
Change-Id: I6fbad17cb2e9d6238b84fc96a518e545a7156769
Reviewed-on: https://chromium-review.googlesource.com/655168
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47891}
2017-09-07 15:45:05 +00:00
Peter Marshall
ab43c76dde [cleanup] Replace List with std::vector in uri, debug, and others.
Bug: v8:6333
Change-Id: Ibc704172ebc796977b8d8cfae6976666d186f12c
Reviewed-on: https://chromium-review.googlesource.com/652450
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47890}
2017-09-07 15:04:31 +00:00
Clemens Hammacher
408f252bfa [assembler] Remove RegisterBase::is method
Use operator== and operator!= instead.
Implemented for x64, ia32, arm, arm64, mips and mips64.

R=mstarzinger@chromium.org,ishell@chromium.org,jgruber@chromium.org

Change-Id: Iad0f03f7f442709dcaa12d6a49a8bc4b03b9cdae
Reviewed-on: https://chromium-review.googlesource.com/654857
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47889}
2017-09-07 15:03:22 +00:00
Toon Verwaest
04419d4d89 [builtins] Migrate the Object constructor from JS to CSA.
This speeds up the baseline performance of Object by 20%.

With this change, the callViaObject when run with --noopt
goes from 10718ms to 8577ms on the benchmark from:
http://benediktmeurer.de/2017/08/31/object-constructor-calls-in-webpack-bundles

Bug: v8:6772
Change-Id: Id0e54ba44204a1700885185ec360e1c56834fb73
Reviewed-on: https://chromium-review.googlesource.com/654900
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47888}
2017-09-07 14:38:32 +00:00
jgruber
238b3c964d [snapshot] Disable lazy deserialization in some tests
Lazy deserialization requires a fully set-up isolate (in particular, we
need Isolate::snapshot_blob). This CL disables lazy deserialization in
affected tests. This should be fixed at some point by setting up the
isolate as needed.

Bug: v8:6624
Change-Id: I94f792d9dcc8a3ba2d91fdeadd9e04ebb0bb50cf
Reviewed-on: https://chromium-review.googlesource.com/655162
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47887}
2017-09-07 14:19:12 +00:00
Yang Guo
65055a9b00 [coverage] disallow copy constructor for API objects.
R=caseq@chromium.org

Change-Id: Ie7d8e2eb1452758895f47c749cd7f1ea9b565301
Reviewed-on: https://chromium-review.googlesource.com/654038
Reviewed-by: Franziska Hinkelmann <franzih@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47886}
2017-09-07 14:15:52 +00:00
jgruber
2797a14cd0 [snapshot] Deserialize eagerly if serializer is active
When setting up an isolate for serialization, we need to disable lazy
deserialization to avoid replacing lazy builtins with DeserializeLazy.

Bug: v8:6624
Change-Id: I3e10e262f6dd856f92fd83e5e475127e8ca3f3bf
Reviewed-on: https://chromium-review.googlesource.com/655161
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47885}
2017-09-07 14:11:12 +00:00
Peter Marshall
d450441dbe Reland "[cleanup] Replace more instances of List with std::vector."
This is a reland of 9b35364c51
Original change's description:
> [cleanup] Replace more instances of List with std::vector.
> 
> Bug: v8:6333
> Change-Id: Ic1956d3dcfc0309fe2b65344e5af7235d5b804a2
> Reviewed-on: https://chromium-review.googlesource.com/651413
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Peter Marshall <petermarshall@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47854}

Bug: v8:6333
Change-Id: I5d9482b061f26b57550a421ea4099372dc80767f
Reviewed-on: https://chromium-review.googlesource.com/654898
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47884}
2017-09-07 13:57:59 +00:00
jgruber
0ed000d1f9 [builtins] Set lazy_deserialization_builtin_id in api.cc
debug::GetBuiltin creates a new JSFunction and constructs a new SFI at
runtime. Ensure that this SFI has the correct builtin_id set.

Bug: v8:6624,v8:6788
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: I25da2ad5e69478f81042d3e3bf7e7e2644e7050d
Reviewed-on: https://chromium-review.googlesource.com/654643
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47883}
2017-09-07 13:53:59 +00:00
Michael Starzinger
1eabc93f53 [asm.js] Fix include cycle in asm-parser.cc file.
R=clemensh@chromium.org

Change-Id: If0b4aed4e5770702b36e3e1a34189a1b18a9cf17
Reviewed-on: https://chromium-review.googlesource.com/631837
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47882}
2017-09-07 13:50:35 +00:00
jgruber
ef557c9844 [builtins] Mark array continuation builtins as eager
The optimizer produces direct calls to these builtins. Lazy
deserialization depends on the existance of a shared function info, so
these need to be blacklisted for now.

Bug: v8:6624,v8:6786
Change-Id: I69e766d327338d333a9a8e6ba9a394aad5f06f01
Reviewed-on: https://chromium-review.googlesource.com/655160
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47881}
2017-09-07 13:37:20 +00:00
Michael Starzinger
bae0ea30c4 [iwyu] Make factory.h self-contained.
This finally allows to include the factory.h header without having to
also inlcude the object-inl.h inline header. It will in turn enable the
removal of the last inline header inclusion violation.

R=marja@chromium.org

Change-Id: Ice2821e1f74cf428d80c8ebf606a218026f37677
Reviewed-on: https://chromium-review.googlesource.com/654862
Reviewed-by: Marja Hölttä <marja@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47880}
2017-09-07 13:36:15 +00:00
jgruber
69f8f185e2 [snapshot] Skip kNextChunk when deserializing builtins
kNextChunk handling in deserializer.cc relies on the reservation
mechanism, which is not used by builtin deserialization. To avoid
complications, we work around this for now by skipping over these
bytecodes.

This will soon become unnecessary once allocations & reservations have
been refactored.

Bug: v8:6624
Change-Id: I9e861268ee2b3f49fe7f3ed6c1e3501b4b47dc37
Reviewed-on: https://chromium-review.googlesource.com/655158
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47879}
2017-09-07 13:30:02 +00:00
jgruber
357269a5d9 [debug-evaluate] Correctly handle DeserializeLazy
With lazy deserialization, the target code object may have been replaced
by DeserializeLazy. In that case, we can get the target builtin id from
the shared function info, and we need to skip RelocInfo iteration (it
doesn't exist yet).

Bug: v8:6624
Change-Id: I765b74de313e65bfdf0122f13535029994fc0de1
Reviewed-on: https://chromium-review.googlesource.com/655159
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47878}
2017-09-07 13:28:56 +00:00
Marja Hölttä
138fbdb4f4 [parser] Fix arrow funcs w/ destructuring params again. [Alternative fix]
What happened:
- When rewriting in DoParseFunction, the relevant function scope is no longer in
the scope stack.
- The correct scope is given to the PatternRewriter.
- PatternRewriter called to Parser::BuildIteratorCloseForCompletion.
- BuildIteratorCloseForCompletion would just call NewTemporary (which creates
a new temporary in Parser's current scope) instead of using the scope passed to
it and calling NewTemporary on it.
- Normally this went unnoticed, since it doesn't matter that much where the
temporary is.
- But in the lazy arrow func case, the Parser's scope at that point was the
already-resolved outer scope, and a DCHECK detected this problem.

Kudos & thanks to verwaest@ for a debugging session :)

BUG=chromium:761831

Change-Id: I1e8474ce927be0330f4ba4efc0fc08fdcc328809
Reviewed-on: https://chromium-review.googlesource.com/650297
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47877}
2017-09-07 13:06:44 +00:00
jgruber
e67420cbc2 [builtins] Move DeserializeLazy to ASM
There are two main reasons to move DeserializeLazy to ASM:

1. We avoid complications around the distinction between Call/Construct
   cases by making sure relevant registers (e.g. new_target) remain
   unclobbered.

2. We can avoid the tail-call through CodeFactory::Call/Construct by
   jumping directly to the deserialized code object.

Bug: v8:6624
Change-Id: Idef8fa73d804e16d510f62766c735d1891729b81
Reviewed-on: https://chromium-review.googlesource.com/652472
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47876}
2017-09-07 12:59:35 +00:00
Juliana Franco
f82ae284fa Remove the next field from JS functions.
Given that we no longer need to iterate over lists of optimized JS functions 
(c.f. https://chromium-review.googlesource.com/c/v8/v8/+/647596), we can 
remove this field. Thus saving the size of one pointer per function.

Bug: v8:6637
Change-Id: If77951f2eddba33ba350fa9ddf03a4edb3f7c7d8
Reviewed-on: https://chromium-review.googlesource.com/652373
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Juliana Patricia Vicente Franco <jupvfranco@google.com>
Cr-Commit-Position: refs/heads/master@{#47875}
2017-09-07 12:36:49 +00:00
Andreas Haas
7b53a0e010 [wasm] Avoid executing infinite loops in the wasm fuzzers
The wasm-async fuzzer uses the bytes provided by the fuzzer engine
directly as wasm module bytes, compiles them with async compilation, and
then tries to execute the "main" function of the module. This "main"
can have an infinite loop which causes a timeout in the fuzzer. With
this CL the "main" function is first executed with the interpreter. If
the execution in the interpreter finishes within 16k steps, which means
that there is no infinite loop, also the compiled code is executed.

I added the raw fuzzer input as a test case because in this case I
really want to test the fuzzer and not V8.

R=clemensh@chromium.org

Bug: chromium:761784
Change-Id: Id1fe5da0da8670ec821ab9979fdb9454dbde1162
Reviewed-on: https://chromium-review.googlesource.com/651046
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47874}
2017-09-07 12:35:45 +00:00
Michael Starzinger
1db428964a [objects] Remove obsolete fields for old OSR support.
R=rmcilroy@chromium.org
BUG=v8:6409

Change-Id: Ib8bb85674f63fed47aa55a775eaade6b14d60f2e
Reviewed-on: https://chromium-review.googlesource.com/654040
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47873}
2017-09-07 12:27:24 +00:00
Camillo Bruni
f199674bed [tools] Harden a few more corners in grokdump.py
Change-Id: If7db250e242350f83b368b33b60399afd5312b36
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/654658
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47872}
2017-09-07 12:21:04 +00:00
Camillo Bruni
a5dfa52e08 [tools] Show more help information grokdump.py
The help output prints the first line of the doc string.

Change-Id: I76817d5138b7bb7ba8034c6a5d803b5aaf1201f7
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/654603
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47871}
2017-09-07 12:19:04 +00:00
Ross McIlroy
a192639e2f [Interpreter] Make CallJSRuntime implicitly use undefined reciever.
JS runtime calls are always created with undefined recievers, so make the
bytecode behave similarly to CallUndefinedReciever such that we don't need
to push an explicit undefined register for the receiver for such calls.

Modifies the Async[Generator/Function]Await[Caught/Uncaught] runtime calls
to pass the generator in the first argument rather than the reciever since
these runtime calls were desugered in the bytecode generator and explicitly
passed the generator in the receiver.

Change-Id: I36c8087bb3b663dccd805bfdb1eea04eb6a73269
Reviewed-on: https://chromium-review.googlesource.com/654257
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47870}
2017-09-07 12:14:24 +00:00
Benedikt Meurer
866782e0e0 [turbofan] Don't introduce unnecessary map checks.
Introduce NodeProperties::NoObservableSideEffectBetween to check if
there's any observable side effect between two nodes in the effect
chain. Use this to guard the insertion of potentially redundant map
checks in the lowering of Object.prototype.hasOwnProperty and keyed
accesses within a for..in loop. This gives another boost on the for..in
performance front.

Bug: v8:6702
Change-Id: I68133f14ad388a1a7422714319c9b323d5cf8bc4
Reviewed-on: https://chromium-review.googlesource.com/654640
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47869}
2017-09-07 10:43:52 +00:00
Franziska Hinkelmann
ccabada6f3 [api] Disable copy for PropertyCallbackArguments
Bug: 
Change-Id: I3a97b303bcb4cbb4835fb5de8c55a21eaaa93504
Reviewed-on: https://chromium-review.googlesource.com/649615
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Franziska Hinkelmann <franzih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47868}
2017-09-07 08:05:59 +00:00
jgruber
258e42cda6 [bootstrapper] Reliably set SFI::lazy_deserialization_builtin_id
The lazy deserialization builtin id is usually set when the shared
function info is created in Factory::NewSharedFunctionInfo, which looks
at the given code object to grab the builtin id.

However, this doesn't work when the shared function info is created
after deserialization, as is the case for harmony features that can be
toggled with runtime flags. At this point, lazy builtins have already
been replaced by DeserializeLazy in the builtins table.

To ensure that the lazy deserialization id is correct in this case,
explicitly set it in bootstrapper functions.

Bug: v8:6624, v8:6788
Change-Id: Ia6ac3a4842d2659d5de6d92f378ea221b5508040
Reviewed-on: https://chromium-review.googlesource.com/652477
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47867}
2017-09-07 08:00:39 +00:00
Mostyn Bramley-Moore
7d890c1135 [jumbo] undef FORWARD_DECLARE after creating it in source files
Followup after https://chromium-review.googlesource.com/c/v8/v8/+/652427
which triggered FORWARD_DECLARE macro redefinition warnings/errors.  Let's
make sure to undef this macro at the end of source files that create it.

Bug: chromium:746958
Change-Id: Ie70743c836db45eb51f412a0d6359f0f667319d3
Reviewed-on: https://chromium-review.googlesource.com/654657
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47866}
2017-09-07 07:35:19 +00:00
jgruber
ad9640e300 [builtins] Extend the list of eager builtins
This extends the list by two cases that we currently cannot handle:

FunctionPrototypeHasInstance is called directly without going through
Call (https://crbug.com/v8/6786).

The Proxy constructor uses a custom construct stub
(https://crbug.com/v8/6787).

Bug: v8:6624,v8:6786,v8:6787
Change-Id: I21b883bf94bfa170d1da7aa812d09f813d881133
Reviewed-on: https://chromium-review.googlesource.com/651424
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47865}
2017-09-07 07:31:29 +00:00
Yang Guo
dbdf487f5e [debug] test that functions optimize without breakpoints.
This came up in the context of a Twitter discussion, see this particular
tweet https://twitter.com/hashseed/status/905684048382754817 and the
relevant thread.

Change-Id: If2447169df999b64ce701a44321d48ba1bff2a06
Reviewed-on: https://chromium-review.googlesource.com/654598
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47864}
2017-09-07 07:23:39 +00:00
Yang Guo
d4c6c7561c [heap] remove heap init from shipping binary.
This reduces the arm32 binary by around 20kB.

R=jkummerow@chromium.org, mstarzinger@chromium.org

Bug: v8:6055
Change-Id: If9098e49793b29dceb8292aff6f668ca28a07728
Reviewed-on: https://chromium-review.googlesource.com/652427
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47863}
2017-09-07 05:24:49 +00:00
Yuki Shiino
eeadb48c28 Supports Object::DefineOwnProperty with ENTER_V8_NO_SCRIPT.
As Blink needs a way to define a property without running a script,
make Object::DefineOwnProperty use ENTER_V8_NO_SCRIPT if the
receiver object is not a JSProxy.  Quite similar to
https://crrev.com/c/v8/v8/+/608348

Bug: chromium:728583, chromedriver:1978, chromium:762385
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: If358bf0d156139c456de369ac04da2be6e626143
Reviewed-on: https://chromium-review.googlesource.com/651949
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47862}
2017-09-07 05:18:38 +00:00
Jeremy Roman
ccb5f5a3f0 Inspector: Skip a copy/widening of the injected script source.
This reduces the number of times this string is copied from two to one.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8680cfc1ef1d6c2cfd3bc4970fe698bb904ce328
Reviewed-on: https://chromium-review.googlesource.com/652591
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47861}
2017-09-06 21:06:18 +00:00
Jaideep Bajwa
e8fbf582f6 PPC/S390: use 32bit load to fix endianess issue
R=joransiu@ca.ibm.com, jyan@ca.ibm.com
BUG=
LOG=N

Change-Id: I353f953b6b2d9c20ebd9d141b33da47761f3e43b
Reviewed-on: https://chromium-review.googlesource.com/653808
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47860}
2017-09-06 21:04:59 +00:00
Mostyn Bramley-Moore
b91b8def42 [jumbo] #undef TRACE at the end of source files
This macro is defined all over the place, and often causes macro
redefinition errors in jumbo builds.  Let's make sure all such
instances created in source files are #undef'ed.

Candidate files found with:
  grep -wL '#undef TRACE' $(git grep -wl '#define TRACE' -- '*.cc')

While we're at it, let's undef all macros defined in these files.

Bug: chromium:746958
Change-Id: I639ca2b141f908457d1b2601cd6d5827dee0ead0
Reviewed-on: https://chromium-review.googlesource.com/652476
Reviewed-by: Mircea Trofin <mtrofin@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#47859}
2017-09-06 19:23:58 +00:00
Anisha Rohra
40c98daa17 s390/PPC: Remove InterpreterExitTrampoline.
Port 30f08f39f9

  Always return to the InterpreterEntryTrampoline rather than calling the
  InterpreterExitTrampoline from the Return bytecode handler. This fixes a
  regression which occured if we upset the call/return stack by skipping the
  return to the InterpreterEntryTrampoline from the return bytecode handler.

R=bjaideep@ca.ibm.com, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Id2bae444e72cd7ddfb74f4861fc2c4f7b5e9bda5
Reviewed-on: https://chromium-review.googlesource.com/653618
Reviewed-by: Jaideep Bajwa <bjaideep@ca.ibm.com>
Commit-Queue: Jaideep Bajwa <bjaideep@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#47858}
2017-09-06 19:04:03 +00:00
Sathya Gunasekaran
ba145b32b4 [api] Fix typo in comment
R=adamk@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Ie59cc231e130fad391508e5c47e01d32d0a78806
Reviewed-on: https://chromium-review.googlesource.com/651357
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47857}
2017-09-06 16:57:44 +00:00
Mythri
bf3b7163e2 Remove SetForceInlineFlag from src/js/*
This is the second attempt at removing this.
Earlier (https://chromium-review.googlesource.com/579194) there were
regressions on some of the functions related to maps and sets. Now that
all of them are ported to CSA, we can remove the remaining uses of
SetForceInlineFlag.

Bug: v8:6682
Change-Id: Iebf296038aa24b65181b0d10531b0569d313e7fc
Reviewed-on: https://chromium-review.googlesource.com/647452
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47856}
2017-09-06 16:34:23 +00:00