| OLD | NEW |
| 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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 __ shr(eax, kSmiTagSize); | 455 __ shr(eax, kSmiTagSize); |
| 456 | 456 |
| 457 __ LeaveInternalFrame(); | 457 __ LeaveInternalFrame(); |
| 458 __ jmp(&patch_receiver); | 458 __ jmp(&patch_receiver); |
| 459 | 459 |
| 460 // Use the global receiver object from the called function as the receiver. | 460 // Use the global receiver object from the called function as the receiver. |
| 461 __ bind(&use_global_receiver); | 461 __ bind(&use_global_receiver); |
| 462 const int kGlobalIndex = | 462 const int kGlobalIndex = |
| 463 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 463 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
| 464 __ mov(ebx, FieldOperand(esi, kGlobalIndex)); | 464 __ mov(ebx, FieldOperand(esi, kGlobalIndex)); |
| 465 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalContextOffset)); |
| 466 __ mov(ebx, FieldOperand(ebx, kGlobalIndex)); |
| 465 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 467 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
| 466 | 468 |
| 467 __ bind(&patch_receiver); | 469 __ bind(&patch_receiver); |
| 468 __ mov(Operand(esp, eax, times_4, 0), ebx); | 470 __ mov(Operand(esp, eax, times_4, 0), ebx); |
| 469 | 471 |
| 470 __ bind(&done); | 472 __ bind(&done); |
| 471 } | 473 } |
| 472 | 474 |
| 473 // 4. Shift stuff one slot down the stack. | 475 // 4. Shift stuff one slot down the stack. |
| 474 { Label loop; | 476 { Label loop; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 __ push(ebx); | 601 __ push(ebx); |
| 600 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 602 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
| 601 __ mov(ebx, Operand(eax)); | 603 __ mov(ebx, Operand(eax)); |
| 602 __ jmp(&push_receiver); | 604 __ jmp(&push_receiver); |
| 603 | 605 |
| 604 // Use the current global receiver object as the receiver. | 606 // Use the current global receiver object as the receiver. |
| 605 __ bind(&use_global_receiver); | 607 __ bind(&use_global_receiver); |
| 606 const int kGlobalOffset = | 608 const int kGlobalOffset = |
| 607 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 609 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; |
| 608 __ mov(ebx, FieldOperand(esi, kGlobalOffset)); | 610 __ mov(ebx, FieldOperand(esi, kGlobalOffset)); |
| 611 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalContextOffset)); |
| 612 __ mov(ebx, FieldOperand(ebx, kGlobalOffset)); |
| 609 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 613 __ mov(ebx, FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
| 610 | 614 |
| 611 // Push the receiver. | 615 // Push the receiver. |
| 612 __ bind(&push_receiver); | 616 __ bind(&push_receiver); |
| 613 __ push(ebx); | 617 __ push(ebx); |
| 614 | 618 |
| 615 // Copy all arguments from the array to the stack. | 619 // Copy all arguments from the array to the stack. |
| 616 Label entry, loop; | 620 Label entry, loop; |
| 617 __ mov(eax, Operand(ebp, kIndexOffset)); | 621 __ mov(eax, Operand(ebp, kIndexOffset)); |
| 618 __ jmp(&entry); | 622 __ jmp(&entry); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 // Dont adapt arguments. | 1228 // Dont adapt arguments. |
| 1225 // ------------------------------------------- | 1229 // ------------------------------------------- |
| 1226 __ bind(&dont_adapt_arguments); | 1230 __ bind(&dont_adapt_arguments); |
| 1227 __ jmp(Operand(edx)); | 1231 __ jmp(Operand(edx)); |
| 1228 } | 1232 } |
| 1229 | 1233 |
| 1230 | 1234 |
| 1231 #undef __ | 1235 #undef __ |
| 1232 | 1236 |
| 1233 } } // namespace v8::internal | 1237 } } // namespace v8::internal |
| OLD | NEW |