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

84477 Коммитов

Автор SHA1 Сообщение Дата
Lars T Hansen 3bd2682fac Bug 1739576 - Make 8GB available. r=rhunt
Tidy up MaxMemoryPages(IndexType::I64) so that it returns a value
corresponding to the max buffer byte length.  Fix two asserts that
were incorrect and that triggered when making this change.

Add a test that the max memory pages for i64 is indeed at least 8GB.

Drive-by fix to allow a test to OOM without reporting that as a
failure.

Differential Revision: https://phabricator.services.mozilla.com/D130452
2021-11-05 20:03:22 +00:00
Sebastian Hengst cfe77b2206 Bug 1739603 - only define variable in BytecodeCompiler.cpp for configurations which use it. r=nbp DONTBUILD
Bug 1721849 added 'data' variable which only got called by assertions which are
ignore in opt builds outside Nightly and causes the build to report 'data' as
unused variable.

Differential Revision: https://phabricator.services.mozilla.com/D130456
2021-11-05 18:55:02 +00:00
Jon Coppeard 67e5f32aae Bug 1738721 - Part 3: Rename MetaTwoByte to MetaScriptedThisShape and remove unused argument r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D130106
2021-11-05 18:14:42 +00:00
Jon Coppeard 9f89d2dd54 Bug 1738721 - Part 2: Remove unused MCreateThisWithTemplate node and associated machinery r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D130105
2021-11-05 18:14:41 +00:00
Jon Coppeard 68ee4eb8e2 Bug 1738721 - Part 1: Use a shape rather than a template object to create |this| when calling a scripted constructor r=jandem
This replaces use of MCreateThisWithTemplate with MNewPlainObject. This adds a
MIR flag to replace checks for MCreatThisWithTemplate.

Differential Revision: https://phabricator.services.mozilla.com/D130104
2021-11-05 18:14:41 +00:00
Nicolas B. Pierron fb350c6b26 Bug 1739627 - Disable test cases when forceFullParse is set by code coverage. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D130475
2021-11-05 15:31:48 +00:00
Cristian Tuns cbd178830f Backed out 10 changesets (bug 1732343) for causing coverage build bustages (Bug 1739590).
Backed out changeset bba94c79f3e1 (bug 1732343)
Backed out changeset d30fa1e1f605 (bug 1732343)
Backed out changeset ed0b4f757c4b (bug 1732343)
Backed out changeset a272da134c34 (bug 1732343)
Backed out changeset ccb259d73843 (bug 1732343)
Backed out changeset a292990b62de (bug 1732343)
Backed out changeset 7d1854782ca8 (bug 1732343)
Backed out changeset 29eaabd9ffb3 (bug 1732343)
Backed out changeset 1aa26657a7a6 (bug 1732343)
Backed out changeset 7a6708dc620a (bug 1732343)
2021-11-05 07:21:04 -04:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
André Bargull 950c4f972e Bug 1131996 - Part 5: Use scoped enums for CanAttachDenseElementHole. r=iain
Use scoped enums for `CanAttachDenseElementHole` to improve the readibility
compared to using three plain `bool` parameters.

Differential Revision: https://phabricator.services.mozilla.com/D129623
2021-11-05 08:28:21 +00:00
André Bargull 0ce05dd4ea Bug 1131996 - Part 4: Support scalar replacement for arguments objects with out-of-bounds read access. r=iain
The follows the existing implementations of `MGetInlinedArgument` and
`MGetFrameArgument`. There are only two differences:
1. A bailout occurs when the index is negative. This implies both instructions
   must be guards.
2. Undefined is returned when the index is larger than the arguments length.

Differential Revision: https://phabricator.services.mozilla.com/D129622
2021-11-05 08:28:21 +00:00
André Bargull 3013e201cd Bug 1131996 - Part 3: Support out-of-bounds read access on arguments objects in Warp. r=iain
Transpile the CacheIR operation from part 2.

Differential Revision: https://phabricator.services.mozilla.com/D129621
2021-11-05 08:28:20 +00:00
André Bargull 4576174865 Bug 1131996 - Part 2: Support out-of-bounds read access on arguments objects in CacheIR. r=iain
The `ELEMENT_OVERRIDDEN_BIT` flag is set whenever any element is defined on an
arguments object, irrespective of whether the element is in-bounds or out-of-bounds.
That means that flag can also be used to determine if an arguments object has any
elements besides the frame arguments.

When reading a possible out-of-bounds index, we can therefore use the following
approach:
1. Fail whenever `ELEMENT_OVERRIDDEN_BIT` is set.
2. If the index is in-bounds:
  a. Return the in-bounds element unless it's `FORWARD_TO_CALL_SLOT`.
3. Else,
  a. Fail if the index is less than zero.
  b. Return `undefined`.

Plus a prototype guard check to ensure the element isn't present on any object
of the prototype chain.

Differential Revision: https://phabricator.services.mozilla.com/D129620
2021-11-05 08:28:20 +00:00
André Bargull 596761610a Bug 1131996 - Part 1: Move ClassCanHaveExtraProperties and CanAttachDenseElementHole. r=iain
Moves ClassCanHaveExtraProperties and CanAttachDenseElementHole in preparation
for the next part

Differential Revision: https://phabricator.services.mozilla.com/D129619
2021-11-05 08:28:20 +00:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Nika Layzell b8279164db Bug 1732343 - Part 2: Migrate all uses of base::FileDescriptor to UniqueFileHandle, r=handyman
This is useful for the following parts, as UniqueFileHandle is a cross-platform
type which can also be used to support transferring HANDLEs between processes.

This change requires fairly sweeping changes to existing callsites, which
previously did not require owning access to the handle types when transferring.
For the most part these changes were straightforward, but manual.

Differential Revision: https://phabricator.services.mozilla.com/D126564
2021-11-04 19:20:17 +00:00
Nicolas B. Pierron 8e61f2da65 Bug 1721849 - Add CompileAllToStencil testing function. r=arai
This function compiles its string arguments, first creating the top-level
stencil in a way similar to compileToStencil, but then delazify all inner
functions using DelazifyCanonicalScriptedFunction from the previous patch.

Differential Revision: https://phabricator.services.mozilla.com/D128182
2021-11-04 18:25:42 +00:00
Nicolas B. Pierron 5dcd01337b Bug 1721849 - Overload DelazifyCanonicalScriptedFunction with Stencil inputs. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D128181
2021-11-04 18:25:42 +00:00
Nicolas B. Pierron 7e04d0a168 Bug 1730881 - Initialize CompilationSyntaxParseCache from InputScript variants. r=arai
This change clone some of the functions used to initialize the
CompilationSyntaxParseCache. These are specialized to copy the minimal set of
information needed for skipping inner functions and for iterating over
closed-over-bindings.

Unforutnately, as opposed to what this structure was initialy designed for, we
are not yet able to reuse the Stencils from the InputScript as ParseAtomIndex of
the InputScript are in the context of the InputScript and not of the
CompilationState which wraps the CompilationSyntaxParseCache. Until we are
capable of reusing the same indexes of a previous compilation, we would have to
duplicate the Stencil structures. Thus, copyScriptInfo and
copyClosedOVerBindings are copied from the original functions and adapted to
work with Stencil inputs.

Differential Revision: https://phabricator.services.mozilla.com/D128180
2021-11-04 18:25:42 +00:00
Nicolas B. Pierron 51e61a53c5 Bug 1730881 - Use InputScript for CompilationInput::lazy_. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D125997
2021-11-04 18:25:41 +00:00
Nicolas B. Pierron 77e899e1c2 Bug 1730881 - Use InputScope for CompilationInput::enclosingScope. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D125996
2021-11-04 18:25:41 +00:00
Nicolas B. Pierron f6c4f4e4e1 Bug 1730881 - Use InputScope in ScopeContext::cacheEnclosingScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D125995
2021-11-04 18:25:40 +00:00
Nicolas B. Pierron bdef1e4996 Bug 1730881 - Use InputScope in ScopeContext::computeThisEnvironment. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D125994
2021-11-04 18:25:40 +00:00
Nicolas B. Pierron 8bedd3fff4 Bug 1730881 - Use InputScope in ScopeContext::computeInScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D125993
2021-11-04 18:25:40 +00:00
Nicolas B. Pierron 62115ce1fc Bug 1730881 - Use InputScope in ScopeContext::{determineEffectiveScope, computeThisBinding}. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D125992
2021-11-04 18:25:39 +00:00
Nicolas B. Pierron 8597c3703a Bug 1730881 - Use InputScope in ScopeContext::cachePrivateFieldsForEval. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D125991
2021-11-04 18:25:39 +00:00
Nicolas B. Pierron d0349173a9 Bug 1730881 - Use InputScope in ScopeContext::cacheEnclosingScopeBindingForEval. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D125990
2021-11-04 18:25:38 +00:00
Nicolas B. Pierron 16892e6c4d Bug 1730881 - Use InputScope in ScopeContext::searchInEnclosingScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D125989
2021-11-04 18:25:38 +00:00
Nicolas B. Pierron 27a8f91b4e Bug 1730881 - Use InputScope in NameIsOnEnvironment. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D125988
2021-11-04 18:25:37 +00:00
Nicolas B. Pierron a4f7ba6078 Bug 1730881 - Add InputName to handle JSAtom* and TaggedParserAtomIndex r=arai,tcampbell
This patchs adds an InputName structure. This structure is used to represent
names held by the GC or another Stencil, and isolate these names such that they
are properly interned before being used in the CompilationState of the existing
compilation.

InputName is a variant over a JSAtom* or a NameStencilRef. The NameStencilRef is
a TaggedParserAtomIndex from a CompilationStencil given as context.

A function is added as part of the ParserAtomsTable, such that
TaggedParserAtomIndex from another compilation can be interned as well. For
encoding where the atom is represented by the tag it-self, this is a no-op,
whereas for larger atoms, these have to be registered in the table. Identically,
another function is added to compare an InputName with an internalized name,
which would be necessary to convert `ScopeContext::searchInEnclosingScope`.

ParserBindingIter are updated to be initialized with a `ScopeStencilRef`, in a
similar way as already done with `Scope*`.

BindingIter and ParserBindingIter creation are wrapped behind the local
InputBindingIter function, used to return one or the other based on the input
type. Identically, InputName can be constructed from a scope and its matching
name type. These would be handy to convert `ScopeContext` methods to
`InputScopeIter`, while maintaining a single implementation of the binding
traversal, which would dispatch to one variant or the other based on the type of
the scope.

Differential Revision: https://phabricator.services.mozilla.com/D125987
2021-11-04 18:25:37 +00:00
criss 7cd579aaf3 Backed out changeset 80065f480a1f (bug 1737798) for causing TSAN exceptions. CLOSED TREE 2021-11-04 16:57:27 +02:00
Jon Coppeard f8886fd82e Bug 1738899 - Assert that gray marking doesn't push black entries r=sfink
Also assert that nothing adds entries to the barrier buffer.

Differential Revision: https://phabricator.services.mozilla.com/D130166
2021-11-04 13:06:38 +00:00
Nicolas B. Pierron cd762ef3c8 Bug 1730881 - Add InputScope, InputScript and InputScopeIter. r=arai,tcampbell
In order to make CompilationInput accept Stencil instead of GC objects as
inputs, we have to create structure which are able to abstract over the GC Scope
pointer, the BaseScript pointer, and the manipulation of the the scopes.

This patch adds the structures used in all follow-up patches from Bug 1730881
which are implementing all the accessors necessary to make it possible to later
initialize a CompilationInput with a Stencil.

Stencil references are abstracted using a `ScopeStencilRef` /
`ScriptStencilRef`, to capture the `CompilationStencil` input and the index
which is a reference to an element within the `CompilationStencil`. These
structures are made to avoid accidental missuse of indexes with the wrong
stencil.

`InputScope` / `InputScript` are variants over the pointer to the GC object and
the equivalent Stencil reference. They are used to provide a common interface to
interpret GC / Stencil data.

Differential Revision: https://phabricator.services.mozilla.com/D125986
2021-11-04 12:21:36 +00:00
Lars T Hansen 58495c92ef Bug 1737798 - More memory64 test cases. r=yury
Test a number of corner cases for memory64.  See comments in the tests
for further information.

Differential Revision: https://phabricator.services.mozilla.com/D130277
2021-11-04 08:14:16 +00:00
Lars T Hansen 2ccfb4ee41 Bug 1738997 - Add missing MEMORY64 ifdefs. r=yury
When ENABLE_WASM_MEMORY64 is not defined, the isMem32() test will
always return true, and there should be no 64-bit case - instead, that
case could just MOZ_CRASH.  This prevents the expansion of templates
for 64-bit code (which would be dead) and means we don't have to
provide masm stubs on platforms that don't support memory64.

Differential Revision: https://phabricator.services.mozilla.com/D130248
2021-11-04 08:13:55 +00:00
Cristian Tuns 9a39fdc8ea Backed out changeset 5d24482057dd (bug 1738899) for causing mochitest failures on Marking.cpp CLOSED TREE 2021-11-03 12:34:50 -04:00
Jon Coppeard 341b778018 Bug 1738899 - Assert that gray marking doesn't push black entries r=sfink
Also assert that nothing adds entries to the barrier buffer.

Differential Revision: https://phabricator.services.mozilla.com/D130166
2021-11-03 14:52:24 +00:00
Lukas Bernhard 463253db7d Bug 1709209 - [wasm] Move SIMD masking out of codegen. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D129314
2021-11-02 19:47:21 +00:00
Kershaw Chang 34f9cb2633 Bug 1727180 - Call XRE_InitCommandLine for xpcshell, r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D124890
2021-11-02 16:01:10 +00:00
Steve Fink f64fd4ecbc Bug 1738750 - Review comment fixes for bug 1706265
Differential Revision: https://phabricator.services.mozilla.com/D130110
2021-11-01 19:05:45 +00:00
Jon Coppeard 125e40b537 Bug 1738228 - Part 3: Don't use MOZ_MAKE_MEM_UNDEFINED on the start of nursery chunks r=sfink
We use MarkPagesUnusedHard/MarkPagesInUseHard on unused pages in nursery chunks
to allow the OS to make use of this memory without releasing the address space.

The latter function is currently applied to the start of the chunk including
the header, even though this part is never passed to MarkPagesUnusedHard. Since
MarkPagesInUseHard uses MOZ_MAKE_MEM_UNDEFINED on the address range it
receives, valgrind warns us about accessing memory that has been marked as
undefined when we touch the chunk header.

The fix is to not call MarkPagesInUseHard on the first page of the chunk, since
MarkPagesUnusedHard is never called on this region either.

Differential Revision: https://phabricator.services.mozilla.com/D129815
2021-11-01 15:15:49 +00:00
Jon Coppeard 0f12b69b56 Bug 1738228 - Part 2: Limit nursery size parameters to at least one page r=sfink
Currently they are limited to ArenaSize mininum, which may be less then a page.

Depends on D130035

Differential Revision: https://phabricator.services.mozilla.com/D130036
2021-11-01 15:15:49 +00:00
Jon Coppeard 72671f86be Bug 1738228 - Part 1: Rename arguments to NurseryChunk::markPages methods for clarity r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D130035
2021-11-01 15:15:48 +00:00
Yoshi Cheng-Hao Huang b4c3f94c5f Bug 1737814 - Part 3: Simplify parts data structure. r=platform-i18n-reviewers,anba,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D129563
2021-11-01 14:23:23 +00:00
Yoshi Cheng-Hao Huang 2349231e66 Bug 1737814 - Part 2: ListFormat.FormatToParts doesn't take a callback. r=platform-i18n-reviewers,anba,gregtatum
The caller now will provide a buffer, which owns the memory pointed by the span.

Differential Revision: https://phabricator.services.mozilla.com/D129562
2021-11-01 14:23:22 +00:00
Andrew McCreight 7d01afde50 Bug 1737515 - Null check the result of XrayTraits::ensureHolder(). r=peterv
XrayTraits::ensureHolder() can return the result of XrayTraits::createHolder(),
which in turns returns the result of JS_NewObjectWithGivenProto(),
so we need to null check the result. The other callers already do this.

Differential Revision: https://phabricator.services.mozilla.com/D129432
2021-11-01 13:37:38 +00:00
Lars T Hansen 00e91987fd Bug 1738197 - Allow memory.grow to oom. r=yury
Differential Revision: https://phabricator.services.mozilla.com/D129796
2021-11-01 07:34:25 +00:00
Chris Peterson 2192f6320d Bug 1738400 - Fix -Wshadow-field-in-constructor-modified warning in js/src/vm/SavedStacks.cpp. r=sfink
Bug 1247299 added a `column` member variable reduce differential testing false positives, but the SavedFrame::Lookup constructor inadvertently sets the constructor's `column` parameter = 0, not the `column` member variable.

js/src/vm/SavedStacks.cpp:198:14 [-Wshadow-field-in-constructor-modified] modifying constructor parameter 'column' that shadows a field of 'js::SavedFrame::Lookup'

Differential Revision: https://phabricator.services.mozilla.com/D129900
2021-10-30 16:31:34 +00:00
Jan de Mooij 48ff8711db Bug 1738020 part 5 - Move ReshapeForProtoMutation call to JSObject::setProtoUnchecked. r=tcampbell
Merge SetProto into JSObject::setProtoUnchecked. This is similar to part 1.

Depends on D129631

Differential Revision: https://phabricator.services.mozilla.com/D129632
2021-10-29 18:19:17 +00:00
Jan de Mooij fc9998b7cf Bug 1738020 part 4 - Rename AddDataPropertyNonPrototype to AddDataPropertyToPlainObject. r=tcampbell
The "NonPrototype" in the name no longer matters, because shape teleporting is now
handled by addProperty which we end up calling.

Differential Revision: https://phabricator.services.mozilla.com/D129631
2021-10-29 18:19:17 +00:00
Jan de Mooij 3bd072bef9 Bug 1738020 part 3 - Change ReshapeForShadowedProp argument from JSObject to NativeObject. r=tcampbell
Depends on D129629

Differential Revision: https://phabricator.services.mozilla.com/D129630
2021-10-29 18:19:17 +00:00