Commit f7f334f1 authored by Robin Templeton's avatar Robin Templeton
Browse files

Bug 1532289 - Fix missing pre-write barrier for BigInt values in Ion r=jandem

Differential Revision: https://phabricator.services.mozilla.com/D21941

--HG--
extra : moz-landing-system : lando
parent b8a3774d
// |jit-test| --ion-warmup-threshold=0; --ion-offthread-compile=off; skip-if: !getJitCompilerOptions()['baseline.enable']
// gczeal mode causes test to run too slowly with --no-baseline
gczeal(4,40);
var x;
var y = false;
function f(v) { x = v; while (y) {} }
for (var z=1; z < 1e5; z++) { f(BigInt(z)); }
......@@ -1852,7 +1852,7 @@ bool HeapTypeSetKey::needsBarrier(CompilerConstraintList* constraints) {
return false;
}
bool result = types->unknownObject() || types->getObjectCount() > 0 ||
types->hasAnyFlag(TYPE_FLAG_STRING | TYPE_FLAG_SYMBOL);
types->hasAnyFlag(TYPE_FLAG_PRIMITIVE_GCTHING);
if (!result) {
freeze(constraints);
}
......
......@@ -87,10 +87,16 @@ enum : uint32_t {
TYPE_FLAG_LAZYARGS = 0x100,
TYPE_FLAG_ANYOBJECT = 0x200,
/* Mask containing all "immediate" primitives (not heap-allocated) */
TYPE_FLAG_PRIMITIVE_IMMEDIATE = TYPE_FLAG_UNDEFINED | TYPE_FLAG_NULL |
TYPE_FLAG_BOOLEAN | TYPE_FLAG_INT32 | TYPE_FLAG_DOUBLE,
/* Mask containing all GCThing primitives (heap-allocated) */
TYPE_FLAG_PRIMITIVE_GCTHING =
TYPE_FLAG_STRING | TYPE_FLAG_SYMBOL | TYPE_FLAG_BIGINT,
/* Mask containing all primitives */
TYPE_FLAG_PRIMITIVE = TYPE_FLAG_UNDEFINED | TYPE_FLAG_NULL |
TYPE_FLAG_BOOLEAN | TYPE_FLAG_INT32 | TYPE_FLAG_DOUBLE |
TYPE_FLAG_STRING | TYPE_FLAG_SYMBOL | TYPE_FLAG_BIGINT,
TYPE_FLAG_PRIMITIVE =
TYPE_FLAG_PRIMITIVE_IMMEDIATE | TYPE_FLAG_PRIMITIVE_GCTHING,
/* Mask/shift for the number of objects in objectSet */
TYPE_FLAG_OBJECT_COUNT_MASK = 0x3c00,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment