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

Side by Side Diff: src/x64/lithium-codegen-x64.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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "x64/lithium-codegen-x64.h" 9 #include "x64/lithium-codegen-x64.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 4359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4370 __ Move(rbx, to_map); 4370 __ Move(rbx, to_map);
4371 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; 4371 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
4372 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); 4372 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
4373 __ CallStub(&stub); 4373 __ CallStub(&stub);
4374 RecordSafepointWithLazyDeopt(instr, RECORD_SAFEPOINT_WITH_REGISTERS, 0); 4374 RecordSafepointWithLazyDeopt(instr, RECORD_SAFEPOINT_WITH_REGISTERS, 0);
4375 } 4375 }
4376 __ bind(&not_applicable); 4376 __ bind(&not_applicable);
4377 } 4377 }
4378 4378
4379 4379
4380 void LCodeGen::DoArrayShift(LArrayShift* instr) {
4381 ASSERT(ToRegister(instr->context()).is(rsi));
4382 ASSERT(ToRegister(instr->object()).is(rax));
4383 ASSERT(ToRegister(instr->result()).is(rax));
4384 ArrayShiftStub stub(isolate(), instr->hydrogen()->kind());
4385 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4386 }
4387
4388
4389 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4380 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4390 Register object = ToRegister(instr->object()); 4381 Register object = ToRegister(instr->object());
4391 Register temp = ToRegister(instr->temp()); 4382 Register temp = ToRegister(instr->temp());
4392 Label no_memento_found; 4383 Label no_memento_found;
4393 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); 4384 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
4394 DeoptimizeIf(equal, instr->environment()); 4385 DeoptimizeIf(equal, instr->environment());
4395 __ bind(&no_memento_found); 4386 __ bind(&no_memento_found);
4396 } 4387 }
4397 4388
4398 4389
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after
5694 __ bind(deferred->exit()); 5685 __ bind(deferred->exit());
5695 __ bind(&done); 5686 __ bind(&done);
5696 } 5687 }
5697 5688
5698 5689
5699 #undef __ 5690 #undef __
5700 5691
5701 } } // namespace v8::internal 5692 } } // namespace v8::internal
5702 5693
5703 #endif // V8_TARGET_ARCH_X64 5694 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/hydrogen.cc ('K') | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698