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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.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. 1 // Copyright 2012 the V8 project authors. All rights reserved.
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 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1857 } 1857 }
1858 1858
1859 1859
1860 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { 1860 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) {
1861 Register result = ToRegister(instr->result()); 1861 Register result = ToRegister(instr->result());
1862 Register map = ToRegister(instr->value()); 1862 Register map = ToRegister(instr->value());
1863 __ EnumLength(result, map); 1863 __ EnumLength(result, map);
1864 } 1864 }
1865 1865
1866 1866
1867 void LCodeGen::DoElementsKind(LElementsKind* instr) {
1868 Register result = ToRegister(instr->result());
1869 Register input = ToRegister(instr->value());
1870
1871 // Load map into |result|.
1872 __ ldr(result, FieldMemOperand(input, HeapObject::kMapOffset));
1873 // Load the map's "bit field 2" into |result|. We only need the first byte,
1874 // but the following bit field extraction takes care of that anyway.
1875 __ ldr(result, FieldMemOperand(result, Map::kBitField2Offset));
1876 // Retrieve elements_kind from bit field 2.
1877 __ ubfx(result, result, Map::kElementsKindShift, Map::kElementsKindBitCount);
1878 }
1879
1880
1881 void LCodeGen::DoValueOf(LValueOf* instr) { 1867 void LCodeGen::DoValueOf(LValueOf* instr) {
1882 Register input = ToRegister(instr->value()); 1868 Register input = ToRegister(instr->value());
1883 Register result = ToRegister(instr->result()); 1869 Register result = ToRegister(instr->result());
1884 Register map = ToRegister(instr->temp()); 1870 Register map = ToRegister(instr->temp());
1885 Label done; 1871 Label done;
1886 1872
1887 if (!instr->hydrogen()->value()->IsHeapObject()) { 1873 if (!instr->hydrogen()->value()->IsHeapObject()) {
1888 // If the object is a smi return the object. 1874 // If the object is a smi return the object.
1889 __ SmiTst(input); 1875 __ SmiTst(input);
1890 __ Move(result, input, eq); 1876 __ Move(result, input, eq);
(...skipping 3899 matching lines...) Expand 10 before | Expand all | Expand 10 after
5790 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5776 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5791 __ ldr(result, FieldMemOperand(scratch, 5777 __ ldr(result, FieldMemOperand(scratch,
5792 FixedArray::kHeaderSize - kPointerSize)); 5778 FixedArray::kHeaderSize - kPointerSize));
5793 __ bind(&done); 5779 __ bind(&done);
5794 } 5780 }
5795 5781
5796 5782
5797 #undef __ 5783 #undef __
5798 5784
5799 } } // namespace v8::internal 5785 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698