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

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

Issue 279743002: Improve Array.shift() performance for small arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Cosmetic fix Created 6 years, 7 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/arm64/lithium-arm64.cc ('k') | src/code-stubs.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "arm64/lithium-codegen-arm64.h" 7 #include "arm64/lithium-codegen-arm64.h"
8 #include "arm64/lithium-gap-resolver-arm64.h" 8 #include "arm64/lithium-gap-resolver-arm64.h"
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "stub-cache.h" 10 #include "stub-cache.h"
(...skipping 5726 matching lines...) Expand 10 before | Expand all | Expand 10 after
5737 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; 5737 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
5738 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); 5738 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
5739 __ CallStub(&stub); 5739 __ CallStub(&stub);
5740 RecordSafepointWithRegistersAndDoubles( 5740 RecordSafepointWithRegistersAndDoubles(
5741 instr->pointer_map(), 0, Safepoint::kLazyDeopt); 5741 instr->pointer_map(), 0, Safepoint::kLazyDeopt);
5742 } 5742 }
5743 __ Bind(&not_applicable); 5743 __ Bind(&not_applicable);
5744 } 5744 }
5745 5745
5746 5746
5747 void LCodeGen::DoArrayShift(LArrayShift* instr) {
5748 ASSERT(ToRegister(instr->context()).is(cp));
5749 ASSERT(ToRegister(instr->object()).is(x0));
5750 ASSERT(ToRegister(instr->result()).is(x0));
5751 ArrayShiftStub stub(isolate(), instr->hydrogen()->kind());
5752 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
5753 }
5754
5755
5747 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 5756 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
5748 Register object = ToRegister(instr->object()); 5757 Register object = ToRegister(instr->object());
5749 Register temp1 = ToRegister(instr->temp1()); 5758 Register temp1 = ToRegister(instr->temp1());
5750 Register temp2 = ToRegister(instr->temp2()); 5759 Register temp2 = ToRegister(instr->temp2());
5751 5760
5752 Label no_memento_found; 5761 Label no_memento_found;
5753 __ TestJSArrayForAllocationMemento(object, temp1, temp2, &no_memento_found); 5762 __ TestJSArrayForAllocationMemento(object, temp1, temp2, &no_memento_found);
5754 DeoptimizeIf(eq, instr->environment()); 5763 DeoptimizeIf(eq, instr->environment());
5755 __ Bind(&no_memento_found); 5764 __ Bind(&no_memento_found);
5756 } 5765 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
5993 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 6002 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5994 // Index is equal to negated out of object property index plus 1. 6003 // Index is equal to negated out of object property index plus 1.
5995 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 6004 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5996 __ Ldr(result, FieldMemOperand(result, 6005 __ Ldr(result, FieldMemOperand(result,
5997 FixedArray::kHeaderSize - kPointerSize)); 6006 FixedArray::kHeaderSize - kPointerSize));
5998 __ Bind(deferred->exit()); 6007 __ Bind(deferred->exit());
5999 __ Bind(&done); 6008 __ Bind(&done);
6000 } 6009 }
6001 6010
6002 } } // namespace v8::internal 6011 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698