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

Side by Side Diff: src/x87/lithium-x87.cc

Issue 306483013: X87: Avoid HeapObject check in HStoreNamedField. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/x87/lithium-codegen-x87.cc ('k') | src/x87/macro-assembler-x87.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
9 #include "lithium-allocator-inl.h" 9 #include "lithium-allocator-inl.h"
10 #include "x87/lithium-x87.h" 10 #include "x87/lithium-x87.h"
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2372 } 2372 }
2373 2373
2374 // We only need a scratch register if we have a write barrier or we 2374 // We only need a scratch register if we have a write barrier or we
2375 // have a store into the properties array (not in-object-property). 2375 // have a store into the properties array (not in-object-property).
2376 LOperand* temp = (!is_in_object || needs_write_barrier || 2376 LOperand* temp = (!is_in_object || needs_write_barrier ||
2377 needs_write_barrier_for_map) ? TempRegister() : NULL; 2377 needs_write_barrier_for_map) ? TempRegister() : NULL;
2378 2378
2379 // We need a temporary register for write barrier of the map field. 2379 // We need a temporary register for write barrier of the map field.
2380 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL; 2380 LOperand* temp_map = needs_write_barrier_for_map ? TempRegister() : NULL;
2381 2381
2382 LInstruction* result = 2382 return new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2383 new(zone()) LStoreNamedField(obj, val, temp, temp_map);
2384 if (!instr->access().IsExternalMemory() &&
2385 instr->field_representation().IsHeapObject() &&
2386 (val->IsConstantOperand()
2387 ? HConstant::cast(instr->value())->HasSmiValue()
2388 : !instr->value()->type().IsHeapObject())) {
2389 result = AssignEnvironment(result);
2390 }
2391 return result;
2392 } 2383 }
2393 2384
2394 2385
2395 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { 2386 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
2396 LOperand* context = UseFixed(instr->context(), esi); 2387 LOperand* context = UseFixed(instr->context(), esi);
2397 LOperand* object = UseFixed(instr->object(), edx); 2388 LOperand* object = UseFixed(instr->object(), edx);
2398 LOperand* value = UseFixed(instr->value(), eax); 2389 LOperand* value = UseFixed(instr->value(), eax);
2399 2390
2400 LStoreNamedGeneric* result = 2391 LStoreNamedGeneric* result =
2401 new(zone()) LStoreNamedGeneric(context, object, value); 2392 new(zone()) LStoreNamedGeneric(context, object, value);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
2657 LOperand* index = UseTempRegister(instr->index()); 2648 LOperand* index = UseTempRegister(instr->index());
2658 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2649 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2659 LInstruction* result = DefineSameAsFirst(load); 2650 LInstruction* result = DefineSameAsFirst(load);
2660 return AssignPointerMap(result); 2651 return AssignPointerMap(result);
2661 } 2652 }
2662 2653
2663 2654
2664 } } // namespace v8::internal 2655 } } // namespace v8::internal
2665 2656
2666 #endif // V8_TARGET_ARCH_X87 2657 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | src/x87/macro-assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698