| 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 // It is important that we do not have a test instruction after the |
| 619 // call. A test instruction after the call is used to indicate that |
| 620 // we have generated an inline version of the keyed load. In this |
| 621 // case, we know that we are not generating a test instruction next. |
| 618 | 622 |
| 619 // Remove IC arguments from the stack and push the nth argument. | 623 // Remove IC arguments from the stack and push the nth argument. |
| 620 __ add(Operand(esp), Immediate(2 * kPointerSize)); | 624 __ add(Operand(esp), Immediate(2 * kPointerSize)); |
| 621 __ push(eax); | 625 __ push(eax); |
| 622 | 626 |
| 623 // Update the index on the stack and in register eax. | 627 // Update the index on the stack and in register eax. |
| 624 __ mov(eax, Operand(ebp, kIndexOffset)); | 628 __ mov(eax, Operand(ebp, kIndexOffset)); |
| 625 __ add(Operand(eax), Immediate(1 << kSmiTagSize)); | 629 __ add(Operand(eax), Immediate(1 << kSmiTagSize)); |
| 626 __ mov(Operand(ebp, kIndexOffset), eax); | 630 __ mov(Operand(ebp, kIndexOffset), eax); |
| 627 | 631 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 // Dont adapt arguments. | 754 // Dont adapt arguments. |
| 751 // ------------------------------------------- | 755 // ------------------------------------------- |
| 752 __ bind(&dont_adapt_arguments); | 756 __ bind(&dont_adapt_arguments); |
| 753 __ jmp(Operand(edx)); | 757 __ jmp(Operand(edx)); |
| 754 } | 758 } |
| 755 | 759 |
| 756 | 760 |
| 757 #undef __ | 761 #undef __ |
| 758 | 762 |
| 759 } } // namespace v8::internal | 763 } } // namespace v8::internal |
| OLD | NEW |