OLD | NEW |
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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1911 Handle<Object> value = instr->value(); | 1911 Handle<Object> value = instr->value(); |
1912 if (value->IsSmi()) { | 1912 if (value->IsSmi()) { |
1913 __ mov(ToRegister(instr->result()), Operand(value)); | 1913 __ mov(ToRegister(instr->result()), Operand(value)); |
1914 } else { | 1914 } else { |
1915 __ LoadHeapObject(ToRegister(instr->result()), | 1915 __ LoadHeapObject(ToRegister(instr->result()), |
1916 Handle<HeapObject>::cast(value)); | 1916 Handle<HeapObject>::cast(value)); |
1917 } | 1917 } |
1918 } | 1918 } |
1919 | 1919 |
1920 | 1920 |
1921 void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { | |
1922 Register result = ToRegister(instr->result()); | |
1923 Register array = ToRegister(instr->value()); | |
1924 __ ldr(result, FieldMemOperand(array, JSArray::kLengthOffset)); | |
1925 } | |
1926 | |
1927 | |
1928 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { | 1921 void LCodeGen::DoFixedArrayBaseLength(LFixedArrayBaseLength* instr) { |
1929 Register result = ToRegister(instr->result()); | 1922 Register result = ToRegister(instr->result()); |
1930 Register array = ToRegister(instr->value()); | 1923 Register array = ToRegister(instr->value()); |
1931 __ ldr(result, FieldMemOperand(array, FixedArrayBase::kLengthOffset)); | 1924 __ ldr(result, FieldMemOperand(array, FixedArrayBase::kLengthOffset)); |
1932 } | 1925 } |
1933 | 1926 |
1934 | 1927 |
1935 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { | 1928 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { |
1936 Register result = ToRegister(instr->result()); | 1929 Register result = ToRegister(instr->result()); |
1937 Register map = ToRegister(instr->value()); | 1930 Register map = ToRegister(instr->value()); |
(...skipping 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6397 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6390 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
6398 __ ldr(result, FieldMemOperand(scratch, | 6391 __ ldr(result, FieldMemOperand(scratch, |
6399 FixedArray::kHeaderSize - kPointerSize)); | 6392 FixedArray::kHeaderSize - kPointerSize)); |
6400 __ bind(&done); | 6393 __ bind(&done); |
6401 } | 6394 } |
6402 | 6395 |
6403 | 6396 |
6404 #undef __ | 6397 #undef __ |
6405 | 6398 |
6406 } } // namespace v8::internal | 6399 } } // namespace v8::internal |
OLD | NEW |