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

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

Issue 136093004: Remove the unused HElementsKind instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 } 1644 }
1645 1645
1646 1646
1647 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { 1647 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) {
1648 Register result = ToRegister(instr->result()); 1648 Register result = ToRegister(instr->result());
1649 Register map = ToRegister(instr->value()); 1649 Register map = ToRegister(instr->value());
1650 __ EnumLength(result, map); 1650 __ EnumLength(result, map);
1651 } 1651 }
1652 1652
1653 1653
1654 void LCodeGen::DoElementsKind(LElementsKind* instr) {
1655 Register result = ToRegister(instr->result());
1656 Register input = ToRegister(instr->value());
1657
1658 // Load map into |result|.
1659 __ lw(result, FieldMemOperand(input, HeapObject::kMapOffset));
1660 // Load the map's "bit field 2" into |result|. We only need the first byte,
1661 // but the following bit field extraction takes care of that anyway.
1662 __ lbu(result, FieldMemOperand(result, Map::kBitField2Offset));
1663 // Retrieve elements_kind from bit field 2.
1664 __ Ext(result, result, Map::kElementsKindShift, Map::kElementsKindBitCount);
1665 }
1666
1667
1668 void LCodeGen::DoValueOf(LValueOf* instr) { 1654 void LCodeGen::DoValueOf(LValueOf* instr) {
1669 Register input = ToRegister(instr->value()); 1655 Register input = ToRegister(instr->value());
1670 Register result = ToRegister(instr->result()); 1656 Register result = ToRegister(instr->result());
1671 Register map = ToRegister(instr->temp()); 1657 Register map = ToRegister(instr->temp());
1672 Label done; 1658 Label done;
1673 1659
1674 if (!instr->hydrogen()->value()->IsHeapObject()) { 1660 if (!instr->hydrogen()->value()->IsHeapObject()) {
1675 // If the object is a smi return the object. 1661 // If the object is a smi return the object.
1676 __ Move(result, input); 1662 __ Move(result, input);
1677 __ JumpIfSmi(input, &done); 1663 __ JumpIfSmi(input, &done);
(...skipping 4102 matching lines...) Expand 10 before | Expand all | Expand 10 after
5780 __ Subu(scratch, result, scratch); 5766 __ Subu(scratch, result, scratch);
5781 __ lw(result, FieldMemOperand(scratch, 5767 __ lw(result, FieldMemOperand(scratch,
5782 FixedArray::kHeaderSize - kPointerSize)); 5768 FixedArray::kHeaderSize - kPointerSize));
5783 __ bind(&done); 5769 __ bind(&done);
5784 } 5770 }
5785 5771
5786 5772
5787 #undef __ 5773 #undef __
5788 5774
5789 } } // namespace v8::internal 5775 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698