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

Side by Side Diff: src/ia32/builtins-ia32.cc

Issue 601080: Change KeyedLoadIC interface on ia32 to take receiver and name in registers. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 10 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 | « no previous file | src/ia32/codegen-ia32.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 638
639 // Push the receiver. 639 // Push the receiver.
640 __ bind(&push_receiver); 640 __ bind(&push_receiver);
641 __ push(ebx); 641 __ push(ebx);
642 642
643 // Copy all arguments from the array to the stack. 643 // Copy all arguments from the array to the stack.
644 Label entry, loop; 644 Label entry, loop;
645 __ mov(eax, Operand(ebp, kIndexOffset)); 645 __ mov(eax, Operand(ebp, kIndexOffset));
646 __ jmp(&entry); 646 __ jmp(&entry);
647 __ bind(&loop); 647 __ bind(&loop);
648 __ mov(ecx, Operand(ebp, 2 * kPointerSize)); // load arguments 648 __ mov(edx, Operand(ebp, 2 * kPointerSize)); // load arguments
649 __ push(ecx);
650 __ push(eax);
651 649
652 // Use inline caching to speed up access to arguments. 650 // Use inline caching to speed up access to arguments.
653 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 651 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
654 __ call(ic, RelocInfo::CODE_TARGET); 652 __ call(ic, RelocInfo::CODE_TARGET);
655 // It is important that we do not have a test instruction after the 653 // It is important that we do not have a test instruction after the
656 // call. A test instruction after the call is used to indicate that 654 // call. A test instruction after the call is used to indicate that
657 // we have generated an inline version of the keyed load. In this 655 // we have generated an inline version of the keyed load. In this
658 // case, we know that we are not generating a test instruction next. 656 // case, we know that we are not generating a test instruction next.
659 657
660 // Remove IC arguments from the stack and push the nth argument. 658 // Push the nth argument.
661 __ add(Operand(esp), Immediate(2 * kPointerSize));
662 __ push(eax); 659 __ push(eax);
663 660
664 // Update the index on the stack and in register eax. 661 // Update the index on the stack and in register eax.
665 __ mov(eax, Operand(ebp, kIndexOffset)); 662 __ mov(eax, Operand(ebp, kIndexOffset));
666 __ add(Operand(eax), Immediate(1 << kSmiTagSize)); 663 __ add(Operand(eax), Immediate(1 << kSmiTagSize));
667 __ mov(Operand(ebp, kIndexOffset), eax); 664 __ mov(Operand(ebp, kIndexOffset), eax);
668 665
669 __ bind(&entry); 666 __ bind(&entry);
670 __ cmp(eax, Operand(ebp, kLimitOffset)); 667 __ cmp(eax, Operand(ebp, kLimitOffset));
671 __ j(not_equal, &loop); 668 __ j(not_equal, &loop);
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 // Dont adapt arguments. 1249 // Dont adapt arguments.
1253 // ------------------------------------------- 1250 // -------------------------------------------
1254 __ bind(&dont_adapt_arguments); 1251 __ bind(&dont_adapt_arguments);
1255 __ jmp(Operand(edx)); 1252 __ jmp(Operand(edx));
1256 } 1253 }
1257 1254
1258 1255
1259 #undef __ 1256 #undef __
1260 1257
1261 } } // namespace v8::internal 1258 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698