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

Side by Side Diff: src/arm/virtual-frame-arm.cc

Issue 2024002: Pass key and receiver in registers for keyed load IC on ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/arm/virtual-frame-arm.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 EmitPop(r1); 316 EmitPop(r1);
317 SpillAll(); 317 SpillAll();
318 } 318 }
319 __ mov(r2, Operand(name)); 319 __ mov(r2, Operand(name));
320 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); 320 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
321 } 321 }
322 322
323 323
324 void VirtualFrame::CallKeyedLoadIC() { 324 void VirtualFrame::CallKeyedLoadIC() {
325 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 325 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
326 SpillAllButCopyTOSToR0(); 326 PopToR1R0();
327 SpillAll();
327 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); 328 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
328 } 329 }
329 330
330 331
331 void VirtualFrame::CallKeyedStoreIC() { 332 void VirtualFrame::CallKeyedStoreIC() {
332 ASSERT(SpilledScope::is_spilled()); 333 ASSERT(SpilledScope::is_spilled());
333 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); 334 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
334 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0); 335 CallCodeObject(ic, RelocInfo::CODE_TARGET, 0);
335 } 336 }
336 337
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 // r0 and r1 contains the same value. Prefer a state with r0 holding TOS. 526 // r0 and r1 contains the same value. Prefer a state with r0 holding TOS.
526 top_of_stack_state_ = R0_R1_TOS; 527 top_of_stack_state_ = R0_R1_TOS;
527 break; 528 break;
528 default: 529 default:
529 UNREACHABLE(); 530 UNREACHABLE();
530 } 531 }
531 element_count_++; 532 element_count_++;
532 } 533 }
533 534
534 535
536 void VirtualFrame::Dup2() {
537 if (SpilledScope::is_spilled()) {
538 __ ldr(ip, MemOperand(sp, kPointerSize));
539 EmitPush(ip);
540 __ ldr(ip, MemOperand(sp, kPointerSize));
541 EmitPush(ip);
542 } else {
543 switch (top_of_stack_state_) {
544 case NO_TOS_REGISTERS:
545 __ ldr(r0, MemOperand(sp, 0));
546 __ ldr(r1, MemOperand(sp, kPointerSize));
547 top_of_stack_state_ = R0_R1_TOS;
548 break;
549 case R0_TOS:
550 __ push(r0);
551 __ ldr(r1, MemOperand(sp, kPointerSize));
552 top_of_stack_state_ = R0_R1_TOS;
553 break;
554 case R1_TOS:
555 __ push(r1);
556 __ ldr(r0, MemOperand(sp, kPointerSize));
557 top_of_stack_state_ = R1_R0_TOS;
558 break;
559 case R0_R1_TOS:
560 __ push(r1);
561 __ push(r0);
562 top_of_stack_state_ = R0_R1_TOS;
563 break;
564 case R1_R0_TOS:
565 __ push(r0);
566 __ push(r1);
567 top_of_stack_state_ = R1_R0_TOS;
568 break;
569 default:
570 UNREACHABLE();
571 }
572 }
573 element_count_ += 2;
574 }
575
576
535 Register VirtualFrame::PopToRegister(Register but_not_to_this_one) { 577 Register VirtualFrame::PopToRegister(Register but_not_to_this_one) {
536 ASSERT(but_not_to_this_one.is(r0) || 578 ASSERT(but_not_to_this_one.is(r0) ||
537 but_not_to_this_one.is(r1) || 579 but_not_to_this_one.is(r1) ||
538 but_not_to_this_one.is(no_reg)); 580 but_not_to_this_one.is(no_reg));
539 AssertIsNotSpilled(); 581 AssertIsNotSpilled();
540 element_count_--; 582 element_count_--;
541 if (top_of_stack_state_ == NO_TOS_REGISTERS) { 583 if (top_of_stack_state_ == NO_TOS_REGISTERS) {
542 if (but_not_to_this_one.is(r0)) { 584 if (but_not_to_this_one.is(r0)) {
543 __ pop(r1); 585 __ pop(r1);
544 return r1; 586 return r1;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 default: 705 default:
664 UNREACHABLE(); 706 UNREACHABLE();
665 break; 707 break;
666 } 708 }
667 ASSERT(register_allocation_map_ == 0); // Not yet implemented. 709 ASSERT(register_allocation_map_ == 0); // Not yet implemented.
668 } 710 }
669 711
670 #undef __ 712 #undef __
671 713
672 } } // namespace v8::internal 714 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/virtual-frame-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698