| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 97d763714b3646ca417d198fffafb771941f8bc0..13abf05bcc85f15ad5dd2572330495f97497d346 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -3098,7 +3098,12 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
|
|
| if (access.IsExternalMemory()) {
|
| Register result = ToRegister(instr->result());
|
| - __ ldr(result, MemOperand(object, offset));
|
| + MemOperand operand = MemOperand(object, offset);
|
| + if (access.representation().IsByte()) {
|
| + __ ldrb(result, operand);
|
| + } else {
|
| + __ ldr(result, operand);
|
| + }
|
| return;
|
| }
|
|
|
| @@ -3109,11 +3114,15 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
| }
|
|
|
| Register result = ToRegister(instr->result());
|
| - if (access.IsInobject()) {
|
| - __ ldr(result, FieldMemOperand(object, offset));
|
| - } else {
|
| + if (!access.IsInobject()) {
|
| __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
|
| - __ ldr(result, FieldMemOperand(result, offset));
|
| + object = result;
|
| + }
|
| + MemOperand operand = FieldMemOperand(object, offset);
|
| + if (access.representation().IsByte()) {
|
| + __ ldrb(result, operand);
|
| + } else {
|
| + __ ldr(result, operand);
|
| }
|
| }
|
|
|
| @@ -4219,7 +4228,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
|
|
| if (access.IsExternalMemory()) {
|
| Register value = ToRegister(instr->value());
|
| - __ str(value, MemOperand(object, offset));
|
| + MemOperand operand = MemOperand(object, offset);
|
| + if (representation.IsByte()) {
|
| + __ strb(value, operand);
|
| + } else {
|
| + __ str(value, operand);
|
| + }
|
| return;
|
| }
|
|
|
| @@ -4264,7 +4278,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
| instr->hydrogen()->value()->IsHeapObject()
|
| ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
|
| if (access.IsInobject()) {
|
| - __ str(value, FieldMemOperand(object, offset));
|
| + MemOperand operand = FieldMemOperand(object, offset);
|
| + if (representation.IsByte()) {
|
| + __ strb(value, operand);
|
| + } else {
|
| + __ str(value, operand);
|
| + }
|
| if (instr->hydrogen()->NeedsWriteBarrier()) {
|
| // Update the write barrier for the object for in-object properties.
|
| __ RecordWriteField(object,
|
| @@ -4278,7 +4297,12 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
| }
|
| } else {
|
| __ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset));
|
| - __ str(value, FieldMemOperand(scratch, offset));
|
| + MemOperand operand = FieldMemOperand(scratch, offset);
|
| + if (representation.IsByte()) {
|
| + __ strb(value, operand);
|
| + } else {
|
| + __ str(value, operand);
|
| + }
|
| if (instr->hydrogen()->NeedsWriteBarrier()) {
|
| // Update the write barrier for the properties array.
|
| // object is used as a scratch register.
|
|
|