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

81078 Коммитов

Автор SHA1 Сообщение Дата
Tooru Fujisawa 51eef41214 Bug 1688534 - Part 4: Add fast path for object literal without index or duplicate properties. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103553
2021-02-02 18:52:32 +00:00
Tooru Fujisawa 0ebc944ebd Bug 1688534 - Part 3: Add HasIndexOrDuplicatePropName flags. r=tcampbell
This flag is used in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D103552
2021-02-02 18:50:30 +00:00
Tooru Fujisawa 46a529c0c5 Bug 1688534 - Part 2: Inline NewPlainObjectWithProperties to avoid building properties vector. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103551
2021-02-02 18:50:22 +00:00
Tooru Fujisawa 2d99a31206 Bug 1688534 - Part 1: Store the number of properties/elements in ObjLiteralStencil. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103550
2021-02-02 18:50:12 +00:00
Mihai Alexandru Michis 7e2dd6d49e Backed out 4 changesets (bug 1688534) for causing hazard bustages in ObjLiteral.cpp
CLOSED TREE

Backed out changeset 2ce5fee4f1b3 (bug 1688534)
Backed out changeset 50f5c8ec9472 (bug 1688534)
Backed out changeset ae4890a14011 (bug 1688534)
Backed out changeset 9c82c4f218ee (bug 1688534)
2021-02-02 20:21:51 +02:00
Iain Ireland 89b13a093b Bug 1690092: Document MIR optimizations r=tcampbell DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D103707
2021-02-02 17:57:53 +00:00
Tooru Fujisawa 7e91dd003c Bug 1689781 - Fix smoosh to use CompilationState while building up stencil vectors. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D103540
2021-02-02 16:59:03 +00:00
Tooru Fujisawa 25562a928b Bug 1689696 - Part 5: Use toSmallChar in getLength2IndexStatic to make it always constexpr. r=nbp
This is necessary to use the result of `StaticStrings::getLength2IndexStatic`
in switch-case.

Differential Revision: https://phabricator.services.mozilla.com/D103546
2021-02-02 17:28:00 +00:00
Tooru Fujisawa 722965d849 Bug 1689696 - Part 4: Add comment about frontend-VM map for well-known/static atom table. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D103545
2021-02-02 17:26:41 +00:00
Tooru Fujisawa 8727575b12 Bug 1689696 - Part 3: Add StaticStrings::{firstCharOfLength2,secondCharOfLength2}. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D103544
2021-02-02 17:22:51 +00:00
Tooru Fujisawa f66ece388a Bug 1689696 - Part 2: Share NUM_LENGTH2_ENTRIES constant. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D103543
2021-02-02 17:19:19 +00:00
Tooru Fujisawa 78e64edf96 Bug 1689696 - Part 1: Rename SmallCharArray to SmallCharTable. r=nbp
Given it's a table for optimization purpose, the name should be explicit.

Differential Revision: https://phabricator.services.mozilla.com/D103542
2021-02-02 17:14:07 +00:00
Tooru Fujisawa cb096fbf7c Bug 1688534 - Part 4: Add fast path for object literal without index or duplicate properties. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103553
2021-02-02 17:37:51 +00:00
Tooru Fujisawa 16905203c9 Bug 1688534 - Part 3: Add HasIndexOrDuplicatePropName flags. r=tcampbell
This flag is used in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D103552
2021-02-02 16:21:13 +00:00
Tooru Fujisawa 13df350334 Bug 1688534 - Part 2: Inline NewPlainObjectWithProperties to avoid building properties vector. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103551
2021-02-02 15:12:00 +00:00
Tooru Fujisawa 3114569fcd Bug 1688534 - Part 1: Store the number of properties/elements in ObjLiteralStencil. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103550
2021-02-02 15:10:48 +00:00
Christian Holler ab4ced5b6c Bug 1588340 - Always define MOZ_HAS_MOZGLUE for JS. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D103462
2021-02-02 16:39:55 +00:00
Jan de Mooij 299736e3ee Bug 1686890 - Add tests. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D101346
2021-02-02 13:53:52 +00:00
Jan de Mooij 82a5f1fb5a Bug 1686890 - Add a JitOption to force megamorphic ICs. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D101345
2021-01-26 08:49:24 +00:00
Matthew Gaudet d5c7f81a2c Bug 1690115 - Remove off_thread_parse_global preference r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D103718
2021-02-02 03:24:31 +00:00
Jan de Mooij c7c11c1992 Bug 1674777 part 5 - Change GetObjectAs* APIs to use size_t for outparam instead of uint32_t. r=sfink,sg
Note that in the IndexedDB code we pass a Span to Key::EncodeAsString where we check
for large lengths.

Differential Revision: https://phabricator.services.mozilla.com/D103679
2021-02-01 17:15:00 +00:00
Iain Ireland b2433a832c Bug 1688033: Add support for LoadArgumentsObjArg r=jandem
This adds support for `arguments[i]`. It is based directly on WarpCacheIRTranspiler::emitLoadFrameArgumentResult.

If this bounds check fails, then baseline will attach a new stub in tryAttachGenericElement, preventing a bailout loop. We could also disable scalar replacement of arguments immediately, using a special BailoutKind.

Depends on D103111

Differential Revision: https://phabricator.services.mozilla.com/D103112
2021-02-02 00:27:40 +00:00
Iain Ireland d53b405109 Bug 1688033: Add support for GetArgumentsObjectArg r=jandem
This adds support for `JSOp::GetArg` when `arguments` aliases the formal args.

Depends on D103110

Differential Revision: https://phabricator.services.mozilla.com/D103111
2021-02-02 00:27:31 +00:00
Iain Ireland 3297898224 Bug 1688033: Add framework for scalar replacement of arguments r=jandem,nbp
This is based on the existing code for scalar replacement of objects and arrays. Unlike objects and arrays, we don't have to support mutation of the arguments object, so we can simplify a lot of the code: for example, we don't need to track state per-block.

This initial patch adds support for `arguments.length`.

Differential Revision: https://phabricator.services.mozilla.com/D103110
2021-02-02 01:24:53 +00:00
Iain Ireland 3a63407183 Bug 1688033: Allow DCE of MCreateArgumentsObject r=jandem
The goal of scalar replacement of arguments is to remove all uses of the CreateArgumentsObject instruction, so that DCE can remove it.

However, the MCreateArgumentsObject constructor calls setGuard, which stops DCE from removing it. (This has been true since it was introduced.) As far as I can tell, it doesn't have to be a guard. In FinishBailoutToBaseline, if a frame needs an args object and doesn't have one, then we call ArgumentsObject::createExpected to create it from the restored baseline frame.

Depends on D103108

Differential Revision: https://phabricator.services.mozilla.com/D103109
2021-02-02 00:27:36 +00:00
Iain Ireland 29a68bcf58 Bug 1688033: Add scalarReplaceArguments jit option r=jandem
Adding a jit option so that I can prototype this behind a flag.

Differential Revision: https://phabricator.services.mozilla.com/D103108
2021-02-02 00:27:38 +00:00
Butkovits Atila 3ec7d9cbf2 Backed out 5 changesets (bug 1688033) for causing build bustages on ScalarReplacement.cpp. CLOSED TREE
Backed out changeset ee7b88395348 (bug 1688033)
Backed out changeset 2205f04dd8ba (bug 1688033)
Backed out changeset f1949d2340d9 (bug 1688033)
Backed out changeset 1a5070c500b4 (bug 1688033)
Backed out changeset 5b100262a038 (bug 1688033)
2021-02-02 02:22:48 +02:00
Iain Ireland 4e8774e361 Bug 1688033: Add support for LoadArgumentsObjArg r=jandem
This adds support for `arguments[i]`. It is based directly on WarpCacheIRTranspiler::emitLoadFrameArgumentResult.

If this bounds check fails, then baseline will attach a new stub in tryAttachGenericElement, preventing a bailout loop. We could also disable scalar replacement of arguments immediately, using a special BailoutKind.

Depends on D103111

Differential Revision: https://phabricator.services.mozilla.com/D103112
2021-01-27 18:50:06 +00:00
Iain Ireland 3223e97206 Bug 1688033: Add support for GetArgumentsObjectArg r=jandem
This adds support for `JSOp::GetArg` when `arguments` aliases the formal args.

Depends on D103110

Differential Revision: https://phabricator.services.mozilla.com/D103111
2021-01-27 12:29:21 +00:00
Iain Ireland 28e4a03b0d Bug 1688033: Add framework for scalar replacement of arguments r=jandem,nbp
This is based on the existing code for scalar replacement of objects and arrays. Unlike objects and arrays, we don't have to support mutation of the arguments object, so we can simplify a lot of the code: for example, we don't need to track state per-block.

This initial patch adds support for `arguments.length`.

Differential Revision: https://phabricator.services.mozilla.com/D103110
2021-02-01 23:05:35 +00:00
Iain Ireland 39ed48b60d Bug 1688033: Allow DCE of MCreateArgumentsObject r=jandem
The goal of scalar replacement of arguments is to remove all uses of the CreateArgumentsObject instruction, so that DCE can remove it.

However, the MCreateArgumentsObject constructor calls setGuard, which stops DCE from removing it. (This has been true since it was introduced.) As far as I can tell, it doesn't have to be a guard. In FinishBailoutToBaseline, if a frame needs an args object and doesn't have one, then we call ArgumentsObject::createExpected to create it from the restored baseline frame.

Depends on D103108

Differential Revision: https://phabricator.services.mozilla.com/D103109
2021-01-27 12:27:57 +00:00
Iain Ireland 84ed3a7eec Bug 1688033: Add scalarReplaceArguments jit option r=jandem
Adding a jit option so that I can prototype this behind a flag.

Differential Revision: https://phabricator.services.mozilla.com/D103108
2021-01-27 12:25:52 +00:00
Jan de Mooij 8bee559e1a Bug 1688913 part 4 - Use separate NonNegativeIntPtrToInt32 node for ta.length. r=anba,iain
This makes GVN and bounds check optimizations work better.

Differential Revision: https://phabricator.services.mozilla.com/D103485
2021-02-01 19:57:14 +00:00
Jan de Mooij ab7691ca72 Bug 1688913 part 3 - Support range analysis checks for MIRType::IntPtr nodes. r=iain
Very similar to MIRType::Int32 but use branchPtr instead of branch32 for codegen.

Depends on D103483

Differential Revision: https://phabricator.services.mozilla.com/D103484
2021-02-01 18:34:24 +00:00
Jan de Mooij 10c88e78de Bug 1688913 part 2 - Use useAny for RHS of pointer-size comparison. r=iain
Drive-by change: for Compare_Symbol and Compare_Object this allows the RHS to be
a memory operand on non-ARM platforms, instead of requiring a register.

Differential Revision: https://phabricator.services.mozilla.com/D103483
2021-02-01 18:34:26 +00:00
Jan de Mooij d370fee3ad Bug 1688913 part 1 - Support int32 constants for Compare_UIntPtr. r=iain
Change useAnyOrConstant to useAnyOrInt32Constant and use for Compare_UIntPtr.
For IntPtr values, useAnyOrInt32Constant checks a constant is only used for values
in the Int32 range.

Differential Revision: https://phabricator.services.mozilla.com/D103482
2021-02-01 18:34:28 +00:00
Butkovits Atila a162dc1101 Backed out 4 changesets (bug 1688913) for causing build bustages. CLOSED TREE
Backed out changeset 886fe5870eb6 (bug 1688913)
Backed out changeset 5f1f8088956c (bug 1688913)
Backed out changeset ea00bb31867e (bug 1688913)
Backed out changeset 02ffbca866a0 (bug 1688913)
2021-02-01 20:29:30 +02:00
Jan de Mooij 82d1bae7a6 Bug 1688913 part 4 - Use separate NonNegativeIntPtrToInt32 node for ta.length. r=anba,iain
This makes GVN and bounds check optimizations work better.

Differential Revision: https://phabricator.services.mozilla.com/D103485
2021-02-01 16:44:35 +00:00
Jan de Mooij ecef3038e6 Bug 1688913 part 3 - Support range analysis checks for MIRType::IntPtr nodes. r=iain
Very similar to MIRType::Int32 but use branchPtr instead of branch32 for codegen.

Depends on D103483

Differential Revision: https://phabricator.services.mozilla.com/D103484
2021-01-29 20:41:32 +00:00
Jan de Mooij ddfb4d7172 Bug 1688913 part 2 - Use useAny for RHS of pointer-size comparison. r=iain
Drive-by change: for Compare_Symbol and Compare_Object this allows the RHS to be
a memory operand on non-ARM platforms, instead of requiring a register.

Differential Revision: https://phabricator.services.mozilla.com/D103483
2021-01-29 20:23:24 +00:00
Jan de Mooij 96d05024a2 Bug 1688913 part 1 - Support int32 constants for Compare_UIntPtr. r=iain
Change useAnyOrConstant to useAnyOrInt32Constant and use for Compare_UIntPtr.
For IntPtr values, useAnyOrInt32Constant checks a constant is only used for values
in the Int32 range.

Differential Revision: https://phabricator.services.mozilla.com/D103482
2021-01-29 20:07:09 +00:00
Jon Coppeard 5e1094533e Bug 1690022 - Remove concept of paths for parallel phases r=sfink
Parallel phases don't nest, unlike main thread phases. This removes the restriction that parallel phases must be recorded when in a suitable main thread parent, to allow the main thread to pause background work in any phase without associating that work with what is currently happening in the main thread.

Depends on D103675

Differential Revision: https://phabricator.services.mozilla.com/D103676
2021-02-01 17:13:35 +00:00
Jon Coppeard 94063dde50 Bug 1690022 - Report phase kind names in crash to make debugging stats phase errors simpler r=sfink
Not sure why I didn't do this before. It's a pain to have to track down phases by number.

Differential Revision: https://phabricator.services.mozilla.com/D103675
2021-02-01 17:10:27 +00:00
Jon Coppeard 792880fa11 Bug 1690022 - Simplify phase kind graph description r=sfink
Rather than having to declar some phase kinds up-front, this records phase kind names when they are created and adds a function to reference previously created kinds. This makes the graph description simpler and removes the need to do a DFS to get all the phase kinds later.

Differential Revision: https://phabricator.services.mozilla.com/D103674
2021-02-01 17:09:18 +00:00
Jon Coppeard 2ef271a2d1 Bug 1689794 - Always wait for decommit task when entering nursery zeal mode r=sfink
Entering zeal mode can interact with the nursery's background decommit task, so we should always wait for it at the start of the method.

Differential Revision: https://phabricator.services.mozilla.com/D103625
2021-02-01 16:56:47 +00:00
André Bargull 2aa9f9f621 Bug 1689880: Always box magic types in TypePolicy. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D103621
2021-02-01 16:37:04 +00:00
Lars T Hansen e22404c3c8 Bug 1686633 - Add a clarifying comment about commutative operations. r=yury DONTBUILD
The code in MIR.cpp takes care of reordering and there are test cases
in wasm/simd/binop-x64-ion-codegen.js, see the codegenTextX64_LITERALxv128_v128
block.  So just add a comment to avoid future confusion.

Differential Revision: https://phabricator.services.mozilla.com/D103455
2021-02-01 08:08:11 +00:00
Jan de Mooij 72b0edc3ed Bug 1674777 part 4 - Change some JSAPI byteLength and byteOffset accessors to return size_t instead of uint32_t. r=sfink
Of these four, only JS_GetTypedArrayByteLength is used outside jsapi-tests.

Differential Revision: https://phabricator.services.mozilla.com/D103277
2021-01-28 16:11:52 +00:00
Jan de Mooij 41621582c6 Bug 1674777 part 3 - Change Get*LengthAndData outparam from uint32_t to size_t. r=sfink,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D103275
2021-01-31 08:35:40 +00:00
Jan de Mooij 27b285bc46 Bug 1674777 part 2 - Enable large ArrayBuffers for jsapi-tests. r=sfink
Depends on D103273

Differential Revision: https://phabricator.services.mozilla.com/D103274
2021-01-28 15:54:23 +00:00