Commit Graph

47346 Commits

Author SHA1 Message Date
jgruber
6379e2a464 [builtins] Patch self-references in constants table
During code generation, we generate self-references (i.e. references to
the Code object currently being generated) as references to a temporary
handle. When the final Code object has been allocated, the handle's
location is fixed up and RelocInfo iteration fixes up all references
embedded in the generated code.

This adds support for this mechanism to the builtins constants table
builder. CodeObject() is now a new handle pointing to a dedicated
self-reference marker in order to distinguish between self-references
and references to undefined. In Factory::NewCode, we patch up
the constants table.

Bug: v8:6666
Change-Id: If74ed91bb1c3b8abb20ff2f0a87d1bcd9a1b0511
Reviewed-on: https://chromium-review.googlesource.com/1018468
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52854}
2018-04-27 15:38:10 +00:00
Michael Starzinger
d71bcfcb54 [wasm] Make {NativeModule} independent of instance.
This removes the last reference from {NativeModule} that made it
specific to a concrete WebAssembly instance, by only referencing the
{WasmSharedModuleData} instead of a {WasmCompiledModule}. Note that
eventually we want to remove this reference completely to become even
independent of the underlying Isolate soon.

R=clemensh@chromium.org
BUG=v8:7424

Change-Id: I29b8cde8beadeef75c90e90fbff1830f2bf4e636
Reviewed-on: https://chromium-review.googlesource.com/1032433
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52853}
2018-04-27 14:22:35 +00:00
Ben L. Titzer
8ba3f1366d [wasm] Handlify table entry helpers
R=clemensh@chromium.org

Change-Id: Iade16b07a24dca8ac542e68becad734d977b673a
Reviewed-on: https://chromium-review.googlesource.com/1032778
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52852}
2018-04-27 14:11:34 +00:00
Georg Neis
61c9503965 [torque] Minor cleanups.
- Refine the type of 'hole'.
- Remove the mysterious 'receiver' definition.
- Remove the declaration of a non-existing Print function.

Bug: v8:7570
Change-Id: If093b456a9bc31c5673ada87f262c0cfcadf11ad
Reviewed-on: https://chromium-review.googlesource.com/1032737
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52851}
2018-04-27 13:59:49 +00:00
Simon Zünd
9f01281656 [refactoring] Remove unused CSA methods.
Bug: v8:7570
Change-Id: I2c6551fdd1a53323065f9c23e5bee793e9f561cf
Reviewed-on: https://chromium-review.googlesource.com/1032774
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#52850}
2018-04-27 13:49:39 +00:00
Clemens Hammacher
8466b71ad8 [wasm] Split off wasm-linkage.h
Linkage-related methods were declared in wasm-compiler.h and
implemented in wasm-linkage.cc. This required all users of e.g. wasm
call descriptors to include the whole wasm compiler header. Also, some
wasm linkage information is independent of turbofan and also used
outside of the compiler directory.

This CL splits off wasm-linkage.h (with minimal includes) and puts it
in src/wasm. This allows to use that information without including
compiler headers (will clean up several uses in follow-up CLs).

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

Bug: v8:7570
Change-Id: Ifcae70b4ea7932cda30953b325c2b87c4176c598
Reviewed-on: https://chromium-review.googlesource.com/1013701
Reviewed-by: Ben Titzer <titzer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52849}
2018-04-27 13:43:49 +00:00
Dan Elphick
4655c9d369 [heap] Move all Maps into RO_SPACE
Allocates almost all maps found in the start up snapshot into RO_SPACE.
There are 2 JSObject maps that are excluded as they contain a mutable cell.

Also updates VerifyReadOnlyPointers to check that RO_SPACE objects' maps are
also in RO_SPACE. Previously the invariant did not hold for Strings which still
had their maps in MAP_SPACE.

Also moves invalid_prototype_validity_cell to RO_SPACE.

    RO_SPACE  NEW_SPACE  OLD_SPACE  CODE_SPACE  MAP_SPACE  LO_SPACE
old    22024          0     229184       32928       8184         0
new    31488          0     229184       32928        176         0

Bug: v8:7464
Change-Id: I870d22cc5234ba60b3ef8a2ada590ee6ae426c9f
Reviewed-on: https://chromium-review.googlesource.com/1013494
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52848}
2018-04-27 13:33:29 +00:00
sreten.kovacevic
e4df13984c [Liftoff][mips] Implement div and rem instructions
Bug: v8:6600
Change-Id: I49b3180603651609ce575e540169f995587f9d88
Reviewed-on: https://chromium-review.googlesource.com/1032615
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52847}
2018-04-27 13:29:39 +00:00
Camillo Bruni
37b8684ec3 [CSA] Type CodeStubAssembler::Is* methods
Bug: v8:7570
Change-Id: I74b482b670ce0e78dca012cbe8d9c2f65fdae5b9
Reviewed-on: https://chromium-review.googlesource.com/1030554
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52846}
2018-04-27 12:45:21 +00:00
Dan Elphick
440533d5d4 [builtins] Remove new_target from ArrayBuiltinsAssembler
Removes new_target member and getter since none of the Array builtins in
builtins-array-gen.* use it (since none of them are constructors).

delete new_target getter and member variable

Bug: v8:7570
Change-Id: Ia23af014750278d64447bb58171955d909fdb5a8
Reviewed-on: https://chromium-review.googlesource.com/1032556
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52845}
2018-04-27 12:26:41 +00:00
sreten.kovacevic
c0c073e65c [Liftoff][mips64] Implement f32/f64 conversion to i64/u64
Bug: v8:6600
Change-Id: Ieefbd4530f068b41895a8eb608a480b563968d63
Reviewed-on: https://chromium-review.googlesource.com/1030331
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52844}
2018-04-27 12:05:30 +00:00
Ivica Bogosavljevic
443b9de184 MIPS: Fix [builtins] Introduce further constant & external reference indirections
Temporary register at was rewritten. We use different register.

Change-Id: If3a162765ee29eb1d03d3f29345328cf79244e41
Reviewed-on: https://chromium-review.googlesource.com/1032616
Reviewed-by: Sreten Kovacevic <sreten.kovacevic@mips.com>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52843}
2018-04-27 12:03:09 +00:00
Peter Marshall
f8597b25c1 [cleanup] Change objects_by_info_ to use unordered map.
Trying to reduce use of our self-baked data structures.

Bug: v8:7570
Change-Id: I3c8598ece74b6434c8baa69810a384b5209dd107
Reviewed-on: https://chromium-review.googlesource.com/1032442
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52842}
2018-04-27 11:56:57 +00:00
Marja Hölttä
0a01b62022 [objects.h splitting] Move TemplateInfo + related classes.
BUG=v8:5402,v8:7570

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: Ia97efa31495b371805eb469be8395aaa19c7628d
Reviewed-on: https://chromium-review.googlesource.com/1032431
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52841}
2018-04-27 11:15:44 +00:00
Peter Marshall
1961008a03 [cleanup] Change CounterMap to use unordered map.
Trying to reduce use of our self-baked data structures.

Bug: v8:7570
Change-Id: Ie4257911b388d320e4c5da5108cd763d3ab9299f
Reviewed-on: https://chromium-review.googlesource.com/1032555
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52840}
2018-04-27 11:01:18 +00:00
Georg Neis
b9dd620b28 [cleanup] Don't bake mjsunit.js line numbers into message tests.
Whenever mjsunit.js changes, these tests might suddenly fail.

R=herhut@chromium.org

Bug: v8:7570
Change-Id: Ib43b03a3df92a4c5acabc193c63f46b29ea992b0
Reviewed-on: https://chromium-review.googlesource.com/1032440
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52839}
2018-04-27 10:38:03 +00:00
Clemens Hammacher
feada70894 [Liftoff] Implement f64.min and f64.max
This adds support for f64.min and f64.max, implemented on ia32, x64,
mips and mips64.

R=ahaas@chromium.org

Bug: v8:6600
Change-Id: Ib4383df08692c76df5861fe71a96c4354fdf10c1
Reviewed-on: https://chromium-review.googlesource.com/1028235
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52838}
2018-04-27 10:36:58 +00:00
Georg Neis
649c25263b [cleanup] Remove some obsolete TODOs.
R=sigurds@chromium.org

Bug: v8:7570
Change-Id: I3f077940117467be98fbb3c2a30684af8eaaf801
Reviewed-on: https://chromium-review.googlesource.com/1032432
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52837}
2018-04-27 10:27:27 +00:00
sreten.kovacevic
600033e65c [Liftoff][mips] Implement f32 min/max
Fix initial implementation of min/max f32 instructions.

Bug: v8:6600
Change-Id: Icb30515b692caef2c33bd85f468e83c17cdef2a3
Reviewed-on: https://chromium-review.googlesource.com/1030493
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52836}
2018-04-27 09:57:17 +00:00
Ben L. Titzer
a17083ee3a [wasm] Rename WasmModuleWrapper to Managed<WasmModule>
R=ahaas@chromium.org

Bug: v8:7570
Change-Id: I5327d1b8e2f2bf4c1538f565442305a0e1f05b65
Reviewed-on: https://chromium-review.googlesource.com/1032550
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52835}
2018-04-27 09:41:17 +00:00
Michael Achenbach
ff571867d7 [test] Skip flaky tests
See referenced bugs for links.

NOTRY=true

Bug: v8:5193,v8:7702
Change-Id: I380479405f46cfc32d6cfa728fb86297f6d4f43c
Reviewed-on: https://chromium-review.googlesource.com/1032436
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52834}
2018-04-27 09:18:07 +00:00
Michael Achenbach
dd12341bbd [infra] Add presubmit checks for test specifications
This adds presubmit checks and documentation for the features added on
infra side in https://crrev.com/c/1019080.

NOTRY=true

Bug: chromium:830557
Change-Id: If3808f5931f7b1043a8a80c03a293df4602ce758
Reviewed-on: https://chromium-review.googlesource.com/1021140
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52833}
2018-04-27 08:39:26 +00:00
Clemens Hammacher
fa0e55e2f4 [test] Fix CHECK_DOUBLE_EQ and CHECK_FLOAT_EQ
Both macros currently call a function with individual CHECKs, which
makes error messages only show that one part of the equality check (and
not the the actual float values), and hides the actual location of the
check.
This CL refactors this such that the actual value is shown (just as
with other CHECK_EQ macros) and it shows the right file name and line
number.

R=ahaas@chromium.org

Bug: v8:7570
Change-Id: I198e73c053178a09f14330a18069463760693f81
Reviewed-on: https://chromium-review.googlesource.com/1027879
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52832}
2018-04-27 08:34:16 +00:00
Ben L. Titzer
903d87312e [wasm] Fix target instance for indirect calls to imports
In the case of an indirect call to an imported function, the target
instance stored in the IFT was actually wrong.

Bug: chromium:834619
Change-Id: Id2ac4158335ecf2b58e1983ce37df852a9ebd1b2
Reviewed-on: https://chromium-review.googlesource.com/1030174
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52831}
2018-04-27 08:27:56 +00:00
Marja Hölttä
006f3f56cb [cleanup] Remove parser_shell
It's old & not used recently & obsolete. It was mainly used for measuring the
effect of preparse data, which we no longer have.

BUG=v8:7570

Change-Id: Ic31958e736fbf9645e014f6ef61dd6cf72a42c76
Reviewed-on: https://chromium-review.googlesource.com/1032390
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52830}
2018-04-27 08:11:35 +00:00
Marja Hölttä
a6c44361c8 [iwyu, objects.h splitting] Outline MarkCompactCollector::MarkingWorklist::PrintWorklist.
Calls a function defined in map-inl.h which mark-compact.h is not allowed to
include.

BUG=v8:7490,v8:5402,v8:7570

Change-Id: I51cef646fc2b650208d4e59b92bcd1e406ddd7fd
Reviewed-on: https://chromium-review.googlesource.com/1032332
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52829}
2018-04-27 08:02:05 +00:00
Michael Achenbach
8961287aec [V8] Add back owners check
This adds parts of Chromium's PanProjectChecks. We don't add all yet
as there is to much chance for the checks to fire on files later. We
first need to find a way to run the checks on all files (not only
changed ones).

NOTRY=true

Bug: v8:7689
Change-Id: I747b49a9a362cf76f329e7f743545c6e6cb56f85
Reviewed-on: https://chromium-review.googlesource.com/1029854
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52828}
2018-04-27 07:43:39 +00:00
jgruber
15db6d5512 Skip test-heap/OutOfMemorySmallObjects on native arm
The test is flaky on arm in --optimize-for-size.

NOTRY=true

Bug: v8:7605
Change-Id: I6219442545244bb0c07f8b028668f41602a83b30
Reviewed-on: https://chromium-review.googlesource.com/1032331
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52827}
2018-04-27 07:42:34 +00:00
v8-autoroll
54c6f78c17 Update V8 DEPS.
Rolling v8/build: 403c903..70ef8f2

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/dc970d3..846cec5

Rolling v8/third_party/googletest/src: 4bd8c46..a6f06bf

Rolling v8/tools/clang: abe5e4f..ec200e7

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

Change-Id: Icdef510ea71b63f7dd748e72e85a494ebf790c39
Reviewed-on: https://chromium-review.googlesource.com/1031910
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52826}
2018-04-27 06:20:39 +00:00
Jakob Kummerow
32b5cad1da [elements.cc] Specialize CollectValuesOrEntriesImpl
When collecting the values of an object with Smi or Object elements
kind, there are no allocations, so we don't need to create a short-
lived handle for each value. This gives a small performance benefit
in general, and in particular on ia32 by reducing register pressure
causes clang to spill less, which fixes the regression in the issue
mentioned below.

Bug: chromium:833591
Change-Id: I5eb0c6164b2972306ce965ec101687cab486bf0d
Reviewed-on: https://chromium-review.googlesource.com/1029417
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52825}
2018-04-27 06:19:34 +00:00
Jakob Kummerow
8d236192a1 [heap] Fine-tune write barrier for strong references
There is no need to remove an object pointer's heap object
tag when all we want is the Page that it's on. Also, apply
to IncrementalMarking's writebarrier the optimization that
crrev.com/e570e67383577c7f5ab6da7beb68631bab4ba75d brought
to the old-to-new barrier.

Change-Id: Ic9328d7d6f5c01073288a3e87931ea6095750740
Reviewed-on: https://chromium-review.googlesource.com/1029413
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52824}
2018-04-27 06:18:25 +00:00
Jungshik Shin
919270e024 Fix the fast path for locale canonicalization
Not all 2 or 3 letter language codes are canonical. Some of them need
to be canonicalized.

Specifically, exclude {jw,ji,iw,in} and all three-letter codes from the
fast path except for 'fil'.

{jw,ji,iw,in} are deprecated ISO 639 codes for
{Javanese, Yiddish, Hebrew, Indonesian}. They should be
canonicalized to {jv,yi,he,id}. So, do not return early
in the fast path, but pass it down to the full canonicalization.

In addition, there are 70+ deprecated 3-letter codes that need to be
replaced by their modern equivalents. Instead of checking and replacing
in v8, just pass them to ICU to handle.

Along with the following ICU change, two more tests will pass.

  https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1026797

These two tests still fail because of the disagreement between ICU and the test
expectations about 5 grandfathered tags with no preferred value (e.g.
i-default, zh-min, cel-gaulish).

  'intl402/Intl/getCanonicalLocales/canonicalized-tags'
  'intl402/Intl/getCanonicalLocales/preferred-grandfathered'

Bug: v8:5693, v8:7669
Test: test262/intl402/language-tags-canonicalized.js
Test: test262/intl402/Intl/preferred-variants.js
Test: intl/general/language_tags_with_preferred_values.js
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ide7e9c90ac046859604c7b71c641f84ce9c64be5
Reviewed-on: https://chromium-review.googlesource.com/1023379
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52823}
2018-04-26 18:10:04 +00:00
Ben Smith
e3c9f26626 [wasm] Update WebAssembly.Global constructor
The new spec has two arguments, the first is the global descriptor, and
the second is the initial value:

    new WebAssembly.Global({type: i32}, 42);

If the initial value argument is omitted, the value is set to 0.

Bug: v8:7625
Change-Id: I679d4b7c49c69ec7ffcdfeb8ae506fa7ab9bba95
Reviewed-on: https://chromium-review.googlesource.com/1028847
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52822}
2018-04-26 18:01:53 +00:00
Kim-Anh Tran
b3ff8eb9cf [wasm] Log top-tier code
Top-tier code needs to be explicitly logged after
compilation.

Change-Id: Ic3c54ff4b7bddd44516a611398b7373fe0acc8d4
Reviewed-on: https://chromium-review.googlesource.com/1030391
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@google.com>
Cr-Commit-Position: refs/heads/master@{#52821}
2018-04-26 16:30:22 +00:00
Ben L. Titzer
b66226828f [wasm] Implement Managed<T> with std::shared_ptr<T>
This CL simplifies and extends the implementation of Managed<T>
and now uses a std::shared_ptr<T> underneath in order to offer
cross-isolate management of C++ allocated memory.

R=mstarzinger@chromium.org
CC=ulan@chromium.org

Bug: v8:7424
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Id43a26f565677e8c9cdfd73810568d4f2b1871fe
Reviewed-on: https://chromium-review.googlesource.com/1028190
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Ben Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52820}
2018-04-26 15:53:42 +00:00
jgruber
3f99a376dd Reland "[builtins] Introduce further constant & external reference indirections"
This is a reland of f5d308510a

Original change's description:
> [builtins] Introduce further constant & external reference indirections
>
> This introduces further indirections for embedded constants and
> external references for builtins generated by the macro-assembler.
> The used mechanisms (LookupConstant and LookupExternalReference) are
> identical to what we already use in CSA.
>
> Almost all builtins are now isolate-independent in both release and
> debug modes. snapshot_blob.bin is roughly 670K smaller in embedded
> builds vs. non-embedded builds, while libv8.so is roughly 280K larger.
>
> Bug: v8:6666
> Change-Id: I7a6c2193ef5a763e6cf7543dd51597d6fff6c110
> Reviewed-on: https://chromium-review.googlesource.com/1006581
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52810}

TBR=mstarzinger@chromium.org

Bug: v8:6666
Change-Id: I73dfe207f2c5f79a9a06c165c75f5619e88a5a17
Reviewed-on: https://chromium-review.googlesource.com/1030550
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52819}
2018-04-26 15:27:22 +00:00
Alexey Kozyatinskiy
c1e4885f7d Reland "[inspector] added timeout for Debugger.evaluateOnCallFrame method"
This is a reland of 436faae044

Original change's description:
> [inspector] added timeout for Debugger.evaluateOnCallFrame method
> 
> R=dgozman@chromium.org,yangguo@chromium.org
> 
> Bug: none
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I569899f245190ca2fa720bdb837db1263e8058d5
> Reviewed-on: https://chromium-review.googlesource.com/1023035
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52798}

Bug: none
Change-Id: I91219382b5dc45b54dd8e5c64d9f0d11c849b9c8
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1030510
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52818}
2018-04-26 15:08:52 +00:00
Yang Guo
afd73a4856 [api] deprecate old code caching APIs that require source string.
R=jgruber@chromium.org

Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I62955f95812a2c6ac04599c437971863a73af66d
Reviewed-on: https://chromium-review.googlesource.com/1014103
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52817}
2018-04-26 14:53:22 +00:00
sreten.kovacevic
bb965ff7fb [Liftoff][mips] Implement jump on target
Implement emit_jump when target is in register.

Bug: v8:6600
Change-Id: Idd8fc739ac9997cad53feffdfcee5ae25d9ad6ee
Reviewed-on: https://chromium-review.googlesource.com/1030453
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52816}
2018-04-26 14:44:42 +00:00
Vincent Belliard
076ff421e5 [arm64][Liftoff] add AbortCompilation
When a liftoff function bails out after generating some constant pool,
this avoids to trigger a check in the Assembler destructor.

Bug: v8:6600

Change-Id: I79c595605bc0add1f3f5617ac7feedf162081d8a
Reviewed-on: https://chromium-review.googlesource.com/1026647
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Vincent Belliard <vincent.belliard@arm.com>
Cr-Commit-Position: refs/heads/master@{#52815}
2018-04-26 14:35:30 +00:00
Ivica Bogosavljevic
b8166b34fd MIPS[64]: Fix call to PrepareCallCFunction in liftoff
In liftoff, call to PrepareCallCFunction was using at as scratch
register. This is a very bad idea, since at is later used in
underlying macro assembler

TEST=cctest/test-run-wasm-64/RunWasmLiftoff_Regression_6858

Change-Id: Ifbc43678731d2833d2faa2f20fe79ea9e3089002
Reviewed-on: https://chromium-review.googlesource.com/1030430
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Sreten Kovacevic <sreten.kovacevic@mips.com>
Commit-Queue: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52814}
2018-04-26 13:50:42 +00:00
jgruber
a9da85e7c8 Revert "[builtins] Introduce further constant & external reference indirections"
This reverts commit f5d308510a.

Breakages:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20noi18n%20-%20debug/builds/20370
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20-%20custom%20snapshot%20-%20debug/builds/21174

TBR=yangguo@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Change-Id: Ic4d28fccf647aadcac0a60430b7fb66d22ce4577
Reviewed-on: https://chromium-review.googlesource.com/1030431
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52813}
2018-04-26 13:42:53 +00:00
Jakob Gruber
9b2bb40448 Revert "[test] Disable pause-on-oom in no_snap"
This reverts commit 2f0a78ab75.

Reason for revert: Test fixed by https://chromium-review.googlesource.com/1030211.

Original change's description:
> [test] Disable pause-on-oom in no_snap
> 
> 
> TBR=machenbach@chromium.org
> 
> Bug: v8:7631
> No-Tree-Checks: true
> No-Try: true
> Change-Id: Iace8fae7fcbdd1766394ee30d0c1e54f3a29e2b9
> Reviewed-on: https://chromium-review.googlesource.com/1027852
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#52780}

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

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

Bug: v8:7631
Change-Id: I42bd9d251eb82b2e49e45756118d7dde8f99536d
Reviewed-on: https://chromium-review.googlesource.com/1030390
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52812}
2018-04-26 13:19:32 +00:00
jgruber
5958788c1a Fix intl builtins in IsIsolateIndependent predicate
Intl builtins must stay behind V8_INTL_SUPPORT.

This fixes:
ci.chromium.org/buildbot/client.v8.ports/V8%20Mips%20-%20builder/16733

TBR=yangguo@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6666
Change-Id: I001df26585e376c6e242ece88612e10417529037
Reviewed-on: https://chromium-review.googlesource.com/1030272
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52811}
2018-04-26 13:15:33 +00:00
jgruber
f5d308510a [builtins] Introduce further constant & external reference indirections
This introduces further indirections for embedded constants and
external references for builtins generated by the macro-assembler.
The used mechanisms (LookupConstant and LookupExternalReference) are
identical to what we already use in CSA.

Almost all builtins are now isolate-independent in both release and
debug modes. snapshot_blob.bin is roughly 670K smaller in embedded
builds vs. non-embedded builds, while libv8.so is roughly 280K larger.

Bug: v8:6666
Change-Id: I7a6c2193ef5a763e6cf7543dd51597d6fff6c110
Reviewed-on: https://chromium-review.googlesource.com/1006581
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52810}
2018-04-26 13:01:41 +00:00
jgruber
27ed807156 Open a HandleScope before NearHeapLimitCallback
This should fix the recent frequent pause-on-oom failures.
The callback attempted to create a handle without a HandleScope.

Bug: v8:7631
Change-Id: Id15ba287896d62d3205585d14204f0c92a8823f8
Reviewed-on: https://chromium-review.googlesource.com/1030211
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52809}
2018-04-26 12:37:11 +00:00
Peter Marshall
6b454aff37 [test] Fix inlining test for CpuProfiler.
When running this test locally, the OptimizeFunctionOnNextCall
call fails, because the line above has no semicolon, and automatic
insertion doesn't help, probably because of the % sign. The test still
runs, but the first call after level1() fails, meaning the inlining
does not happen.

Change-Id: Icd2d08e676ea3cade63d4e12277748a447e410fc
Reviewed-on: https://chromium-review.googlesource.com/1030210
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52808}
2018-04-26 12:19:51 +00:00
Stephan Herhut
48d508cb45 [wasm] Add I32AtomicCompareExchange to interpreter
This adds support for the I32AtomicCompareExchange operations in the
interpreter. Also, the interpreter will now fail if it encounters
an unknown opcode from the atomic prefix.

Bug: chromium:826069
Change-Id: Iec1742271f4fdd83fcaa09ca72c24d1cf8c58835
Reviewed-on: https://chromium-review.googlesource.com/1029867
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52807}
2018-04-26 12:02:11 +00:00
sreten.kovacevic
19896840c7 [Liftoff][mips] Implement f32/f64 to i32/u32 conversion
Implement float to i32/u32 conversion on mips. Also, fix order
of arguments in some macro-assembler instructions used for these
conversions.

Bug: v8:6600
Change-Id: I94c91f8ac7796ac66fb3cf0129a2a27c1a6ec336
Reviewed-on: https://chromium-review.googlesource.com/1028232
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: Ivica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52806}
2018-04-26 10:10:51 +00:00
v8-autoroll
0d200d0832 Update V8 DEPS.
Rolling v8/build: 358d25a..403c903

Rolling v8/buildtools: 8febfea..ab7b6a7

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/f718fb1..dc970d3

Rolling v8/third_party/googletest/src: b640d87..4bd8c46

Rolling v8/third_party/icu: aff99f5..e4194dc

Rolling v8/tools/clang: 5395a74..abe5e4f

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

Change-Id: I8b2b34357451a7c1f71327e7cf633dc73aea5f72
Reviewed-on: https://chromium-review.googlesource.com/1029740
Commit-Queue: v8 autoroll <v8-autoroll@chromium.org>
Reviewed-by: v8 autoroll <v8-autoroll@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52805}
2018-04-26 09:36:08 +00:00