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

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

Issue 308793010: Inline Array.shift() fast path instead of using a code stub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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 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 5736 matching lines...) Expand 10 before | Expand all | Expand 10 after
5747 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; 5747 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
5748 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); 5748 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
5749 __ CallStub(&stub); 5749 __ CallStub(&stub);
5750 RecordSafepointWithRegistersAndDoubles( 5750 RecordSafepointWithRegistersAndDoubles(
5751 instr->pointer_map(), 0, Safepoint::kLazyDeopt); 5751 instr->pointer_map(), 0, Safepoint::kLazyDeopt);
5752 } 5752 }
5753 __ Bind(&not_applicable); 5753 __ Bind(&not_applicable);
5754 } 5754 }
5755 5755
5756 5756
5757 void LCodeGen::DoArrayShift(LArrayShift* instr) {
5758 ASSERT(ToRegister(instr->context()).is(cp));
5759 ASSERT(ToRegister(instr->object()).is(x0));
5760 ASSERT(ToRegister(instr->result()).is(x0));
5761 ArrayShiftStub stub(isolate(), instr->hydrogen()->kind());
5762 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
5763 }
5764
5765
5766 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 5757 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
5767 Register object = ToRegister(instr->object()); 5758 Register object = ToRegister(instr->object());
5768 Register temp1 = ToRegister(instr->temp1()); 5759 Register temp1 = ToRegister(instr->temp1());
5769 Register temp2 = ToRegister(instr->temp2()); 5760 Register temp2 = ToRegister(instr->temp2());
5770 5761
5771 Label no_memento_found; 5762 Label no_memento_found;
5772 __ TestJSArrayForAllocationMemento(object, temp1, temp2, &no_memento_found); 5763 __ TestJSArrayForAllocationMemento(object, temp1, temp2, &no_memento_found);
5773 DeoptimizeIf(eq, instr->environment()); 5764 DeoptimizeIf(eq, instr->environment());
5774 __ Bind(&no_memento_found); 5765 __ Bind(&no_memento_found);
5775 } 5766 }
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
6012 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 6003 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
6013 // Index is equal to negated out of object property index plus 1. 6004 // Index is equal to negated out of object property index plus 1.
6014 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 6005 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
6015 __ Ldr(result, FieldMemOperand(result, 6006 __ Ldr(result, FieldMemOperand(result,
6016 FixedArray::kHeaderSize - kPointerSize)); 6007 FixedArray::kHeaderSize - kPointerSize));
6017 __ Bind(deferred->exit()); 6008 __ Bind(deferred->exit());
6018 __ Bind(&done); 6009 __ Bind(&done);
6019 } 6010 }
6020 6011
6021 } } // namespace v8::internal 6012 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-arm64.cc ('k') | src/code-stubs.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698