| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Copy parameters into context if necessary. | 88 // Copy parameters into context if necessary. |
| 89 int num_parameters = fun->scope()->num_parameters(); | 89 int num_parameters = fun->scope()->num_parameters(); |
| 90 for (int i = 0; i < num_parameters; i++) { | 90 for (int i = 0; i < num_parameters; i++) { |
| 91 Slot* slot = fun->scope()->parameter(i)->slot(); | 91 Slot* slot = fun->scope()->parameter(i)->slot(); |
| 92 if (slot != NULL && slot->type() == Slot::CONTEXT) { | 92 if (slot != NULL && slot->type() == Slot::CONTEXT) { |
| 93 int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 93 int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
| 94 (num_parameters - 1 - i) * kPointerSize; | 94 (num_parameters - 1 - i) * kPointerSize; |
| 95 // Load parameter from stack. | 95 // Load parameter from stack. |
| 96 __ mov(eax, Operand(ebp, parameter_offset)); | 96 __ mov(eax, Operand(ebp, parameter_offset)); |
| 97 // Store it in the context | 97 // Store it in the context |
| 98 __ mov(Operand(esi, Context::SlotOffset(slot->index())), eax); | 98 Move(slot, eax, ecx, edx); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 Variable* arguments = fun->scope()->arguments()->AsVariable(); | 103 Variable* arguments = fun->scope()->arguments()->AsVariable(); |
| 104 if (arguments != NULL) { | 104 if (arguments != NULL) { |
| 105 // Function uses arguments object. | 105 // Function uses arguments object. |
| 106 Comment cmnt(masm_, "[ Allocate arguments object"); | 106 Comment cmnt(masm_, "[ Allocate arguments object"); |
| 107 if (function_in_register) { | 107 if (function_in_register) { |
| 108 __ push(edi); | 108 __ push(edi); |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 1882 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
| 1883 __ mov(Operand(esp, 0), edx); | 1883 __ mov(Operand(esp, 0), edx); |
| 1884 // And return. | 1884 // And return. |
| 1885 __ ret(0); | 1885 __ ret(0); |
| 1886 } | 1886 } |
| 1887 | 1887 |
| 1888 | 1888 |
| 1889 #undef __ | 1889 #undef __ |
| 1890 | 1890 |
| 1891 } } // namespace v8::internal | 1891 } } // namespace v8::internal |
| OLD | NEW |