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

Side by Side Diff: src/arm/lithium-codegen-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 "arm/lithium-codegen-arm.h" 7 #include "arm/lithium-codegen-arm.h"
8 #include "arm/lithium-gap-resolver-arm.h" 8 #include "arm/lithium-gap-resolver-arm.h"
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "stub-cache.h" 10 #include "stub-cache.h"
(...skipping 4384 matching lines...) Expand 10 before | Expand all | Expand 10 after
4395 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; 4395 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
4396 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); 4396 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
4397 __ CallStub(&stub); 4397 __ CallStub(&stub);
4398 RecordSafepointWithRegistersAndDoubles( 4398 RecordSafepointWithRegistersAndDoubles(
4399 instr->pointer_map(), 0, Safepoint::kLazyDeopt); 4399 instr->pointer_map(), 0, Safepoint::kLazyDeopt);
4400 } 4400 }
4401 __ bind(&not_applicable); 4401 __ bind(&not_applicable);
4402 } 4402 }
4403 4403
4404 4404
4405 void LCodeGen::DoArrayShift(LArrayShift* instr) {
4406 ASSERT(ToRegister(instr->context()).is(cp));
4407 ASSERT(ToRegister(instr->object()).is(r0));
4408 ASSERT(ToRegister(instr->result()).is(r0));
4409 ArrayShiftStub stub(isolate(), instr->hydrogen()->kind());
4410 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4411 }
4412
4413
4414 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4405 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4415 Register object = ToRegister(instr->object()); 4406 Register object = ToRegister(instr->object());
4416 Register temp = ToRegister(instr->temp()); 4407 Register temp = ToRegister(instr->temp());
4417 Label no_memento_found; 4408 Label no_memento_found;
4418 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); 4409 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
4419 DeoptimizeIf(eq, instr->environment()); 4410 DeoptimizeIf(eq, instr->environment());
4420 __ bind(&no_memento_found); 4411 __ bind(&no_memento_found);
4421 } 4412 }
4422 4413
4423 4414
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
5820 __ ldr(result, FieldMemOperand(scratch, 5811 __ ldr(result, FieldMemOperand(scratch,
5821 FixedArray::kHeaderSize - kPointerSize)); 5812 FixedArray::kHeaderSize - kPointerSize));
5822 __ bind(deferred->exit()); 5813 __ bind(deferred->exit());
5823 __ bind(&done); 5814 __ bind(&done);
5824 } 5815 }
5825 5816
5826 5817
5827 #undef __ 5818 #undef __
5828 5819
5829 } } // namespace v8::internal 5820 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/code-stubs-arm64.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698