Граф коммитов

77378 Коммитов

Автор SHA1 Сообщение Дата
André Bargull 061fdcf536 Bug 1557718 - Part 3: Implement date-/timeStyle proposal. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D73895
2020-06-10 18:18:15 +00:00
André Bargull 862888b9a6 Bug 1557718 - Part 2: Remove "mozExtensions" flag from resolved internal options. r=jwalden
`mozExtensions` is now only used for the `patternOption` property, because
`dateStyle` and `timeStyle` are no longer custom extensions. So instead of
testing for `mozExtensions`, we can simply only test if `patternOptions` is
present.

And update `Intl_DateTimeFormat_resolvedOptions` to only set the "hour12"
and "hourCycle" options when `timeStyle` is used.

Differential Revision: https://phabricator.services.mozilla.com/D73894
2020-06-10 18:17:47 +00:00
André Bargull 746207cffd Bug 1557718 - Part 1: Reduce code duplication for date/time-style parsing. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D73892
2020-06-10 18:17:22 +00:00
Matthew Gaudet fcf1b84e40 Bug 1641632 - Disable clang-formatting of js.msg r=jorendorff DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D77316
2020-06-10 19:22:16 +00:00
Tooru Fujisawa 10e4cc5311 Bug 1641369 - Part 4: Make clean command more robust. r=sfink
Depends on D77991

Differential Revision: https://phabricator.services.mozilla.com/D77992
2020-06-03 23:03:09 +00:00
Tom Schuster 54cb85774f Bug 1644523 - Transpile LoadFixedSlotTyped r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78950
2020-06-10 17:21:31 +00:00
Tom Schuster 4579298e27 Bug 1644523 - Optimize UnsafeGetReservedSlot intrinsic in CacheIR. r=iain
In baseline we can't really optimize the typed variant because we have to return boxed values anyway.
(Ion does not use Call ICs so MOZ_CRASH for now at least)

We ensure that the slot argument is constant by checking in the BytecodeEmitter

Differential Revision: https://phabricator.services.mozilla.com/D78949
2020-06-10 17:21:23 +00:00
Mihai Alexandru Michis bb3a7c09fd Backed out 5 changesets (bug 1557718) for causing bustages in DateTimeFormat.cpp
CLOSED TREE

Backed out changeset b9853d5eb007 (bug 1557718)
Backed out changeset 8118b2bfb39d (bug 1557718)
Backed out changeset 97ab994e8e06 (bug 1557718)
Backed out changeset 12fe4bb1d720 (bug 1557718)
Backed out changeset fcbfbb53396d (bug 1557718)
2020-06-10 20:41:44 +03:00
Jon Coppeard 00f99e1d69 Bug 1644258 - Simplify nursery size rounding r=sfink
Previously there was a quirk of nursery size rounding where requesting a nursery size of just less than a chunk resulted in a smaller size than a chunk being used even if one chunk was the nearest valid size.

This was to avoid having a sub-chunk size greater than the amount of usable space in a chunk, but that is not possible anyway as long as the sub-chunk step is greater than the chunk trailer size.

The patch simplifies the rounding code and updates the test code to add a size that will give different results depending on chunk size.  I had to add a gcparam to get the chunk size to make this work.

Differential Revision: https://phabricator.services.mozilla.com/D79148
2020-06-10 15:44:07 +00:00
Tom Schuster 6aa2469df0 Bug 1644777 - Remove IonBuilder::inlineHasClass. r=iain
MHasClass is still used in other places.

Differential Revision: https://phabricator.services.mozilla.com/D79151
2020-06-10 16:10:33 +00:00
André Bargull a1a5c2e9b7 Bug 1557718 - Part 5: Enable test262 tests for date-/timeStyle. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D73899
2020-06-10 15:10:33 +00:00
André Bargull 4dde0d18c3 Bug 1557718 - Part 4: Add hourCycle support to date/time-style. r=jwalden
CLDR provides date-time patterns, not skeletons, for date/time-styles, so
when either `hour12` or `hourCycle` is present, we need to adjust the returned
pattern to use the correct hour symbol.

Drive-by change:
- Move `replaceHourRepresentation` for standard options to C++.
- Change `resolveDateTimeFormatInternals` to no longer change the hour
  symbol when the non-standard `patternOption` is used.

Differential Revision: https://phabricator.services.mozilla.com/D73896
2020-06-09 16:10:21 +00:00
André Bargull 4a80018388 Bug 1557718 - Part 3: Implement date-/timeStyle proposal. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D73895
2020-06-09 16:09:54 +00:00
André Bargull c2dfb054d5 Bug 1557718 - Part 2: Remove "mozExtensions" flag from resolved internal options. r=jwalden
`mozExtensions` is now only used for the `patternOption` property, because
`dateStyle` and `timeStyle` are no longer custom extensions. So instead of
testing for `mozExtensions`, we can simply only test if `patternOptions` is
present.

And update `Intl_DateTimeFormat_resolvedOptions` to only set the "hour12"
and "hourCycle" options when `timeStyle` is used.

Differential Revision: https://phabricator.services.mozilla.com/D73894
2020-06-09 16:09:29 +00:00
André Bargull 2574221cb8 Bug 1557718 - Part 1: Reduce code duplication for date/time-style parsing. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D73892
2020-06-09 16:09:09 +00:00
Adam Vandolder f294aa213c Bug 1644581 - Remove Iterator.prototype[@@toStringTag]. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D78983
2020-06-10 13:40:13 +00:00
André Bargull 2ae77fdd0a Bug 1564942 - Part 4: Lower MPow to a series of shift-instructions when the base operand is a power of two. r=jandem
In-tree users of `Math.pow` show that the function is often called with the base operand equal to
two. This case can easily be optimised to a series of shift-instructions for any power of two. For
now this optimisation is only taken for 2^i with i in {1..8} to avoid generating too many
consecutive shift-instructions. 2^8 = 256 was chosen as the limit, because it is the maximum power
of two base operand for `Math.pow` used in-tree.

Differential Revision: https://phabricator.services.mozilla.com/D37587
2020-06-10 13:49:46 +00:00
André Bargull 3b11638944 Bug 1564942 - Part 3: Avoid an extra `mov` when multiplying an operand with itself. r=jandem
Similar to `LIRGeneratorX86Shared::lowerForALU`, try to use the same register when multiplying an
operand with itself.

This change improves the generated assembly for `Math.pow(x, 2)` from:
```
# instruction MoveGroup
movl       %eax, %ecx
# instruction MulI
imull      %ecx, %eax
jo         .Lfrom0000
```

to:
```
# instruction MulI
imull      %eax, %eax
jo         .Lfrom0000
```

Differential Revision: https://phabricator.services.mozilla.com/D37586
2020-06-10 11:52:00 +00:00
André Bargull b27cc67ef9 Bug 1564942 - Part 2: Avoid negative zero check when the base operand in MPow is an Int32. r=jandem
That way the trailing DoubleToInt32 doesn't emit the negative zero check sequence:

```
movq       %xmm0, %rax
cmpq       $0x1, %rax
jo         .Lfrom0000
```


When MPow is used with a constant power which can be folded to MMul, this change
will lead to better codegen, too. For example `Math.pow(x, 2)` where `x` is an
Int32 value, currently generates the following assembly:
```
# instruction MoveGroup
movl       %eax, %ecx
# instruction MulI:CanBeNegativeZero
imull      %ecx, %eax
jo         .Lfrom0000
testl      %eax, %eax
je         .Lfrom0000
```

With this patch, this assembly will be generated:
```
# instruction MoveGroup
movl       %eax, %ecx
# instruction MulI
imull      %ecx, %eax
jo         .Lfrom0000
```

Differential Revision: https://phabricator.services.mozilla.com/D37584
2020-06-10 11:51:58 +00:00
André Bargull 729f6a9522 Bug 1564942 - Part 1: Add braces to if-statements in MPow. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D37583
2020-06-10 11:50:53 +00:00
Jan de Mooij 1dbf9c2c8e Bug 1643888 - Support using AutoScratchFloatRegister with ensureDoubleRegister. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D78863
2020-06-09 09:49:53 +00:00
Lars T Hansen a10a0da964 Bug 1644507 - Remove an inappropriate MOZ_ASSERT. r=bbouvier
When the SIMD code landed, all aligned loads/stores (except constant loads)
were changed to be unaligned, so as to not have to worry about aligning
SIMD parameters and locals.  But I forgot to remove this assert.

Differential Revision: https://phabricator.services.mozilla.com/D79036
2020-06-10 07:57:14 +00:00
Jon Coppeard 44abde177b Bug 1644552 - Improve GC profiling output by adding timestamps r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D78959
2020-06-09 22:44:07 +00:00
Jeff Walden 019a9e6e18 Bug 1596706 - Add tests. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D59962
2020-06-05 07:35:05 +00:00
Zhao Jiazhong fc09b41948 Bug 1639896 - [MIPS] Add unaligned load and store functions to the assemblers. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D78645
2020-06-09 23:48:59 +00:00
Noemi Erli 4bb2401ecb Backed out 4 changesets (bug 1564942) for causing SM bustage in pow-base-power-of-two.js CLOSED TREE
Backed out changeset ed869f61d924 (bug 1564942)
Backed out changeset cee3bb013291 (bug 1564942)
Backed out changeset 91d3f5dc57c9 (bug 1564942)
Backed out changeset 0017d61a5a0f (bug 1564942)
2020-06-09 22:39:08 +03:00
yulia 118185f66f Bug 1640876 - update module names to be in line with spec revision b012019fea18f29737a67c36911340a3e25bfc63; r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D76833
2020-06-09 16:52:53 +00:00
Razvan Maries 468d520bfa Backed out changeset 91d9671c44b5 (bug 1640445) as requested. CLOSED TREE 2020-06-09 19:57:58 +03:00
André Bargull 40bd6f3a2b Bug 1564942 - Part 4: Lower MPow to a series of shift-instructions when the base operand is a power of two. r=jandem
In-tree users of `Math.pow` show that the function is often called with the base operand equal to
two. This case can easily be optimised to a series of shift-instructions for any power of two. For
now this optimisation is only taken for 2^i with i in {1..8} to avoid generating too many
consecutive shift-instructions. 2^8 = 256 was chosen as the limit, because it is the maximum power
of two base operand for `Math.pow` used in-tree.

Differential Revision: https://phabricator.services.mozilla.com/D37587
2020-06-09 14:08:17 +00:00
André Bargull 67c0c78aed Bug 1564942 - Part 3: Avoid an extra `mov` when multiplying an operand with itself. r=jandem
Similar to `LIRGeneratorX86Shared::lowerForALU`, try to use the same register when multiplying an
operand with itself.

This change improves the generated assembly for `Math.pow(x, 2)` from:
```
# instruction MoveGroup
movl       %eax, %ecx
# instruction MulI
imull      %ecx, %eax
jo         .Lfrom0000
```

to:
```
# instruction MulI
imull      %eax, %eax
jo         .Lfrom0000
```

Differential Revision: https://phabricator.services.mozilla.com/D37586
2020-06-09 11:52:15 +00:00
André Bargull acf9035595 Bug 1564942 - Part 2: Avoid negative zero check when the base operand in MPow is an Int32. r=jandem
That way the trailing DoubleToInt32 doesn't emit the negative zero check sequence:

```
movq       %xmm0, %rax
cmpq       $0x1, %rax
jo         .Lfrom0000
```


When MPow is used with a constant power which can be folded to MMul, this change
will lead to better codegen, too. For example `Math.pow(x, 2)` where `x` is an
Int32 value, currently generates the following assembly:
```
# instruction MoveGroup
movl       %eax, %ecx
# instruction MulI:CanBeNegativeZero
imull      %ecx, %eax
jo         .Lfrom0000
testl      %eax, %eax
je         .Lfrom0000
```

With this patch, this assembly will be generated:
```
# instruction MoveGroup
movl       %eax, %ecx
# instruction MulI
imull      %ecx, %eax
jo         .Lfrom0000
```

Differential Revision: https://phabricator.services.mozilla.com/D37584
2020-06-09 11:51:40 +00:00
André Bargull 3a0c404a8f Bug 1564942 - Part 1: Add braces to if-statements in MPow. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D37583
2020-06-09 11:50:57 +00:00
Andrew McCreight 2771fe40e6 Bug 1640445 - Hold the lock while tracing mScripts. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D78711
2020-06-08 21:08:49 +00:00
Andrew McCreight 8eb502fd67 Bug 1643170, part 2 - Report memory for HelperThreads::helperContexts_. r=jandem
This is 41600 bytes of unreported memory in each process.

Differential Revision: https://phabricator.services.mozilla.com/D78813
2020-06-09 09:07:07 +00:00
Andrew McCreight bef3096a56 Bug 1643170, part 1 - Add JSContext::sizeOfIncludingThis. r=jandem
JSContexts aren't stored inline, so having this helper is convenient.

Differential Revision: https://phabricator.services.mozilla.com/D78812
2020-06-09 09:03:30 +00:00
Ted Campbell b3e185db5d Bug 1644218 - Add blinterp implementation tracking to profiler r=jandem,gerald
Introduce an IS_BLINTERP_FRAME flag to ProfilingStackFrame to distinguish C++
and Baseline interpreter frames. In the profile data this sets the
"implementation" to "blinterp".

Differential Revision: https://phabricator.services.mozilla.com/D78725
2020-06-09 12:27:15 +00:00
Ted Campbell 393ca29b50 Bug 1644218 - Cleanup ProfilingStackFrame flags r=gerald
Round the number of reserved flag bits up to 16. This leaves 16-bits for the
category (so 64k subcategories). Also make the baseprofiler consistent.

Differential Revision: https://phabricator.services.mozilla.com/D78724
2020-06-08 23:46:16 +00:00
Jon Coppeard ebd33b0e2f Bug 1639246 - Ship weak refs r=sfink,smaug
This renames the pref to remove 'experimental' and turns it on by default.

For integration with the CC, any DOM objects that are the target of a WeakRef or registered with a FinalizationRegistry have their wrappers preserved. WeakRef.deref() checks whether any wrapper is still preserved and returns undefined if not, to avoid giving out references to wrappers whose DOM object has been cycle collected.

Tests exercising browser integration are under js/xpconnect/tests/mochitest/.

Differential Revision: https://phabricator.services.mozilla.com/D77656
2020-06-09 11:20:45 +00:00
Dmitry Bezhetskov 6f51057451 Bug 1639153 - change call_indirect signature check to happen after frame is pushed r=lth,wingo
Move call_indirect's signature check after pushing the frame. We are going to start to implement trampolines as inline code in call_indirect and so, we will push frame and only then tail call to one of the function entries.

Differential Revision: https://phabricator.services.mozilla.com/D75924
2020-06-09 11:40:49 +00:00
Razvan Maries ed45c75750 Backed out changeset 4cf40cf33b0a (bug 1639153) for SM bustages on WasmFrameIter.cpp. CLOSED TREE 2020-06-09 12:32:58 +03:00
Dmitry Bezhetskov 6f5b781a29 Bug 1639153 - change call_indirect signature check to happen after frame is pushed r=lth,wingo
Move call_indirect's signature check after pushing the frame. We are going to start to implement trampolines as inline code in call_indirect and so, we will push frame and only then tail call to one of the function entries.

Differential Revision: https://phabricator.services.mozilla.com/D75924
2020-06-09 08:54:23 +00:00
Lars T Hansen 0b6f454037 Bug 1643681 - Fold scalar.const+NxM.splat as v128.const. r=bbouvier
Emscripten will generate eg f32.const + f32x4.splat instead of
f32x4.const when the same value is used for all lanes, presumably
because this is more compact bytecode.  Fold the MIR node to recover
the constant, for all types.

Differential Revision: https://phabricator.services.mozilla.com/D78646
2020-06-09 06:48:47 +00:00
Razvan Maries d72c849034 Backed out changeset a5ba8c617b11 (bug 1643681) for build bustages on MIR.cpp. CLOSED TREE 2020-06-09 09:20:48 +03:00
Lars T Hansen 0edb29be78 Bug 1643681 - Fold scalar.const+NxM.splat as v128.const. r=bbouvier
Emscripten will generate eg f32.const + f32x4.splat instead of
f32x4.const when the same value is used for all lanes, presumably
because this is more compact bytecode.  Fold the MIR node to recover
the constant, for all types.

Differential Revision: https://phabricator.services.mozilla.com/D78646
2020-06-08 16:53:16 +00:00
Adam Vandolder 531bc9d159 Bug 1643013 - Add eager Iterator Helper methods. r=jorendorff
Implements the 6 eager methods onto %Iterator.prototype%:
`reduce`, `toArray`, `forEach`, `some`, `every`, and `find`,
as well as adding corresponding unit tests.

Differential Revision: https://phabricator.services.mozilla.com/D78080
2020-06-09 00:40:13 +00:00
Adam Vandolder 23399ff9d2 Bug 1644171 - Add AsyncIterator constructor. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D78703
2020-06-08 20:43:56 +00:00
Jon Coppeard 04e7711396 Bug 1643913 - Do additional marking work after sweeping finalization records r=sfink
Sweeping finalization records can push marking working in zones that are still marking, so we may need to drain the mark stack again after this happens.

Differential Revision: https://phabricator.services.mozilla.com/D78662
2020-06-08 15:49:55 +00:00
Jon Coppeard b8024fc9f2 Bug 1643650 - Refactor nursery resizing r=sfink
Nursery reszing has got pretty complicted.  This simplifies things by factoring out the ideal size calculation and then clamping the result to the allowed size range.

Differential Revision: https://phabricator.services.mozilla.com/D78502
2020-06-08 15:34:31 +00:00
Jon Coppeard 9f46feb33a Bug 1643650 - Round nursery size parameters once when they are set rather than on every use r=sfink
This has the side effect that gcparam() will report the values that are actually in use rather than the value that are set, which seems like a good thing. I had to update test code expectations due to this.

Differential Revision: https://phabricator.services.mozilla.com/D78500
2020-06-08 14:21:47 +00:00
Jon Coppeard 83bd9e2a5d Bug 1643650 - Refactor nursery to use double for floating point variable everywhere r=sfink
This caused problems elsewhere due to limited resolution of 'float'. double is the default type for floating point values in C++ and we should use it everywhere unless there is a compelling reason not.

Differential Revision: https://phabricator.services.mozilla.com/D78497
2020-06-08 14:21:50 +00:00
Jon Coppeard 5fea7e4183 Bug 1643650 - Refactor nursery to move all telemetry to one method r=sfink
This also splits out profiling output from the main collect() method.

Differential Revision: https://phabricator.services.mozilla.com/D78495
2020-06-08 14:21:40 +00:00
Jon Coppeard c7aec13465 Bug 1643650 - Refactor nursery to update previous collection data in one place r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D78494
2020-06-08 14:21:43 +00:00
Iain Ireland 2853f78c16 Bug 1643171: Add memory reporting to irregexp::Isolate r=mccr8
A couple of notes:

1. In the previous patch in this stack, I significantly reduced the default size of handleArena and uniquePtrArena (from 4K each down to 128 bytes). We are using SegmentedVector because we need to grow without moving the contents, not because we expect to grow frequently.

2. I'm reporting the owned memory of the RegExpStack if it has any, but the owned memory is pretty transient. RegExp execution is wrapped in a RegExpStackScope, which should free the owned memory when we're done executing. (That might not always be the case when executing RegExps directly from jitcode, though.)

Differential Revision: https://phabricator.services.mozilla.com/D78521
2020-06-07 15:43:30 +00:00
Tooru Fujisawa 447cb4a153 Bug 1644117 - Update jsparagus to use JSOp::ToPropertyKey. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D78685
2020-06-08 14:43:49 +00:00
Zhao Jiazhong 55d8d49088 Bug 1642915 - [MIPS] Add byte swap instructions to the assemblers. r=tcampbell.
Differential Revision: https://phabricator.services.mozilla.com/D77994
2020-06-08 14:17:25 +00:00
Bogdan Tara 74a15f3340 Backed out 5 changesets (bug 1643650) for Nursery.cpp related bustage CLOSED TREE
Backed out changeset 596abb4cb54d (bug 1643650)
Backed out changeset 76a609e569bf (bug 1643650)
Backed out changeset f2e3001a9076 (bug 1643650)
Backed out changeset d4c40dbb2488 (bug 1643650)
Backed out changeset fd4c3045b895 (bug 1643650)
2020-06-08 17:17:29 +03:00
Iain Ireland f7033bf741 Bug 1643171: Reduce segment size of root arenas in Isolate r=mgaudet
By default, SegmentedVector allocated in segments of 4096 bytes. That's incredible overkill for the arenas in Isolate that store roots and pseudo-roots, because the only place in irregexp where we allocate more than a small constant number of roots is named captures, where we allocate one string per name. Shrinking these down to 128 bytes instead of 4096 still leaves room for 20+ names without allocating another segment.

While testing this change, I noticed that we had a memory leak. When we allocate named capture information in the parser, we don't have a HandleScope on the stack, so we root the handles in the implicit global handlescope. That scope isn't cleared out during the lifetime of the Isolate. I moved the HandleScope in CompilePattern up to enclose the parser, and added assertions in DestroyIsolate to verify that there aren't any other leaks.

Differential Revision: https://phabricator.services.mozilla.com/D78520
2020-06-08 14:05:02 +00:00
Ted Campbell 8911a3ea5e Bug 1643902 - Call setTypeForScriptFunction for standalone functions. r=anba
Fix recent regression when standalone functions started being allocated by
instantiateStencils. This adds an `isStandalone` flag to the function box
that we can check in addition to `wasEmitted` (which is not set for these
standalone functions). Also remove some dead code.

Differential Revision: https://phabricator.services.mozilla.com/D78604
2020-06-08 12:21:04 +00:00
Jon Coppeard 8497ef9f62 Bug 1643650 - Refactor nursery resizing r=sfink
Nursery reszing has got pretty complicted.  This simplifies things by factoring out the ideal size calculation and then clamping the result to the allowed size range.

Differential Revision: https://phabricator.services.mozilla.com/D78502
2020-06-08 12:38:22 +00:00
Jon Coppeard 5198ad33bf Bug 1643650 - Round nursery size parameters once when they are set rather than on every use r=sfink
This has the side effect that gcparam() will report the values that are actually in use rather than the value that are set, which seems like a good thing. I had to update test code expectations due to this.

Differential Revision: https://phabricator.services.mozilla.com/D78500
2020-06-08 12:38:09 +00:00
Jon Coppeard bef2cf47b8 Bug 1643650 - Refactor nursery to use double for floating point variable everywhere r=sfink
This caused problems elsewhere due to limited resolution of 'float'. double is the default type for floating point values in C++ and we should use it everywhere unless there is a compelling reason not.

Differential Revision: https://phabricator.services.mozilla.com/D78497
2020-06-08 12:37:57 +00:00
Jon Coppeard 73d17ac95b Bug 1643650 - Refactor nursery to move all telemetry to one method r=sfink
This also splits out profiling output from the main collect() method.

Differential Revision: https://phabricator.services.mozilla.com/D78495
2020-06-08 12:37:42 +00:00
Jon Coppeard fd570eb262 Bug 1643650 - Refactor nursery to update previous collection data in one place r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D78494
2020-06-08 12:37:26 +00:00
Masatoshi Kimura 8601daefcb Bug 1643910 - Remove ability to disable JSM global sharing. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D78602
2020-06-08 11:03:36 +00:00
Mihai Alexandru Michis 51f5a7ede6 Backed out changeset a4d1e2c3ba9e (bug 1639153) for causing bustages in WasmFrameIter.cpp
CLOSED TREE
2020-06-08 12:07:09 +03:00
Dmitry Bezhetskov 0356cded2f Bug 1639153 - change call_indirect signature check to happen after frame is pushed r=lth,wingo
Move call_indirect's signature check after pushing the frame. We are going to start to implement trampolines as inline code in call_indirect and so, we will push frame and only then tail call to one of the function entries.

Differential Revision: https://phabricator.services.mozilla.com/D75924
2020-06-08 08:27:32 +00:00
Lars T Hansen e34701fc0d Bug 1641140 - Implement the .bitmask instructions. r=jseward
For general background see the bug's description.  This patch
implements the iNxM.bitmask instructions for x86+x64 in baseline+ion,
and adds some simple test cases.

Differential Revision: https://phabricator.services.mozilla.com/D77784
2020-06-08 08:02:37 +00:00
Lars T Hansen 0cda75506a Bug 1642589 - Pull in new wat crate. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D78226
2020-06-08 08:01:13 +00:00
Lars T Hansen db2f9302ac Bug 1642909 - Do not scalarize i64x2.mul on x64/x86. r=jseward
This is mostly code removal: we remove the platform-specific lowering
and code generation for scalarized i64x2.mul.  In its place we use
Andrew Brown's code for a platform-agnostic SIMD implementation, this
fits in very neatly in the existing code generation pipeline.

Differential Revision: https://phabricator.services.mozilla.com/D78015
2020-06-08 07:57:41 +00:00
Bogdan Tara ed2d35e67b Backed out changeset 578160fb0ac3 (bug 1639153) for WasmFrameIter.cpp related bustage CLOSED TREE 2020-06-08 09:46:52 +03:00
Dmitry Bezhetskov 5ed26e86b3 Bug 1639153 - change call_indirect signature check to happen after frame is pushed r=lth,wingo
Move call_indirect's signature check after pushing the frame. We are going to start to implement trampolines as inline code in call_indirect and so, we will push frame and only then tail call to one of the function entries.

Differential Revision: https://phabricator.services.mozilla.com/D75924
2020-06-08 05:31:50 +00:00
Tom Schuster 1bd27d425f Bug 1644015 - Optimize String() in CacheIR and Warp. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78620
2020-06-07 15:41:59 +00:00
Jan de Mooij 694103d549 Bug 1643680 part 3 - Add a test. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D78515
2020-06-07 11:48:45 +00:00
Jan de Mooij 6e5900f802 Bug 1643680 part 2 - Optimize Math.{min,max} with 1-4 arguments in CacheIR and Warp. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D78514
2020-06-05 17:36:09 +00:00
Jan de Mooij ae42091f01 Bug 1643680 part 1 - Use a conditional move in CodeGenerator::visitMinMaxI. r=evilpie
This is a small speedup on micro-benchmarks. Note that CMOV doesn't accept an
immediate so I didn't change that one.

Differential Revision: https://phabricator.services.mozilla.com/D78513
2020-06-05 17:14:46 +00:00
Tom Schuster 126c28d616 Bug 1643954 - Optimize Object() in CacheIR and Warp. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78608
2020-06-07 13:10:39 +00:00
Iain Ireland 79bc6dc831 Bug 1643137: Add testcase r=mgaudet
This is equivalent to `regexp/non-unicode-case-folding.js`, but checking back-references instead of simple matches / character classes.

Note: this testcase is similar to the testcase I landed upstream, but not identical. The upstream testcase verifies that the characters in each equivalence class match if the regexp is `/iu`. It turns out that there is a very small set of characters ('\ufb05' and `\ufb06`; '\u0390' and '\u1fd3'; '\u03b0' and '\u1fe3') where both characters have a full (aka multi-character) case-folding to the same value, but don't have a simple case-folding. As the spec is written, these characters should *not* match each other, even with `/iu`.

I opened a V8 bug for this issue: https://bugs.chromium.org/p/v8/issues/detail?id=10591

Depends on D78559

Differential Revision: https://phabricator.services.mozilla.com/D78560
2020-06-05 19:55:46 +00:00
Iain Ireland 222f1b7267 Bug 1643137: Use unicode flag in CheckNotBackReference r=mgaudet
This patch uses the unicode flag to decide which helper function to call for two-byte ignoreCase non-unicode backreferences.

It also fixes the (previously unused) helper to do the right thing. Compare RegExpMacroAssembler::CaseInsensitiveCompareNonUnicode in `irregexp/imported/regexp-macro-assembler.cc`, from the previous patch.

RegExpCaseFolding is only defined when we build with ICU. The differences here only occur in corner cases, so in non-intl builds, CaseInsensitiveCompareNonUnicode can do the same thing as CaseInsensitiveCompareUnicode.

Differential Revision: https://phabricator.services.mozilla.com/D78559
2020-06-06 00:57:42 +00:00
Iain Ireland 4889841f33 Bug 1643137: Re-import irregexp r=mgaudet
This patch was auto-generated, based on fixes I made upstream.

Differential Revision: https://phabricator.services.mozilla.com/D78558
2020-06-05 19:47:39 +00:00
Jon Coppeard c53e11c2b2 Bug 1642974 - Don't expose WeakRef targets which are DOM wrappers whose target has been collected r=smaug,sfink
WeakRef targets that are wrappers to DOM objects are preserved when the WeakRef is created.  This checks whether the wrapper is still preserved in deref() and if it is found to have been released, the target is cleared.

The patch adds a new DOMJSClass hook to deal with getting the wrapper cache for non-nsISupports objects.

Differential Revision: https://phabricator.services.mozilla.com/D78061
2020-06-06 06:58:42 +00:00
Bogdan Tara bc7a9918ad Backed out 2 changesets (bug 1643171) for jsapi-tests failures CLOSED TREE
Backed out changeset 094e467aacd7 (bug 1643171)
Backed out changeset 58363dfc9159 (bug 1643171)
2020-06-06 04:00:27 +03:00
Ted Campbell e1567ac5ab Bug 1599634 - Move the JS::WasmModule definition to own header r=bbouvier
Also add `JS::WasmModule::createObjectForAsmJS` which is similar to
`createObject` but does not set the WasmModule prototype. Also mark these
methods as const so they work with the `SharedModule` definition.

Differential Revision: https://phabricator.services.mozilla.com/D78088
2020-06-04 15:36:11 +00:00
Ted Campbell c4a5e98905 Bug 1599634 - Stop pre-allocating JSFunction for standalone compiles r=mgaudet
Use InitialFunctionFlags to compute flags consistently. That requires
plumbing FunctionSyntaxKind in for the standalone-function case. Preserve the
existing expression-vs-statement decisions. We move the InitialFunctionFlags
definition earlier in file but it is unchanged.

Stop allocating a function before parsing and rely on the frontend to do that
for us. This gives more consistent behaviour with asm.js and inner functions.

We need to explicitly call initEnvironment function now since the Stencil
instantiation code does not do it for us, while NewScriptedFunction did.

Differential Revision: https://phabricator.services.mozilla.com/D78087
2020-06-04 14:01:29 +00:00
Iain Ireland 6ef71d1e02 Bug 1643171: Add memory reporting to irregexp::Isolate r=mccr8
A couple of notes:

1. In the previous patch in this stack, I significantly reduced the default size of handleArena and uniquePtrArena (from 4K each down to 128 bytes). We are using SegmentedVector because we need to grow without moving the contents, not because we expect to grow frequently.

2. I'm reporting the owned memory of the RegExpStack if it has any, but the owned memory is pretty transient. RegExp execution is wrapped in a RegExpStackScope, which should free the owned memory when we're done executing. (That might not always be the case when executing RegExps directly from jitcode, though.)

Differential Revision: https://phabricator.services.mozilla.com/D78521
2020-06-05 23:41:08 +00:00
Iain Ireland 6aeb63b031 Bug 1643171: Reduce segment size of root arenas in Isolate r=mgaudet
By default, SegmentedVector allocated in segments of 4096 bytes. That's incredible overkill for the arenas in Isolate that store roots and pseudo-roots, because the only place in irregexp where we allocate more than a small constant number of roots is named captures, where we allocate one string per name. Shrinking these down to 128 bytes instead of 4096 still leaves room for 20+ names without allocating another segment.

While testing this change, I noticed that we had a memory leak. When we allocate named capture information in the parser, we don't have a HandleScope on the stack, so we root the handles in the implicit global handlescope. That scope isn't cleared out during the lifetime of the Isolate. I moved the HandleScope in CompilePattern up to enclose the parser, and added assertions in DestroyIsolate to verify that there aren't any other leaks.

Differential Revision: https://phabricator.services.mozilla.com/D78520
2020-06-05 19:09:17 +00:00
Logan Smyth 0b3c990251 Bug 1643180 - Part 2: Update the Frame component to always pass generated position to view source. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D78381
2020-06-05 22:18:38 +00:00
Logan Smyth cc02094920 Bug 1643540 - Split scriptElement type into three types for clarity. r=jlast,smaug
The lack of specificity for script intro type has lead the debugger to need
to make use of 'source.introductionType' and 'source.element' in order to
determine whether a given script was injected, or inline or fetched, which
is entirely unnecessary of the loader itself clearly tells us what type
of script we are working with. It also allows us to cleanly handle the case
of XUL, which previously was "scriptElement" but has no ".element" passed
in, so we were unable to know whether a given source was inline or not.

Differential Revision: https://phabricator.services.mozilla.com/D78435
2020-06-05 18:22:50 +00:00
caroline c2c8c976f0 Bug 1643519 - Transpile Math.atan2 in Warp. r=iain
Depends on D78553

Differential Revision: https://phabricator.services.mozilla.com/D78554
2020-06-05 18:55:19 +00:00
caroline 9e8586b562 Bug 1643519 - Optimize Math.atan2 in CacheIR. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78553
2020-06-05 18:55:17 +00:00
Yoshi Cheng-Hao Huang d9df44ffe5 Bug 1642154 : Add JSLinearString to MapTypeToTraceKind. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D78063
2020-06-05 19:08:49 +00:00
Iain Ireland 9a5ae1ba85 Bug 1643700: Fix ToCString r=mgaudet
The fickle, ever-changing whims of unified builds shuffled code around enough that the place where we are printing this value inlined this function and complained about the unique_ptr being null. We continue to not care about this output, so instead of messing around with copying the characters we just return an empty string.

Differential Revision: https://phabricator.services.mozilla.com/D78548
2020-06-05 19:02:36 +00:00
Iain Ireland 6887958b81 Bug 1643700: Fix v8::Address / js::jit::Address confusion r=lth
RegExpNativeMacroAssembler.cpp has a list of `using js::jit::X` statements to keep the code readable. Depending on the config options and the whims of the unified build, `using js::jit::Address` can appear in imported V8 files where we actually want `v8::Address`.

The easy fix is to build RegExpNativeMacroAssembler separately.

Differential Revision: https://phabricator.services.mozilla.com/D78519
2020-06-05 19:02:36 +00:00
Ted Campbell 8f5badf601 Bug 1643664 - Mark JS delazifying parse in profiler. r=mgaudet
This includes the delazifying parse in the sidebar summary for parsing.

Differential Revision: https://phabricator.services.mozilla.com/D78492
2020-06-05 18:09:20 +00:00
Matthew Gaudet 331f68ca0f Bug 1641961 - Don't parse shell option as comment in shell directive line r=anba,jorendorff
Accomplished by a heavily clarifying rewrite done by Andre Bargull

Differential Revision: https://phabricator.services.mozilla.com/D78091
2020-06-05 16:08:01 +00:00
Narcis Beleuzu a04f493620 Backed out changeset 2ab35272d8c4 (bug 1643700) for bustages on regexp-bytecodes.cc . CLOSED TREE 2020-06-05 18:30:20 +03:00
Kannan Vijayan 7084bb56a4 Bug 1642716 - Change scope BindingIter to be abstract on the type of atom. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D77912
2020-06-05 04:03:04 +00:00
Iain Ireland 97963c2db3 Bug 1643700: Fix v8::Address / js::jit::Address confusion r=lth
RegExpNativeMacroAssembler.cpp has a list of `using js::jit::X` statements to keep the code readable. Depending on the config options and the whims of the unified build, `using js::jit::Address` can appear in imported V8 files where we actually want `v8::Address`.

The easy fix is to build RegExpNativeMacroAssembler separately.

Differential Revision: https://phabricator.services.mozilla.com/D78519
2020-06-05 14:22:18 +00:00
André Bargull 346a4b69db Bug 1642680: Share LRandom lowering code. r=jandem
The previous code was using a fixed result register, because bug 774364 was
using an OOL-path for `Math.random`, which was later removed in bug 322529.

Differential Revision: https://phabricator.services.mozilla.com/D77836
2020-06-05 14:20:09 +00:00
Tooru Fujisawa 2c4cbe5c6f Bug 1643632 - Use BaseScopeData. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D78475
2020-06-05 10:34:56 +00:00
Tooru Fujisawa 654c97a626 Bug 1643044 - Use bumpalo 3.4.0. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D78079
2020-06-05 11:04:23 +00:00
Tom Schuster c75a4c7c77 Bug 1643486 - Transpile LoadDenseElementHoleResult. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D78377
2020-06-05 11:03:07 +00:00
Tom Schuster 3e8a4e31ae Bug 1643486 - Transpile GuardNoDenseElements. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D78376
2020-06-05 11:02:54 +00:00
Tom Schuster e8bc29b8b9 Bug 1643135 - Warp: Transpile GuardSpecificSymbol. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D78232
2020-06-04 12:11:54 +00:00
Jan de Mooij 8fc8027f30 Bug 1643350 part 5 - Rename MComputeThis to MBoxNonStrictThis. r=tcampbell
This is clearer because it calls js::BoxNonStrictThis.

Depends on D78299

Differential Revision: https://phabricator.services.mozilla.com/D78300
2020-06-05 03:40:00 +00:00
Jan de Mooij b13d139e5d Bug 1643350 part 4 - Make BoxNonStrictThis return an object instead of Value. r=tcampbell
Depends on D78298

Differential Revision: https://phabricator.services.mozilla.com/D78299
2020-06-05 03:40:00 +00:00
Jan de Mooij 45ec4a88b0 Bug 1643350 part 3 - Change LexicalEnvironmentObject's thisValue to thisObject. r=tcampbell
Depends on D78297

Differential Revision: https://phabricator.services.mozilla.com/D78298
2020-06-05 03:39:59 +00:00
Jan de Mooij 5a893a9f68 Bug 1643350 part 2 - Remove an outdated comment. r=tcampbell
This comment is more confusing than helpful. SynthesizeFrame was a TraceMonkey thing.

Depends on D78296

Differential Revision: https://phabricator.services.mozilla.com/D78297
2020-06-05 03:39:59 +00:00
Jan de Mooij 46b9a66626 Bug 1643350 part 1 - Rename GetThisValue{OfWith} to GetThisObject{OfWith} and return an object instead of Value. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D78296
2020-06-05 03:39:59 +00:00
Jan de Mooij f52fb938a5 Bug 1643304 - Properly support try-catch in Warp. r=iain
WarpOracle was aborting on the JSOp::Exception. It's hard to (efficiently) skip
catch-blocks in WarpOracle too so this patch just adds it to the supported ops
and crashes in WarpBuilder since it's unreachable there.

This uncovered a few more test failures where we relied on specific exception messages.

Differential Revision: https://phabricator.services.mozilla.com/D78259
2020-06-04 15:03:11 +00:00
Jan de Mooij 67ea494127 Bug 1636942 part 3 - Add CacheIR generator for JSOp::ToPropertyKey. r=evilpie
The only new op we needed was LoadSymbolResult.

Also adds transpiler support for GuardToSymbol.

Differential Revision: https://phabricator.services.mozilla.com/D78041
2020-06-05 07:14:32 +00:00
Jan de Mooij dfbeb38cce Bug 1636942 part 2 - Add IC support for JSOp::ToPropertyKey. r=evilpie
Just the fallback path, the next patch will add CacheIR support.

Differential Revision: https://phabricator.services.mozilla.com/D78040
2020-06-05 07:14:25 +00:00
Jan de Mooij 1d34735dbc Bug 1636942 part 1 - Rename JSOp::ToId to JSOp::ToPropertyKey. r=evilpie
Doesn't rename the MToId instruction because the next patch will make changes to
that anyway.

The comment in Interpreter.cpp was removed because this op is already (and better)
documented in vm/Opcodes.h

Differential Revision: https://phabricator.services.mozilla.com/D78039
2020-06-05 07:14:22 +00:00
Lars T Hansen 2517967e0e Bug 1637332 - wasm simd x86, part 2 - implement it. r=rhunt
This patch generalizes the x64 code that was moved into x86-shared
code in the previous patch, and makes it all work for x86.

Generally the changes are pedestrian.  The most interesting bit is
that signed right shift i64x2 is now scalarized in the compilers, not
in the macroassemblers, as this simplifies code everywhere.  This
gives rise to a new kind of porting API that reveals information about
what the macroassembler supports on the platform, in the form of the
MustScalarize/MustMaskShiftCount predicates in MacroAssembler.h.

Multiply i64x2, which is scalarized in the macroassemblers now, could
have been subjected to the same treatment, but I did not do so (yet)
because this op presented fewer problems than the right shift. (Discuss.)

Differential Revision: https://phabricator.services.mozilla.com/D74935
2020-06-05 06:39:32 +00:00
Lars T Hansen daaf9a94e9 Bug 1637332 - wasm simd x86, part 1 - move stuff from x64 to x86-shared. r=rhunt
This patch only moves code from x64 to x86-shared.

There are no functional or indeed any other adjustments.  This patch
does not lead to code that will compile, it only makes review of the
substantive changes easier.  It must be landed together with the next
patch.

Differential Revision: https://phabricator.services.mozilla.com/D77237
2020-06-05 06:36:42 +00:00
Kannan Vijayan 74503317ae Bug 1639612 - Reorganize Scope::Data structures to factor out non-GC state used by the parser. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D76168
2020-06-04 22:32:32 +00:00
Steve Fink 26f7c8e009 Bug 1642503 - Fix the name and type gdb uses to catch wasm's SIGSEGV handler r=bbouvier
Differential Revision: https://phabricator.services.mozilla.com/D77718
2020-06-02 08:01:34 +00:00
Tom Schuster 74aae9c256 Bug 1643455 - Transpile Load(Double|BigInt)Result. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78359
2020-06-04 20:35:31 +00:00
Iain Ireland bd890c87d7 Bug 1642493: Apply clang-format to shim files r=mgaudet
Now this code is less of a weird outlier.

Differential Revision: https://phabricator.services.mozilla.com/D77732
2020-06-04 14:35:05 +00:00
Iain Ireland d94e3f70a4 Bug 1642493: Separate imported files from shim r=mgaudet
I've been thinking about doing this for a while, and finally got around to doing it.

This patch moves the files that are directly imported from V8 into their own subdirectory of `irregexp`, to make it more obvious which code is part of V8 and which code is part of the shim. I also took the opportunity to rename the shim files to follow our naming conventions (FileName.cpp) instead of V8's (file-name.cc).

Most of this code is mechanical. The mildly interesting parts are:

1. In `import-irregexp.py`, when figuring out where the regexp shim include should go, we no longer have to work quite as hard to alphabetize it, because `irregexp/RegExpShim.h` will always come after `irregexp/imported/*`. Instead, we just keep scanning until we find a newline.

2. Some of the V8 code #includes "regexp-macro-assembler-arch.h". Up until now, that's the name we used for the header file for our RegExpMacroAssembler implementation. Now that the implementation lives in a separate directory from the V8 code, I've renamed the header to `RegExpNativeMacroAssembler.h` (to match the .cpp file), and added a stub `regexp-macro-assembler-arch.h` header in `imported` that #includes the real thing.

In the next patch, we take advantage of the new directory structure to get more precise with clang-format-ignore.

Depends on D77730

Differential Revision: https://phabricator.services.mozilla.com/D77731
2020-06-04 14:35:05 +00:00
Iain Ireland f8f5226883 Bug 1642493: Move RegExpStackScope inside irregexp r=mgaudet
This is the only place where any code outside the `irregexp` directory directly includes a V8 header. Tidying it up makes the next patch easier.

Depends on D77729

Differential Revision: https://phabricator.services.mozilla.com/D77730
2020-06-04 14:35:05 +00:00
Iain Ireland f3f5c19bba Bug 1642493: Rename new-regexp to irregexp r=mgaudet
It's not `new-` any more.

This patch moves the files, replaces `new-regexp` with `irregexp` throughout the code, re-alphabetizes `#include`s, and adds a few missing `#include`s to `RegExpTypes.h` and `util/vector.h` that were exposed by the reordering.

Depends on D77728

Differential Revision: https://phabricator.services.mozilla.com/D77729
2020-06-04 14:35:04 +00:00
Iain Ireland 31ded7e5aa Bug 1642493: Clean up remaining references to ENABLE_NEW_REGEXP and old irregexp r=mgaudet
I kept a running list of code that would be dead once we removed the old engine. This is what was on that list.

Note: The regexp_parse tests used a testing function that parsed a regexp and returned an AST to compare against the expected AST. They are being deleted because the tests are fragile in the face of upstream changes, not particularly useful, and a lot of work to convert.

Depends on D77727

Differential Revision: https://phabricator.services.mozilla.com/D77728
2020-06-04 14:35:04 +00:00
Iain Ireland 408c1ea24e Bug 1642493: Remove old copy of irregexp and ENABLE_NEW_REGEXP ifdefs r=mgaudet
This code no longer sparks joy.

Depends on D77726

Differential Revision: https://phabricator.services.mozilla.com/D77727
2020-06-04 14:35:04 +00:00
Iain Ireland c49fd6fa7a Bug 1642493: Add named capture proxy testcase r=mgaudet
I wrote this testcase while trying to figure out the spec for named captures, and discovered that V8 was not handling it properly. Our implementation does the right thing here, so I'm landing this testcase to make sure it stays that way.

Depends on D77725

Differential Revision: https://phabricator.services.mozilla.com/D77726
2020-06-04 14:35:03 +00:00
Iain Ireland ab44fc2953 Bug 1642493: Add case-folding testcase r=mgaudet
I wrote this testcase while fixing an issue with upstream V8's handling of non-unicode ignoreCase RegExps. (See here: 3fab9d05cf)

I'm finally getting around to landing it.

(There will be another patch in the future to fix an equivalent issue with back-references, but it's waiting on upstream review.)

Differential Revision: https://phabricator.services.mozilla.com/D77725
2020-06-04 14:35:03 +00:00
Jon Coppeard 732efa6c53 Bug 1643393 - Don't associate non-GC trace sessions with the GC r=sfink
This makes pushing a profiler frame conditional on the heap state.

Differential Revision: https://phabricator.services.mozilla.com/D78344
2020-06-04 17:59:57 +00:00
Jan de Mooij 013a148b84 Bug 1642610 part 5 - Use convertInt64ToDouble instead of convertUInt64ToDouble. r=iain
Drive-by performance improvement. convertUInt64ToDouble is slower because it has
a different code path for negative inputs but that can't happen here.

Differential Revision: https://phabricator.services.mozilla.com/D77803
2020-06-04 16:29:04 +00:00
Jan de Mooij 9f09a4c832 Bug 1642610 part 4 - Implement convertInt64ToDouble for ARM32 and MIPS32. r=arai
Based on the existing convertUInt64ToDouble.

Differential Revision: https://phabricator.services.mozilla.com/D78011
2020-06-04 16:29:04 +00:00
Jan de Mooij 62167dda95 Bug 1642610 part 3 - Transpile MathRandomResult. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D77802
2020-06-04 16:31:40 +00:00
Jan de Mooij 5707a6d76d Bug 1642610 part 2 - Optimize Math.random in CacheIR. r=iain
Note that the math-random.js jit-test is a good correctness test for this. It
overrides the RNG's seed, generates a few thousand numbers, and then checks some
of them. I verified this test fails if I add a bug to the Math.random JIT code.

Differential Revision: https://phabricator.services.mozilla.com/D77801
2020-06-04 16:31:38 +00:00
Jan de Mooij 3ae9c0b627 Bug 1642610 part 1 - Move Ion's Math.random code to the MacroAssembler. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D77800
2020-06-04 16:30:44 +00:00
Jan de Mooij 0d026bea3c Bug 1643283 - Check CanInlineCrossRealm also for natives optimized in CacheIR. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D78243
2020-06-04 16:30:34 +00:00
André Bargull 837b01cad4 Bug 1642067: Use Baseline inspector to decide if strings can occur in binary arithmetic expressions. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D78018
2020-06-04 13:28:45 +00:00
Ted Campbell f37413169a Bug 1642332 - Avoid static initializer for Number.NaN r=jandem
This also fixes correctness issue on MIPS platform.

Differential Revision: https://phabricator.services.mozilla.com/D77673
2020-06-04 07:38:45 +00:00
André Bargull 90bfdeac68 Bug 1642962: Add toStringTag to Intl prototypes referring to the constructor name. r=jwalden
Implement the changes from <https://github.com/tc39/ecma402/pull/430>.

Differential Revision: https://phabricator.services.mozilla.com/D78035
2020-06-04 11:24:02 +00:00
André Bargull 29b8477954 Bug 1639178: Add missing argument to intl_ValidateAndCanonicalizeUnicodeExtensionType. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D75936
2020-06-04 11:25:44 +00:00
Tooru Fujisawa bb16091e78 Bug 1643273 - Disable consistency check for Opcodes.h in SM(nu) job. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D78245
2020-06-04 10:19:01 +00:00
Tom Schuster a4b984b507 Bug 1643082 - Transpile StringFromCharCodeResult. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78115
2020-06-04 09:34:17 +00:00
Tom Schuster e18ff8cf41 Bug 1643082 - Support StringFromCharCode in CacheIR. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D78114
2020-06-04 09:34:06 +00:00
Jan de Mooij e9698866a7 Bug 1640587 part 5 - Transpile Int32PowResult. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D77779
2020-06-04 09:29:39 +00:00
Jan de Mooij 4594e0b069 Bug 1640587 part 4 - Add Int32 specialization for MPow. r=anba
Code mostly written by André Bargull for bug 1564942.

Differential Revision: https://phabricator.services.mozilla.com/D77778
2020-06-04 09:29:32 +00:00
Jan de Mooij 6b9bf1f1d6 Bug 1640587 part 3 - Refactor MPow type policy. r=anba
Remove the specialization_ field and the powerType use. Use the return type instead.

For now we only use the Double specialization, although this already adds the
TypePolicy code for Int32 specialization.

Differential Revision: https://phabricator.services.mozilla.com/D77777
2020-06-04 09:29:19 +00:00
Jan de Mooij 9119f4eeae Bug 1640587 part 2 - Use Int32PowResult for Math.pow on two int32 values when possible. r=anba
Differential Revision: https://phabricator.services.mozilla.com/D77776
2020-06-04 09:29:01 +00:00
Jan de Mooij a8a468fa35 Bug 1640587 part 1 - Use DoublePowResult for Math.pow(number, number). r=anba
Differential Revision: https://phabricator.services.mozilla.com/D77775
2020-06-04 09:28:54 +00:00
Masatoshi Kimura 3b8943eb50 Bug 1642844 - Remove mozJSComponentLoader::ReuseGlobal. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D78029
2020-06-03 22:53:29 +00:00
John Paul Adrian Glaubitz 319d3205ce Bug 1325771 - mfbt: Reorder parameters for MOZ_ALIGNED_DECL r=jwalden
Currently, MOZ_ALIGNED_DECL uses the order (_type, _align) for its
parameters. However, this order makes the code less readable when
_type is a larger object like a struct because the value for _align
would be at the end of the struct definition. By swapping the order
of _type and _align, the alignment value will always be next to
the type name, regardless how far the definition of _type extends.

Differential Revision: https://phabricator.services.mozilla.com/D77288
2020-06-03 18:31:06 +00:00
John Paul Adrian Glaubitz 0d3f9839aa Bug 1325771 - js:jit: Enable AtomicOperations-feeling-lucky.h on m68k r=lth
This allows the build on m68k to use the atomic operations provided by GCC.

Differential Revision: https://phabricator.services.mozilla.com/D77287
2020-06-03 18:30:58 +00:00
Coroiu Cristina 3cce853af2 Backed out 4 changesets (bug 1641291) for build bustages and SM failures on a CLOSED TREE
Backed out changeset 9c0a44614576 (bug 1641291)
Backed out changeset 0dcf604b880e (bug 1641291)
Backed out changeset d830bee40b5c (bug 1641291)
Backed out changeset fe38c82c2dad (bug 1641291)
2020-06-03 22:09:52 +03:00
Nick Alexander 26518d1bde Bug 1641291 - Part 2: Make NSDISTMODE=copy impact install manifests. r=glandium
This is strictly a quality of life improvement when cross-compiling to
Windows targets.  A common scenario is mounting an object directory
into a Windows VM, which requires additional VM configuration to
handle (absolute) symlinks.  With this patch, `export NSDISTMODE=copy`
in a mozconfig sidesteps any such symlink issues.

Differential Revision: https://phabricator.services.mozilla.com/D77118
2020-06-03 18:18:23 +00:00
Tom Schuster e0bacdb606 Bug 1642593 - Fix non unified
Depends on D77793

Differential Revision: https://phabricator.services.mozilla.com/D78111
2020-06-03 17:36:27 +00:00