Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: src/a64/stub-cache-a64.cc

Issue 206183005: A64: Minor cleaning in StoreStubCompiler::GenerateStoreField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix test after rebasing. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/stub-cache-a64.cc
diff --git a/src/a64/stub-cache-a64.cc b/src/a64/stub-cache-a64.cc
index 291da65d44f4113e2c9ff9f226a766571238237a..fee2c3297068a2db14daf10da9ef859d3dcb58eb 100644
--- a/src/a64/stub-cache-a64.cc
+++ b/src/a64/stub-cache-a64.cc
@@ -461,16 +461,11 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// 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;
ulan 2014/03/20 10:49:27 Nit: no need to put representation.IsDouble() in (
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 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698