зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1283334 - Part 2: Do not sparsify dense arrays when freezing - Baseline. r=nbp
--HG-- extra : rebase_source : 135d19fdb9df833819e841c892ce786c6d00a940 extra : histedit_source : 24a4c23bf696c117f7e25520a4c1b770a798748f
This commit is contained in:
Родитель
f90cd661a0
Коммит
07fa31ec7c
|
@ -2822,17 +2822,21 @@ ICSetElem_DenseOrUnboxedArray::Compiler::generateStubCode(MacroAssembler& masm)
|
|||
masm.branchTestMagic(Assembler::Equal, element, &failure);
|
||||
|
||||
// Perform a single test to see if we either need to convert double
|
||||
// elements or clone the copy on write elements in the object.
|
||||
// elements, clone the copy on write elements in the object or fail
|
||||
// due to a frozen element.
|
||||
Label noSpecialHandling;
|
||||
Address elementsFlags(scratchReg, ObjectElements::offsetOfFlags());
|
||||
masm.branchTest32(Assembler::Zero, elementsFlags,
|
||||
Imm32(ObjectElements::CONVERT_DOUBLE_ELEMENTS |
|
||||
ObjectElements::COPY_ON_WRITE),
|
||||
ObjectElements::COPY_ON_WRITE |
|
||||
ObjectElements::FROZEN),
|
||||
&noSpecialHandling);
|
||||
|
||||
// Fail if we need to clone copy on write elements.
|
||||
// Fail if we need to clone copy on write elements or to throw due
|
||||
// to a frozen element.
|
||||
masm.branchTest32(Assembler::NonZero, elementsFlags,
|
||||
Imm32(ObjectElements::COPY_ON_WRITE),
|
||||
Imm32(ObjectElements::COPY_ON_WRITE |
|
||||
ObjectElements::FROZEN),
|
||||
&failure);
|
||||
|
||||
// Failure is not possible now. Free up registers.
|
||||
|
@ -3032,7 +3036,8 @@ ICSetElemDenseOrUnboxedArrayAddCompiler::generateStubCode(MacroAssembler& masm)
|
|||
// Check for copy on write elements.
|
||||
Address elementsFlags(scratchReg, ObjectElements::offsetOfFlags());
|
||||
masm.branchTest32(Assembler::NonZero, elementsFlags,
|
||||
Imm32(ObjectElements::COPY_ON_WRITE),
|
||||
Imm32(ObjectElements::COPY_ON_WRITE |
|
||||
ObjectElements::FROZEN),
|
||||
&failure);
|
||||
|
||||
// Failure is not possible now. Free up registers.
|
||||
|
|
Загрузка…
Ссылка в новой задаче