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

82370 Коммитов

Автор SHA1 Сообщение Дата
Andi-Bogdan Postelnicu 2508edc4c5 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,geckoview-reviewers,agi
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113294
2021-04-26 15:52:25 +00:00
Jon Coppeard 898906b1cd Bug 1707422 - Fix non-inline string data pointer for dependent strings created by rope flattening r=jandem
There is a bug in the string flattening changes that happens when we reuse the
leftmost string as the buffer for the flattened string. In this case the
chacter data pointer for dependent strings converted from ropes is set
incorrectly until we reach the leftmost rope, since we initialize the |pos|
variable to the first character after the contents of the leftmost string. In
the original version of this code we use |str->setNonInlineChars(wholeChars)|
for these. This also results in the lengths of these dependent strings being
wrong since this is caculated based on this pointer. This leads to the
assertion failure.

Differential Revision: https://phabricator.services.mozilla.com/D113306
2021-04-26 11:37:49 +00:00
Jan de Mooij e931659170 Bug 1706900 part 8 - Compact ShapeTables that can't be purged. r=jonco
This is now easy to support.

Differential Revision: https://phabricator.services.mozilla.com/D113109
2021-04-26 11:00:06 +00:00
Jan de Mooij 38a55a6c80 Bug 1706900 part 7 - Simplify addProperty a bit more. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D113092
2021-04-26 11:00:06 +00:00
Jan de Mooij dca62ba9ee Bug 1706900 part 6 - Replace ShapeTable's custom hash table with a HashSet. r=jonco
This is much simpler and lets us tidy up the addProperty code more. It also makes
it easier to change ShapeTable for property maps in the future.

Lookup performance and memory usage appear to be similar for the two versions,
probably because ShapeTable used the same double-hashing algorithm and because
we can purge most ShapeTables on GC.

Differential Revision: https://phabricator.services.mozilla.com/D113089
2021-04-26 11:00:06 +00:00
Jan de Mooij 409b24beaa Bug 1706900 part 5 - Don't add properties with duplicate keys to the intrinsics holder. r=jonco
The next patch will assert when adding duplicate keys to the ShapeTable. This caught
an issue with the intrinsics holder (on a single jsreftest): there's an edge
case where we could add "$ArrayValues" to the intrinsics holder twice.

Differential Revision: https://phabricator.services.mozilla.com/D113088
2021-04-26 11:00:05 +00:00
Jan de Mooij 3e34f82de1 Bug 1706900 part 4 - Simplify changeCustomDataPropAttributes. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D113087
2021-04-26 11:00:05 +00:00
Jan de Mooij 6b8180879d Bug 1706900 part 3 - Merge addProperty and addPropertyInternal. r=jonco
After part 1, addPropertyInternal is only called by addProperty so we can merge them
into a single addProperty method.

Differential Revision: https://phabricator.services.mozilla.com/D113086
2021-04-26 11:00:04 +00:00
Jan de Mooij 61d5184253 Bug 1706900 part 2 - Rename putProperty to changeProperty. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D113085
2021-04-26 11:00:04 +00:00
Jan de Mooij 2617cd4fd7 Bug 1706900 part 1 - Only call putProperty when changing an existing (shape) property. r=jonco
The callers now know whether we're adding a new property to the shape or just changing
a property, so they can call addProperty directly in the former case. This lets us
simplify putProperty a bit.

Differential Revision: https://phabricator.services.mozilla.com/D113084
2021-04-26 11:00:03 +00:00
Ashita 3adb99dc5b Bug 1696085: Use js::EnumFlags for js::ObjLiteralFlags r=arai
Differential Revision: https://phabricator.services.mozilla.com/D113268
2021-04-25 20:35:59 +00:00
Butkovits Atila 2e34e363b9 Backed out 2 changesets (bug 1696251) for causing js-bench-sm failures. CLOSED TREE
Backed out changeset 1c84c9a34575 (bug 1696251)
Backed out changeset e169193b7423 (bug 1696251)
2021-04-23 02:53:36 +03:00
mr.robot 092404496a Bug 1706190: Simplify the arguments to IRGenerator constructor r=iain
Differential Revision: https://phabricator.services.mozilla.com/D112989
2021-04-22 20:38:12 +00:00
Alex Lopez 41687360e8 Bug 1696251 - Turn all properties in MachCommandBase subclasses into methods. r=mhentges,perftest-reviewers,sparky
As a step towards moving mach commands outside of classes, this converts all
properties into methods so that they can later become top-level helper functions.

Differential Revision: https://phabricator.services.mozilla.com/D112196
2021-04-22 19:44:52 +00:00
Butkovits Atila 8d2ef6ccc7 Backed out changeset b35ee13d7aa5 (bug 1706190) for causing build bustages on BaselineIC.cpp. CLOSED TREE 2021-04-22 22:21:16 +03:00
Alex Lopez d1a82b8092 Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).

Differential Revision: https://phabricator.services.mozilla.com/D109650
2021-04-22 18:56:15 +00:00
mr.robot 44b353dc4d Bug 1706190: Simplify the arguments to IRGenerator constructor r=iain
Differential Revision: https://phabricator.services.mozilla.com/D112989
2021-04-22 18:02:48 +00:00
Tom Schuster 3fc6505aa6 Bug 1706404 - Add JS_GetOwnPropertyDescriptorById Maybe<PropertyDescriptor> overload. r=jandem
Depends on D112917

Differential Revision: https://phabricator.services.mozilla.com/D113017
2021-04-22 16:56:10 +00:00
Tom Schuster 26e2ecda9f Bug 1706404 - Change internal GetPropertyDescriptor to use Maybe and return holder object seperately. r=jandem
Depends on D112790

Differential Revision: https://phabricator.services.mozilla.com/D112917
2021-04-22 16:56:10 +00:00
Tom Schuster 2a9dcca214 Bug 1706404 - Remove internal non-Maybe GetOwnPropertyDescriptor overload. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D112790
2021-04-22 16:56:09 +00:00
Narcis Beleuzu 33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Ryan Hunt f1fa5625be Bug 1704111 - wasm: Check for correct NaN flavor in spec tests. r=lth
This commit adds a new testing utility for checking NaN flavors and
uses it for spec tests. The spectest generator uses this when
appropriate, and switches to bitwise equality for all other cases.

The comparison functions for arithmetic/canonical nan's was taken
from wasmtime's spectest runner without deep examination.

Differential Revision: https://phabricator.services.mozilla.com/D112998
2021-04-22 14:16:10 +00:00
Valentin Gosu db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Dmitry Bezhetskov a6f2b3ce51 Bug 1704771 part 9 - Add recursion limiter. r=jandem
WASI doesn't support catching call-stack overflows with
stack-pointer checks, so custom RecursionLimiter is used to directly count entries to certain functions
and report stack overflows.

Differential Revision: https://phabricator.services.mozilla.com/D111813
2021-04-22 11:11:12 +00:00
Chris Fallin 98af369b22 Bug 1704763 part 8 - Path canonicalization. r=jandem,wingo
For WASI we need to collapse ".." path components for the capabilities
that we pass to our unit tests to be reasonable.

Differential Revision: https://phabricator.services.mozilla.com/D111798
2021-04-22 11:11:12 +00:00
Lars T Hansen 5e8b141fb2 Bug 1704722 - Tidy up confusion around jit entry/exit generation. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D111800
2021-04-22 08:57:55 +00:00
Dmitry Bezhetskov b4bded15af Bug 1706251: Replace wasi-only buggy options with condition r=glandium
For wasi purposes --enable-editline was introduced but since it is buggy
it is replaced with simple if.

Differential Revision: https://phabricator.services.mozilla.com/D112924
2021-04-22 04:25:04 +00:00
Iain Ireland dd3876f8df Bug 1706314: Don't specialize OSR phis after pruning path to preheader r=jandem
This bug is an extension of bug 1704467. That bug was triggered when we had a phi with one undefined operand and one OSRValue operand; this bug is triggered if we have a phi with one undefined operand and a second phi operand, which in turn has OSRValue operands. I've updated the testcase to test the broader problem.

It's relatively simple to fix this, but at this point I'm tired of playing whack-a-mole with this code. All of these problems (this bug, bug 1704467, bug 1701208) happen when we try to specialize OSR phis after branch pruning has removed the path from the entry block to the preheader. The cleanest fix, which I probably should have done a while ago, is to just disable OSR phi specialization in this case. It's not clear that it's even useful: for example, in this testcase, which isn't particularly weird, we end up specializing `o1` and `o2` to null because that's the only information we have, which will cause us to immediately bail out and recompile.

After disabling OSR specialization, we can also remove the extra code we added to handle this weird case.

Differential Revision: https://phabricator.services.mozilla.com/D112827
2021-04-21 22:06:27 +00:00
Matthew Gaudet d1dd32f089 Bug 1703688 - Update test262 and import Ergonomic Brand Check tests r=arai
This patch updates tests262, enables the ergnomic brand check tests, and disables those that do not currently pass.

I have opened bugs for the new test cases that are skipped.

Differential Revision: https://phabricator.services.mozilla.com/D113030
2021-04-21 21:40:49 +00:00
Yoshi Cheng-Hao Huang b02dede164 Bug 1703240 - Part 2: Read the env variable MOZ_JS_DISPATCH_TO_EXTERNAL_THREAD_POOL. r=jonco
Only allow to use external thread pool if MOZ_JS_DISPATCH_TO_EXTERNAL_THREAD_POOL
is defined in environment varaible.

Differential Revision: https://phabricator.services.mozilla.com/D112704
2021-04-21 20:19:22 +00:00
Yoshi Cheng-Hao Huang 9da49b827b Bug 1703240 - Part 1: Add a useInternalThreadPool() method. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D112703
2021-04-21 20:19:22 +00:00
Iain Ireland 1de328f3ad Bug 1706504: Only attach some ICs once r=jandem
It's possible that we want to do this in more places, but for now I just went with the ones that we had marked.

Differential Revision: https://phabricator.services.mozilla.com/D112873
2021-04-21 18:11:32 +00:00
Julian Seward 823a65a011 Bug 1705664 - Centralise save-area-size computation for the bailout-register-save-area. r=lth.
MacroAssembler methods PushRegsInMask, storeRegsInMask, PopRegsInMask and
PopRegsInMaskIgnore create code to save/restore arbitrary subsets of the
registers in memory.  Unfortunately logic which computes the size of this area
is decoupled from those routines and is not documented as being dependent on
them.  This also means the format must be the same for all targets, which may
not be optimal in future when we come to save/restore SIMD registers on more
targets.

This patch introduces a new method, MacroAssembler::PushRegsInMaskSizeInBytes,
to calculate that size independently on a per-platform basis.  Ad-hoc
computations of the size are replaced by a call to this method.  On
x86_{32,64} and arm{32,64}, the method is used in assertions to crosscheck
the actual used size in PushRegsInMask, storeRegsInMask and
PopRegsInMaskIgnore.

The inferred invariants have been recorded in comments.  There is no change to
the generated code.

Differential Revision: https://phabricator.services.mozilla.com/D112533
2021-04-21 18:04:57 +00:00
Jan de Mooij 0ad727394f Bug 1706573 - Don't generate a new shape for updated dictionary properties. r=jonco
When changing a dictionary property, we have to generate a new shape for the
object (last property shape) and we can then mutate the property in place.
This removes the extra shape allocation for the mutated property.

This reverts the change in bug 703157: the issue fixed there no longer applies.

`replaceWithNewEquivalentShape` is then only used for `generateOwnShape`, to generate
a new shape for the last property, so we can inline it into `generateOwnShape` and
simplify the code a bit.

Differential Revision: https://phabricator.services.mozilla.com/D112907
2021-04-21 15:06:10 +00:00
Garima 44de785f30 Bug 1524481 Hide names 'ScratchDoubleReg' and 'ScratchFloat32Reg' in tier-1 back-ends. r=lth
Differential Revision: https://phabricator.services.mozilla.com/D112694
2021-04-21 13:19:18 +00:00
Lars T Hansen 843803743d Bug 1697371 - Templatize baseline compiler part 5: eqz and wrap. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D109611
2021-04-21 12:52:09 +00:00
Lars T Hansen 1b7bd6c272 Bug 1697371 - Templatize baseline compiler part 4: Shifts and 32-bit rotates. r=rhunt
Shifts and rotates may require a variable RHS to be in a specific
register.  We can express this generically by passing an rhs-popper
function to the emitter.

(64-bit rotates are additionally complicated by requiring a temp, and
are not translated in this patch.)

Differential Revision: https://phabricator.services.mozilla.com/D109610
2021-04-21 12:52:09 +00:00
Lars T Hansen 283c987c95 Bug 1697371 - Templatize baseline compiler part 3: Popcnt. r=rhunt
Popcount may need a temp; whether it does depends on both the platform
and the CPU.  A custom temp allocator function can be passed to the
emitter and used generically.

Differential Revision: https://phabricator.services.mozilla.com/D109609
2021-04-21 12:52:08 +00:00
Lars T Hansen 5b3bb91275 Bug 1697371 - Templatize baseline compiler part 2: Easy cases. r=rhunt
Translate the existing emitters that have simple register use patterns
(no custom pops, temps, widens, or narrows) into the new templated
style.

Differential Revision: https://phabricator.services.mozilla.com/D107798
2021-04-21 12:52:08 +00:00
Lars T Hansen a526d30dc2 Bug 1697371 - Templatize baseline compiler part 1: Move stuff around and rename. r=rhunt
The templates that were introduced for SIMD are promoted from
emitVectorWhatever to emitWhatever, so that they can be used more
generally.  They are also moved away from SIMD-specific code to a more
generic place in the compiler.

Some type-specific names for which type information is otherwise
available though a parameter type are changed to become type-agnostic
(popConstT -> popConst for example), this will aid further template
use.

Differential Revision: https://phabricator.services.mozilla.com/D109608
2021-04-21 12:52:08 +00:00
Ted Campbell 4a7efadf02 Bug 1705837 - Remove MakeConstructible self-hosting intrinsic. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D112436
2021-04-21 12:22:19 +00:00
Ted Campbell ac0dd27b11 Bug 1705837 - Add new_Record / new_List utility functions to JS self-hosting. r=jandem
We do not allow `new` in self-hosting, except in these special cases. We can
avoid `new` in these remaining cases as well by using std_Object_create. The
created objects are internal to self-hosting algorithms and are never exposed
to user scripts.

Differential Revision: https://phabricator.services.mozilla.com/D112435
2021-04-21 12:22:18 +00:00
Brindusan Cristian da7fbe99f9 Backed out 5 changesets (bug 1697371) for causing sm bustages in WasmBaselineCompile.cpp. CLOSED TREE
Backed out changeset 6f12cc06efc0 (bug 1697371)
Backed out changeset c6a95e1a6b94 (bug 1697371)
Backed out changeset 4b683260bf2f (bug 1697371)
Backed out changeset 8869b6a4843e (bug 1697371)
Backed out changeset 85fe1b348664 (bug 1697371)
2021-04-21 14:04:38 +03:00
Lars T Hansen bcb824b07c Bug 1697371 - Templatize baseline compiler part 5: eqz and wrap. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D109611
2021-04-21 10:51:02 +00:00
Lars T Hansen 97cd5af4a0 Bug 1697371 - Templatize baseline compiler part 4: Shifts and 32-bit rotates. r=rhunt
Shifts and rotates may require a variable RHS to be in a specific
register.  We can express this generically by passing an rhs-popper
function to the emitter.

(64-bit rotates are additionally complicated by requiring a temp, and
are not translated in this patch.)

Differential Revision: https://phabricator.services.mozilla.com/D109610
2021-04-21 10:51:02 +00:00
Lars T Hansen 9bb9bdca0b Bug 1697371 - Templatize baseline compiler part 3: Popcnt. r=rhunt
Popcount may need a temp; whether it does depends on both the platform
and the CPU.  A custom temp allocator function can be passed to the
emitter and used generically.

Differential Revision: https://phabricator.services.mozilla.com/D109609
2021-04-21 10:51:02 +00:00
Lars T Hansen b9f17454eb Bug 1697371 - Templatize baseline compiler part 2: Easy cases. r=rhunt
Translate the existing emitters that have simple register use patterns
(no custom pops, temps, widens, or narrows) into the new templated
style.

Differential Revision: https://phabricator.services.mozilla.com/D107798
2021-04-21 10:51:01 +00:00
Lars T Hansen 3b099fdd06 Bug 1697371 - Templatize baseline compiler part 1: Move stuff around and rename. r=rhunt
The templates that were introduced for SIMD are promoted from
emitVectorWhatever to emitWhatever, so that they can be used more
generally.  They are also moved away from SIMD-specific code to a more
generic place in the compiler.

Some type-specific names for which type information is otherwise
available though a parameter type are changed to become type-agnostic
(popConstT -> popConst for example), this will aid further template
use.

Differential Revision: https://phabricator.services.mozilla.com/D109608
2021-04-21 10:51:01 +00:00
Jon Coppeard af6c652f89 Bug 1705113 - Fix NewPlainObject stub to not use AutoCallVM for conditinal VM call r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D112338
2021-04-21 08:25:39 +00:00
Jon Coppeard a681645963 Bug 1705113 - Add an IC stub for the NewArray op and compile it in basline r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D112054
2021-04-21 08:25:38 +00:00