- case Array::Arguments: {
- JSValueOperand value(this, child3);
- GPRTemporary scratch(this);
- GPRTemporary scratch2(this);
-
- GPRReg valueReg = value.gpr();
- GPRReg scratchReg = scratch.gpr();
- GPRReg scratch2Reg = scratch2.gpr();
-
- if (!m_compileOkay)
- return;
-
- // Two really lame checks.
- speculationCheck(
- Uncountable, JSValueSource(), 0,
- m_jit.branch32(
- MacroAssembler::AboveOrEqual, propertyReg,
- MacroAssembler::Address(baseReg, OBJECT_OFFSETOF(Arguments, m_numArguments))));
- speculationCheck(
- Uncountable, JSValueSource(), 0,
- m_jit.branchTestPtr(
- MacroAssembler::NonZero,
- MacroAssembler::Address(
- baseReg, OBJECT_OFFSETOF(Arguments, m_slowArguments))));
-
- m_jit.move(propertyReg, scratch2Reg);
- m_jit.neg32(scratch2Reg);
- m_jit.signExtend32ToPtr(scratch2Reg, scratch2Reg);
- m_jit.loadPtr(
- MacroAssembler::Address(baseReg, OBJECT_OFFSETOF(Arguments, m_registers)),
- scratchReg);
-
- m_jit.store64(
- valueReg,
- MacroAssembler::BaseIndex(
- scratchReg, scratch2Reg, MacroAssembler::TimesEight,
- CallFrame::thisArgumentOffset() * sizeof(Register) - sizeof(Register)));
-
- noResult(node);
- break;
- }
-
- case Array::Int8Array:
- compilePutByValForIntTypedArray(m_jit.vm()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), SignedTypedArray);
- break;
-
- case Array::Int16Array:
- compilePutByValForIntTypedArray(m_jit.vm()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), SignedTypedArray);
- break;
-
- case Array::Int32Array:
- compilePutByValForIntTypedArray(m_jit.vm()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), SignedTypedArray);
- break;
-
- case Array::Uint8Array:
- compilePutByValForIntTypedArray(m_jit.vm()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), UnsignedTypedArray);
- break;
-
- case Array::Uint8ClampedArray:
- compilePutByValForIntTypedArray(m_jit.vm()->uint8ClampedArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), UnsignedTypedArray, ClampRounding);
- break;
-
- case Array::Uint16Array:
- compilePutByValForIntTypedArray(m_jit.vm()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), UnsignedTypedArray);
- break;
-
- case Array::Uint32Array:
- compilePutByValForIntTypedArray(m_jit.vm()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), UnsignedTypedArray);
- break;
-
- case Array::Float32Array:
- compilePutByValForFloatTypedArray(m_jit.vm()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float));
- break;
-
- case Array::Float64Array:
- compilePutByValForFloatTypedArray(m_jit.vm()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double));
- break;
-
- default:
- RELEASE_ASSERT_NOT_REACHED();
- break;
- }