Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 608 __ mov(eax, Operand(ebp, kIndexOffset)); | 608 __ mov(eax, Operand(ebp, kIndexOffset)); |
| 609 __ jmp(&entry); | 609 __ jmp(&entry); |
| 610 __ bind(&loop); | 610 __ bind(&loop); |
| 611 __ mov(ecx, Operand(ebp, 2 * kPointerSize)); // load arguments | 611 __ mov(ecx, Operand(ebp, 2 * kPointerSize)); // load arguments |
| 612 __ push(ecx); | 612 __ push(ecx); |
| 613 __ push(eax); | 613 __ push(eax); |
| 614 | 614 |
| 615 // Use inline caching to speed up access to arguments. | 615 // Use inline caching to speed up access to arguments. |
| 616 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); | 616 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); |
| 617 __ call(ic, RelocInfo::CODE_TARGET); | 617 __ call(ic, RelocInfo::CODE_TARGET); |
| 618 // Make sure that we do not have a test instruction after the | |
| 619 // call. A test instruction after the call is used to | |
| 620 // indicate that we have generated an inline version of the | |
| 621 // keyed load. | |
| 622 __ nop(); | |
|
Kasper Lund
2008/12/22 09:52:13
Is this really necessary? The next instruction her
Mads Ager (chromium)
2008/12/22 12:59:11
This is definitely not necessary. I alternated be
| |
| 618 | 623 |
| 619 // Remove IC arguments from the stack and push the nth argument. | 624 // Remove IC arguments from the stack and push the nth argument. |
| 620 __ add(Operand(esp), Immediate(2 * kPointerSize)); | 625 __ add(Operand(esp), Immediate(2 * kPointerSize)); |
| 621 __ push(eax); | 626 __ push(eax); |
| 622 | 627 |
| 623 // Update the index on the stack and in register eax. | 628 // Update the index on the stack and in register eax. |
| 624 __ mov(eax, Operand(ebp, kIndexOffset)); | 629 __ mov(eax, Operand(ebp, kIndexOffset)); |
| 625 __ add(Operand(eax), Immediate(1 << kSmiTagSize)); | 630 __ add(Operand(eax), Immediate(1 << kSmiTagSize)); |
| 626 __ mov(Operand(ebp, kIndexOffset), eax); | 631 __ mov(Operand(ebp, kIndexOffset), eax); |
| 627 | 632 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 750 // Dont adapt arguments. | 755 // Dont adapt arguments. |
| 751 // ------------------------------------------- | 756 // ------------------------------------------- |
| 752 __ bind(&dont_adapt_arguments); | 757 __ bind(&dont_adapt_arguments); |
| 753 __ jmp(Operand(edx)); | 758 __ jmp(Operand(edx)); |
| 754 } | 759 } |
| 755 | 760 |
| 756 | 761 |
| 757 #undef __ | 762 #undef __ |
| 758 | 763 |
| 759 } } // namespace v8::internal | 764 } } // namespace v8::internal |
| OLD | NEW |