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

Side by Side Diff: src/x64/lithium-x64.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/x64/lithium-x64.h ('k') | test/mjsunit/array-shift2.js » ('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. 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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "lithium-allocator-inl.h" 9 #include "lithium-allocator-inl.h"
10 #include "x64/lithium-x64.h" 10 #include "x64/lithium-x64.h"
(...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2246 } else { 2246 } else {
2247 LOperand* object = UseFixed(instr->object(), rax); 2247 LOperand* object = UseFixed(instr->object(), rax);
2248 LOperand* context = UseFixed(instr->context(), rsi); 2248 LOperand* context = UseFixed(instr->context(), rsi);
2249 LTransitionElementsKind* result = 2249 LTransitionElementsKind* result =
2250 new(zone()) LTransitionElementsKind(object, context, NULL, NULL); 2250 new(zone()) LTransitionElementsKind(object, context, NULL, NULL);
2251 return MarkAsCall(result, instr); 2251 return MarkAsCall(result, instr);
2252 } 2252 }
2253 } 2253 }
2254 2254
2255 2255
2256 LInstruction* LChunkBuilder::DoArrayShift(HArrayShift* instr) {
2257 LOperand* object = UseFixed(instr->object(), rax);
2258 LOperand* context = UseFixed(instr->context(), rsi);
2259 LArrayShift* result = new(zone()) LArrayShift(context, object);
2260 return MarkAsCall(DefineFixed(result, rax), instr, CANNOT_DEOPTIMIZE_EAGERLY);
2261 }
2262
2263
2256 LInstruction* LChunkBuilder::DoTrapAllocationMemento( 2264 LInstruction* LChunkBuilder::DoTrapAllocationMemento(
2257 HTrapAllocationMemento* instr) { 2265 HTrapAllocationMemento* instr) {
2258 LOperand* object = UseRegister(instr->object()); 2266 LOperand* object = UseRegister(instr->object());
2259 LOperand* temp = TempRegister(); 2267 LOperand* temp = TempRegister();
2260 LTrapAllocationMemento* result = 2268 LTrapAllocationMemento* result =
2261 new(zone()) LTrapAllocationMemento(object, temp); 2269 new(zone()) LTrapAllocationMemento(object, temp);
2262 return AssignEnvironment(result); 2270 return AssignEnvironment(result);
2263 } 2271 }
2264 2272
2265 2273
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2585 LOperand* index = UseTempRegister(instr->index()); 2593 LOperand* index = UseTempRegister(instr->index());
2586 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2594 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2587 LInstruction* result = DefineSameAsFirst(load); 2595 LInstruction* result = DefineSameAsFirst(load);
2588 return AssignPointerMap(result); 2596 return AssignPointerMap(result);
2589 } 2597 }
2590 2598
2591 2599
2592 } } // namespace v8::internal 2600 } } // namespace v8::internal
2593 2601
2594 #endif // V8_TARGET_ARCH_X64 2602 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | test/mjsunit/array-shift2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698