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

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

Issue 275883002: MIPS: Improve Array.shift() performance for small arrays. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: 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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-mips.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 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 4424 matching lines...) Expand 10 before | Expand all | Expand 10 after
4435 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; 4435 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE;
4436 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); 4436 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array);
4437 __ CallStub(&stub); 4437 __ CallStub(&stub);
4438 RecordSafepointWithRegistersAndDoubles( 4438 RecordSafepointWithRegistersAndDoubles(
4439 instr->pointer_map(), 0, Safepoint::kLazyDeopt); 4439 instr->pointer_map(), 0, Safepoint::kLazyDeopt);
4440 } 4440 }
4441 __ bind(&not_applicable); 4441 __ bind(&not_applicable);
4442 } 4442 }
4443 4443
4444 4444
4445 void LCodeGen::DoArrayShift(LArrayShift* instr) {
4446 ASSERT(ToRegister(instr->context()).is(cp));
4447 ASSERT(ToRegister(instr->object()).is(a0));
4448 ASSERT(ToRegister(instr->result()).is(v0));
4449 ArrayShiftStub stub(isolate(), instr->hydrogen()->kind());
4450 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4451 }
4452
4453
4445 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4454 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4446 Register object = ToRegister(instr->object()); 4455 Register object = ToRegister(instr->object());
4447 Register temp = ToRegister(instr->temp()); 4456 Register temp = ToRegister(instr->temp());
4448 Label no_memento_found; 4457 Label no_memento_found;
4449 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found, 4458 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found,
4450 ne, &no_memento_found); 4459 ne, &no_memento_found);
4451 DeoptimizeIf(al, instr->environment()); 4460 DeoptimizeIf(al, instr->environment());
4452 __ bind(&no_memento_found); 4461 __ bind(&no_memento_found);
4453 } 4462 }
4454 4463
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
5905 __ lw(result, FieldMemOperand(scratch, 5914 __ lw(result, FieldMemOperand(scratch,
5906 FixedArray::kHeaderSize - kPointerSize)); 5915 FixedArray::kHeaderSize - kPointerSize));
5907 __ bind(deferred->exit()); 5916 __ bind(deferred->exit());
5908 __ bind(&done); 5917 __ bind(&done);
5909 } 5918 }
5910 5919
5911 5920
5912 #undef __ 5921 #undef __
5913 5922
5914 } } // namespace v8::internal 5923 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698