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

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

Issue 12491023: Remove (H|L)JSArrayLength instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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
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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after
6393 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 6386 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
6394 __ ldr(result, FieldMemOperand(scratch, 6387 __ ldr(result, FieldMemOperand(scratch,
6395 FixedArray::kHeaderSize - kPointerSize)); 6388 FixedArray::kHeaderSize - kPointerSize));
6396 __ bind(&done); 6389 __ bind(&done);
6397 } 6390 }
6398 6391
6399 6392
6400 #undef __ 6393 #undef __
6401 6394
6402 } } // namespace v8::internal 6395 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/code-stubs-hydrogen.cc » ('j') | src/hydrogen-instructions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698