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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 2622783002: [crankshaft] Remove dead Variable hole-checking code (Closed)
Patch Set: Update golden files Created 3 years, 11 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
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-mips64.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 "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/builtins/builtins-constructor.h" 7 #include "src/builtins/builtins-constructor.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2589 matching lines...) Expand 10 before | Expand all | Expand 10 after
2600 2600
2601 __ Jump(ra); 2601 __ Jump(ra);
2602 } 2602 }
2603 2603
2604 2604
2605 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2605 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2606 Register context = ToRegister(instr->context()); 2606 Register context = ToRegister(instr->context());
2607 Register result = ToRegister(instr->result()); 2607 Register result = ToRegister(instr->result());
2608 2608
2609 __ ld(result, ContextMemOperand(context, instr->slot_index())); 2609 __ ld(result, ContextMemOperand(context, instr->slot_index()));
2610 if (instr->hydrogen()->RequiresHoleCheck()) {
2611 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2612
2613 if (instr->hydrogen()->DeoptimizesOnHole()) {
2614 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, result, Operand(at));
2615 } else {
2616 Label is_not_hole;
2617 __ Branch(&is_not_hole, ne, result, Operand(at));
2618 __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
2619 __ bind(&is_not_hole);
2620 }
2621 }
2622 } 2610 }
2623 2611
2624 2612
2625 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 2613 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
2626 Register context = ToRegister(instr->context()); 2614 Register context = ToRegister(instr->context());
2627 Register value = ToRegister(instr->value()); 2615 Register value = ToRegister(instr->value());
2628 Register scratch = scratch0(); 2616 Register scratch = scratch0();
2629 MemOperand target = ContextMemOperand(context, instr->slot_index()); 2617 MemOperand target = ContextMemOperand(context, instr->slot_index());
2630 2618
2631 Label skip_assignment;
2632
2633 if (instr->hydrogen()->RequiresHoleCheck()) {
2634 __ ld(scratch, target);
2635 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
2636
2637 if (instr->hydrogen()->DeoptimizesOnHole()) {
2638 DeoptimizeIf(eq, instr, DeoptimizeReason::kHole, scratch, Operand(at));
2639 } else {
2640 __ Branch(&skip_assignment, ne, scratch, Operand(at));
2641 }
2642 }
2643
2644 __ sd(value, target); 2619 __ sd(value, target);
2645 if (instr->hydrogen()->NeedsWriteBarrier()) { 2620 if (instr->hydrogen()->NeedsWriteBarrier()) {
2646 SmiCheck check_needed = 2621 SmiCheck check_needed =
2647 instr->hydrogen()->value()->type().IsHeapObject() 2622 instr->hydrogen()->value()->type().IsHeapObject()
2648 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 2623 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
2649 __ RecordWriteContextSlot(context, 2624 __ RecordWriteContextSlot(context,
2650 target.offset(), 2625 target.offset(),
2651 value, 2626 value,
2652 scratch0(), 2627 scratch0(),
2653 GetRAState(), 2628 GetRAState(),
2654 kSaveFPRegs, 2629 kSaveFPRegs,
2655 EMIT_REMEMBERED_SET, 2630 EMIT_REMEMBERED_SET,
2656 check_needed); 2631 check_needed);
2657 } 2632 }
2658
2659 __ bind(&skip_assignment);
2660 } 2633 }
2661 2634
2662 2635
2663 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2636 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2664 HObjectAccess access = instr->hydrogen()->access(); 2637 HObjectAccess access = instr->hydrogen()->access();
2665 int offset = access.offset(); 2638 int offset = access.offset();
2666 Register object = ToRegister(instr->object()); 2639 Register object = ToRegister(instr->object());
2667 if (access.IsExternalMemory()) { 2640 if (access.IsExternalMemory()) {
2668 Register result = ToRegister(instr->result()); 2641 Register result = ToRegister(instr->result());
2669 MemOperand operand = MemOperand(object, offset); 2642 MemOperand operand = MemOperand(object, offset);
(...skipping 2954 matching lines...) Expand 10 before | Expand all | Expand 10 after
5624 __ ld(result, FieldMemOperand(scratch, 5597 __ ld(result, FieldMemOperand(scratch,
5625 FixedArray::kHeaderSize - kPointerSize)); 5598 FixedArray::kHeaderSize - kPointerSize));
5626 __ bind(deferred->exit()); 5599 __ bind(deferred->exit());
5627 __ bind(&done); 5600 __ bind(&done);
5628 } 5601 }
5629 5602
5630 #undef __ 5603 #undef __
5631 5604
5632 } // namespace internal 5605 } // namespace internal
5633 } // namespace v8 5606 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698