Revision: 20116
Author: [email protected]
Date: Thu Mar 20 11:35:05 2014 UTC
Log: A64: Minor cleaning in StoreStubCompiler::GenerateStoreField.
Abstract a register to simplify code generation.
[email protected]
Review URL: https://codereview.chromium.org/206183005
http://code.google.com/p/v8/source/detail?r=20116
Modified:
/branches/bleeding_edge/src/a64/stub-cache-a64.cc
=======================================
--- /branches/bleeding_edge/src/a64/stub-cache-a64.cc Thu Mar 20 10:37:19
2014 UTC
+++ /branches/bleeding_edge/src/a64/stub-cache-a64.cc Thu Mar 20 11:35:05
2014 UTC
@@ -461,16 +461,11 @@
// TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
+ Register prop_reg = representation.IsDouble() ? storage_reg : value_reg;
if (index < 0) {
// Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize);
- // TODO(jbramley): This construct appears in several places in this
- // function. Try to clean it up, perhaps using a result_reg.
- if (representation.IsDouble()) {
- __ Str(storage_reg, FieldMemOperand(receiver_reg, offset));
- } else {
- __ Str(value_reg, FieldMemOperand(receiver_reg, offset));
- }
+ __ Str(prop_reg, FieldMemOperand(receiver_reg, offset));
if (!representation.IsSmi()) {
// Update the write barrier for the array address.
@@ -492,11 +487,7 @@
// Get the properties array
__ Ldr(scratch1,
FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
- if (representation.IsDouble()) {
- __ Str(storage_reg, FieldMemOperand(scratch1, offset));
- } else {
- __ Str(value_reg, FieldMemOperand(scratch1, offset));
- }
+ __ Str(prop_reg, FieldMemOperand(scratch1, offset));
if (!representation.IsSmi()) {
// Update the write barrier for the array address.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.