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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 292993003: Revert "Refactor transitioning stores." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "arm64/lithium-codegen-arm64.h" 7 #include "arm64/lithium-codegen-arm64.h"
8 #include "arm64/lithium-gap-resolver-arm64.h" 8 #include "arm64/lithium-gap-resolver-arm64.h"
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "stub-cache.h" 10 #include "stub-cache.h"
(...skipping 5284 matching lines...) Expand 10 before | Expand all | Expand 10 after
5295 5295
5296 5296
5297 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 5297 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
5298 Representation representation = instr->representation(); 5298 Representation representation = instr->representation();
5299 5299
5300 Register object = ToRegister(instr->object()); 5300 Register object = ToRegister(instr->object());
5301 HObjectAccess access = instr->hydrogen()->access(); 5301 HObjectAccess access = instr->hydrogen()->access();
5302 int offset = access.offset(); 5302 int offset = access.offset();
5303 5303
5304 if (access.IsExternalMemory()) { 5304 if (access.IsExternalMemory()) {
5305 ASSERT(!instr->hydrogen()->has_transition());
5305 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 5306 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
5306 Register value = ToRegister(instr->value()); 5307 Register value = ToRegister(instr->value());
5307 __ Store(value, MemOperand(object, offset), representation); 5308 __ Store(value, MemOperand(object, offset), representation);
5308 return; 5309 return;
5309 } else if (representation.IsDouble()) { 5310 } else if (representation.IsDouble()) {
5310 ASSERT(access.IsInobject()); 5311 ASSERT(access.IsInobject());
5312 ASSERT(!instr->hydrogen()->has_transition());
5311 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); 5313 ASSERT(!instr->hydrogen()->NeedsWriteBarrier());
5312 FPRegister value = ToDoubleRegister(instr->value()); 5314 FPRegister value = ToDoubleRegister(instr->value());
5313 __ Str(value, FieldMemOperand(object, offset)); 5315 __ Str(value, FieldMemOperand(object, offset));
5314 return; 5316 return;
5315 } 5317 }
5316 5318
5317 Register value = ToRegister(instr->value()); 5319 Register value = ToRegister(instr->value());
5318 5320
5319 SmiCheck check_needed = instr->hydrogen()->value()->IsHeapObject() 5321 SmiCheck check_needed = instr->hydrogen()->value()->IsHeapObject()
5320 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 5322 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
5321 5323
5322 ASSERT(!(representation.IsSmi() && 5324 ASSERT(!(representation.IsSmi() &&
5323 instr->value()->IsConstantOperand() && 5325 instr->value()->IsConstantOperand() &&
5324 !IsInteger32Constant(LConstantOperand::cast(instr->value())))); 5326 !IsInteger32Constant(LConstantOperand::cast(instr->value()))));
5325 if (representation.IsHeapObject() && 5327 if (representation.IsHeapObject() &&
5326 !instr->hydrogen()->value()->type().IsHeapObject()) { 5328 !instr->hydrogen()->value()->type().IsHeapObject()) {
5327 DeoptimizeIfSmi(value, instr->environment()); 5329 DeoptimizeIfSmi(value, instr->environment());
5328 5330
5329 // We know now that value is not a smi, so we can omit the check below. 5331 // We know now that value is not a smi, so we can omit the check below.
5330 check_needed = OMIT_SMI_CHECK; 5332 check_needed = OMIT_SMI_CHECK;
5331 } 5333 }
5332 5334
5335 if (instr->hydrogen()->has_transition()) {
5336 Handle<Map> transition = instr->hydrogen()->transition_map();
5337 AddDeprecationDependency(transition);
5338 // Store the new map value.
5339 Register new_map_value = ToRegister(instr->temp0());
5340 __ Mov(new_map_value, Operand(transition));
5341 __ Str(new_map_value, FieldMemOperand(object, HeapObject::kMapOffset));
5342 if (instr->hydrogen()->NeedsWriteBarrierForMap()) {
5343 // Update the write barrier for the map field.
5344 __ RecordWriteField(object,
5345 HeapObject::kMapOffset,
5346 new_map_value,
5347 ToRegister(instr->temp1()),
5348 GetLinkRegisterState(),
5349 kSaveFPRegs,
5350 OMIT_REMEMBERED_SET,
5351 OMIT_SMI_CHECK);
5352 }
5353 }
5354
5333 // Do the store. 5355 // Do the store.
5334 Register destination; 5356 Register destination;
5335 if (access.IsInobject()) { 5357 if (access.IsInobject()) {
5336 destination = object; 5358 destination = object;
5337 } else { 5359 } else {
5338 Register temp0 = ToRegister(instr->temp0()); 5360 Register temp0 = ToRegister(instr->temp0());
5339 __ Ldr(temp0, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5361 __ Ldr(temp0, FieldMemOperand(object, JSObject::kPropertiesOffset));
5340 destination = temp0; 5362 destination = temp0;
5341 } 5363 }
5342 5364
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
5983 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 6005 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5984 // Index is equal to negated out of object property index plus 1. 6006 // Index is equal to negated out of object property index plus 1.
5985 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 6007 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5986 __ Ldr(result, FieldMemOperand(result, 6008 __ Ldr(result, FieldMemOperand(result,
5987 FixedArray::kHeaderSize - kPointerSize)); 6009 FixedArray::kHeaderSize - kPointerSize));
5988 __ Bind(deferred->exit()); 6010 __ Bind(deferred->exit());
5989 __ Bind(&done); 6011 __ Bind(&done);
5990 } 6012 }
5991 6013
5992 } } // namespace v8::internal 6014 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698