Commit Graph

368 Commits

Author SHA1 Message Date
Victor Gomes
096faa3a3e [bazel] Remove gtest dependency
No-Try: true
Bug: v8:11234
Change-Id: I82a066bfc395718f1b295f52785600aaa34604e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985402
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75403}
2021-06-28 08:08:10 +00:00
Jakob Kummerow
ee307c747f [bigint] Move toString conversion to src/bigint/
This just moves the existing algorithm, and translates it from
Handle<BigInt> to Digits as underlying data format.

Bug: v8:11515
Change-Id: Ieefee4e953e14f4c574aebab94d825ddb7c31f8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2975304
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75391}
2021-06-25 15:37:37 +00:00
Victor Gomes
f9aa571577 [bazel] Remove baseline-osr-inl.h
No-Try: true
Change-Id: I1aee4944bf4b33cb4b1be745bedb88ac63c6d9e3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2987832
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75386}
2021-06-25 11:32:08 +00:00
Victor Gomes
edce708f87 [bazel] Adds skylib and macos support
No-Try: true
Bug: v8:11234
Change-Id: I4099a231ecc5cfb87d74170b04753a8bec2b5cbf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985501
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75374}
2021-06-24 19:09:34 +00:00
Victor Gomes
9a4bcc31e1 [bazel] Support arm 32 bits
No-Try: true
Bug: v8:11234
Change-Id: I4339a3a3f3fcffa7c65a569ea36a56be16b1ae45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985340
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75371}
2021-06-24 16:19:13 +00:00
Victor Gomes
1002703c9e [bazel] Support arm64
Bug: v8:11234
No-Try: true
Change-Id: Idc8a0d6a513fd38fafb10ff33121e37a79e3a1f3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2985242
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75370}
2021-06-24 15:58:44 +00:00
Dan Elphick
44e73e0b78 Reland "[base] Move most of src/numbers into base"
This is a reland of 9701d4a420
with a small fix for some code landed in between the dry-run and
submission.

Original change's description:
> [base] Move most of src/numbers into base
>
> Moves all but conversions.*, hash-seed-inl.h and math-random.* into
> base, in preparation for moving the parts of conversions that don't
> access HeapObjects.
>
> Also moves uc16 and uc32 out of commons/globals.h into base/strings.h.
>
> Bug: v8:11917
> Change-Id: Ife359148bb0961a63833aff40d26331454b6afb6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979595
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Auto-Submit: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75354}

Bug: v8:11917
Change-Id: Ie1ec9032fe56646a7c7303185cecc70fce5694ae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2982607
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75368}
2021-06-24 15:00:27 +00:00
Victor Gomes
0b3bb24adc [bazel] Supports android x86
Supports cross-compilation targeting android x86:
bazel build --config=android --android_cpu=x86 --cpu=x86 \
  --host_cpu=k8 :d8

Caveat: one needs to have a cross compiler setup.

No-Try: true
Bug: v8:11234
Change-Id: Ieff72d9c04c8c3db9801c6316bae5c2570265f45
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2983211
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75365}
2021-06-24 14:27:03 +00:00
Victor Gomes
e03051ea7a [bazel] Small patches to reconcile with blaze
No-Try: true
Change-Id: Id8c7aa494bda905aef9cc605e206df685de30233
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2983534
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75359}
2021-06-24 12:03:23 +00:00
Nico Hartmann
10f6151d7e Revert "[base] Move most of src/numbers into base"
This reverts commit 9701d4a420.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/40802/overview

Original change's description:
> [base] Move most of src/numbers into base
>
> Moves all but conversions.*, hash-seed-inl.h and math-random.* into
> base, in preparation for moving the parts of conversions that don't
> access HeapObjects.
>
> Also moves uc16 and uc32 out of commons/globals.h into base/strings.h.
>
> Bug: v8:11917
> Change-Id: Ife359148bb0961a63833aff40d26331454b6afb6
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979595
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
> Auto-Submit: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75354}

Bug: v8:11917
Change-Id: Iacf796c95256016fa74f0a910c5bb1a86baa425a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2982605
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75356}
2021-06-24 11:14:24 +00:00
Dan Elphick
9701d4a420 [base] Move most of src/numbers into base
Moves all but conversions.*, hash-seed-inl.h and math-random.* into
base, in preparation for moving the parts of conversions that don't
access HeapObjects.

Also moves uc16 and uc32 out of commons/globals.h into base/strings.h.

Bug: v8:11917
Change-Id: Ife359148bb0961a63833aff40d26331454b6afb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979595
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Auto-Submit: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75354}
2021-06-24 11:01:23 +00:00
Jakob Kummerow
7065784ac9 [bigint] Burnikel-Ziegler division
The Burnikel-Ziegler division algorithm is used for divisors
with 57 or more internal digits. It has better asymptotic
complexity than "schoolbook" division because it can make use
of fast multiplication under the hood.

Bug: v8:11515
Change-Id: Ib5d573a0afa560d42972c4ae06aff810a8b9cadb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960221
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75310}
2021-06-22 17:58:21 +00:00
Dan Elphick
9010201c99 [base] Create base/strings.h
Moves VSNPrintf, SNPrintf and StrNCpy out of utils/utils.h into
base/strings.h.

Bug: v8:11879
Change-Id: I0e165cb27c42f89c9acd1c6378514b40a90cd18d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972732
Auto-Submit: Dan Elphick <delphick@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75308}
2021-06-22 16:55:32 +00:00
Daniel Lehmann
2ef8f917ff [wasm] Move NativeModuleModificationScope impl
In an effort to merge `CODE_SPACE_WRITE_SCOPE` and
`NativeModuleModificationScope`, this CL moves the interface and
implementation of the latter into code-space-access.{h,cc}, where the
former already lives. No other changes to the code itself.

R=clemensb@chromium.org
CC=jkummerow@chromium.org

Bug: v8:11714

Cq-Include-Trybots: luci.v8.try:v8_linux64_fyi_rel_ng
Change-Id: I1aabce26f2033430523a7a3a0a4864e7267bee21
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2972803
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Daniel Lehmann <dlehmann@google.com>
Cr-Commit-Position: refs/heads/master@{#75267}
2021-06-21 12:22:05 +00:00
Dan Elphick
7f5383e8ad [base] Move utils/vector.h to base/vector.h
The adding of base:: was mostly prepared using git grep and sed:
git grep -l <pattern> | grep -v base/vector.h | \
  xargs sed -i 's/\b<pattern>\b/base::<pattern>/
with lots of manual clean-ups due to the resulting
v8::internal::base::Vectors.

#includes were fixed using:
git grep -l "src/utils/vector.h" | \
  axargs sed -i 's!src/utils/vector.h!src/base/vector.h!'

Bug: v8:11879
Change-Id: I3e6d622987fee4478089c40539724c19735bd625
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2968412
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75243}
2021-06-18 13:33:13 +00:00
Victor Gomes
c5d49a57b2 [bazel] Adds new bigint files
Bug: v8:11234
Change-Id: I5fa2d97e01df25171c2a80aafb265b508176b334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2967470
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75206}
2021-06-17 10:05:21 +00:00
Victor Gomes
80f204a6ee [bazel] Add v8_enable_webassembly
Adds support to webassembly and enables it by default.
Adds wee8 target.

We can compile without wasm with:
`bazel build :d8 --no//:v8_enable_webassembly`

Bug: v8:11234
Change-Id: I90b11eb71aed808005b66e40e37894616d8b1658
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960803
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75200}
2021-06-17 08:09:26 +00:00
Victor Gomes
36b44c15f6 [bazel] Compile V8 with bazel
Command to build: `bazel build :d8`

Caveats:
  - Needs clang
  - Only supports x64 on Linux
  - Bare V8: no Wasm and no ICU
  - Still needs GN to generate inspector files

Bug: v8:11234
Change-Id: I6d01fecff5fba5c3582995d071692e5c6c6c6310
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2960949
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75155}
2021-06-15 14:52:09 +00:00