Commit Graph

1412 Commits

Author SHA1 Message Date
Yang Guo
0dd33901a1 Reland "[builtins] Add %IsTraceCategoryEnabled and %Trace builtins"
This is a reland of 8d4572a22b

Original change's description:
> [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
>
> Adds the builtin Trace and IsTraceCategoryEnabled functions
> exposed via extra bindings. These are intended to use by
> embedders to allow basic trace event support from JavaScript.
>
> ```js
> isTraceCategoryEnabled('v8.some-category')
>
> trace('e'.charCodeAt(0), 'v8.some-category',
>       'Foo', 0, { abc: 'xyz'})
> ```
>
> Bug: v8:7851
> Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
> Reviewed-on: https://chromium-review.googlesource.com/1103294
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54121}

TBR=cbruni@chromium.org

Bug: v8:7851
Change-Id: Id063754b2834b3b6a2b2654e76e8637bcd6aa5f8
Reviewed-on: https://chromium-review.googlesource.com/1137071
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54532}
2018-07-18 22:49:40 +00:00
Dan Elphick
bb9b41bb03 [explicit isolates] Remove HeapObject::GetHeap/GetIsolate
Convert all remaining uses (in api.cc) to use private local
implementations. These local uses all appear inside deprecated
functions.

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I86bcafd4c8a737da32fcb8ab275ec708632f9e39
Reviewed-on: https://chromium-review.googlesource.com/1140319
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54514}
2018-07-18 08:22:54 +00:00
Marja Hölttä
4b39fe3d60 [objects.h splitting] Move JSProxy.
BUG=v8:7754,v8:5402

Change-Id: Ib3f3a879e68d96cd5d82b1ee461b57dc7367ebe2
Reviewed-on: https://chromium-review.googlesource.com/1139059
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54509}
2018-07-18 06:56:02 +00:00
Sigurd Schneider
46a78fbedf Revert "[embedded-builtins] Enable on all arches except x86 for benchmarks"
This reverts commit f5a8352b0f.

Reason for revert: Performance issues

Original change's description:
> [embedded-builtins] Enable on all arches except x86 for benchmarks
> 
> This CL enables embedded builtins to get benchmark feedback. We need
> this feedback to identify and address remaining performance problems.
> 
> Bug: v8:6666
> Change-Id: I8f77f218e656b55ddabe1236eb2a1d14a5ac6233
> Reviewed-on: https://chromium-review.googlesource.com/1105834
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53836}

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

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

Bug: v8:6666
Change-Id: I0e0897eefa069b0b9ad2dd56b2ffc3e3617f9258
Reviewed-on: https://chromium-review.googlesource.com/1139974
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54498}
2018-07-17 15:33:20 +00:00
Michael Starzinger
df7a027fd1 Factor out {CodeTracer} into a separate header file.
R=clemensh@chromium.org

Change-Id: Iab7210eaddb14c9ca8638cbc8d69206bbaf15462
Reviewed-on: https://chromium-review.googlesource.com/1134785
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54451}
2018-07-16 08:24:40 +00:00
Marja Hölttä
c6effdbba9 [objects.h splitting] Move PrototypeInfo.
BUG=v8:7754,v8:5402

Change-Id: Iccbf453e6b27e4e2604bd3f074882bf864e01070
Reviewed-on: https://chromium-review.googlesource.com/1131129
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54399}
2018-07-12 10:56:27 +00:00
Frank Tang
97cdf44d7c [Intl] Implement Intl.RelativeTimeFormat constructor
Spec: http://tc39.github.io/proposal-intl-relative-time/

Design Doc: go/add-intl.relativetimeformat-to-v8

Test: test262/intl402/RelativeTimeFormat/*, intl/relative-time-format/*

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

Bug: v8:7869
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I2cfe8dba9d3a99957ad4b444023c89bbdae08c7c
Reviewed-on: https://chromium-review.googlesource.com/1124121
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54358}
2018-07-10 14:20:06 +00:00
Stephan Herhut
7679c71194 [build] Remove non-existant header file
Change-Id: I23bd2ca20f3913f334278e865bab41e58f90af0d
Reviewed-on: https://chromium-review.googlesource.com/1129221
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54346}
2018-07-10 08:57:14 +00:00
Brian Stell
3ba5445b8a Port BuildLanguageTagREs from Javascript to C++.
Bug: v8:5751
Test: None (no caller yet)

Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: Ifbe243b945ae6e1750e9db8430da178ae137e34f
Reviewed-on: https://chromium-review.googlesource.com/1117303
Commit-Queue: Brian Stell <bstell@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54336}
2018-07-09 19:40:17 +00:00
Georg Neis
cf87e94c01 Move CompilationDependencies into compiler.
- Move the CompilationDependencies member of OptimizedCompilationInfo
  to Turbofan's PipelineData (and thus into the compiler namespace).
- Move compilation-dependencies.{cc,h} to the compiler directory.

Bug: v8:7902
Change-Id: I5471d0923daf83abe975357325db5bc5ad0a8571
Reviewed-on: https://chromium-review.googlesource.com/1127793
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54295}
2018-07-06 13:32:02 +00:00
Maya Lekova
916e35d72f Reland ^3 "[async] Expose async hooks to d8"
This is a reland of ade7f55b3a

Previously landed as: ade7f55b3a / 1125679
Previously landed as: 3c4d0316e4 / 1065818
Previously landed as: 8e0f67be3f / 1088890

Original change's description:
> Reland ^2 "[async] Expose async hooks to d8"
>
> This is a reland of 8e0f67be3f
>

Bug: chromium:850530
Change-Id: I536cfb9443d80d62937d9c3dc6a53b52b209d5c7
Reviewed-on: https://chromium-review.googlesource.com/1125683
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54218}
2018-07-04 15:47:16 +00:00
Yang Guo
86fb0feb35 Revert "Reland ^2 "[async] Expose async hooks to d8""
This reverts commit ade7f55b3a.

Reason for revert: https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux/25706

Original change's description:
> Reland ^2 "[async] Expose async hooks to d8"
> 
> This is a reland of 8e0f67be3f
> 
> Previously landed as: 3c4d0316e4 / 1065818
> Previously landed as: 8e0f67be3f / 1088890
> 
> Original change's description:
> > [async] Expose async hooks to d8
> >
> > This implementation follows the Node.js API as a guideline.
> 
> Bug: chromium:850530
> Change-Id: I8ba22b11c80328108b197d687826ce0198420c9c
> Reviewed-on: https://chromium-review.googlesource.com/1125679
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54191}

TBR=ofrobots@google.com,sergiyb@chromium.org,gsathya@chromium.org,bmeurer@chromium.org,mslekova@chromium.org

Change-Id: Id751136aee175bb3ba75edc780d62cfc9d60ed24
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:850530
Reviewed-on: https://chromium-review.googlesource.com/1125682
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54195}
2018-07-04 09:07:50 +00:00
Maya Lekova
ade7f55b3a Reland ^2 "[async] Expose async hooks to d8"
This is a reland of 8e0f67be3f

Previously landed as: 3c4d0316e4 / 1065818
Previously landed as: 8e0f67be3f / 1088890

Original change's description:
> [async] Expose async hooks to d8
>
> This implementation follows the Node.js API as a guideline.

Bug: chromium:850530
Change-Id: I8ba22b11c80328108b197d687826ce0198420c9c
Reviewed-on: https://chromium-review.googlesource.com/1125679
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54191}
2018-07-04 08:28:57 +00:00
Yang Guo
1da6cd9f44 [snapshot] allow custom chunk sizes.
Bug: v8:7887
Change-Id: I3904981f06efcb1fb83e863d0be6a16ebaaf17f2
Reviewed-on: https://chromium-review.googlesource.com/1113930
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54189}
2018-07-04 07:38:08 +00:00
Alexey Kozyatinskiy
5505c66446 Reland "[debug] liveedit in native"
This is a reland of 3dfaf8264f

Original change's description:
> [debug] liveedit in native
>
> Liveedit step-by-step:
> 1. calculate diff between old source and new source,
> 2. map function literals from old source to new source,
> 3. create new script for new_source,
> 4. mark literals with changed code as changed, all others as unchanged,
> 5. check that for changed literals there are no:
>   - running generators in the heap,
>   - non droppable frames (e.g. running generator) above them on stack.
> 6. mark the bottom most frame with changed function as scheduled for
>    restart if any.
> 7. for unchanged functions:
>   - deoptimize,
>   - remove from cache,
>   - update source positions,
>   - move to new script,
>   - reset feedback information and preparsed scope information if any,
>   - replace any sfi in constant pool with changed one if any.
> 8. for changed functions:
>   - deoptimize
>   - remove from cache,
>   - reset feedback information,
>   - update all links from js functions to old shared with new one.
> 9. swap scripts.
>
> TBR=ulan@chromium.org
>
> Bug: v8:7862,v8:5713
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I8f6f6156318cc82d6f36d7ebc1c9f7d5f3aa1461
> Reviewed-on: https://chromium-review.googlesource.com/1105493
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54146}

TBR=dgozman@chromium.org

Bug: v8:7862, v8:5713
Change-Id: I163ed2fd2ca3115ba0de74cb35a6fac9e40fdd94
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1124879
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54187}
2018-07-03 21:01:57 +00:00
Dan Elphick
ff32ba8e54 [explicit isolates] Add ReadOnlyRoots
Adds a ReadOnlyRoots class trivially constructable from a Heap* or
Isolate* and which can be obtained from a any HeapObject which provides
access to roots objects that will always be in RO_SPACE. In the longer
term this object will be accessed via a global variable without
requiring an Isolate or using the memory address of a HeapObject to
infer it.

Moves the list macros in heap.h to roots.h and splits some of them into
two parts (read-only and mutable).

Convert cases of heap_object->GetHeap()->root_accessor() to
heap_objects->GetReadOnlyRoots().root_accessor().

Bug: v8:7786
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I14b01052adb2af9a5ec82b970e933d6a423d17a5
Reviewed-on: https://chromium-review.googlesource.com/1122127
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54160}
2018-07-03 10:33:10 +00:00
jgruber
c23a662322 Replace V8_EMBEDDED_BUILTIN by runtime flag
This CL replaces most uses of the V8_EMBEDDED_BUILTIN define
by a new read-only runtime flag called FLAG_embedded_builtins.

The flag is true iff V8_EMBEDDED_BUILTINS is defined.

Bug: v8:6666
Change-Id: Ifcc909dc9b028a2c967f8a0e45029df5e71072df
Reviewed-on: https://chromium-review.googlesource.com/1122401
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54156}
2018-07-03 08:22:19 +00:00
Yang Guo
22594d1092 Revert "[debug] liveedit in native"
This reverts commit 3dfaf8264f.

Reason for revert: Failures - https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20gcc%204.8/20394

Original change's description:
> [debug] liveedit in native
> 
> Liveedit step-by-step:
> 1. calculate diff between old source and new source,
> 2. map function literals from old source to new source,
> 3. create new script for new_source,
> 4. mark literals with changed code as changed, all others as unchanged,
> 5. check that for changed literals there are no:
>   - running generators in the heap,
>   - non droppable frames (e.g. running generator) above them on stack.
> 6. mark the bottom most frame with changed function as scheduled for
>    restart if any.
> 7. for unchanged functions:
>   - deoptimize,
>   - remove from cache,
>   - update source positions,
>   - move to new script,
>   - reset feedback information and preparsed scope information if any,
>   - replace any sfi in constant pool with changed one if any.
> 8. for changed functions:
>   - deoptimize
>   - remove from cache,
>   - reset feedback information,
>   - update all links from js functions to old shared with new one.
> 9. swap scripts.
> 
> TBR=ulan@chromium.org
> 
> Bug: v8:7862,v8:5713
> Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
> Change-Id: I8f6f6156318cc82d6f36d7ebc1c9f7d5f3aa1461
> Reviewed-on: https://chromium-review.googlesource.com/1105493
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54146}

TBR=dgozman@chromium.org,ulan@chromium.org,yangguo@chromium.org,kozyatinskiy@chromium.org

Change-Id: I45df5b6f3abaf29e593c6ac11edefbd0177d0109
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7862, v8:5713
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Reviewed-on: https://chromium-review.googlesource.com/1124159
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54151}
2018-07-03 06:43:04 +00:00
Alexey Kozyatinskiy
3dfaf8264f [debug] liveedit in native
Liveedit step-by-step:
1. calculate diff between old source and new source,
2. map function literals from old source to new source,
3. create new script for new_source,
4. mark literals with changed code as changed, all others as unchanged,
5. check that for changed literals there are no:
  - running generators in the heap,
  - non droppable frames (e.g. running generator) above them on stack.
6. mark the bottom most frame with changed function as scheduled for
   restart if any.
7. for unchanged functions:
  - deoptimize,
  - remove from cache,
  - update source positions,
  - move to new script,
  - reset feedback information and preparsed scope information if any,
  - replace any sfi in constant pool with changed one if any.
8. for changed functions:
  - deoptimize
  - remove from cache,
  - reset feedback information,
  - update all links from js functions to old shared with new one.
9. swap scripts.

TBR=ulan@chromium.org

Bug: v8:7862,v8:5713
Cq-Include-Trybots: luci.chromium.try:linux_chromium_headless_rel;luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I8f6f6156318cc82d6f36d7ebc1c9f7d5f3aa1461
Reviewed-on: https://chromium-review.googlesource.com/1105493
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54146}
2018-07-03 00:44:50 +00:00
Sathya Gunasekaran
f03a754c25 [intl] Refactor instance type checks
Adds Intl::IsObjectOfType method to do type checks. This will make it
easier to port the methods using the runtime type check calls as we
won't have to create a v8::string for type checks.

Bug: v8:5751
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Change-Id: I0babdc8709564be693ce808e2ef3ffef7b24ceec
Reviewed-on: https://chromium-review.googlesource.com/1121943
Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54143}
2018-07-02 17:30:25 +00:00
Creddy
ec7249f274 [runtime][parser] Make CompileTimeValue a struct for type safety.
This promotes CompileTimeValue as a seperate struct instead of FixedArray.
This reduces the heap object size by one word (size field of FixedArray)

Change-Id: Id09d9e04c4c1a98aa9fa53b1a44ec17e8cd06f34
Bug: v8:7787, chromium:818642
Reviewed-on: https://chromium-review.googlesource.com/1119918
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54135}
2018-07-02 12:34:41 +00:00
Michael Achenbach
c888293c7d Revert "[builtins] Add %IsTraceCategoryEnabled and %Trace builtins"
This reverts commit 8d4572a22b.

Reason for revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux64%20TSAN/21312

Original change's description:
> [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
> 
> Adds the builtin Trace and IsTraceCategoryEnabled functions
> exposed via extra bindings. These are intended to use by
> embedders to allow basic trace event support from JavaScript.
> 
> ```js
> isTraceCategoryEnabled('v8.some-category')
> 
> trace('e'.charCodeAt(0), 'v8.some-category',
>       'Foo', 0, { abc: 'xyz'})
> ```
> 
> Bug: v8:7851
> Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
> Reviewed-on: https://chromium-review.googlesource.com/1103294
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54121}

TBR=fmeawad@chromium.org,yangguo@chromium.org,cbruni@chromium.org,bmeurer@chromium.org,jasnell@gmail.com

Change-Id: I352e2413aa771ba9eb069bcc26c04414abfc500f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7851
Reviewed-on: https://chromium-review.googlesource.com/1122036
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54123}
2018-07-02 06:06:47 +00:00
James M Snell
8d4572a22b [builtins] Add %IsTraceCategoryEnabled and %Trace builtins
Adds the builtin Trace and IsTraceCategoryEnabled functions
exposed via extra bindings. These are intended to use by
embedders to allow basic trace event support from JavaScript.

```js
isTraceCategoryEnabled('v8.some-category')

trace('e'.charCodeAt(0), 'v8.some-category',
      'Foo', 0, { abc: 'xyz'})
```

Bug: v8:7851
Change-Id: I7bfb9bb059efdf87d92a56a0aae326650730c250
Reviewed-on: https://chromium-review.googlesource.com/1103294
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Fadi Meawad <fmeawad@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54121}
2018-07-02 05:16:16 +00:00
jgruber
edef59ca27 Reland "[build] Disable slow asserts for v8_enable_fast_mksnapshot"
This is a reland of 7a0d6a5000

Original change's description:
> [build] Disable slow asserts for v8_enable_fast_mksnapshot
>
> Slow asserts double the time spent in mksnapshot. While we want them
> enabled on our bot builds, local builds should be fast and don't
> necessarily need them.
>
> This also adds v8_enable_fast_mksnapshot as default in gm.py.
>
> Bug: v8:7891,v8:6688
> Change-Id: I5ab1491f3396c4351de30dbbb80a81e2242c5db9
> Reviewed-on: https://chromium-review.googlesource.com/1116552
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54074}

TBR=jkummerow@chromium.org

Bug: v8:7891, v8:6688
Change-Id: I3b1e80b3ca156b7d571ebc7f04e341f0ba716691
Reviewed-on: https://chromium-review.googlesource.com/1118139
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54080}
2018-06-28 10:07:42 +00:00
Jakob Gruber
cf66f73771 Revert "[build] Disable slow asserts for v8_enable_fast_mksnapshot"
This reverts commit 7a0d6a5000.

Reason for revert: Breaks no-slow-assert builds.

Original change's description:
> [build] Disable slow asserts for v8_enable_fast_mksnapshot
> 
> Slow asserts double the time spent in mksnapshot. While we want them
> enabled on our bot builds, local builds should be fast and don't
> necessarily need them.
> 
> This also adds v8_enable_fast_mksnapshot as default in gm.py.
> 
> Bug: v8:7891,v8:6688
> Change-Id: I5ab1491f3396c4351de30dbbb80a81e2242c5db9
> Reviewed-on: https://chromium-review.googlesource.com/1116552
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#54074}

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

Change-Id: I6b048e819846c4bd9a064f82e2f3c7609369cd33
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7891, v8:6688
Reviewed-on: https://chromium-review.googlesource.com/1118138
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54077}
2018-06-28 09:12:25 +00:00
jgruber
7a0d6a5000 [build] Disable slow asserts for v8_enable_fast_mksnapshot
Slow asserts double the time spent in mksnapshot. While we want them
enabled on our bot builds, local builds should be fast and don't
necessarily need them.

This also adds v8_enable_fast_mksnapshot as default in gm.py.

Bug: v8:7891,v8:6688
Change-Id: I5ab1491f3396c4351de30dbbb80a81e2242c5db9
Reviewed-on: https://chromium-review.googlesource.com/1116552
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54074}
2018-06-28 06:31:59 +00:00
Michael Starzinger
8ca3d065bf [wasm] Remove obsolete code specialization support.
R=clemensh@chromium.org

Change-Id: Id8a0849d3456be1062a065a23f51bac250de4f7d
Reviewed-on: https://chromium-review.googlesource.com/1107936
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54026}
2018-06-26 11:25:52 +00:00
Sigurd Schneider
ba39d635de [turbofan] Support kRootRegisterBias on all platforms
We had a kRootRegisterBias on x64 before. This CL ports the feature to
all other platforms as well. The root register bias is helpful to adjust
the value of the root register, which allows to better utilize signed
immediate offset constants in load instructions.

We currently use a separate add instruction to add kRootRegisterBias
in the code that initializes the root register. This could be improved
by adding a custom relocation mode ensuring that instead of the root
address, the root address plus the bias is inserted (and in this way
the add instruction can be omitted).

Bug: v8:6666
Change-Id: I55cf02ab85d11e3c6d0d83a8f7905dbf924890f1
Reviewed-on: https://chromium-review.googlesource.com/1113539
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54023}
2018-06-26 09:59:00 +00:00
Igor Sheludko
ef1031be75 Remove unused PlatformInterfaceDescriptor.
Bug: v8:7754
Change-Id: I5de3f1fb1c1c44312238c05f53257ca75136d093
Reviewed-on: https://chromium-review.googlesource.com/1109690
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53912}
2018-06-21 10:36:38 +00:00
Michael Achenbach
d31e031514 Revert "Reland "[async] Expose async hooks to d8""
This reverts commit 8e0f67be3f.

Reason for revert:
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Linux%20-%20debug/20949

Original change's description:
> Reland "[async] Expose async hooks to d8"
> 
> This is a reland of 3c4d0316e4
> 
> Original change's description:
> > [async] Expose async hooks to d8
> >
> > This implementation follows the Node.js API as a guideline.
> >
> > Change-Id: I09274ea25ccdbb9794a7440d6c14f26b9febb4f4
> > Reviewed-on: https://chromium-review.googlesource.com/1065818
> > Commit-Queue: Maya Lekova <mslekova@chromium.org>
> > Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#53551}
> 
> Change-Id: If2114db2ff179c6b07a40bc0c2dac3a41f37aea9
> Bug: chromium:850530
> Reviewed-on: https://chromium-review.googlesource.com/1088890
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53901}

TBR=ofrobots@google.com,sergiyb@chromium.org,gsathya@chromium.org,bmeurer@chromium.org,mslekova@chromium.org

Change-Id: Id55809a46bc5118103391fdbdfb52415182d3fd4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:850530
Reviewed-on: https://chromium-review.googlesource.com/1109038
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53902}
2018-06-21 06:28:30 +00:00
Maya Lekova
8e0f67be3f Reland "[async] Expose async hooks to d8"
This is a reland of 3c4d0316e4

Original change's description:
> [async] Expose async hooks to d8
>
> This implementation follows the Node.js API as a guideline.
>
> Change-Id: I09274ea25ccdbb9794a7440d6c14f26b9febb4f4
> Reviewed-on: https://chromium-review.googlesource.com/1065818
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53551}

Change-Id: If2114db2ff179c6b07a40bc0c2dac3a41f37aea9
Bug: chromium:850530
Reviewed-on: https://chromium-review.googlesource.com/1088890
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53901}
2018-06-21 04:11:17 +00:00
Sigurd Schneider
f5a8352b0f [embedded-builtins] Enable on all arches except x86 for benchmarks
This CL enables embedded builtins to get benchmark feedback. We need
this feedback to identify and address remaining performance problems.

Bug: v8:6666
Change-Id: I8f77f218e656b55ddabe1236eb2a1d14a5ac6233
Reviewed-on: https://chromium-review.googlesource.com/1105834
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53836}
2018-06-19 11:39:09 +00:00
Théotime Grohens
e947d21e3d [dataview]: Move DataView setters to Torque.
This CL completely reimplements the DataView setters in Torque, and
removes the former C++ runtime implementation.

Change-Id: I66cdd35712e46f3931d6530a4512fa3c8eb3b3bf
Reviewed-on: https://chromium-review.googlesource.com/1104162
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53800}
2018-06-18 15:02:44 +00:00
Simon Zünd
3291bd38bd [cleanup] Move Array.p.sort Torque code into its own file
R=jgruber@chromium.org

Bug: v8:7382
Change-Id: I5b92f46736d8c0ca8ef0f187ecaa1d58661a1c7f
Reviewed-on: https://chromium-review.googlesource.com/1101690
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Simon Zünd <szuend@google.com>
Cr-Commit-Position: refs/heads/master@{#53778}
2018-06-18 08:22:59 +00:00
Clemens Hammacher
2dda64aabf [wasm] Introduce JumpTableAssembler
Extract code generation (for the trampoline) from {wasm-code-manager.cc}
to a new {JumpTableAssembler}. This prepares a CL to add more logic to
the {JumpTableAssembler} to also generate jump tables for lazy
compilation and tier up.

R=mstarzinger@chromium.org

Change-Id: I383585b7e4b5a4af3ca08d07e374b44654c1a09f
Reviewed-on: https://chromium-review.googlesource.com/1046585
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53729}
2018-06-14 10:25:50 +00:00
Wez
dc53e17e92 [tools] Remove unused V8 dependency on Fuchsia's "launchpad" package.
R=sergiyb@chromium.org

Bug: chromium:848028
Change-Id: If8ce38ff0e991e171eae68e2bea708365e63a35c
Reviewed-on: https://chromium-review.googlesource.com/1099601
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53719}
2018-06-13 21:12:08 +00:00
jgruber
9b0b3ab0a8 [build] Tweak default value of v8_enable_embedded_builtins
Embedded builtins are currently unsupported in no-snapshot builds.
This lets BUILD.gn reflect that (both in the default value and an added
assertion).

Bug: v8:6666,v8:7837
Change-Id: I5c56f655733505e481017408f8a1a14d857f0b4a
Reviewed-on: https://chromium-review.googlesource.com/1096758
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53716}
2018-06-13 19:36:23 +00:00
Daniel Clifford
2506963a4e [torque] Correctly generate one .h/.cc file pair per module
In the process and as a test case of the module/file-handling, separate
Array.p.forEach into its own Torque file.

Bug: v8:7793
Change-Id: If45103a9df3bf8fade34e7bcf7c7c9c060e25966
Reviewed-on: https://chromium-review.googlesource.com/1097755
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Daniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53703}
2018-06-13 14:28:50 +00:00
Michael Achenbach
35d06c3c60 [build] Enable hooking up custom_deps BUILD.gn files.
This adds a new gn arg v8_custom_deps to add a dependency that's dynamically
added under v8/custom_deps. E.g. for depending on a target in
v8/custom_deps/test_root/BUILD.gn set
v8_custom_deps = "custom_deps/test_root:target_name".

Bug: chromium:846711
Change-Id: If03d48dba07cb36dc1b981602e5dc267deec086b
Reviewed-on: https://chromium-review.googlesource.com/1095218
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53640}
2018-06-11 13:45:11 +00:00
jgruber
699a91f2a6 [tasm] Add platform-independent base class TurboAssemblerBase
This class can contain members and functions common across all
platforms.

Bug: v8:6666
Change-Id: I8f232f806457164a2401f74c7140fd035ad05096
Reviewed-on: https://chromium-review.googlesource.com/1086940
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53609}
2018-06-08 12:09:49 +00:00
jgruber
1086bb7f92 Only enable embedded builtins in snapshot builds
Currently, nosnap builds do not run mksnapshot and thus do not have a
chance to generate the embedded blob. In theory we could support this,
but let's just ensure we don't crash for now.

Bug: v8:6666,v8:7835
Change-Id: I7d3b1f772b296ae3bcaed1604e0d1e44834da1c0
Reviewed-on: https://chromium-review.googlesource.com/1092491
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53600}
2018-06-08 07:44:26 +00:00
Igor Sheludko
afd6351dcd [csa][builtins] Port CompileLazy* to CSA.
This CL introduces CSA::TailCallJSCode() for tail calling code objects
with JSCall linkage.

Bug: v8:5269, v8:7703
Change-Id: I97370dc4355dc658a9cd62166efcbe7f03d6daca
Reviewed-on: https://chromium-review.googlesource.com/1087459
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53590}
2018-06-07 18:21:55 +00:00
Rodrigo Bruno
db4b7e7598 [heap] Refactoring heap growing strategy from Heap to HeapController class.
Bug: chromium:845409
Change-Id: I377d6f9d26a193f7fd829f7b74f9fdabc1337dc0
Reviewed-on: https://chromium-review.googlesource.com/1089053
Commit-Queue: Rodrigo Bruno <rfbpb@google.com>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53580}
2018-06-07 12:38:34 +00:00
Jaroslav Sevcik
6ee715264c [turbofan] Introduce JS heap broker.
As a first step towards moving accesses to the broker, this moves
heap accesses from BitsetType::Lub to the broker.

Bug: v8:7790
Change-Id: Ie240b84b979717caae42cb8aa06ee8d9877a446d
Reviewed-on: https://chromium-review.googlesource.com/1088695
Commit-Queue: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53571}
2018-06-07 07:45:16 +00:00
Bill Budge
3252af39f2 Revert "[async] Expose async hooks to d8"
This reverts commit 3c4d0316e4.

Reason for revert: Breaks MSAN on ARM64

https://ci.chromium.org/buildbot/client.v8/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/21425

'enabled' field not initialized in constructor?

Original change's description:
> [async] Expose async hooks to d8
> 
> This implementation follows the Node.js API as a guideline.
> 
> Change-Id: I09274ea25ccdbb9794a7440d6c14f26b9febb4f4
> Reviewed-on: https://chromium-review.googlesource.com/1065818
> Commit-Queue: Maya Lekova <mslekova@chromium.org>
> Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53551}

TBR=ofrobots@google.com,gsathya@chromium.org,bmeurer@chromium.org,mslekova@chromium.org

Change-Id: I8b2bedb51cba18c77578d4e223474015d819e428
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1088811
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53555}
2018-06-06 13:51:12 +00:00
Théotime Grohens
22fab0bad8 [dataview] Implement Torque/CSA getters for DataView
This CL fully implements the DataView getters for the Uint8, Int8,
Uint16, Int16, Uint32 and Int32 types in Torque, and removes
the runtime implementation that is not needed anymore.

There should be a light but visible performance increase compared to
the former runtime implementation.

Change-Id: I7d85097fd5953b9629f3ac6bed93b068889712b2
Reviewed-on: https://chromium-review.googlesource.com/1078349
Commit-Queue: Théotime Grohens <theotime@google.com>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53553}
2018-06-06 13:08:27 +00:00
Maya Lekova
3c4d0316e4 [async] Expose async hooks to d8
This implementation follows the Node.js API as a guideline.

Change-Id: I09274ea25ccdbb9794a7440d6c14f26b9febb4f4
Reviewed-on: https://chromium-review.googlesource.com/1065818
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53551}
2018-06-06 13:06:12 +00:00
jgruber
fc683744e5 Re-enable embedded builtins
Enabling once again post-branch point. This CL is expected to come
with major memory improvements and slight performance regressions.

Recent work on performance improvements has focused on x64, hence only
enabling there for now.

Bug: v8:6666
Change-Id: I29dc55eb4e592465073559647e280f74253b73e1
Reviewed-on: https://chromium-review.googlesource.com/1076247
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53544}
2018-06-06 08:47:57 +00:00
Igor Sheludko
d123f30b6d [ptr-compr] Support 31-bit Smis in lower half-word on 64-bit architectures.
This CL introduces a new gn argument: v8_enable_pointer_compression which is
false by default. All the changes done in this CL are made under this flag.

Upper half-word of a Smi word must be properly sign-extended according to the
sign of the lower-half containing the actual Smi value.

Bug: v8:7703
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I2b52ab49cd18c7c613130705de445fef44c30ac5
Reviewed-on: https://chromium-review.googlesource.com/1061175
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ben Titzer <titzer@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53519}
2018-06-05 11:37:35 +00:00
Tom Anderson
c2455500f4 Remove manual references to exe_and_shlib_deps
After [1], a manual dependency on exe_and_shlib_deps is no longer necessary
since it's automatically added.  This CL removes all remaining manual references
to exe_and_shlib_deps.

[1] d7ed1f0a9c

BUG=chromium:845700
R=machenbach

Change-Id: I17da573b7b6509a690caf8be6ae6afc180105f07
Reviewed-on: https://chromium-review.googlesource.com/1082913
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53500}
2018-06-04 18:35:43 +00:00