OLD | NEW |
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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // instruction that gets patched and coverage code gets in the way. | 636 // instruction that gets patched and coverage code gets in the way. |
637 masm_->testl(rax, Immediate(-delta_to_patch_site)); | 637 masm_->testl(rax, Immediate(-delta_to_patch_site)); |
638 // Restore value (returned from store IC), key and receiver | 638 // Restore value (returned from store IC), key and receiver |
639 // registers. | 639 // registers. |
640 if (!value_.is(rax)) __ movq(value_, rax); | 640 if (!value_.is(rax)) __ movq(value_, rax); |
641 __ pop(key_); | 641 __ pop(key_); |
642 __ pop(receiver_); | 642 __ pop(receiver_); |
643 } | 643 } |
644 | 644 |
645 | 645 |
646 class CallFunctionStub: public CodeStub { | |
647 public: | |
648 CallFunctionStub(int argc, InLoopFlag in_loop) | |
649 : argc_(argc), in_loop_(in_loop) { } | |
650 | |
651 void Generate(MacroAssembler* masm); | |
652 | |
653 private: | |
654 int argc_; | |
655 InLoopFlag in_loop_; | |
656 | |
657 #ifdef DEBUG | |
658 void Print() { PrintF("CallFunctionStub (args %d)\n", argc_); } | |
659 #endif | |
660 | |
661 Major MajorKey() { return CallFunction; } | |
662 int MinorKey() { return argc_; } | |
663 InLoopFlag InLoop() { return in_loop_; } | |
664 }; | |
665 | |
666 | |
667 void CodeGenerator::CallApplyLazy(Property* apply, | 646 void CodeGenerator::CallApplyLazy(Property* apply, |
668 Expression* receiver, | 647 Expression* receiver, |
669 VariableProxy* arguments, | 648 VariableProxy* arguments, |
670 int position) { | 649 int position) { |
671 ASSERT(ArgumentsMode() == LAZY_ARGUMENTS_ALLOCATION); | 650 ASSERT(ArgumentsMode() == LAZY_ARGUMENTS_ALLOCATION); |
672 ASSERT(arguments->IsArguments()); | 651 ASSERT(arguments->IsArguments()); |
673 | 652 |
674 JumpTarget slow, done; | 653 JumpTarget slow, done; |
675 | 654 |
676 // Load the apply function onto the stack. This will usually | 655 // Load the apply function onto the stack. This will usually |
(...skipping 7196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7873 masm.GetCode(&desc); | 7852 masm.GetCode(&desc); |
7874 // Call the function from C++. | 7853 // Call the function from C++. |
7875 return FUNCTION_CAST<ModuloFunction>(buffer); | 7854 return FUNCTION_CAST<ModuloFunction>(buffer); |
7876 } | 7855 } |
7877 | 7856 |
7878 #endif | 7857 #endif |
7879 | 7858 |
7880 #undef __ | 7859 #undef __ |
7881 | 7860 |
7882 } } // namespace v8::internal | 7861 } } // namespace v8::internal |
OLD | NEW |